| 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_PX_PARTICLESYSTEM |
| 15 | #define PX_PHYSICS_PX_PARTICLESYSTEM |
| 16 | /** \addtogroup particles |
| 17 | @{ |
| 18 | */ |
| 19 | |
| 20 | #include "particles/PxParticleBase.h" |
| 21 | |
| 22 | #ifndef PX_DOXYGEN |
| 23 | namespace physx |
| 24 | { |
| 25 | #endif |
| 26 | |
| 27 | /** |
| 28 | \brief The particle system class represents the main module for particle based simulation. |
| 29 | |
| 30 | This class inherits the properties of the PxParticleBase class. |
| 31 | |
| 32 | The particle system class manages a set of particles. Particles can be created, released and updated directly through the API. |
| 33 | When a particle is created the user gets an id for it which can be used to address the particle until it is released again. |
| 34 | |
| 35 | Particles collide with static and dynamic shapes. They are also affected by the scene gravity and a user force, |
| 36 | as well as global velocity damping. When a particle collides, a particle flag is raised corresponding to the type of |
| 37 | actor, static or dynamic, it collided with. Additionally a shape can be flagged as a drain (See PxShapeFlag), in order to get a corresponding |
| 38 | particle flag raised when a collision occurs. This information can be used to delete particles. |
| 39 | |
| 40 | The particles of a particle system don't collide with each other. In order to simulate particle-particle interactions use the |
| 41 | subclass PxParticleFluid. |
| 42 | |
| 43 | @see PxParticleBase, PxParticleReadData, PxPhysics.createParticleSystem |
| 44 | */ |
| 45 | class PxParticleSystem : public PxParticleBase |
| 46 | { |
| 47 | public: |
| 48 | |
| 49 | virtual const char* getConcreteTypeName() const { return "PxParticleSystem" ; } |
| 50 | |
| 51 | /************************************************************************************************/ |
| 52 | |
| 53 | protected: |
| 54 | PX_INLINE PxParticleSystem(PxType concreteType, PxBaseFlags baseFlags) : PxParticleBase(concreteType, baseFlags) {} |
| 55 | PX_INLINE PxParticleSystem(PxBaseFlags baseFlags) : PxParticleBase(baseFlags) {} |
| 56 | virtual ~PxParticleSystem() {} |
| 57 | virtual bool isKindOf(const char* name) const { return !strcmp("PxParticleSystem" , name) || PxParticleBase::isKindOf(name); } |
| 58 | |
| 59 | }; |
| 60 | |
| 61 | PX_DEPRECATED PX_INLINE PxParticleSystem* PxActor::isParticleSystem() { return is<PxParticleSystem>(); } |
| 62 | PX_DEPRECATED PX_INLINE const PxParticleSystem* PxActor::isParticleSystem() const { return is<PxParticleSystem>(); } |
| 63 | |
| 64 | |
| 65 | #ifndef PX_DOXYGEN |
| 66 | } // namespace physx |
| 67 | #endif |
| 68 | |
| 69 | /** @} */ |
| 70 | #endif |
| 71 | |