Click or drag to resize
DigitalRuneShape Class
Defines the volume of an IGeometricObject.
Inheritance Hierarchy
SystemObject
  DigitalRune.Geometry.ShapesShape
    More...

Namespace: DigitalRune.Geometry.Shapes
Assembly: DigitalRune.Geometry (in DigitalRune.Geometry.dll) Version: 1.18.0.0 (1.18.2.14427)
Syntax
[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.

Constructors
  NameDescription
Protected methodShape
Initializes a new instance of the Shape class
Top
Methods
  NameDescription
Public methodClone
Creates a new Shape that is a clone (deep copy) of the current instance.
Protected methodCloneCore
Makes the instance a clone (deep copy) of the specified Shape.
Protected methodCreateInstanceCore
When implemented in a derived class, creates a new instance of the Shape derived class.
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 methodGetAabb
Computes the axis-aligned bounding box (AABB) for this shape in local space.
Public methodGetAabb(Pose)
Computes the axis-aligned bounding box (AABB) for this shape positioned in world space using the given Pose.
Public methodGetAabb(Vector3F, Pose)
Computes the axis-aligned bounding box (AABB) for this shape positioned in world space using the given scale and Pose.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetMesh
Gets a mesh that represents this shape.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetVolume
Gets the volume of this shape.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodOnChanged
Raises the Changed event.
Protected methodOnGetMesh
Called when a mesh should be generated for the shape.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Fields
  NameDescription
Public fieldStatic memberEmpty
An immutable shape that is infinitely small and does not collide with other shapes.
Public fieldStatic memberInfinite
An immutable shape that is infinitely large and collides with every other shape (except EmptyShapes).
Top
Properties
  NameDescription
Public propertyInnerPoint
Gets an inner point.
Top
Events
  NameDescription
Public eventChanged
Occurs when the shape was changed.
Top
Remarks

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).

See Also
Inheritance Hierarchy