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

Inherits G3D::Shape.

Public Member Functions

 RayShape (const G3D::Ray &r)
 
virtual float area () const
 Surface area of the outside of this object. More...
 
virtual CoordinateFrame & axes ()
 
virtual AABox boundingAABox () const
 Bounds the graphic representation of the ray. More...
 
virtual Sphere boundingSphere () const
 Bounds the graphic representation of the ray. More...
 
virtual Box & box ()
 
virtual const Box & box () const
 
virtual Capsule & capsule ()
 
virtual const Capsule & capsule () const
 
virtual Vector3 center () const
 Set to origin of ray. More...
 
virtual Cylinder & cylinder ()
 
virtual const Cylinder & cylinder () const
 
virtual void getRandomSurfacePoint (Vector3 &P, Vector3 &N=Vector3::ignore, Random &rnd=Random::common()) const
 Returns a point along the ray. 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
 Returns a random point along the ray. 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...
 

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

◆ RayShape()

G3D::RayShape::RayShape ( const G3D::Ray &  r)
inlineexplicit

Member Function Documentation

◆ area()

virtual float G3D::RayShape::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::RayShape::boundingAABox ( ) const
inlinevirtual

Bounds the graphic representation of the ray.

Implements G3D::Shape.

◆ boundingSphere()

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

Bounds the graphic representation of the ray.

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::RayShape::center ( ) const
inlinevirtual

Set to origin of ray.

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

Reimplemented in G3D::CylinderShape.

◆ cylinder() [2/2]

virtual const Cylinder& G3D::Shape::cylinder ( ) const
inlinevirtualinherited

Reimplemented in G3D::CylinderShape.

◆ getRandomSurfacePoint()

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

Returns a point along the ray.

The normal is NaN

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::RayShape::randomInteriorPoint ( Random &  rnd = Random::common()) const
inlinevirtual

Returns a random point along the ray.

Implements G3D::Shape.

Referenced by getRandomSurfacePoint().

◆ ray() [1/2]

virtual Ray& G3D::RayShape::ray ( )
inlinevirtual

Reimplemented from G3D::Shape.

◆ ray() [2/2]

virtual const Ray& G3D::RayShape::ray ( ) const
inlinevirtual

Reimplemented from G3D::Shape.

◆ render()

virtual void G3D::RayShape::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::RayShape::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::RayShape::volume ( ) const
inlinevirtual

Volume of the interior of this object.

Implements G3D::Shape.


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