pgl
PrimitiveOpenGL3Dprimitivelibrary
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
pgl::Arrow Class Reference

Arrow Primitive. More...

#include <primitive.h>

Inheritance diagram for pgl::Arrow:
Inheritance graph
[legend]
Collaboration diagram for pgl::Arrow:
Collaboration graph
[legend]

Public Member Functions

 Arrow (double length, double radius, double headlength=-1, double headradius=-1)
 Specifies arrow length, radius, head length, and head radius. More...
 
 Arrow (const Vector3 &start, const Vector3 &end, double radius, double headlength=-1, double headradius=-1)
 Specifies start and end coordinates, as well as radius, head length, and head radius. More...
 
void draw ()
 Draw primitive and its children.
 
- Public Member Functions inherited from pgl::Primitive
 Primitive ()
 Default constructor. More...
 
- Public Member Functions inherited from pgl::Object
 Object ()
 Default constructor. More...
 
- Public Member Functions inherited from pgl::Node
template<class T >
T * attach (T *child)
 Add child to list of sub-objects. More...
 

Protected Member Functions

void make (double length, double radius, double headlength, double headradius)
 
- Protected Member Functions inherited from pgl::Primitive
double align (const Vector3 &start, const Vector3 &end)
 Align primitive along axis. More...
 
virtual void normal (const Vector3 &v)
 Sets norm for subsequent vertices.
 
virtual void vertex (const Vector3 &v)
 Enters vertex into display list.
 
virtual void quad (const Vector3 &v1, const Vector3 &v2, const Vector3 &v3, const Vector3 &v4)
 Draws a four-sided polygon using two triangles. More...
 
virtual void triangle (const Vector3 &v1, const Vector3 &v2, const Vector3 &v3)
 Draws triangle.
 

Protected Attributes

Cylinderbody_
 Arrow body.
 
Conehead_
 Arrow head.
 
- Protected Attributes inherited from pgl::Primitive
GLuint list_
 OpenGL display list identifier.
 

Additional Inherited Members

- Public Attributes inherited from pgl::Primitive
Vector3 color
 Primitive color.
 
- Public Attributes inherited from pgl::Object
Transform transform
 Position and orientation.
 
- Public Attributes inherited from pgl::Node
std::vector< Node * > children
 Sub-objects.
 

Detailed Description

Arrow Primitive.

Consists of a Cylinder body and a Cone head.

Constructor & Destructor Documentation

◆ Arrow() [1/2]

pgl::Arrow::Arrow ( double  length,
double  radius,
double  headlength = -1,
double  headradius = -1 
)
inline

Specifies arrow length, radius, head length, and head radius.

When not specified, head length is radius*6, while head radius is head length/2.

◆ Arrow() [2/2]

pgl::Arrow::Arrow ( const Vector3 start,
const Vector3 end,
double  radius,
double  headlength = -1,
double  headradius = -1 
)
inline

Specifies start and end coordinates, as well as radius, head length, and head radius.

When not specified, head length is radius*6, while head radius is head length/2.


The documentation for this class was generated from the following file: