CompositeShape Class |
Namespace: DigitalRune.Geometry.Shapes
The CompositeShape type exposes the following members.
Name | Description | |
---|---|---|
CompositeShape |
Initializes a new instance of the CompositeShape class.
|
Name | Description | |
---|---|---|
Clone |
Creates a new Shape that is a clone (deep copy) of the current instance.
(Inherited from Shape.) | |
CloneCore |
Makes the instance a clone (deep copy) of the specified Shape.
(Overrides ShapeCloneCore(Shape).) | |
CreateInstanceCore |
When implemented in a derived class, creates a new instance of the Shape
derived class.
(Overrides ShapeCreateInstanceCore.) | |
Equals | (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetAabb |
Computes the axis-aligned bounding box (AABB) for this shape in local space.
(Inherited from Shape.) | |
GetAabb(Pose) |
Computes the axis-aligned bounding box (AABB) for this shape positioned in world space using
the given Pose.
(Inherited from Shape.) | |
GetAabb(Vector3F, Pose) |
Computes the axis-aligned bounding box (AABB) for this shape positioned in world space using
the given scale and Pose.
(Overrides ShapeGetAabb(Vector3F, Pose).) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetMesh |
Gets a mesh that represents this shape.
(Inherited from Shape.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GetVolume |
Gets the volume of this shape.
(Overrides ShapeGetVolume(Single, Int32).) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
OnChanged |
Raises the Changed event.
(Inherited from Shape.) | |
OnGetMesh |
Called when a mesh should be generated for the shape.
(Overrides ShapeOnGetMesh(Single, Int32).) | |
ToString | (Overrides ObjectToString.) |
Name | Description | |
---|---|---|
Children |
Gets the child geometric objects.
| |
InnerPoint |
Gets an inner point.
(Overrides ShapeInnerPoint.) | |
Partition |
Gets or set the spatial partition used to improve the performance of geometric queries.
|
This shape is a collection of geometric objects (see Children). Each child has a Shape, Scale and a Pose (= position and orientation). All children are defined in the local space of the composite shape. That means that the Pose defines the position and orientation of each child relative to the parent composite shape. The resulting composite shape can be concave.
Other names for this type of shape: Complex, Compound, Group, ...
Spatial Partitioning: A spatial partitioning method (see Partition can be used to improve runtime performance if this composite shape consists of a lot of children. A spatial partition improves the collision detection speed at the cost of additional memory. If Partition is , no spatial partitioning method is used (which is the default). If a spatial partitioning scheme should be used, the property Partition must be set to an instance of ISpatialPartitionT. The items in the spatial partition will be the indices of the Children of this composite shape. The composite shape will automatically fill and update the spatial partition. Following example shows how a complex composite shape can be improved by using an AABB tree:
myCompositeShape.Partition = new AabbTree<int>();
Shape Features: If a CompositeShape is involved in a Contact, the shape feature property (FeatureA and FeatureB) contains the index of the child that caused the Contact.
Cloning: If a CompositeShape is cloned, all Children and the spatial partition (if any is in use) will be cloned (deep copy).