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_DEBUG_VISUALIZATION_PARAMETER |
15 | #define PX_PHYSICS_NX_DEBUG_VISUALIZATION_PARAMETER |
16 | |
17 | /** \addtogroup physics |
18 | @{ |
19 | */ |
20 | |
21 | #ifndef PX_DOXYGEN |
22 | namespace physx |
23 | { |
24 | #endif |
25 | |
26 | /* |
27 | NOTE: Parameters should NOT be conditionally compiled out. Even if a particular feature is not available. |
28 | Otherwise the parameter values get shifted about and the numeric values change per platform. This causes problems |
29 | when trying to serialize parameters. |
30 | |
31 | New parameters should also be added to the end of the list for this reason. Also make sure to update |
32 | eNUM_VALUES, which should be one higher than the maximum value in the enum. |
33 | */ |
34 | |
35 | /** |
36 | \brief Debug visualization parameters. |
37 | |
38 | #PxVisualizationParameter::eSCALE is the master switch for enabling visualization, please read the corresponding documentation |
39 | for further details. |
40 | |
41 | @see PxScene.setVisualizationParameter() PxScene.getVisualizationParameter() PxScene.getRenderBuffer() |
42 | */ |
43 | struct PxVisualizationParameter |
44 | { |
45 | enum Enum |
46 | { |
47 | /* RigidBody-related parameters */ |
48 | |
49 | /** |
50 | \brief This overall visualization scale gets multiplied with the individual scales. Setting to zero ignores all visualizations. Default is 0. |
51 | |
52 | The below settings permit the debug visualization of various simulation properties. |
53 | The setting is either zero, in which case the property is not drawn. Otherwise it is a scaling factor |
54 | that determines the size of the visualization widgets. |
55 | |
56 | Only objects for which visualization is turned on using setFlag(eVISUALIZATION) are visualized (see #PxActorFlag::eVISUALIZATION, #PxShapeFlag::eVISUALIZATION, ...). |
57 | Contacts are visualized if they involve a body which is being visualized. |
58 | Default is 0. |
59 | |
60 | Notes: |
61 | - to see any visualization, you have to set PxVisualizationParameter::eSCALE to nonzero first. |
62 | - the scale factor has been introduced because it's difficult (if not impossible) to come up with a |
63 | good scale for 3D vectors. Normals are normalized and their length is always 1. But it doesn't mean |
64 | we should render a line of length 1. Depending on your objects/scene, this might be completely invisible |
65 | or extremely huge. That's why the scale factor is here, to let you tune the length until it's ok in |
66 | your scene. |
67 | - however, things like collision shapes aren't ambiguous. They are clearly defined for example by the |
68 | triangles & polygons themselves, and there's no point in scaling that. So the visualization widgets |
69 | are only scaled when it makes sense. |
70 | |
71 | <b>Range:</b> [0, PX_MAX_F32)<br> |
72 | <b>Default:</b> 0 |
73 | */ |
74 | eSCALE, |
75 | |
76 | |
77 | /** |
78 | \brief Visualize the world axes. |
79 | */ |
80 | eWORLD_AXES, |
81 | |
82 | /* Body visualizations */ |
83 | |
84 | /** |
85 | \brief Visualize a bodies axes. |
86 | |
87 | @see PxActor.globalPose PxActor |
88 | */ |
89 | eBODY_AXES, |
90 | |
91 | /** |
92 | \brief Visualize a body's mass axes. |
93 | |
94 | This visualization is also useful for visualizing the sleep state of bodies. Sleeping bodies are drawn in |
95 | black, while awake bodies are drawn in white. If the body is sleeping and part of a sleeping group, it is |
96 | drawn in red. |
97 | |
98 | @see PxBodyDesc.massLocalPose PxActor |
99 | */ |
100 | eBODY_MASS_AXES, |
101 | |
102 | /** |
103 | \brief Visualize the bodies linear velocity. |
104 | |
105 | @see PxBodyDesc.linearVelocity PxActor |
106 | */ |
107 | eBODY_LIN_VELOCITY, |
108 | |
109 | /** |
110 | \brief Visualize the bodies angular velocity. |
111 | |
112 | @see PxBodyDesc.angularVelocity PxActor |
113 | */ |
114 | eBODY_ANG_VELOCITY, |
115 | |
116 | |
117 | /** |
118 | \brief Visualize the bodies joint projection group. |
119 | |
120 | @see PxBodyDesc.angularVelocity PxActor |
121 | */ |
122 | eBODY_JOINT_GROUPS, |
123 | |
124 | /* Contact visualisations */ |
125 | |
126 | /** |
127 | \brief Visualize contact points. Will enable contact information. |
128 | */ |
129 | eCONTACT_POINT, |
130 | |
131 | /** |
132 | \brief Visualize contact normals. Will enable contact information. |
133 | */ |
134 | eCONTACT_NORMAL, |
135 | |
136 | /** |
137 | \brief Visualize contact errors. Will enable contact information. |
138 | */ |
139 | eCONTACT_ERROR, |
140 | |
141 | /** |
142 | \brief Visualize Contact forces. Will enable contact information. |
143 | */ |
144 | eCONTACT_FORCE, |
145 | |
146 | |
147 | /** |
148 | \brief Visualize actor axes. |
149 | |
150 | @see PxRigidStatic PxRigidDynamic PxArticulationLink |
151 | */ |
152 | eACTOR_AXES, |
153 | |
154 | |
155 | /** |
156 | \brief Visualize bounds (AABBs in world space) |
157 | */ |
158 | eCOLLISION_AABBS, |
159 | |
160 | /** |
161 | \brief Shape visualization |
162 | |
163 | @see PxShape |
164 | */ |
165 | eCOLLISION_SHAPES, |
166 | |
167 | /** |
168 | \brief Shape axis visualization |
169 | |
170 | @see PxShape |
171 | */ |
172 | eCOLLISION_AXES, |
173 | |
174 | /** |
175 | \brief Compound visualization (compound AABBs in world space) |
176 | */ |
177 | eCOLLISION_COMPOUNDS, |
178 | |
179 | /** |
180 | \brief Mesh & convex face normals |
181 | |
182 | @see PxTriangleMesh PxConvexMesh |
183 | */ |
184 | eCOLLISION_FNORMALS, |
185 | |
186 | /** |
187 | \brief Active edges for meshes |
188 | |
189 | @see PxTriangleMesh |
190 | */ |
191 | eCOLLISION_EDGES, |
192 | |
193 | /** |
194 | \brief Static pruning structures |
195 | */ |
196 | eCOLLISION_STATIC, |
197 | |
198 | /** |
199 | \brief Dynamic pruning structures |
200 | */ |
201 | eCOLLISION_DYNAMIC, |
202 | |
203 | /** |
204 | \brief Visualizes pairwise state. |
205 | |
206 | */ |
207 | eCOLLISION_PAIRS, |
208 | |
209 | /** |
210 | \brief Joint local axes |
211 | */ |
212 | eJOINT_LOCAL_FRAMES, |
213 | |
214 | /** |
215 | \brief Joint limits |
216 | */ |
217 | eJOINT_LIMITS, |
218 | |
219 | |
220 | /* ParticleSystem visualizations */ |
221 | |
222 | /** |
223 | \brief Particle position visualization. |
224 | */ |
225 | ePARTICLE_SYSTEM_POSITION, |
226 | |
227 | /** |
228 | \brief Particle velocity visualization. |
229 | */ |
230 | ePARTICLE_SYSTEM_VELOCITY, |
231 | |
232 | /** |
233 | \brief Particle collision normal visualization. |
234 | */ |
235 | ePARTICLE_SYSTEM_COLLISION_NORMAL, |
236 | |
237 | /** |
238 | \brief ParticleSystem AABB visualization. |
239 | */ |
240 | ePARTICLE_SYSTEM_BOUNDS, |
241 | |
242 | /** |
243 | \brief Particle grid visualization. |
244 | */ |
245 | ePARTICLE_SYSTEM_GRID, |
246 | |
247 | /** |
248 | \brief Particle system broad phase bounds. |
249 | */ |
250 | ePARTICLE_SYSTEM_BROADPHASE_BOUNDS, |
251 | |
252 | /** |
253 | \brief ParticleSystem maximum motion distance visualization. |
254 | */ |
255 | ePARTICLE_SYSTEM_MAX_MOTION_DISTANCE, |
256 | |
257 | /* Visualization subscene (culling box) */ |
258 | |
259 | /** |
260 | \brief Debug visualization culling |
261 | */ |
262 | eCULL_BOX, |
263 | |
264 | /** |
265 | \brief Cloth fabric vertical sets |
266 | */ |
267 | eCLOTH_VERTICAL, |
268 | /** |
269 | \brief Cloth fabric horizontal sets |
270 | */ |
271 | eCLOTH_HORIZONTAL, |
272 | /** |
273 | \brief Cloth fabric bending sets |
274 | */ |
275 | eCLOTH_BENDING, |
276 | /** |
277 | \brief Cloth fabric shearing sets |
278 | */ |
279 | eCLOTH_SHEARING, |
280 | /** |
281 | \brief Cloth virtual particles |
282 | */ |
283 | eCLOTH_VIRTUAL_PARTICLES, |
284 | |
285 | /** |
286 | \brief MBP regions |
287 | */ |
288 | eMBP_REGIONS, |
289 | |
290 | /** |
291 | \brief This is not a parameter, it just records the current number of parameters (as maximum(PxVisualizationParameter)+1) for use in loops. |
292 | */ |
293 | eNUM_VALUES, |
294 | |
295 | eFORCE_DWORD = 0x7fffffff |
296 | }; |
297 | }; |
298 | |
299 | #ifndef PX_DOXYGEN |
300 | } // namespace physx |
301 | #endif |
302 | |
303 | /** @} */ |
304 | #endif |
305 | |