Struct physx::scene::PxScene

source ·
#[repr(transparent)]
pub struct PxScene<U, L, S, D, C, OC, OT, OCB, OWS, OA>where L: ArticulationLink, S: RigidStatic, D: RigidDynamic, C: ArticulationReducedCoordinate, OC: CollisionCallback, OT: TriggerCallback, OCB: ConstraintBreakCallback, OWS: WakeSleepCallback<L, S, D>, OA: AdvanceCallback<L, D>,{ /* private fields */ }
Expand description

A new type wrapper for PxScene. Parametrized by its user data type, the ArticulationLink, RigidStatic, and RigidDynamic actors, Articulation, and ArticulationReducedCoordinate articulations, and Collision, Trigger, ConstraintBreak, WakeSleep and Advance Callbacks. Due to the number of generic type parameters, creating a type alias is recommended.

Trait Implementations§

source§

impl<P, U, L, S, D, C, OC, OT, OCB, OWS, OA> Class<P> for PxScene<U, L, S, D, C, OC, OT, OCB, OWS, OA>where PxScene: Class<P>, L: ArticulationLink, S: RigidStatic, D: RigidDynamic, C: ArticulationReducedCoordinate, OC: CollisionCallback, OT: TriggerCallback, OCB: ConstraintBreakCallback, OWS: WakeSleepCallback<L, S, D>, OA: AdvanceCallback<L, D>,

source§

fn as_ptr(&self) -> *const P

Returns a raw const pointer to the wrapped type. Retrieving a raw pointer is safe. However, pretty much any use of a raw pointer is unsafe. In particular: this pointer should not be used to construct a second owning wrapper around the pointer.
source§

fn as_mut_ptr(&mut self) -> *mut P

Returns a raw mut pointer to the wrapped type. Retrieving a raw pointer is safe. However, pretty much any use of a raw pointer is unsafe. In particular: this pointer should not be used to construct a second owning wrapper around the pointer.
source§

impl<U, L, S, D, C, OC, OT, OCB, OWS, OA> Drop for PxScene<U, L, S, D, C, OC, OT, OCB, OWS, OA>where L: ArticulationLink, S: RigidStatic, D: RigidDynamic, C: ArticulationReducedCoordinate, OC: CollisionCallback, OT: TriggerCallback, OCB: ConstraintBreakCallback, OWS: WakeSleepCallback<L, S, D>, OA: AdvanceCallback<L, D>,

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl<U, L, S, D, C, OC, OT, OCB, OWS, OA> Scene for PxScene<U, L, S, D, C, OC, OT, OCB, OWS, OA>where L: ArticulationLink, S: RigidStatic, D: RigidDynamic, C: ArticulationReducedCoordinate, OC: CollisionCallback, OT: TriggerCallback, OCB: ConstraintBreakCallback, OWS: WakeSleepCallback<L, S, D>, OA: AdvanceCallback<L, D>,

§

type RigidStatic = S

§

type RigidDynamic = D

§

type ArticulationReducedCoordinate = C

§

type ActorMap = ActorMap<L, S, D>

§

type Aggregate = PxAggregate<L, S, D, C>

source§

unsafe fn from_raw(ptr: *mut PxScene) -> Option<Owner<Self>>

Safety Read more
source§

fn get_user_data(&self) -> &Self::UserData

Get the user data.
source§

fn get_user_data_mut(&mut self) -> *mut Self::UserData

Get the user data.
source§

fn get_pvd_client(&mut self) -> Option<&mut PvdSceneClient>

Get the visual debugger client
source§

fn create_controller_manager<C: Controller>( &mut self, locking_enabled: bool ) -> Option<Owner<PxControllerManager<C>>>

Create a controller manager.
source§

fn add_dynamic_actor(&mut self, actor: Owner<Self::RigidDynamic>)

Add a dynamic actor to the world.
source§

fn add_dynamic_actors(&mut self, actors: Vec<Owner<Self::RigidDynamic>>)

Add dynamic actors to the world.
source§

fn add_static_actor(&mut self, actor: Owner<Self::RigidStatic>)

Add a static actor to the world.
source§

fn add_static_actors(&mut self, actors: Vec<Owner<Self::RigidStatic>>)

Add dynamic actors to the world.
Add an articulation link to the world.
Add articulation links to the world.
source§

fn remove_actor(&mut self, actor: &mut impl Actor, wake_touching: bool)

Remove an actor from the scene.
source§

fn remove_actors(&mut self, actors: Vec<&mut impl Actor>, wake_touching: bool)

Remove actors from the scene.
source§

fn add_articulation( &mut self, articulation: Owner<Self::ArticulationReducedCoordinate> )

Add an articulation to the scene.
source§

fn remove_articulation( &mut self, articulation: &mut Self::ArticulationReducedCoordinate, wake_touching: bool )

Remove an articulation from the scene.
source§

fn add_aggregate(&mut self, aggregate: Owner<Self::Aggregate>)

Add an aggregate to the scene.
source§

fn remove_aggregate( &mut self, aggregate: &mut Self::Aggregate, wake_touching: bool )

Remove an aggregate from the scene.
source§

fn add_pruning_structure(&mut self, pruning_structure: Owner<PruningStructure>)

Add a rpuning structure to the scene.
source§

fn simulate( &mut self, time_step: f32, completion_task: Option<&mut PxBaseTask>, scratch: Option<&mut ScratchBuffer> )

Run a simulation update step.
source§

fn fetch_results(&mut self, block: bool) -> Result<(), u32>

Check if or wait until simulate has completed. Returns Ok(()) when it has, Err otherwise.
source§

fn step( &mut self, time_step: f32, completion_task: Option<&mut PxBaseTask>, scratch: Option<&mut ScratchBuffer>, block: bool ) -> Result<(), u32>

Combines simulate and fetch_results into one call.
source§

fn get_articulations(&mut self) -> Vec<&mut Self::ArticulationReducedCoordinate>

Get a Vec of the articulations in the scene.
source§

fn get_actors(&mut self, actor_types: ActorTypeFlags) -> Vec<&mut Self::ActorMap>

Get the actors in the scene, filtered by ActorTypeFlags.
source§

fn get_active_actors(&mut self) -> &mut [&mut Self::ActorMap]

Get the active actor buffer of actors that were updated during the last simulate call.
source§

fn get_static_actors(&mut self) -> Vec<&mut Self::RigidStatic>

Get the static actors in the scene.
source§

fn get_dynamic_actors(&mut self) -> Vec<&mut Self::RigidDynamic>

Get the dynamic actors in the scene.
source§

fn get_aggregates(&mut self) -> Vec<&mut Self::Aggregate>

Get the aggregates in the scene.
source§

fn get_constraints(&mut self) -> Vec<&mut Constraint>

Get all the constraints currently in this scene.
source§

unsafe fn set_contact_modify_callback( &mut self, callback: &mut PxContactModifyCallback )

Safety Read more
source§

unsafe fn get_contact_modify_callback(&self) -> &PxContactModifyCallback

Safety Read more
source§

unsafe fn set_ccd_contact_modify_callback( &mut self, callback: &mut PxCCDContactModifyCallback )

Safety Read more
source§

unsafe fn get_ccd_contact_callback(&self) -> &PxCCDContactModifyCallback

Safety Read more
source§

unsafe fn set_broad_phase_callback( &mut self, callback: &mut PxBroadPhaseCallback )

Safety Read more
source§

unsafe fn get_broad_phase_callback(&self) -> &PxBroadPhaseCallback

Safety Read more
source§

fn reset_filtering(&mut self, actor: &mut impl Actor) -> bool

Reset the collision filtering for an actor.
source§

fn reset_rigid_actor_filtering<R: RigidActor>( &mut self, actor: &mut R, shapes: &[&mut R::Shape] )

Reset collision filtering for a RigidActor and shapes.
source§

fn get_kinematic_kinematic_filtering_mode(&self) -> PairFilteringMode

Get the kinematic-kinematic filtering mode.
source§

fn get_static_kinematic_filtering_mode(&self) -> PairFilteringMode

Get the static-kinematic filtering mode.
source§

fn set_gravity(&mut self, x: f32, y: f32, z: f32)

Sets the gravity vector.
source§

impl<U, L, S, D, C, OC, OT, OCB, OWS, OA> Send for PxScene<U, L, S, D, C, OC, OT, OCB, OWS, OA>where L: ArticulationLink + Send, S: RigidStatic + Send, D: RigidDynamic + Send, C: ArticulationReducedCoordinate + Send, OC: CollisionCallback + Send, OT: TriggerCallback + Send, OCB: ConstraintBreakCallback + Send, OWS: WakeSleepCallback<L, S, D>, OA: AdvanceCallback<L, D>,

source§

impl<U, L, S, D, C, OC, OT, OCB, OWS, OA> Sync for PxScene<U, L, S, D, C, OC, OT, OCB, OWS, OA>where L: ArticulationLink + Sync, S: RigidStatic + Sync, D: RigidDynamic + Sync, C: ArticulationReducedCoordinate + Sync, OC: CollisionCallback + Sync, OT: TriggerCallback + Sync, OCB: ConstraintBreakCallback + Sync, OWS: WakeSleepCallback<L, S, D>, OA: AdvanceCallback<L, D>,

Auto Trait Implementations§

§

impl<U, L, S, D, C, OC, OT, OCB, OWS, OA> RefUnwindSafe for PxScene<U, L, S, D, C, OC, OT, OCB, OWS, OA>where C: RefUnwindSafe, D: RefUnwindSafe, L: RefUnwindSafe, OA: RefUnwindSafe, OC: RefUnwindSafe, OCB: RefUnwindSafe, OT: RefUnwindSafe, OWS: RefUnwindSafe, S: RefUnwindSafe, U: RefUnwindSafe,

§

impl<U, L, S, D, C, OC, OT, OCB, OWS, OA> Unpin for PxScene<U, L, S, D, C, OC, OT, OCB, OWS, OA>where C: Unpin, D: Unpin, L: Unpin, OA: Unpin, OC: Unpin, OCB: Unpin, OT: Unpin, OWS: Unpin, S: Unpin, U: Unpin,

§

impl<U, L, S, D, C, OC, OT, OCB, OWS, OA> UnwindSafe for PxScene<U, L, S, D, C, OC, OT, OCB, OWS, OA>where C: UnwindSafe, D: UnwindSafe, L: UnwindSafe, OA: UnwindSafe, OC: UnwindSafe, OCB: UnwindSafe, OT: UnwindSafe, OWS: UnwindSafe, S: UnwindSafe, U: UnwindSafe,

Blanket Implementations§

source§

impl<T> Actor for Twhere T: Class<PxActor> + Base,

source§

fn get_type(&self) -> ActorType

Get the concrete type of the actor
source§

fn get_world_bounds(&self, inflation: f32) -> PxBounds3

Get the world bounds of this actor
source§

fn set_actor_flag(&mut self, flag: ActorFlag, value: bool)

Set a flag on this actor
source§

fn set_actor_flags(&mut self, flags: ActorFlags)

Set the flags to the provided value
source§

fn get_actor_flags(&self) -> ActorFlags

Get all actor flags
source§

fn set_dominance_group(&mut self, group: u8)

Set the dominance group
source§

fn get_dominance_group(&self) -> u8

Read the dominance group
source§

fn set_owner_client(&mut self, client: u8)

Set the owner client of this actor
source§

fn get_owner_client(&self) -> u8

Read the owner client of this actor
source§

fn enable_visualization(&mut self, enable: bool)

Enable visualization of this actor
source§

fn enable_gravity(&mut self, enable: bool)

set gravity state
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Base for Twhere T: Class<PxBase>,

source§

fn get_concrete_type_name(&self) -> Option<&str>

Get the name of the real type referenced by this pointer, or None if the returned string is not valid
source§

fn get_concrete_type(&self) -> ConcreteType

Returns an enumerated value identifying the type. Read more
source§

fn set_base_flag(&mut self, flag: BaseFlag, value: bool)

Set or unset the specified flag on this object.
source§

fn set_base_flags(&mut self, in_flags: BaseFlags)

Set the BaseFlags of this object. Note that replaces all flags currently on the object. Use set_base_flag to set individual flags.
source§

fn get_base_flags(&self) -> BaseFlags

Read the BaseFlags of this object
source§

fn is_releasable(&self) -> bool

Returns true if this object can be released, i.e., it is not subordinate.
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.