pub trait Shape {
// Required methods
fn is_convex(&self) -> bool;
fn clone_box(&self) -> ShapeWrapper;
fn get_shape_type(&self) -> ShapeType;
// Provided methods
fn get_radius(&self) -> Option<f32> { ... }
fn get_half_extents(&self) -> Option<Vector3<f32>> { ... }
fn get_half_length(&self) -> Option<f32> { ... }
fn get_mesh_path(&self) -> Option<String> { ... }
}Expand description
Shape trait for defining geometric shapes.
Required Methods§
Sourcefn clone_box(&self) -> ShapeWrapper
fn clone_box(&self) -> ShapeWrapper
Clones the shape and returns a boxed version of it.
Sourcefn get_shape_type(&self) -> ShapeType
fn get_shape_type(&self) -> ShapeType
Returns the shape type.
Provided Methods§
Sourcefn get_radius(&self) -> Option<f32>
fn get_radius(&self) -> Option<f32>
Returns the radius of the shape.
Sourcefn get_half_extents(&self) -> Option<Vector3<f32>>
fn get_half_extents(&self) -> Option<Vector3<f32>>
Returns the half extents of the shape.
Sourcefn get_half_length(&self) -> Option<f32>
fn get_half_length(&self) -> Option<f32>
Returns the half length of the shape.
Sourcefn get_mesh_path(&self) -> Option<String>
fn get_mesh_path(&self) -> Option<String>
Returns the mesh path of the shape.