Panda3D
Loading...
Searching...
No Matches
physxPulleyJointDesc.h
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file physxPulleyJointDesc.h
10 * @author enn0x
11 * @date 2009-09-28
12 */
13
14#ifndef PHYSXPULLEYJOINTDESC_H
15#define PHYSXPULLEYJOINTDESC_H
16
17#include "pandabase.h"
18
19#include "physxJointDesc.h"
20#include "physx_includes.h"
21
22class PhysxMotorDesc;
23
24/**
25 * Descriptor class for distance joint. See PhysxPulleyJoint.
26 */
27class EXPCL_PANDAPHYSX PhysxPulleyJointDesc : public PhysxJointDesc {
28
29PUBLISHED:
30 INLINE PhysxPulleyJointDesc();
31 INLINE ~PhysxPulleyJointDesc();
32
33 INLINE void set_to_default();
34 INLINE bool is_valid() const;
35
36 void set_distance(float distance);
37 void set_stiffness(float stiffness);
38 void set_ratio(float ration);
39 void set_pulley(unsigned int idx, const LPoint3f pos);
40 void set_motor(const PhysxMotorDesc &motor);
41 void set_flag(PhysxPulleyJointFlag flag, bool value);
42
43 float get_distance() const;
44 float get_stiffness() const;
45 float get_ratio() const;
46 bool get_flag(PhysxPulleyJointFlag flag) const;
47 LPoint3f get_pulley(unsigned int idx) const;
48 PhysxMotorDesc get_motor() const;
49
50public:
51 NxJointDesc *ptr() const { return (NxJointDesc *)&_desc; };
52 NxPulleyJointDesc _desc;
53};
54
56
57#endif // PHYSXPULLEYJOINTDESC_H
Describes a joint motor.
void set_distance(float distance)
Sets the rest length of the rope connecting the two objects.
void set_to_default()
(re)sets the structure to the default.
void set_pulley(unsigned int idx, const LPoint3f pos)
Sets the suspension points of two bodies in world space.
void set_ratio(float ration)
Sets the transmission ratio.
void set_flag(PhysxPulleyJointFlag flag, bool value)
Sets or clears a single PulleyJointFlag flag.
bool is_valid() const
Returns true if the descriptor is valid.
void set_motor(const PhysxMotorDesc &motor)
Sets an optional joint motor.
void set_stiffness(float stiffness)
Sets how stiff the constraint is, between 0 and 1 (stiffest)
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.