PxDistanceJoint.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved.
3  *
4  * NVIDIA CORPORATION and its licensors retain all intellectual property
5  * and proprietary rights in and to this software, related documentation
6  * and any modifications thereto. Any use, reproduction, disclosure or
7  * distribution of this software and related documentation without an express
8  * license agreement from NVIDIA CORPORATION is strictly prohibited.
9  */
10 // Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
11 // Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
12 
13 
14 #ifndef PX_DISTANCEJOINT_H
15 #define PX_DISTANCEJOINT_H
16 
20 #include "extensions/PxJoint.h"
21 
22 #ifndef PX_DOXYGEN
23 namespace physx
24 {
25 #endif
26 
27 class PxDistanceJoint;
28 
42  PxRigidActor* actor0, const PxTransform& localFrame0,
43  PxRigidActor* actor1, const PxTransform& localFrame1);
44 
45 
53 {
54  enum Enum
55  {
56  eMAX_DISTANCE_ENABLED = 1<<1,
57  eMIN_DISTANCE_ENABLED = 1<<2,
58  eSPRING_ENABLED = 1<<3
59  };
60 };
61 
64 
65 
70 class PxDistanceJoint : public PxJoint
71 {
72 public:
73 
74 
79  virtual PxReal getDistance() const = 0;
80 
94  virtual void setMinDistance(PxReal distance) = 0;
95 
104  virtual PxReal getMinDistance() const = 0;
105 
106 
120  virtual void setMaxDistance(PxReal distance) = 0;
121 
130  virtual PxReal getMaxDistance() const = 0;
131 
132 
141  virtual void setTolerance(PxReal tolerance) = 0;
142 
143 
157  virtual PxReal getTolerance() const = 0;
158 
172  virtual void setStiffness(PxReal stiffness) = 0;
173 
182  virtual PxReal getStiffness() const = 0;
183 
184 
198  virtual void setDamping(PxReal damping) = 0;
199 
200 
209  virtual PxReal getDamping() const = 0;
210 
221  virtual void setDistanceJointFlags(PxDistanceJointFlags flags) = 0;
222 
223 
233  virtual void setDistanceJointFlag(PxDistanceJointFlag::Enum flag, bool value) = 0;
234 
243  virtual PxDistanceJointFlags getDistanceJointFlags(void) const = 0;
244 
248  virtual const char* getConcreteTypeName() const { return "PxDistanceJoint"; }
249 
250 protected:
251 
252  //serialization
253 
257  PX_INLINE PxDistanceJoint(PxType concreteType, PxBaseFlags baseFlags) : PxJoint(concreteType, baseFlags) {}
258 
262  PX_INLINE PxDistanceJoint(PxBaseFlags baseFlags) : PxJoint(baseFlags) {}
263 
267  virtual bool isKindOf(const char* name) const { return !strcmp("PxDistanceJoint", name) || PxJoint::isKindOf(name); }
268 
269  //~serialization
270 };
271 
272 #ifndef PX_DOXYGEN
273 } // namespace physx
274 #endif
275 
277 #endif


Copyright © 2008-2015 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com