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_PARTICLE_BASE_FLAG
15#define PX_PARTICLE_BASE_FLAG
16/** \addtogroup particles
17 @{
18*/
19
20#include "foundation/PxFlags.h"
21
22#ifndef PX_DOXYGEN
23namespace physx
24{
25#endif
26
27/**
28\brief ParticleBase flags
29*/
30struct PxParticleBaseFlag
31{
32 enum Enum
33 {
34 /**
35 \brief Enable/disable two way collision of particles with the rigid body scene.
36 In either case, particles are influenced by colliding rigid bodies.
37 If eCOLLISION_TWOWAY is not set, rigid bodies are not influenced by
38 colliding particles. Use particleMass to
39 control the strength of the feedback force on rigid bodies.
40
41 \note Switching this flag while the particle system is part of a scene might have a negative impact on performance.
42 */
43 eCOLLISION_TWOWAY = (1<<0),
44
45 /**
46 \brief Enable/disable collision of particles with dynamic actors.
47 The flag can be turned off as a hint to the sdk to save memory space and
48 execution time. In principle any collisions can be turned off using filters
49 but without or reduced memory and performance benefits.
50
51 \note Switching this flag while the particle system is part of a scene might have a negative impact on performance.
52 */
53 eCOLLISION_WITH_DYNAMIC_ACTORS = (1<<1),
54
55 /**
56 \brief Enable/disable execution of particle simulation.
57 */
58 eENABLED = (1<<2),
59
60 /**
61 \brief Defines whether the particles of this particle system should be projected to a plane.
62 This can be used to build 2D applications, for instance. The projection
63 plane is defined by the parameter projectionPlaneNormal and projectionPlaneDistance.
64 */
65 ePROJECT_TO_PLANE = (1<<3),
66
67 /**
68 \brief Enable/disable per particle rest offsets.
69 Per particle rest offsets can be used to support particles having different sizes with
70 respect to collision.
71
72 \note This configuration cannot be changed after the particle system was created.
73 */
74 ePER_PARTICLE_REST_OFFSET = (1<<4),
75
76 /**
77 \brief Ename/disable per particle collision caches.
78 Per particle collision caches improve collision detection performance at the cost of increased
79 memory usage.
80
81 \note Switching this flag while the particle system is part of a scene might have a negative impact on performance.
82 */
83 ePER_PARTICLE_COLLISION_CACHE_HINT = (1<<5),
84
85 /**
86 \brief Enable/disable GPU acceleration.
87 Enabling GPU acceleration might fail. In this case the eGPU flag is switched off.
88
89 \note Switching this flag while the particle system is part of a scene might have a negative impact on performance.
90
91 @see PxScene.removeActor() PxScene.addActor() PxParticleGpu
92 */
93 eGPU = (1<<6)
94 };
95};
96
97
98/**
99\brief collection of set bits defined in PxParticleBaseFlag.
100
101@see PxParticleBaseFlag
102*/
103typedef PxFlags<PxParticleBaseFlag::Enum,PxU16> PxParticleBaseFlags;
104PX_FLAGS_OPERATORS(PxParticleBaseFlag::Enum,PxU16)
105
106#ifndef PX_DOXYGEN
107} // namespace physx
108#endif
109
110/** @} */
111#endif
112