CompositeMaterial Class |
Namespace: DigitalRune.Physics.Materials
The CompositeMaterial type exposes the following members.
Name | Description | |
---|---|---|
CompositeMaterial |
Initializes a new instance of the CompositeMaterial class.
| |
CompositeMaterial(UniformMaterial) |
Initializes a new instance of the CompositeMaterial class.
|
Name | Description | |
---|---|---|
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.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetProperties |
Gets the MaterialProperties for the given rigid body, position and shape
feature.
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
DefaultMaterial |
Gets the default material that is used for shape features that have no entry
in Materials.
| |
Materials |
Gets the list of materials for the shape features.
|
This material can be used with rigid bodies that have a complex shape, e.g. a CompositeShape or a TriangleMeshShape. The features of a CompositeShape are the Children of the composite shape. The features of a TriangleMeshShape are the triangles of the mesh.
The Materials list can store a material for each feature of a complex shape.
To determine the material for a shape feature, the CompositeMaterial first checks if the Materials list has an entry for this shape. If the list has less elements than the shape has features or the material is , the CompositeMaterial checks whether the shape of the rigid body is a CompositeShape and the given shape features is of type RigidBody. If the shape feature is a rigid body instance, the material of this rigid body instance is used. In all other cases the DefaultMaterial is used.