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

Inherits G3D::Shape.

Public Member Functions

 ArrowShape (const Point3 &point, const Vector3 &vector, const float scale=1.0f)
 
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
 Bounds the graphic representation of the arrow. More...
 
virtual Boxbox ()
 
virtual const Boxbox () const
 
virtual Capsulecapsule ()
 
virtual const Capsulecapsule () const
 
virtual Vector3 center () const
 Set to point. More...
 
virtual Cylindercylinder ()
 
virtual const Cylindercylinder () const
 
virtual void getRandomSurfacePoint (Vector3 &P, Vector3 &N=Vector3::ignore, Random &rnd=Random::common()) const
 Returns a point along the arrow. More...
 
virtual const Array< int > & indexArray () const
 
virtual Planeplane ()
 
virtual const Planeplane () const
 
virtual Vector3point ()
 
const Point3point () const
 
virtual Vector3 randomInteriorPoint (Random &rnd=Random::common()) const
 Returns a random point along the arrow. 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
 
const Vector3vector () 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...
 

Protected Attributes

Point3 m_point
 
float m_scale
 
Vector3 m_vector
 

Constructor & Destructor Documentation

◆ ArrowShape()

G3D::ArrowShape::ArrowShape ( const Point3 point,
const Vector3 vector,
const float  scale = 1.0f 
)
inlineexplicit

Member Function Documentation

◆ area()

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

Bounding axis aligned box of this object.

Implements G3D::Shape.

◆ boundingSphere()

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

Bounds the graphic representation of the arrow.

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

Set to point.

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::ArrowShape::getRandomSurfacePoint ( Vector3 P,
Vector3 N = Vector3::ignore,
Random rnd = Random::common() 
) const
inlinevirtual

Returns a point along the arrow.

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]

const Point3& G3D::ArrowShape::point ( ) const
inlinevirtual

Reimplemented from G3D::Shape.

◆ randomInteriorPoint()

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

Returns a random point along the arrow.

Implements G3D::Shape.

Referenced by getRandomSurfacePoint().

◆ 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::ArrowShape::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::ArrowShape::type ( ) const
inlinevirtual

Implements G3D::Shape.

◆ typeToString()

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

◆ vector()

const Vector3& G3D::ArrowShape::vector ( ) const
inline

◆ vertexArray()

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

Reimplemented in G3D::MeshShape.

◆ volume()

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

Volume of the interior of this object.

Implements G3D::Shape.

Member Data Documentation

◆ m_point

Point3 G3D::ArrowShape::m_point
protected

◆ m_scale

float G3D::ArrowShape::m_scale
protected

◆ m_vector

Vector3 G3D::ArrowShape::m_vector
protected

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