#[repr(i32)]
pub enum PxVisualizationParameter {
Show 27 variants
Scale,
WorldAxes,
BodyAxes,
BodyMassAxes,
BodyLinVelocity,
BodyAngVelocity,
ContactPoint,
ContactNormal,
ContactError,
ContactForce,
ActorAxes,
CollisionAabbs,
CollisionShapes,
CollisionAxes,
CollisionCompounds,
CollisionFnormals,
CollisionEdges,
CollisionStatic,
CollisionDynamic,
JointLocalFrames,
JointLimits,
CullBox,
MbpRegions,
SimulationMesh,
Sdf,
NumValues,
ForceDword,
}
Expand description
Debug visualization parameters.
[PxVisualizationParameter::eSCALE
] is the master switch for enabling visualization, please read the corresponding documentation
for further details.
Variants§
Scale
This overall visualization scale gets multiplied with the individual scales. Setting to zero ignores all visualizations. Default is 0.
The below settings permit the debug visualization of various simulation properties. The setting is either zero, in which case the property is not drawn. Otherwise it is a scaling factor that determines the size of the visualization widgets.
Only objects for which visualization is turned on using setFlag(eVISUALIZATION) are visualized (see [PxActorFlag::eVISUALIZATION
], #PxShapeFlag::eVISUALIZATION, …).
Contacts are visualized if they involve a body which is being visualized.
Default is 0.
Notes:
- to see any visualization, you have to set PxVisualizationParameter::eSCALE to nonzero first.
- the scale factor has been introduced because it’s difficult (if not impossible) to come up with a good scale for 3D vectors. Normals are normalized and their length is always 1. But it doesn’t mean we should render a line of length 1. Depending on your objects/scene, this might be completely invisible or extremely huge. That’s why the scale factor is here, to let you tune the length until it’s ok in your scene.
- however, things like collision shapes aren’t ambiguous. They are clearly defined for example by the triangles & polygons themselves, and there’s no point in scaling that. So the visualization widgets are only scaled when it makes sense.
Range: [0, PX_MAX_F32) Default: 0
WorldAxes
Visualize the world axes.
BodyAxes
Visualize a bodies axes.
BodyMassAxes
Visualize a body’s mass axes.
This visualization is also useful for visualizing the sleep state of bodies. Sleeping bodies are drawn in black, while awake bodies are drawn in white. If the body is sleeping and part of a sleeping group, it is drawn in red.
BodyLinVelocity
Visualize the bodies linear velocity.
BodyAngVelocity
Visualize the bodies angular velocity.
ContactPoint
Visualize contact points. Will enable contact information.
ContactNormal
Visualize contact normals. Will enable contact information.
ContactError
Visualize contact errors. Will enable contact information.
ContactForce
Visualize Contact forces. Will enable contact information.
ActorAxes
Visualize actor axes.
CollisionAabbs
Visualize bounds (AABBs in world space)
CollisionShapes
Shape visualization
CollisionAxes
Shape axis visualization
CollisionCompounds
Compound visualization (compound AABBs in world space)
CollisionFnormals
Mesh & convex face normals
CollisionEdges
Active edges for meshes
CollisionStatic
Static pruning structures
CollisionDynamic
Dynamic pruning structures
JointLocalFrames
Joint local axes
JointLimits
Joint limits
CullBox
Visualize culling box
MbpRegions
MBP regions
SimulationMesh
Renders the simulation mesh instead of the collision mesh (only available for tetmeshes)
Sdf
Renders the SDF of a mesh instead of the collision mesh (only available for triangle meshes with SDFs)
NumValues
This is not a parameter, it just records the current number of parameters (as maximum(PxVisualizationParameter)+1) for use in loops.
ForceDword
This is not a parameter, it just records the current number of parameters (as maximum(PxVisualizationParameter)+1) for use in loops.
Trait Implementations§
source§impl Clone for PxVisualizationParameter
impl Clone for PxVisualizationParameter
source§fn clone(&self) -> PxVisualizationParameter
fn clone(&self) -> PxVisualizationParameter
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PxVisualizationParameter
impl Debug for PxVisualizationParameter
source§impl PartialEq<PxVisualizationParameter> for PxVisualizationParameter
impl PartialEq<PxVisualizationParameter> for PxVisualizationParameter
source§fn eq(&self, other: &PxVisualizationParameter) -> bool
fn eq(&self, other: &PxVisualizationParameter) -> bool
self
and other
values to be equal, and is used
by ==
.