Enum rubullet::GeometricCollisionShape[][src]

pub enum GeometricCollisionShape {
    Sphere {
        radius: f64,
    },
    Box {
        half_extents: Vector3<f64>,
    },
    Capsule {
        radius: f64,
        height: f64,
    },
    Cylinder {
        radius: f64,
        height: f64,
    },
    Plane {
        plane_normal: Vector3<f64>,
    },
    MeshFile {
        filename: PathBuf,
        mesh_scaling: Option<Vector3<f64>>,
        flags: Option<i32>,
    },
    Mesh {
        vertices: Vec<[f64; 3]>,
        indices: Option<Vec<i32>>,
        mesh_scaling: Option<Vector3<f64>>,
    },
    HeightfieldFile {
        filename: PathBuf,
        mesh_scaling: Option<Vector3<f64>>,
        texture_scaling: f64,
    },
    Heightfield {
        mesh_scaling: Option<Vector3<f64>>,
        texture_scaling: f64,
        data: Vec<f32>,
        num_rows: usize,
        num_columns: usize,
        replace_heightfield: Option<CollisionId>,
    },
}
Expand description

Collision shape which can be put the create_collision_shape method

Variants

Sphere

A Sphere determined by the radius in meter

Show fields

Fields of Sphere

radius: f64

radius in meter

Box

A Cuboid

Show fields

Fields of Box

half_extents: Vector3<f64>

[x,y,z] lengths starting from the middle of the box. For example Vector3::new(0.5,0.5,0.5) would be a unit cube.

Capsule

Like a cylinder but with a half sphere on each end. The total length of a capsule is length + 2 * radius.

Show fields

Fields of Capsule

radius: f64

radius of the cylindric part of the capsule in meter.

height: f64

height of the cylindric part in meter. The half spheres are put on top on that

Cylinder

A Cylinder

Show fields

Fields of Cylinder

radius: f64

radius in meter

height: f64

height in meter

Plane

A Plane.

Show fields

Fields of Plane

plane_normal: Vector3<f64>

normal of the plane.

MeshFile

Load a .obj (Wavefront) file. Will create convex hulls for each object.

Show fields

Fields of MeshFile

filename: PathBuf

Path to the .obj file.

mesh_scaling: Option<Vector3<f64>>

Scaling of the Mesh.Use None if you do not want to apply any scaling.

flags: Option<i32>

Set to 1 if you want to activate have the GEOM_FORCE_CONCAVE_TRIMESH Flag. this will create a concave static triangle mesh. This should not be used with dynamic / moving objects, only for static (mass = 0) terrain.

Mesh

Create your own mesh.

Show fields

Fields of Mesh

vertices: Vec<[f64; 3]>

list of [x,y,z] coordinates.

indices: Option<Vec<i32>>

triangle indices, should be a multiple of 3

mesh_scaling: Option<Vector3<f64>>

Scaling of the Mesh. Use [1.;3] for normal scaling.

HeightfieldFile

Loads a Heightfield from a file

Show fields

Fields of HeightfieldFile

filename: PathBuf

Path to the .obj file.

mesh_scaling: Option<Vector3<f64>>

Scaling of the Mesh.Use None if you do not want to apply any scaling.

texture_scaling: f64

Texture scaling. Use 1. for original scaling.

Heightfield

Create your own Heightfield. See heightfield.rs for an example.

Show fields

Fields of Heightfield

mesh_scaling: Option<Vector3<f64>>

Scaling of the Mesh. Use [1.;3] for normal scaling.

texture_scaling: f64

Texture scaling. Use 1. for normal scaling.

data: Vec<f32>

Heightfield data. Should be of size num_rows * num_columns

num_rows: usize

number of rows in data

num_columns: usize

number of columns in data

replace_heightfield: Option<CollisionId>

replacing an existing heightfield (updating its heights) (much faster than removing and re-creating a heightfield)

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more

Checks if self is actually part of its subset T (and can be converted to it).

Use with care! Same as self.to_subset but without any property checks. Always succeeds.

The inclusion map: converts self to the equivalent element of its superset.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.