G3D::Shape Class ReferenceBase class for other shapes.
More...
#include <Shape.h>
Inherits G3D::ReferenceCountedObject.
Inherited by G3D::AxesShape, G3D::BoxShape, G3D::CapsuleShape, G3D::CylinderShape, G3D::MeshShape, G3D::PlaneShape, G3D::PointShape, G3D::RayShape, and G3D::SphereShape.
List of all members.
|
Public Types |
| enum | Type {
NONE = 0,
MESH = 1,
BOX,
CYLINDER,
SPHERE,
RAY,
CAPSULE,
PLANE,
AXES,
POINT
} |
Public Member Functions |
| virtual float | area () const=0 |
| virtual CoordinateFrame & | axes () |
| virtual AABox | boundingAABox () const=0 |
| virtual Sphere | boundingSphere () const=0 |
| virtual const Box & | box () const |
| virtual Box & | box () |
| virtual const Capsule & | capsule () const |
| virtual Capsule & | capsule () |
| virtual Vector3 | center () const=0 |
| virtual const Cylinder & | cylinder () const |
| virtual Cylinder & | cylinder () |
| virtual void | getRandomSurfacePoint (Vector3 &P, Vector3 &N=Vector3::dummy) const =0 |
| virtual const Array< int > & | indexArray () const |
| virtual const Plane & | plane () const |
| virtual Plane & | plane () |
| virtual const Vector3 & | point () const |
| virtual Vector3 & | point () |
| virtual Vector3 | randomInteriorPoint () const=0 |
| virtual const Ray & | ray () const |
| virtual Ray & | ray () |
| void | ReferenceCountedObject_zeroWeakPointers () |
| virtual void | render (class RenderDevice *rd, const CoordinateFrame &cframe, Color4 solidColor=Color4(.5,.5, 0,.5), Color4 wireColor=Color3::black())=0 |
| virtual const Sphere & | sphere () const |
| virtual Sphere & | sphere () |
| virtual Type | type () const=0 |
| virtual const Array< Vector3 > & | vertexArray () const |
| virtual float | volume () const=0 |
| virtual | ~Shape () |
Static Public Member Functions |
| static std::string | typeToString (Type t) |
Public Attributes |
| AtomicInt32 | ReferenceCountedObject_refCount |
| _WeakPtrLinkedList * | ReferenceCountedObject_weakPointer |
Detailed Description
Base class for other shapes.
G3D primitives like Box and Cylinder have no base class so that their implementations are maximally efficient, and have no "render" method because they are lower-level than the rendering API.
The Shape classes provide a parallel set of classes to the G3D primitives that support more functionality.
Mesh shapes are intentionally immutable because they precompute data.
BETA API This API is subject to change in future releases.
Member Enumeration Documentation
- Enumerator:
-
| NONE |
|
| MESH |
|
| BOX |
|
| CYLINDER |
|
| SPHERE |
|
| RAY |
|
| CAPSULE |
|
| PLANE |
|
| AXES |
|
| POINT |
|
Constructor & Destructor Documentation
| virtual G3D::Shape::~Shape |
( |
|
) |
[inline, virtual] |
Member Function Documentation
| virtual float G3D::Shape::area |
( |
|
) |
const [pure virtual] |
| virtual AABox G3D::Shape::boundingAABox |
( |
|
) |
const [pure virtual] |
| virtual Sphere G3D::Shape::boundingSphere |
( |
|
) |
const [pure virtual] |
| virtual const Box& G3D::Shape::box |
( |
|
) |
const [inline, virtual] |
| virtual Box& G3D::Shape::box |
( |
|
) |
[inline, virtual] |
| virtual const Capsule& G3D::Shape::capsule |
( |
|
) |
const [inline, virtual] |
| virtual Capsule& G3D::Shape::capsule |
( |
|
) |
[inline, virtual] |
| virtual Vector3 G3D::Shape::center |
( |
|
) |
const [pure virtual] |
| virtual const Cylinder& G3D::Shape::cylinder |
( |
|
) |
const [inline, virtual] |
| virtual Cylinder& G3D::Shape::cylinder |
( |
|
) |
[inline, virtual] |
| virtual const Array<int>& G3D::Shape::indexArray |
( |
|
) |
const [inline, virtual] |
| virtual const Plane& G3D::Shape::plane |
( |
|
) |
const [inline, virtual] |
| virtual Plane& G3D::Shape::plane |
( |
|
) |
[inline, virtual] |
| virtual const Vector3& G3D::Shape::point |
( |
|
) |
const [inline, virtual] |
| virtual Vector3& G3D::Shape::point |
( |
|
) |
[inline, virtual] |
| virtual Vector3 G3D::Shape::randomInteriorPoint |
( |
|
) |
const [pure virtual] |
| virtual const Ray& G3D::Shape::ray |
( |
|
) |
const [inline, virtual] |
| virtual Ray& G3D::Shape::ray |
( |
|
) |
[inline, virtual] |
| void G3D::ReferenceCountedObject::ReferenceCountedObject_zeroWeakPointers |
( |
|
) |
[inline, inherited] |
Automatically called immediately before the object is deleted.
This is not called from the destructor because it needs to be invoked before the subclass destructor.
| virtual const Sphere& G3D::Shape::sphere |
( |
|
) |
const [inline, virtual] |
| virtual Sphere& G3D::Shape::sphere |
( |
|
) |
[inline, virtual] |
| virtual Type G3D::Shape::type |
( |
|
) |
const [pure virtual] |
| static std::string G3D::Shape::typeToString |
( |
Type |
t |
) |
[static] |
| virtual const Array<Vector3>& G3D::Shape::vertexArray |
( |
|
) |
const [inline, virtual] |
| virtual float G3D::Shape::volume |
( |
|
) |
const [pure virtual] |
Member Data Documentation
The long name is to keep this from accidentally conflicting with a subclass's variable name.
Do not use or explicitly manipulate this value--its type may change in the future and is not part of the supported API.
Linked list of all weak pointers that reference this (some may be on the stack!).
Do not use or explicitly manipulate this value.
The documentation for this class was generated from the following file:
Generated on Thu Aug 2 11:40:47 2007 for G3D by
1.5.2
Hosted by
|