Mesh shape is intended for debugging and for collision detection.
More...
Inherits G3D::Shape.
|
| typedef shared_ptr< Shape > | Ref |
| |
| enum | Type {
NONE = 0,
MESH = 1,
BOX,
CYLINDER,
SPHERE,
RAY,
ARROW,
CAPSULE,
PLANE,
AXES,
POINT,
TRIANGLE
} |
| |
|
| | MeshShape (const Array< Vector3 > &vertex, const Array< int > &index) |
| | Copies the geometry from the arrays.
|
| |
| | MeshShape (const CPUVertexArray &vertexArray, const Array< Tri > &tri) |
| | Copies the triangle array.
|
| |
| virtual float | area () const |
| | Slow the first time it is called because the BSP tree must be computed.
|
| |
| virtual CoordinateFrame & | axes () |
| |
| virtual AABox | boundingAABox () const |
| | Bounding axis aligned box of this object.
|
| |
| virtual Sphere | boundingSphere () const |
| | Bounding sphere of this object.
|
| |
| virtual Box & | box () |
| |
| virtual const Box & | box () const |
| |
| virtual const KDTree< Triangle > & | bspTree () const |
| | Not computed until the first call to bspTree, area, or getRandomSurfacePoint.
|
| |
| virtual Capsule & | capsule () |
| |
| virtual const Capsule & | capsule () const |
| |
| virtual Vector3 | center () const |
| | Center of mass for this object.
|
| |
| virtual Cylinder & | cylinder () |
| |
| virtual const Cylinder & | cylinder () const |
| |
| virtual void | getRandomSurfacePoint (Vector3 &P, Vector3 &N=Vector3::ignore()) const |
| | A point selected uniformly at random with respect to the surface area of this object.
|
| |
| const Array< int > & | indexArray () const |
| | Tri-list index array into vertexArray().
|
| |
| virtual Plane & | plane () |
| |
| virtual const Plane & | plane () const |
| |
| virtual Vector3 & | point () |
| |
| virtual const Vector3 & | point () const |
| |
| virtual Vector3 | randomInteriorPoint () const |
| | Returns a point on the surface.
|
| |
| virtual Ray & | ray () |
| |
| virtual const Ray & | ray () const |
| |
| virtual void | render (RenderDevice *rd, const CoordinateFrame &cframe, Color4 solidColor=Color4(.5,.5, 0,.5), Color4 wireColor=Color3::black()) |
| |
| virtual Sphere & | sphere () |
| |
| virtual const Sphere & | sphere () const |
| |
| virtual Triangle & | triangle () |
| |
| virtual const Triangle & | triangle () const |
| |
| virtual Type | type () const |
| |
| const Array< Vector3 > & | vertexArray () const |
| |
| virtual float | volume () const |
| | No volume; Mesh is treated as a 2D surface.
|
| |
Mesh shape is intended for debugging and for collision detection.
It is not a general purpose mesh.
- See Also
- G3D::Surface, G3D::ArticulatedModel, G3D::IFSModel, G3D::MD2Model, G3D::MeshAlg
- Enumerator:
| NONE |
|
| MESH |
|
| BOX |
|
| CYLINDER |
|
| SPHERE |
|
| RAY |
|
| ARROW |
|
| CAPSULE |
|
| PLANE |
|
| AXES |
|
| POINT |
|
| TRIANGLE |
|
Copies the geometry from the arrays.
The index array must describe a triangle list; you can convert other primitives using the MeshAlg methods.
Copies the triangle array.
| virtual float G3D::MeshShape::area |
( |
| ) |
const |
|
virtual |
Slow the first time it is called because the BSP tree must be computed.
Implements G3D::Shape.
| virtual AABox G3D::MeshShape::boundingAABox |
( |
| ) |
const |
|
virtual |
Bounding axis aligned box of this object.
Implements G3D::Shape.
| virtual Sphere G3D::MeshShape::boundingSphere |
( |
| ) |
const |
|
virtual |
Bounding sphere of this object.
Implements G3D::Shape.
| virtual Box& G3D::Shape::box |
( |
| ) |
|
|
inlinevirtualinherited |
| virtual const Box& G3D::Shape::box |
( |
| ) |
const |
|
inlinevirtualinherited |
Not computed until the first call to bspTree, area, or getRandomSurfacePoint.
| virtual Capsule& G3D::Shape::capsule |
( |
| ) |
|
|
inlinevirtualinherited |
| virtual const Capsule& G3D::Shape::capsule |
( |
| ) |
const |
|
inlinevirtualinherited |
| virtual Vector3 G3D::MeshShape::center |
( |
| ) |
const |
|
virtual |
Center of mass for this object.
Implements G3D::Shape.
| virtual Cylinder& G3D::Shape::cylinder |
( |
| ) |
|
|
inlinevirtualinherited |
| virtual const Cylinder& G3D::Shape::cylinder |
( |
| ) |
const |
|
inlinevirtualinherited |
A point selected uniformly at random with respect to the surface area of this object.
Not available on the Plane or Ray, which have infinite extent. The normal has unit length and points out of the surface.
Implements G3D::Shape.
| const Array<int>& G3D::MeshShape::indexArray |
( |
| ) |
const |
|
inlinevirtual |
| virtual Plane& G3D::Shape::plane |
( |
| ) |
|
|
inlinevirtualinherited |
| virtual const Plane& G3D::Shape::plane |
( |
| ) |
const |
|
inlinevirtualinherited |
| virtual Vector3& G3D::Shape::point |
( |
| ) |
|
|
inlinevirtualinherited |
| virtual const Vector3& G3D::Shape::point |
( |
| ) |
const |
|
inlinevirtualinherited |
| virtual Vector3 G3D::MeshShape::randomInteriorPoint |
( |
| ) |
const |
|
virtual |
Returns a point on the surface.
Implements G3D::Shape.
| virtual Ray& G3D::Shape::ray |
( |
| ) |
|
|
inlinevirtualinherited |
| virtual const Ray& G3D::Shape::ray |
( |
| ) |
const |
|
inlinevirtualinherited |
| virtual Sphere& G3D::Shape::sphere |
( |
| ) |
|
|
inlinevirtualinherited |
| virtual const Sphere& G3D::Shape::sphere |
( |
| ) |
const |
|
inlinevirtualinherited |
| virtual Triangle& G3D::Shape::triangle |
( |
| ) |
|
|
inlinevirtualinherited |
| virtual const Triangle& G3D::Shape::triangle |
( |
| ) |
const |
|
inlinevirtualinherited |
| virtual Type G3D::MeshShape::type |
( |
| ) |
const |
|
inlinevirtual |
| virtual float G3D::MeshShape::volume |
( |
| ) |
const |
|
virtual |
No volume; Mesh is treated as a 2D surface.
Implements G3D::Shape.