Panda3D
Loading...
Searching...
No Matches
physxRevoluteJointDesc.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 physxRevoluteJointDesc.h
10 * @author enn0x
11 * @date 2009-09-28
12 */
13
14#ifndef PHYSXREVOLUTEJOINTDESC_H
15#define PHYSXREVOLUTEJOINTDESC_H
16
17#include "pandabase.h"
18
19#include "physxJointDesc.h"
20#include "physx_includes.h"
21
22class PhysxSpringDesc;
23class PhysxMotorDesc;
25
26/**
27 * Descriptor class for distance joint. See PhysxRevoluteJoint.
28 */
29class EXPCL_PANDAPHYSX PhysxRevoluteJointDesc : public PhysxJointDesc {
30
31PUBLISHED:
32 INLINE PhysxRevoluteJointDesc();
33 INLINE ~PhysxRevoluteJointDesc();
34
35 INLINE void set_to_default();
36 INLINE bool is_valid() const;
37
38 void set_projection_distance(float distance);
39 void set_projection_angle(float angle);
40 void set_spring(const PhysxSpringDesc &spring);
41 void set_flag(PhysxRevoluteJointFlag flag, bool value);
42 void set_motor(const PhysxMotorDesc &motor);
43 void set_limit_low(const PhysxJointLimitDesc &low);
44 void set_limit_high(const PhysxJointLimitDesc &high);
45 void set_projection_mode(PhysxProjectionMode mode);
46
47 float get_projection_distance() const;
48 float get_projection_angle() const;
49 bool get_flag(PhysxRevoluteJointFlag flag) const;
50 PhysxSpringDesc get_spring() const;
52 PhysxJointLimitDesc get_limit_low() const;
53 PhysxJointLimitDesc get_limit_high() const;
54 PhysxProjectionMode get_projection_mode() const;
55
56public:
57 NxJointDesc *ptr() const { return (NxJointDesc *)&_desc; };
58 NxRevoluteJointDesc _desc;
59};
60
62
63#endif // PHYSXREVOLUTEJOINTDESC_H
Describes a joint limit.
Describes a joint motor.
float get_projection_angle() const
Return the angle beyond which the joint is projected.
void set_limit_high(const PhysxJointLimitDesc &high)
Sets optional limits for the angular motion of the joint.
void set_motor(const PhysxMotorDesc &motor)
Sets an optional joint motor.
void set_spring(const PhysxSpringDesc &spring)
Sets an aptional spring.
void set_limit_low(const PhysxJointLimitDesc &low)
Sets optional limits for the angular motion of the joint.
float get_projection_distance() const
Return the distance beyond which the joint is projected.
void set_to_default()
(re)sets the structure to the default.
bool is_valid() const
Returns true if the descriptor is valid.
PhysxMotorDesc get_motor() const
Sets an optional joint motor.
void set_projection_angle(float angle)
Sets the angle beyond which the joint is projected.
void set_projection_mode(PhysxProjectionMode mode)
Use this to enable joint projection.
void set_flag(PhysxRevoluteJointFlag flag, bool value)
Sets or clears a single RevoluteJointFlag flag.
void set_projection_distance(float distance)
Sets the distance beyond which the joint is projected.
Describes a joint spring.
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.