Support Forum       G3D Web Page     
Public Member Functions | Static Public Member Functions | Static Protected Member Functions | List of all members
G3D::CylinderShape Class Reference

Inherits G3D::Shape.

Public Member Functions

 CylinderShape (const G3D::Cylinder &c)
 
virtual float area () const
 Surface area of the outside of this object. More...
 
virtual CoordinateFrameaxes ()
 
virtual AABox boundingAABox () const
 Bounding axis aligned box of this object. More...
 
virtual Sphere boundingSphere () const
 Bounding sphere of this object. More...
 
virtual Boxbox ()
 
virtual const Boxbox () const
 
virtual Capsulecapsule ()
 
virtual const Capsulecapsule () const
 
virtual Vector3 center () const
 Center of mass for this object. More...
 
virtual Cylindercylinder ()
 
virtual const Cylindercylinder () 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 Planeplane ()
 
virtual const Planeplane () const
 
virtual Vector3point ()
 
virtual const Vector3point () 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 Rayray ()
 
virtual const Rayray () const
 
virtual void render (RenderDevice *rd, const CoordinateFrame &cframe, Color4 solidColor=Color4(.5,.5, 0,.5), Color4 wireColor=Color3::black())
 
virtual Spheresphere ()
 
virtual const Spheresphere () const
 
virtual Triangletriangle ()
 
virtual const Triangletriangle () const
 
virtual Type type () const
 
virtual const Array< Vector3 > & vertexArray () const
 
virtual float volume () const
 Volume of the interior of this object. More...
 

Static Public Member Functions

static String typeToString (Type t)
 

Static Protected Member Functions

template<class T , class ... ArgTypes>
static shared_ptr< T > createShared (ArgTypes &&... args)
 Like std::make_shared, but works for protected constructors. More...
 

Constructor & Destructor Documentation

◆ CylinderShape()

G3D::CylinderShape::CylinderShape ( const G3D::Cylinder c)
inlineexplicit

Member Function Documentation

◆ area()

virtual float G3D::CylinderShape::area ( ) const
inlinevirtual

Surface area of the outside of this object.

Implements G3D::Shape.

◆ axes()

virtual CoordinateFrame& G3D::Shape::axes ( )
inlinevirtualinherited

Reimplemented in G3D::AxesShape.

◆ boundingAABox()

virtual AABox G3D::CylinderShape::boundingAABox ( ) const
inlinevirtual

Bounding axis aligned box of this object.

Implements G3D::Shape.

◆ boundingSphere()

virtual Sphere G3D::CylinderShape::boundingSphere ( ) const
inlinevirtual

Bounding sphere of this object.

Implements G3D::Shape.

◆ box() [1/2]

virtual Box& G3D::Shape::box ( )
inlinevirtualinherited

Reimplemented in G3D::BoxShape.

◆ box() [2/2]

virtual const Box& G3D::Shape::box ( ) const
inlinevirtualinherited

Reimplemented in G3D::BoxShape.

◆ capsule() [1/2]

virtual Capsule& G3D::Shape::capsule ( )
inlinevirtualinherited

Reimplemented in G3D::CapsuleShape.

◆ capsule() [2/2]

virtual const Capsule& G3D::Shape::capsule ( ) const
inlinevirtualinherited

Reimplemented in G3D::CapsuleShape.

◆ center()

virtual Vector3 G3D::CylinderShape::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::CylinderShape::cylinder ( )
inlinevirtual

Reimplemented from G3D::Shape.

◆ cylinder() [2/2]

virtual const Cylinder& G3D::CylinderShape::cylinder ( ) const
inlinevirtual

Reimplemented from G3D::Shape.

◆ getRandomSurfacePoint()

virtual void G3D::CylinderShape::getRandomSurfacePoint ( Vector3 P,
Vector3 N = Vector3::ignore,
Random rnd = Random::common() 
) const
inlinevirtual

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

Reimplemented in G3D::MeshShape.

◆ plane() [1/2]

virtual Plane& G3D::Shape::plane ( )
inlinevirtualinherited

Reimplemented in G3D::PlaneShape.

◆ plane() [2/2]

virtual const Plane& G3D::Shape::plane ( ) const
inlinevirtualinherited

Reimplemented in G3D::PlaneShape.

◆ point() [1/2]

virtual Vector3& G3D::Shape::point ( )
inlinevirtualinherited

Reimplemented in G3D::PointShape.

◆ point() [2/2]

virtual const Vector3& G3D::Shape::point ( ) const
inlinevirtualinherited

Reimplemented in G3D::PointShape, and G3D::ArrowShape.

◆ randomInteriorPoint()

virtual Vector3 G3D::CylinderShape::randomInteriorPoint ( Random rnd = Random::common()) const
inlinevirtual

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

Reimplemented in G3D::RayShape.

◆ ray() [2/2]

virtual const Ray& G3D::Shape::ray ( ) const
inlinevirtualinherited

Reimplemented in G3D::RayShape.

◆ render()

virtual void G3D::CylinderShape::render ( RenderDevice rd,
const CoordinateFrame cframe,
Color4  solidColor = Color4(.5,.5, 0,.5),
Color4  wireColor = Color3::black() 
)
virtual

Implements G3D::Shape.

◆ sphere() [1/2]

virtual Sphere& G3D::Shape::sphere ( )
inlinevirtualinherited

Reimplemented in G3D::SphereShape.

◆ sphere() [2/2]

virtual const Sphere& G3D::Shape::sphere ( ) const
inlinevirtualinherited

Reimplemented in G3D::SphereShape.

◆ triangle() [1/2]

virtual Triangle& G3D::Shape::triangle ( )
inlinevirtualinherited

Reimplemented in G3D::TriangleShape.

◆ triangle() [2/2]

virtual const Triangle& G3D::Shape::triangle ( ) const
inlinevirtualinherited

Reimplemented in G3D::TriangleShape.

◆ type()

virtual Type G3D::CylinderShape::type ( ) const
inlinevirtual

Implements G3D::Shape.

◆ typeToString()

static String G3D::Shape::typeToString ( Type  t)
staticinherited

◆ vertexArray()

virtual const Array<Vector3>& G3D::Shape::vertexArray ( ) const
inlinevirtualinherited

Reimplemented in G3D::MeshShape.

◆ volume()

virtual float G3D::CylinderShape::volume ( ) const
inlinevirtual

Volume of the interior of this object.

Implements G3D::Shape.


documentation generated on Wed Nov 24 2021 08:01:54 using doxygen 1.8.15