Shape Class |
Namespace: DigitalRune.Geometry.Shapes
[SerializableAttribute] [XmlIncludeAttribute(typeof(BoxShape))] [XmlIncludeAttribute(typeof(CapsuleShape))] [XmlIncludeAttribute(typeof(CircleShape))] [XmlIncludeAttribute(typeof(ConeShape))] [XmlIncludeAttribute(typeof(ConvexPolyhedron))] [XmlIncludeAttribute(typeof(CylinderShape))] [XmlIncludeAttribute(typeof(EmptyShape))] [XmlIncludeAttribute(typeof(InfiniteShape))] [XmlIncludeAttribute(typeof(LineShape))] [XmlIncludeAttribute(typeof(LineSegmentShape))] [XmlIncludeAttribute(typeof(OrthographicViewVolume))] [XmlIncludeAttribute(typeof(PerspectiveViewVolume))] [XmlIncludeAttribute(typeof(PlaneShape))] [XmlIncludeAttribute(typeof(PointShape))] [XmlIncludeAttribute(typeof(RayShape))] [XmlIncludeAttribute(typeof(RectangleShape))] [XmlIncludeAttribute(typeof(SphereShape))] [XmlIncludeAttribute(typeof(ScaledConvexShape))] [XmlIncludeAttribute(typeof(TriangleShape))] public abstract class Shape
The Shape type exposes the following members.
Name | Description | |
---|---|---|
Clone |
Creates a new Shape that is a clone (deep copy) of the current instance.
| |
CloneCore |
Makes the instance a clone (deep copy) of the specified Shape.
| |
CreateInstanceCore |
When implemented in a derived class, creates a new instance of the Shape
derived class.
| |
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.
| |
GetAabb(Pose) |
Computes the axis-aligned bounding box (AABB) for this shape positioned in world space using
the given Pose.
| |
GetAabb(Vector3F, Pose) |
Computes the axis-aligned bounding box (AABB) for this shape positioned in world space using
the given scale and Pose.
| |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetMesh |
Gets a mesh that represents this shape.
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GetVolume |
Gets the volume of this shape.
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
OnChanged |
Raises the Changed event.
| |
OnGetMesh |
Called when a mesh should be generated for the shape.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
Empty |
An immutable shape that is infinitely small and does not collide with other shapes.
| |
Infinite |
An immutable shape that is infinitely large and collides with every other shape
(except EmptyShapes).
|
Name | Description | |
---|---|---|
InnerPoint |
Gets an inner point.
|
A Shape defines the space that is occupied by an object. Shape is the common base class of all types of shapes in DigitalRune Geometry.
Shapes are defined in the local coordinate system of the owning object (also known as local space, object space or body space). Shapes are abstracted from other properties such as color, material, or even position and orientation. Most shapes contain only properties that define their dimensions ("width", "height", "radius", etc.). For example, a SphereShape consists only of a radius that defines the size of the sphere. The sphere is centered in the local coordinate system.
However, some shapes like the PointShape, the TriangleShape or the RayShape, are defined using position and orientation vectors ("Vertex0", "Origin", "Direction", etc.). Thus, they can be also positioned in local coordinate space.
An IGeometricObject is used to position an object in the world coordinate space. An IGeometricObject consists of a Shape, a Scale and a Pose (= position and orientation).
Cloning: Shapes are cloneable. The method Clone creates a deep copy of the shape - except when documented otherwise (see description of derived classes).