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
A Sphere determined by the radius in meter
Show fields
Fields of Sphere
radius: f64
radius in meter
A Cuboid
Show fields
Like a cylinder but with a half sphere on each end. The total length of a capsule is length + 2 * radius.
Show fields
A Cylinder
A Plane.
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.
Create your own mesh.
Show fields
Loads a Heightfield from a file
Show fields
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
impl RefUnwindSafe for GeometricCollisionShape
impl Send for GeometricCollisionShape
impl Sync for GeometricCollisionShape
impl Unpin for GeometricCollisionShape
impl UnwindSafe for GeometricCollisionShape
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
pub fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
pub fn to_subset_unchecked(&self) -> SS
pub fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
pub fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.
pub fn vzip(self) -> V