Click or drag to resize
DigitalRuneCompositeMaterial Class
Defines a material with different materials for each shape feature of a rigid body.
Inheritance Hierarchy
SystemObject
  DigitalRune.Physics.MaterialsCompositeMaterial

Namespace: DigitalRune.Physics.Materials
Assembly: DigitalRune.Physics (in DigitalRune.Physics.dll) Version: 1.10.0.0 (1.10.0.14427)
Syntax
public class CompositeMaterial : IMaterial

The CompositeMaterial type exposes the following members.

Constructors
  NameDescription
Public methodCompositeMaterial
Initializes a new instance of the CompositeMaterial class.
Public methodCompositeMaterial(UniformMaterial)
Initializes a new instance of the CompositeMaterial class.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetProperties
Gets the MaterialProperties for the given rigid body, position and shape feature.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Properties
  NameDescription
Public propertyDefaultMaterial
Gets the default material that is used for shape features that have no entry in Materials.
Public propertyMaterials
Gets the list of materials for the shape features.
Top
Remarks

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.

See Also