142 lines
5.6 KiB
Plaintext
142 lines
5.6 KiB
Plaintext
---
|
|
source: physx-sys/pxbind/tests/enums.rs
|
|
expression: "gen_enums(\"flags.h\",\n &[\"PxActorCacheFlag\", \"PxArticulationCacheFlag\", \"PxShapeFlag\",\n \"PxArticulationSensorFlag\"]).unwrap()"
|
|
---
|
|
/// These flags determine what data is read or written to the internal articulation data via cache.
|
|
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
|
#[repr(i32)]
|
|
pub enum PxArticulationCacheFlag {
|
|
/// The joint velocities, see PxArticulationCache::jointVelocity.
|
|
Velocity = 1,
|
|
/// The joint accelerations, see PxArticulationCache::jointAcceleration.
|
|
Acceleration = 2,
|
|
/// The joint positions, see PxArticulationCache::jointPosition.
|
|
Position = 4,
|
|
/// The joint forces, see PxArticulationCache::jointForce.
|
|
Force = 8,
|
|
/// The link velocities, see PxArticulationCache::linkVelocity.
|
|
LinkVelocity = 16,
|
|
/// The link accelerations, see PxArticulationCache::linkAcceleration.
|
|
LinkAcceleration = 32,
|
|
/// Root link transform, see PxArticulationCache::rootLinkData.
|
|
RootTransform = 64,
|
|
/// Root link velocities (read/write) and accelerations (read), see PxArticulationCache::rootLinkData.
|
|
RootVelocities = 128,
|
|
/// The spatial sensor forces, see PxArticulationCache::sensorForces.
|
|
SensorForces = 256,
|
|
/// Solver constraint joint forces, see PxArticulationCache::jointSolverForces.
|
|
JointSolverForces = 512,
|
|
All = 247,
|
|
}
|
|
|
|
bitflags::bitflags! {
|
|
/// Flags for [`PxArticulationCacheFlag`]
|
|
#[derive(Default)]
|
|
#[repr(transparent)]
|
|
pub struct PxArticulationCacheFlags: u32 {
|
|
const Velocity = 1 << 0;
|
|
const Acceleration = 1 << 1;
|
|
const Position = 1 << 2;
|
|
const Force = 1 << 3;
|
|
const LinkVelocity = 1 << 4;
|
|
const LinkAcceleration = 1 << 5;
|
|
const RootTransform = 1 << 6;
|
|
const RootVelocities = 1 << 7;
|
|
const SensorForces = 1 << 8;
|
|
const JointSolverForces = 1 << 9;
|
|
const All = Self::Velocity.bits | Self::Acceleration.bits | Self::Position.bits | Self::LinkVelocity.bits | Self::LinkAcceleration.bits | Self::RootTransform.bits | Self::RootVelocities.bits;
|
|
}
|
|
}
|
|
|
|
/// Flags to configure the forces reported by articulation link sensors.
|
|
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
|
#[repr(i32)]
|
|
pub enum PxArticulationSensorFlag {
|
|
/// Raise to receive forces from forward dynamics.
|
|
ForwardDynamicsForces = 1,
|
|
/// Raise to receive forces from constraint solver.
|
|
ConstraintSolverForces = 2,
|
|
/// Raise to receive forces in the world rotation frame, otherwise they will be reported in the sensor's local frame.
|
|
WorldFrame = 4,
|
|
}
|
|
|
|
bitflags::bitflags! {
|
|
/// Flags for [`PxArticulationSensorFlag`]
|
|
#[derive(Default)]
|
|
#[repr(transparent)]
|
|
pub struct PxArticulationSensorFlags: u8 {
|
|
const ForwardDynamicsForces = 1 << 0;
|
|
const ConstraintSolverForces = 1 << 1;
|
|
const WorldFrame = 1 << 2;
|
|
}
|
|
}
|
|
|
|
/// Identifies each type of information for retrieving from actor.
|
|
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
|
#[repr(i32)]
|
|
pub enum PxActorCacheFlag {
|
|
ActorData = 1,
|
|
Force = 4,
|
|
Torque = 8,
|
|
}
|
|
|
|
bitflags::bitflags! {
|
|
/// Flags for [`PxActorCacheFlag`]
|
|
#[derive(Default)]
|
|
#[repr(transparent)]
|
|
pub struct PxActorCacheFlags: u16 {
|
|
const ActorData = 1 << 0;
|
|
const Force = 1 << 2;
|
|
const Torque = 1 << 3;
|
|
}
|
|
}
|
|
|
|
/// Flags which affect the behavior of PxShapes.
|
|
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
|
#[repr(i32)]
|
|
pub enum PxShapeFlag {
|
|
/// The shape will partake in collision in the physical simulation.
|
|
///
|
|
/// It is illegal to raise the eSIMULATION_SHAPE and eTRIGGER_SHAPE flags.
|
|
/// In the event that one of these flags is already raised the sdk will reject any
|
|
/// attempt to raise the other. To raise the eSIMULATION_SHAPE first ensure that
|
|
/// eTRIGGER_SHAPE is already lowered.
|
|
///
|
|
/// This flag has no effect if simulation is disabled for the corresponding actor (see [`PxActorFlag::eDISABLE_SIMULATION`]).
|
|
SimulationShape = 1,
|
|
/// The shape will partake in scene queries (ray casts, overlap tests, sweeps, ...).
|
|
SceneQueryShape = 2,
|
|
/// The shape is a trigger which can send reports whenever other shapes enter/leave its volume.
|
|
///
|
|
/// Triangle meshes and heightfields can not be triggers. Shape creation will fail in these cases.
|
|
///
|
|
/// Shapes marked as triggers do not collide with other objects. If an object should act both
|
|
/// as a trigger shape and a collision shape then create a rigid body with two shapes, one being a
|
|
/// trigger shape and the other a collision shape. It is illegal to raise the eTRIGGER_SHAPE and
|
|
/// eSIMULATION_SHAPE flags on a single PxShape instance. In the event that one of these flags is already
|
|
/// raised the sdk will reject any attempt to raise the other. To raise the eTRIGGER_SHAPE flag first
|
|
/// ensure that eSIMULATION_SHAPE flag is already lowered.
|
|
///
|
|
/// Trigger shapes will no longer send notification events for interactions with other trigger shapes.
|
|
///
|
|
/// Shapes marked as triggers are allowed to participate in scene queries, provided the eSCENE_QUERY_SHAPE flag is set.
|
|
///
|
|
/// This flag has no effect if simulation is disabled for the corresponding actor (see [`PxActorFlag::eDISABLE_SIMULATION`]).
|
|
TriggerShape = 4,
|
|
/// Enable debug renderer for this shape
|
|
Visualization = 8,
|
|
}
|
|
|
|
bitflags::bitflags! {
|
|
/// Flags for [`PxShapeFlag`]
|
|
#[derive(Default)]
|
|
#[repr(transparent)]
|
|
pub struct PxShapeFlags: u8 {
|
|
const SimulationShape = 1 << 0;
|
|
const SceneQueryShape = 1 << 1;
|
|
const TriggerShape = 1 << 2;
|
|
const Visualization = 1 << 3;
|
|
}
|
|
}
|
|
|