Trait physx::scene::Scene [−][src]
pub trait Scene: Class<PxScene> + UserData { type ArticulationLink: ArticulationLink; type RigidStatic: RigidStatic; type RigidDynamic: RigidDynamic; type Articulation: Articulation; type ArticulationReducedCoordinate: ArticulationReducedCoordinate; type ActorMap: RigidActor; type ArticulationMap: ArticulationBase; type Aggregate: Aggregate;}Show 42 methods
unsafe fn from_raw(ptr: *mut PxScene) -> Option<Owner<Self>> { ... } fn get_user_data(&self) -> &Self::UserData { ... } fn get_user_data_mut(&mut self) -> *mut Self::UserData { ... } fn get_pvd_client(&mut self) -> Option<&mut PvdSceneClient> { ... } fn create_controller_manager<C: Controller>(
&mut self,
locking_enabled: bool
) -> Option<Owner<PxControllerManager<C>>> { ... } fn add_dynamic_actor(&mut self, actor: Owner<Self::RigidDynamic>) { ... } fn add_dynamic_actors(&mut self, actors: Vec<Owner<Self::RigidDynamic>>) { ... } fn add_static_actor(&mut self, actor: Owner<Self::RigidStatic>) { ... } fn add_static_actors(&mut self, actors: Vec<Owner<Self::RigidStatic>>) { ... } fn add_articulation_link(&mut self, actor: Owner<Self::ArticulationLink>) { ... } fn add_articulation_links(
&mut self,
actors: Vec<Owner<Self::ArticulationLink>>
) { ... } fn remove_actor(&mut self, actor: &mut impl Actor, wake_touching: bool) { ... } fn remove_actors(
&mut self,
actors: Vec<&mut impl Actor>,
wake_touching: bool
) { ... } fn add_articulation(&mut self, articulation: Owner<impl ArticulationBase>) { ... } fn remove_articulation(
&mut self,
articulation: &mut impl ArticulationBase,
wake_touching: bool
) { ... } fn add_aggregate(&mut self, aggregate: Owner<Self::Aggregate>) { ... } fn remove_aggregate(
&mut self,
aggregate: &mut Self::Aggregate,
wake_touching: bool
) { ... } fn add_pruning_structure(
&mut self,
pruning_structure: Owner<PruningStructure>
) { ... } fn simulate(
&mut self,
time_step: f32,
completion_task: Option<&mut PxBaseTask>,
scratch: Option<&mut ScratchBuffer>
) { ... } fn fetch_results(&mut self, block: bool) -> Result<(), u32> { ... } fn step(
&mut self,
time_step: f32,
completion_task: Option<&mut PxBaseTask>,
scratch: Option<&mut ScratchBuffer>,
block: bool
) -> Result<(), u32> { ... } fn get_static_structure(&self) -> PruningStructureType { ... } fn get_dynamic_structure(&self) -> PruningStructureType { ... } fn flush_query_updates(&mut self) { ... } fn get_articulations(&mut self) -> Vec<&mut Self::ArticulationMap> { ... } fn get_actors(
&mut self,
actor_type: ActorTypeFlags
) -> Vec<&mut Self::ActorMap> { ... } fn get_active_actors(&mut self) -> &mut [&mut Self::ActorMap] { ... } fn get_static_actors(&mut self) -> Vec<&mut Self::RigidStatic> { ... } fn get_dynamic_actors(&mut self) -> Vec<&mut Self::RigidDynamic> { ... } fn get_aggregates(&mut self) -> Vec<&mut Self::Aggregate> { ... } fn get_constraints(&mut self) -> Vec<&mut Constraint> { ... } unsafe fn set_contact_modify_callback(
&mut self,
callback: &mut PxContactModifyCallback
) { ... } unsafe fn get_contact_modify_callback(&self) -> &PxContactModifyCallback { ... } unsafe fn set_ccd_contact_modify_callback(
&mut self,
callback: &mut PxCCDContactModifyCallback
) { ... } unsafe fn get_ccd_contact_callback(&self) -> &PxCCDContactModifyCallback { ... } unsafe fn set_broad_phase_callback(
&mut self,
callback: &mut PxBroadPhaseCallback
) { ... } unsafe fn get_broad_phase_callback(&self) -> &PxBroadPhaseCallback { ... } fn reset_filtering(&mut self, actor: &mut impl Actor) { ... } fn reset_rigid_actor_filtering<R: RigidActor>(
&mut self,
actor: &mut R,
shapes: &[&mut R::Shape]
) { ... } fn get_kinematic_kinematic_filtering_mode(&self) -> PairFilteringMode { ... } fn get_static_kinematic_filtering_mode(&self) -> PairFilteringMode { ... } fn set_gravity(&mut self, x: f32, y: f32, z: f32) { ... }
Associated Types
type RigidStatic: RigidStatic
type ActorMap: RigidActor
Provided methods
Safety
Owner’s own the pointer they wrap, using the pointer after dropping the Owner,
or creating multiple Owners from the same pointer will cause UB. Use into_ptr
to
retrieve the pointer and consume the Owner without dropping the pointee.
fn get_user_data(&self) -> &Self::UserData
fn get_user_data(&self) -> &Self::UserData
Get the user data.
fn get_user_data_mut(&mut self) -> *mut Self::UserData
fn get_user_data_mut(&mut self) -> *mut Self::UserData
Get the user data.
fn get_pvd_client(&mut self) -> Option<&mut PvdSceneClient>
fn get_pvd_client(&mut self) -> Option<&mut PvdSceneClient>
Get the visual debugger client
fn create_controller_manager<C: Controller>(
&mut self,
locking_enabled: bool
) -> Option<Owner<PxControllerManager<C>>>
fn create_controller_manager<C: Controller>(
&mut self,
locking_enabled: bool
) -> Option<Owner<PxControllerManager<C>>>
Create a controller manager.
fn add_dynamic_actor(&mut self, actor: Owner<Self::RigidDynamic>)
fn add_dynamic_actor(&mut self, actor: Owner<Self::RigidDynamic>)
Add a dynamic actor to the world.
fn add_dynamic_actors(&mut self, actors: Vec<Owner<Self::RigidDynamic>>)
fn add_dynamic_actors(&mut self, actors: Vec<Owner<Self::RigidDynamic>>)
Add dynamic actors to the world.
fn add_static_actor(&mut self, actor: Owner<Self::RigidStatic>)
fn add_static_actor(&mut self, actor: Owner<Self::RigidStatic>)
Add a static actor to the world.
fn add_static_actors(&mut self, actors: Vec<Owner<Self::RigidStatic>>)
fn add_static_actors(&mut self, actors: Vec<Owner<Self::RigidStatic>>)
Add dynamic actors to the world.
fn add_articulation_link(&mut self, actor: Owner<Self::ArticulationLink>)
fn add_articulation_link(&mut self, actor: Owner<Self::ArticulationLink>)
Add an articulation link to the world.
fn add_articulation_links(&mut self, actors: Vec<Owner<Self::ArticulationLink>>)
fn add_articulation_links(&mut self, actors: Vec<Owner<Self::ArticulationLink>>)
Add articulation links to the world.
fn remove_actor(&mut self, actor: &mut impl Actor, wake_touching: bool)
fn remove_actor(&mut self, actor: &mut impl Actor, wake_touching: bool)
Remove an actor from the scene.
fn remove_actors(&mut self, actors: Vec<&mut impl Actor>, wake_touching: bool)
fn remove_actors(&mut self, actors: Vec<&mut impl Actor>, wake_touching: bool)
Remove actors from the scene.
fn add_articulation(&mut self, articulation: Owner<impl ArticulationBase>)
fn add_articulation(&mut self, articulation: Owner<impl ArticulationBase>)
Add an articulation to the scene.
fn remove_articulation(
&mut self,
articulation: &mut impl ArticulationBase,
wake_touching: bool
)
fn remove_articulation(
&mut self,
articulation: &mut impl ArticulationBase,
wake_touching: bool
)
Remove an articulation from the scene.
fn add_aggregate(&mut self, aggregate: Owner<Self::Aggregate>)
fn add_aggregate(&mut self, aggregate: Owner<Self::Aggregate>)
Add an aggregate to the scene.
fn remove_aggregate(
&mut self,
aggregate: &mut Self::Aggregate,
wake_touching: bool
)
fn remove_aggregate(
&mut self,
aggregate: &mut Self::Aggregate,
wake_touching: bool
)
Remove an aggregate from the scene.
fn add_pruning_structure(&mut self, pruning_structure: Owner<PruningStructure>)
fn add_pruning_structure(&mut self, pruning_structure: Owner<PruningStructure>)
Add a rpuning structure to the scene.
fn simulate(
&mut self,
time_step: f32,
completion_task: Option<&mut PxBaseTask>,
scratch: Option<&mut ScratchBuffer>
)
fn simulate(
&mut self,
time_step: f32,
completion_task: Option<&mut PxBaseTask>,
scratch: Option<&mut ScratchBuffer>
)
Run a simulation update step.
Check if or wait until simulate
has completed. Returns Ok(()) when it has, Err otherwise.
Combines simulate
and fetch_results
into one call.
fn get_static_structure(&self) -> PruningStructureType
fn get_static_structure(&self) -> PruningStructureType
Get the pruning structure type for static physics objects that was set when creating the scene.
fn get_dynamic_structure(&self) -> PruningStructureType
fn get_dynamic_structure(&self) -> PruningStructureType
Get the pruning structure type for dynamic physics objects that was set when creating the scene.
fn flush_query_updates(&mut self)
fn flush_query_updates(&mut self)
Fluish any changes to the scene query represenation, forcing any buffered changes to be applied now, rather than when the next scene query is executed.
fn get_articulations(&mut self) -> Vec<&mut Self::ArticulationMap>
fn get_articulations(&mut self) -> Vec<&mut Self::ArticulationMap>
Get a Vec of the articulations in the scene.
fn get_actors(&mut self, actor_type: ActorTypeFlags) -> Vec<&mut Self::ActorMap>
fn get_actors(&mut self, actor_type: ActorTypeFlags) -> Vec<&mut Self::ActorMap>
Get the actors in the scene, filtered by ActorTypeFlags.
fn get_active_actors(&mut self) -> &mut [&mut Self::ActorMap]
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.
fn get_static_actors(&mut self) -> Vec<&mut Self::RigidStatic>
fn get_static_actors(&mut self) -> Vec<&mut Self::RigidStatic>
Get the static actors in the scene.
fn get_dynamic_actors(&mut self) -> Vec<&mut Self::RigidDynamic>
fn get_dynamic_actors(&mut self) -> Vec<&mut Self::RigidDynamic>
Get the dynamic actors in the scene.
fn get_aggregates(&mut self) -> Vec<&mut Self::Aggregate>
fn get_aggregates(&mut self) -> Vec<&mut Self::Aggregate>
Get the aggregates in the scene.
fn get_constraints(&mut self) -> Vec<&mut Constraint>
fn get_constraints(&mut self) -> Vec<&mut Constraint>
Get all the constraints currently in this scene.
unsafe fn set_contact_modify_callback(
&mut self,
callback: &mut PxContactModifyCallback
)
unsafe fn set_contact_modify_callback(
&mut self,
callback: &mut PxContactModifyCallback
)
unsafe fn get_contact_modify_callback(&self) -> &PxContactModifyCallback
unsafe fn get_contact_modify_callback(&self) -> &PxContactModifyCallback
unsafe fn set_ccd_contact_modify_callback(
&mut self,
callback: &mut PxCCDContactModifyCallback
)
unsafe fn set_ccd_contact_modify_callback(
&mut self,
callback: &mut PxCCDContactModifyCallback
)
unsafe fn get_ccd_contact_callback(&self) -> &PxCCDContactModifyCallback
unsafe fn get_ccd_contact_callback(&self) -> &PxCCDContactModifyCallback
unsafe fn set_broad_phase_callback(
&mut self,
callback: &mut PxBroadPhaseCallback
)
unsafe fn set_broad_phase_callback(
&mut self,
callback: &mut PxBroadPhaseCallback
)
unsafe fn get_broad_phase_callback(&self) -> &PxBroadPhaseCallback
unsafe fn get_broad_phase_callback(&self) -> &PxBroadPhaseCallback
fn reset_filtering(&mut self, actor: &mut impl Actor)
fn reset_filtering(&mut self, actor: &mut impl Actor)
Reset the collision filtering for an actor.
fn reset_rigid_actor_filtering<R: RigidActor>(
&mut self,
actor: &mut R,
shapes: &[&mut R::Shape]
)
fn reset_rigid_actor_filtering<R: RigidActor>(
&mut self,
actor: &mut R,
shapes: &[&mut R::Shape]
)
Reset collision filtering for a RigidActor and shapes.
Get the kinematic-kinematic filtering mode.
Get the static-kinematic filtering mode.
fn set_gravity(&mut self, x: f32, y: f32, z: f32)
fn set_gravity(&mut self, x: f32, y: f32, z: f32)
Sets the gravity vector.
Implementors
impl<U, L, S, D, T, C, OC, OT, OCB, OWS, OA> Scene for PxScene<U, L, S, D, T, C, OC, OT, OCB, OWS, OA> where
L: ArticulationLink,
S: RigidStatic,
D: RigidDynamic,
T: Articulation,
C: ArticulationReducedCoordinate,
OC: CollisionCallback,
OT: TriggerCallback,
OCB: ConstraintBreakCallback,
OWS: WakeSleepCallback<L, S, D>,
OA: AdvanceCallback<L, D>,