Panda3D
Loading...
Searching...
No Matches
physxDistanceJointDesc.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 physxDistanceJointDesc.h
10 * @author enn0x
11 * @date 2009-09-28
12 */
13
14#ifndef PHYSXDISTANCEJOINTDESC_H
15#define PHYSXDISTANCEJOINTDESC_H
16
17#include "pandabase.h"
18
19#include "physxJointDesc.h"
20#include "physx_includes.h"
21
22class PhysxSpringDesc;
23
24/**
25 * Descriptor class for distance joint. See PhysxDistanceJoint.
26 */
27class EXPCL_PANDAPHYSX PhysxDistanceJointDesc : public PhysxJointDesc {
28
29PUBLISHED:
30 INLINE PhysxDistanceJointDesc();
31 INLINE ~PhysxDistanceJointDesc();
32
33 INLINE void set_to_default();
34 INLINE bool is_valid() const;
35
36 void set_max_distance(float distance);
37 void set_min_distance(float distance);
38 void set_spring(const PhysxSpringDesc &spring);
39 void set_flag(PhysxDistanceJointFlag flag, bool value);
40
41 float get_max_distance() const;
42 float get_min_distance() const;
43 bool get_flag(PhysxDistanceJointFlag flag) const;
44 PhysxSpringDesc get_spring() const;
45
46public:
47 NxJointDesc *ptr() const { return (NxJointDesc *)&_desc; };
48 NxDistanceJointDesc _desc;
49};
50
52
53#endif // PHYSXDISTANCEJOINTDESC_H
void set_max_distance(float distance)
Sets the maximum rest length of the rope or rod between the two anchor points.
bool get_flag(PhysxDistanceJointFlag flag) const
Return a single DistanceJointFlag flag.
void set_to_default()
(re)sets the structure to the default.
bool is_valid() const
Returns true if the descriptor is valid.
void set_spring(const PhysxSpringDesc &spring)
Makes the joint springy.
void set_min_distance(float distance)
Sets the minimum rest length of the rope or rod between the two anchor points.
void set_flag(PhysxDistanceJointFlag flag, bool value)
Sets or clears a single DistanceJointFlag flag.
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.