PxActor.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_PHYSICS_NX_ACTOR
15 #define PX_PHYSICS_NX_ACTOR
16 
21 #include "PxPhysXConfig.h"
22 #include "foundation/PxBounds3.h"
23 #include "PxClient.h"
24 #include "common/PxBase.h"
25 
26 #ifndef PX_DOXYGEN
27 namespace physx
28 {
29 #endif
30 
31 class PxRigidActor;
32 class PxRigidBody;
33 class PxRigidStatic;
34 class PxRigidDynamic;
35 class PxParticleBase;
36 class PxParticleSystem;
37 class PxParticleFluid;
38 class PxArticulation;
40 
41 
43 typedef PxU8 PxDominanceGroup; // Must be < 32, PxU8.
44 
51 {
52  enum Enum
53  {
59  eVISUALIZATION = (1<<0),
60 
64  eDISABLE_GRAVITY = (1<<1),
65 
71  eSEND_SLEEP_NOTIFIES = (1<<2),
72 
89  eDISABLE_SIMULATION = (1<<3)
90 
91  };
92 };
93 
101 
102 
107 {
108  enum Enum
109  {
115 
121 
122 #if PX_USE_PARTICLE_SYSTEM_API
123 
128 
134 #endif
135 
141 
142 #if PX_USE_CLOTH_API
143 
148 #endif
149 
150  //brief internal use only!
152 
153  eACTOR_FORCE_DWORD = 0x7fffffff
154  };
155 };
156 
163 class PxActor : public PxBase
164 {
165 public:
175  virtual void release() = 0;
176 
184  virtual PxActorType::Enum getType() const = 0;
185 
186 
198  PX_DEPRECATED PX_INLINE PxRigidStatic* isRigidStatic();
199  PX_DEPRECATED PX_INLINE const PxRigidStatic* isRigidStatic() const;
200  PX_DEPRECATED PX_INLINE PxRigidDynamic* isRigidDynamic();
201  PX_DEPRECATED PX_INLINE const PxRigidDynamic* isRigidDynamic() const;
202  PX_DEPRECATED PX_INLINE PxParticleSystem* isParticleSystem();
203  PX_DEPRECATED PX_INLINE const PxParticleSystem* isParticleSystem() const;
204  PX_DEPRECATED PX_INLINE PxParticleFluid* isParticleFluid();
205  PX_DEPRECATED PX_INLINE const PxParticleFluid* isParticleFluid() const;
206  PX_DEPRECATED PX_INLINE PxArticulationLink* isArticulationLink();
207  PX_DEPRECATED PX_INLINE const PxArticulationLink* isArticulationLink() const;
208  PX_DEPRECATED PX_INLINE PxCloth* isCloth();
209  PX_DEPRECATED PX_INLINE const PxCloth* isCloth() const;
210 
211  PX_DEPRECATED PX_INLINE PxRigidActor* isRigidActor();
212  PX_DEPRECATED PX_INLINE const PxRigidActor* isRigidActor() const;
213  PX_DEPRECATED PX_INLINE PxRigidBody* isRigidBody();
214  PX_DEPRECATED PX_INLINE const PxRigidBody* isRigidBody() const;
215  PX_DEPRECATED PX_INLINE PxParticleBase* isParticleBase();
216  PX_DEPRECATED PX_INLINE const PxParticleBase* isParticleBase() const;
217 
225  virtual PxScene* getScene() const = 0;
226 
227  // Runtime modifications
228 
241  virtual void setName(const char* name) = 0;
242 
250  virtual const char* getName() const = 0;
251 
261  virtual PxBounds3 getWorldBounds(float inflation=1.01f) const = 0;
262 
277  virtual void setActorFlag(PxActorFlag::Enum flag, bool value) = 0;
284  virtual void setActorFlags( PxActorFlags inFlags ) = 0;
285 
295  virtual PxActorFlags getActorFlags() const = 0;
296 
313  virtual void setDominanceGroup(PxDominanceGroup dominanceGroup) = 0;
314 
322  virtual PxDominanceGroup getDominanceGroup() const = 0;
323 
324 
334  virtual void setOwnerClient( PxClientID inClient ) = 0;
335 
343  virtual PxClientID getOwnerClient() const = 0;
344 
358  virtual void setClientBehaviorFlags(PxActorClientBehaviorFlags) = 0;
359 
367  virtual PxActorClientBehaviorFlags getClientBehaviorFlags() const = 0;
368 
376  virtual PxAggregate* getAggregate() const = 0;
377 
378  //public variables:
379  void* userData;
380 
381 
382 protected:
383  PX_INLINE PxActor(PxType concreteType, PxBaseFlags baseFlags) : PxBase(concreteType, baseFlags), userData(NULL) {}
384  PX_INLINE PxActor(PxBaseFlags baseFlags) : PxBase(baseFlags) {}
385  virtual ~PxActor() {}
386  virtual bool isKindOf(const char* name) const { return !strcmp("PxActor", name) || PxBase::isKindOf(name); }
387 
388 
389 };
390 
391 #ifndef PX_DOXYGEN
392 } // namespace physx
393 #endif
394 
396 #endif


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