A single triangle.
More...
Inherits G3D::Shape.
|
| TriangleShape (const Triangle &t) |
|
| TriangleShape (const Vector3 &v0, const Vector3 &v1, const Vector3 &v2) |
|
virtual float | area () const |
| Surface area of the outside of this object. More...
|
|
virtual CoordinateFrame & | axes () |
|
virtual AABox | boundingAABox () const |
| Bounding axis aligned box of this object. More...
|
|
virtual Sphere | boundingSphere () const |
| Bounding sphere of this object. More...
|
|
virtual Box & | box () |
|
virtual const Box & | box () const |
|
virtual Capsule & | capsule () |
|
virtual const Capsule & | capsule () const |
|
virtual Vector3 | center () const |
| Center of mass for this object. More...
|
|
virtual Cylinder & | cylinder () |
|
virtual const Cylinder & | cylinder () const |
|
virtual void | getRandomSurfacePoint (Vector3 &P, Vector3 &N=Vector3::ignore, Random &rnd=Random::common()) const |
| A point selected uniformly at random with respect to the surface area of this object. More...
|
|
virtual const Array< int > & | indexArray () const |
|
virtual Plane & | plane () |
|
virtual const Plane & | plane () const |
|
virtual Vector3 & | point () |
|
virtual const Vector3 & | point () const |
|
virtual Vector3 | randomInteriorPoint (Random &rnd=Random::common()) const |
| A point selected uniformly at random with respect to the volume of this object. More...
|
|
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 |
|
virtual const Array< Vector3 > & | vertexArray () const |
|
virtual float | volume () const |
| Volume of the interior of this object. More...
|
|
|
template<class T , class ... ArgTypes> |
static shared_ptr< T > | createShared (ArgTypes &&... args) |
| Like std::make_shared, but works for protected constructors. More...
|
|
A single triangle.
- See also
- Mesh
◆ TriangleShape() [1/2]
G3D::TriangleShape::TriangleShape |
( |
const Triangle & |
t | ) |
|
|
inlineexplicit |
◆ TriangleShape() [2/2]
◆ area()
virtual float G3D::TriangleShape::area |
( |
| ) |
const |
|
inlinevirtual |
◆ axes()
◆ boundingAABox()
virtual AABox G3D::TriangleShape::boundingAABox |
( |
| ) |
const |
|
inlinevirtual |
◆ boundingSphere()
virtual Sphere G3D::TriangleShape::boundingSphere |
( |
| ) |
const |
|
inlinevirtual |
Bounding sphere of this object.
Implements G3D::Shape.
◆ box() [1/2]
virtual Box& G3D::Shape::box |
( |
| ) |
|
|
inlinevirtualinherited |
◆ box() [2/2]
virtual const Box& G3D::Shape::box |
( |
| ) |
const |
|
inlinevirtualinherited |
◆ capsule() [1/2]
virtual Capsule& G3D::Shape::capsule |
( |
| ) |
|
|
inlinevirtualinherited |
◆ capsule() [2/2]
virtual const Capsule& G3D::Shape::capsule |
( |
| ) |
const |
|
inlinevirtualinherited |
◆ center()
virtual Vector3 G3D::TriangleShape::center |
( |
| ) |
const |
|
inlinevirtual |
Center of mass for this object.
Implements G3D::Shape.
◆ createShared()
template<class T , class ... ArgTypes>
static shared_ptr<T> G3D::ReferenceCountedObject::createShared |
( |
ArgTypes &&... |
args | ) |
|
|
inlinestaticprotectedinherited |
Like std::make_shared, but works for protected constructors.
Call as createShared<myclass>.
◆ cylinder() [1/2]
virtual Cylinder& G3D::Shape::cylinder |
( |
| ) |
|
|
inlinevirtualinherited |
◆ cylinder() [2/2]
virtual const Cylinder& G3D::Shape::cylinder |
( |
| ) |
const |
|
inlinevirtualinherited |
◆ getRandomSurfacePoint()
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.
◆ indexArray()
virtual const Array<int>& G3D::Shape::indexArray |
( |
| ) |
const |
|
inlinevirtualinherited |
◆ plane() [1/2]
virtual Plane& G3D::Shape::plane |
( |
| ) |
|
|
inlinevirtualinherited |
◆ plane() [2/2]
virtual const Plane& G3D::Shape::plane |
( |
| ) |
const |
|
inlinevirtualinherited |
◆ point() [1/2]
virtual Vector3& G3D::Shape::point |
( |
| ) |
|
|
inlinevirtualinherited |
◆ point() [2/2]
virtual const Vector3& G3D::Shape::point |
( |
| ) |
const |
|
inlinevirtualinherited |
◆ randomInteriorPoint()
A point selected uniformly at random with respect to the volume of this object.
Not available on objects with infinite extent.
Implements G3D::Shape.
◆ ray() [1/2]
virtual Ray& G3D::Shape::ray |
( |
| ) |
|
|
inlinevirtualinherited |
◆ ray() [2/2]
virtual const Ray& G3D::Shape::ray |
( |
| ) |
const |
|
inlinevirtualinherited |
◆ render()
◆ sphere() [1/2]
virtual Sphere& G3D::Shape::sphere |
( |
| ) |
|
|
inlinevirtualinherited |
◆ sphere() [2/2]
virtual const Sphere& G3D::Shape::sphere |
( |
| ) |
const |
|
inlinevirtualinherited |
◆ triangle() [1/2]
virtual Triangle& G3D::TriangleShape::triangle |
( |
| ) |
|
|
inlinevirtual |
◆ triangle() [2/2]
virtual const Triangle& G3D::TriangleShape::triangle |
( |
| ) |
const |
|
inlinevirtual |
◆ type()
virtual Type G3D::TriangleShape::type |
( |
| ) |
const |
|
inlinevirtual |
◆ typeToString()
◆ vertexArray()
virtual const Array<Vector3>& G3D::Shape::vertexArray |
( |
| ) |
const |
|
inlinevirtualinherited |
◆ volume()
virtual float G3D::TriangleShape::volume |
( |
| ) |
const |
|
inlinevirtual |
Volume of the interior of this object.
Implements G3D::Shape.