Struct ncollide2df64::geom::Compound
pub struct Compound { // some fields omitted }
A compound geometry with an aabb bounding volume.
A compound geometry is a geometry composed of the union of several simpler geometry. This is the main way of creating a concave geometry from convex parts. Each parts can have its own delta transformation to shift or rotate it with regard to the other geometries.
Methods
impl Compound
fn new(shapes: ~[(M, ~Geom)]) -> Compound
Builds a new compound shape from a list of shape with their respective delta transformation.
impl Compound
fn shapes<'r>(&'r self) -> &'r [(M, ~Geom)]
The shapes of this compound geometry.
fn bvt<'r>(&'r self) -> &'r BVT<uint, AABB>
The optimization structure used by this compound geometry.
fn bounding_volumes<'r>(&'r self) -> &'r [AABB]
The shapes bounding volumes.
Trait Implementations
impl HasAABB for Compound
impl Clone for Compound
fn clone(&self) -> Compound
impl ConcaveGeom for Compound
fn map_part_at(&self, i: uint, f: |&M, &Geom|)
Applies a function to each sub-geometry of this concave geometry.
fn map_transformed_part_at(&self, m: &M, i: uint, f: |&M, &Geom|)
Applies a transformation matrix and a function to each sub-geometry of this concave geometry.
fn approx_interferences_with_aabb(&self, aabb: &AABB, out: &mut ~[uint])
Computes the indices of every sub-geometry which might intersect a given AABB.
fn approx_interferences_with_ray(&self, ray: &Ray, out: &mut ~[uint])
Computes the indices of every sub-geometry which might intersect a given Ray.
fn aabb_at<'a>(&'a self, i: uint) -> &'a AABB
Gets the AABB of the geometry identified by the index i
.
impl RayCast for Compound
fn toi_with_ray(&self, ray: &Ray) -> Option<N>
Computes the time of impact between this geometry and a ray
fn toi_and_normal_with_ray(&self, ray: &Ray) -> Option<(N, LV)>
Computes the intersection point between this geometry and a ray.
fn intersects_ray(&self, ray: &Ray) -> bool
Tests whether a ray intersects this geometry.
fn toi_with_transform_and_ray(&self, m: &M, ray: &Ray) -> Option<N>
Computes the time of impact between this transform geometry and a ray.
fn toi_and_normal_with_transform_and_ray(&self, m: &M, ray: &Ray) -> Option<(N, V)>
Computes the time of impact, and normal between this transformed geometry and a ray.
fn intersects_with_transform_and_ray(&self, m: &M, ray: &Ray) -> bool
Tests whether a ray intersects this transformed geometry.