PxVisualizationParameter

Enum PxVisualizationParameter 

Source
#[repr(i32)]
pub enum PxVisualizationParameter {
Show 27 variants Scale = 0, WorldAxes = 1, BodyAxes = 2, BodyMassAxes = 3, BodyLinVelocity = 4, BodyAngVelocity = 5, ContactPoint = 6, ContactNormal = 7, ContactError = 8, ContactForce = 9, ActorAxes = 10, CollisionAabbs = 11, CollisionShapes = 12, CollisionAxes = 13, CollisionCompounds = 14, CollisionFnormals = 15, CollisionEdges = 16, CollisionStatic = 17, CollisionDynamic = 18, JointLocalFrames = 19, JointLimits = 20, CullBox = 21, MbpRegions = 22, SimulationMesh = 23, Sdf = 24, NumValues = 25, ForceDword = 2_147_483_647,
}
Expand description

Debug visualization parameters.

[PxVisualizationParameter::eSCALE] is the master switch for enabling visualization, please read the corresponding documentation for further details.

Variants§

§

Scale = 0

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 = 1

Visualize the world axes.

§

BodyAxes = 2

Visualize a bodies axes.

§

BodyMassAxes = 3

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 = 4

Visualize the bodies linear velocity.

§

BodyAngVelocity = 5

Visualize the bodies angular velocity.

§

ContactPoint = 6

Visualize contact points. Will enable contact information.

§

ContactNormal = 7

Visualize contact normals. Will enable contact information.

§

ContactError = 8

Visualize contact errors. Will enable contact information.

§

ContactForce = 9

Visualize Contact forces. Will enable contact information.

§

ActorAxes = 10

Visualize actor axes.

§

CollisionAabbs = 11

Visualize bounds (AABBs in world space)

§

CollisionShapes = 12

Shape visualization

§

CollisionAxes = 13

Shape axis visualization

§

CollisionCompounds = 14

Compound visualization (compound AABBs in world space)

§

CollisionFnormals = 15

Mesh & convex face normals

§

CollisionEdges = 16

Active edges for meshes

§

CollisionStatic = 17

Static pruning structures

§

CollisionDynamic = 18

Dynamic pruning structures

§

JointLocalFrames = 19

Joint local axes

§

JointLimits = 20

Joint limits

§

CullBox = 21

Visualize culling box

§

MbpRegions = 22

MBP regions

§

SimulationMesh = 23

Renders the simulation mesh instead of the collision mesh (only available for tetmeshes)

§

Sdf = 24

Renders the SDF of a mesh instead of the collision mesh (only available for triangle meshes with SDFs)

§

NumValues = 25

This is not a parameter, it just records the current number of parameters (as maximum(PxVisualizationParameter)+1) for use in loops.

§

ForceDword = 2_147_483_647

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

Source§

fn clone(&self) -> PxVisualizationParameter

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PxVisualizationParameter

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for PxVisualizationParameter

Source§

fn eq(&self, other: &PxVisualizationParameter) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for PxVisualizationParameter

Source§

impl Eq for PxVisualizationParameter

Source§

impl StructuralPartialEq for PxVisualizationParameter

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.