[][src]Trait physx::physics::Physics

pub trait Physics: Class<PxPhysics> + Sized {
    type Shape: Shape;
    pub fn create<Desc: Descriptor<Self>>(&mut self, desc: Desc) -> Desc::Target { ... }
pub fn create_scene<U, L, S, D, T, C, OC, OT, OCB, OWS, OA>(
        &mut self,
        scene_descriptor: SceneDescriptor<U, L, S, D, T, C, OC, OT, OCB, OWS, OA>
    ) -> Option<Owner<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>
, { ... }
pub fn create_aggregate<L, S, D, T, C>(
        &mut self,
        max_size: u32,
        self_collision: bool
    ) -> Option<Owner<PxAggregate<L, S, D, T, C>>>
    where
        L: ArticulationLink,
        S: RigidStatic,
        D: RigidDynamic,
        T: Articulation,
        C: ArticulationReducedCoordinate
, { ... }
pub fn create_articulation<U, L: ArticulationLink>(
        &mut self,
        user_data: U
    ) -> Option<Owner<PxArticulation<U, L>>> { ... }
pub fn create_articulation_reduced_coordinate<U, L: ArticulationLink>(
        &mut self,
        user_data: U
    ) -> Option<Owner<PxArticulationReducedCoordinate<U, L>>> { ... }
pub fn create_bvh_structure(
        &mut self,
        stream: &mut PxInputStream
    ) -> Option<Owner<BVHStructure>> { ... }
pub fn create_constraint(
        &mut self,
        first_actor: &mut impl RigidActor,
        second_actor: &mut impl RigidActor,
        connector: &mut PxConstraintConnector,
        shaders: &PxConstraintShaderTable,
        data_size: u32
    ) -> Option<Owner<Constraint>> { ... }
pub fn create_convex_mesh(
        &mut self,
        stream: &mut PxInputStream
    ) -> Option<Owner<ConvexMesh>> { ... }
pub fn create_height_field(
        &mut self,
        stream: &mut PxInputStream
    ) -> Option<Owner<HeightField>> { ... }
pub fn create_material(
        &mut self,
        static_friction: f32,
        dynamic_friction: f32,
        restitution: f32,
        user_data: <<Self::Shape as Shape>::Material as UserData>::UserData
    ) -> Option<Owner<<Self::Shape as Shape>::Material>> { ... }
pub fn create_pruning_structure(
        &mut self,
        actors: Vec<&mut impl RigidActor>
    ) -> Option<Owner<PruningStructure>> { ... }
pub fn create_dynamic<U>(
        &mut self,
        transform: &PxTransform,
        user_data: U
    ) -> Option<Owner<PxRigidDynamic<U, Self::Shape>>> { ... }
pub fn create_static<U>(
        &mut self,
        transform: PxTransform,
        user_data: U
    ) -> Option<Owner<PxRigidStatic<U, Self::Shape>>> { ... }
pub fn create_shape(
        &mut self,
        geometry: &impl Geometry,
        materials: &mut [&mut <Self::Shape as Shape>::Material],
        is_exclusive: bool,
        shape_flags: ShapeFlags,
        user_data: <Self::Shape as UserData>::UserData
    ) -> Option<Owner<Self::Shape>> { ... }
pub fn create_triangle_mesh(
        &mut self,
        stream: &mut PxInputStream
    ) -> Option<Owner<TriangleMesh>> { ... }
pub fn create_rigid_dynamic<U>(
        &mut self,
        transform: PxTransform,
        geometry: &impl Geometry,
        material: &mut <Self::Shape as Shape>::Material,
        density: f32,
        shape_transform: PxTransform,
        user_data: U
    ) -> Option<Owner<PxRigidDynamic<U, Self::Shape>>> { ... }
pub fn create_rigid_static<U>(
        &mut self,
        transform: PxTransform,
        geometry: &impl Geometry,
        material: &mut <Self::Shape as Shape>::Material,
        shape_transform: PxTransform,
        user_data: U
    ) -> Option<Owner<PxRigidStatic<U, Self::Shape>>> { ... }
pub fn create_plane<U>(
        &mut self,
        normal: PxVec3,
        offset: f32,
        material: &mut <Self::Shape as Shape>::Material,
        user_data: U
    ) -> Option<Owner<PxRigidStatic<U, Self::Shape>>> { ... }
pub fn get_bvh_structures(&self) -> Vec<&BVHStructure> { ... }
pub fn get_convex_meshes(&self) -> Vec<&ConvexMesh> { ... }
pub fn get_height_fields(&self) -> Vec<&HeightField> { ... }
pub fn get_materials(&self) -> Vec<&<Self::Shape as Shape>::Material> { ... }
pub fn get_shapes(&self) -> Vec<&Self::Shape> { ... }
pub fn get_triangle_meshes(&self) -> Vec<&TriangleMesh> { ... }
pub fn get_tolerances_scale(&self) -> Option<&PxTolerancesScale> { ... }
pub fn get_physics_insertion_callback(
        &mut self
    ) -> Option<&mut PxPhysicsInsertionCallback> { ... } }

Associated Types

Loading content...

Provided methods

pub fn create<Desc: Descriptor<Self>>(&mut self, desc: Desc) -> Desc::Target[src]

pub fn create_scene<U, L, S, D, T, C, OC, OT, OCB, OWS, OA>(
    &mut self,
    scene_descriptor: SceneDescriptor<U, L, S, D, T, C, OC, OT, OCB, OWS, OA>
) -> Option<Owner<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>, 
[src]

Create a new scene with from a descriptor.

pub fn create_aggregate<L, S, D, T, C>(
    &mut self,
    max_size: u32,
    self_collision: bool
) -> Option<Owner<PxAggregate<L, S, D, T, C>>> where
    L: ArticulationLink,
    S: RigidStatic,
    D: RigidDynamic,
    T: Articulation,
    C: ArticulationReducedCoordinate
[src]

Create a new aggregate. Must be added to a scene with the same actor user data types.

pub fn create_articulation<U, L: ArticulationLink>(
    &mut self,
    user_data: U
) -> Option<Owner<PxArticulation<U, L>>>
[src]

Create a new articulation. Must be added to a scene with the same user data types.

pub fn create_articulation_reduced_coordinate<U, L: ArticulationLink>(
    &mut self,
    user_data: U
) -> Option<Owner<PxArticulationReducedCoordinate<U, L>>>
[src]

Create a new articulation. Must be added to a scene with the same user data types.

pub fn create_bvh_structure(
    &mut self,
    stream: &mut PxInputStream
) -> Option<Owner<BVHStructure>>
[src]

Create a new BVH structure. The BVH structure class-trait is not implemented yet.

pub fn create_constraint(
    &mut self,
    first_actor: &mut impl RigidActor,
    second_actor: &mut impl RigidActor,
    connector: &mut PxConstraintConnector,
    shaders: &PxConstraintShaderTable,
    data_size: u32
) -> Option<Owner<Constraint>>
[src]

Create a new constraint. The constraint class-trait is not implemented yet.

pub fn create_convex_mesh(
    &mut self,
    stream: &mut PxInputStream
) -> Option<Owner<ConvexMesh>>
[src]

Create a new convex mesh. The convex mesh class-trait is not implemented yet.

pub fn create_height_field(
    &mut self,
    stream: &mut PxInputStream
) -> Option<Owner<HeightField>>
[src]

Create a new height field.

pub fn create_material(
    &mut self,
    static_friction: f32,
    dynamic_friction: f32,
    restitution: f32,
    user_data: <<Self::Shape as Shape>::Material as UserData>::UserData
) -> Option<Owner<<Self::Shape as Shape>::Material>>
[src]

Create a new material with ref count set to one.

pub fn create_pruning_structure(
    &mut self,
    actors: Vec<&mut impl RigidActor>
) -> Option<Owner<PruningStructure>>
[src]

Create a new pruning structure. The pruning structure class-trait is not implemented yet.

pub fn create_dynamic<U>(
    &mut self,
    transform: &PxTransform,
    user_data: U
) -> Option<Owner<PxRigidDynamic<U, Self::Shape>>>
[src]

Create a dynamic actor with given transform and user data. Other fields are initialized to their defaults.

pub fn create_static<U>(
    &mut self,
    transform: PxTransform,
    user_data: U
) -> Option<Owner<PxRigidStatic<U, Self::Shape>>>
[src]

Create a static actor with given transform and user data. Other fields are initialized to their defaults.

pub fn create_shape(
    &mut self,
    geometry: &impl Geometry,
    materials: &mut [&mut <Self::Shape as Shape>::Material],
    is_exclusive: bool,
    shape_flags: ShapeFlags,
    user_data: <Self::Shape as UserData>::UserData
) -> Option<Owner<Self::Shape>>
[src]

Create a new shape.

pub fn create_triangle_mesh(
    &mut self,
    stream: &mut PxInputStream
) -> Option<Owner<TriangleMesh>>
[src]

Create a new pruning structure. The pruning structure class-trait is not implemented yet.

pub fn create_rigid_dynamic<U>(
    &mut self,
    transform: PxTransform,
    geometry: &impl Geometry,
    material: &mut <Self::Shape as Shape>::Material,
    density: f32,
    shape_transform: PxTransform,
    user_data: U
) -> Option<Owner<PxRigidDynamic<U, Self::Shape>>>
[src]

Create a new rigid dynamic actor.

pub fn create_rigid_static<U>(
    &mut self,
    transform: PxTransform,
    geometry: &impl Geometry,
    material: &mut <Self::Shape as Shape>::Material,
    shape_transform: PxTransform,
    user_data: U
) -> Option<Owner<PxRigidStatic<U, Self::Shape>>>
[src]

Create a new rigid static actor.

pub fn create_plane<U>(
    &mut self,
    normal: PxVec3,
    offset: f32,
    material: &mut <Self::Shape as Shape>::Material,
    user_data: U
) -> Option<Owner<PxRigidStatic<U, Self::Shape>>>
[src]

Create a plane, with plane equation normal.dot(v) + offset = 0.

pub fn get_bvh_structures(&self) -> Vec<&BVHStructure>[src]

Get the BVH structures created by this physics object.

pub fn get_convex_meshes(&self) -> Vec<&ConvexMesh>[src]

Get the convex meshes created by this physics object.

pub fn get_height_fields(&self) -> Vec<&HeightField>[src]

Get the height fields created by this physics object.

pub fn get_materials(&self) -> Vec<&<Self::Shape as Shape>::Material>[src]

Get the height fields created by this physics object.

pub fn get_shapes(&self) -> Vec<&Self::Shape>[src]

Get the shapes created by this physics object.

pub fn get_triangle_meshes(&self) -> Vec<&TriangleMesh>[src]

Get the triangle mesghes created by this object.

pub fn get_tolerances_scale(&self) -> Option<&PxTolerancesScale>[src]

Get the tolerance scale.

pub fn get_physics_insertion_callback(
    &mut self
) -> Option<&mut PxPhysicsInsertionCallback>
[src]

Get the physics insertion callback, used for real-time cooking of physics meshes.

Loading content...

Implementors

impl<Allocator: AllocatorCallback, Geom: Shape> Physics for PhysicsFoundation<Allocator, Geom>[src]

type Shape = Geom

impl<Geom: Shape> Physics for PxPhysics<Geom>[src]

type Shape = Geom

Loading content...