GLC_Arrow : OpenGL 3D Arrow. More...
#include <glc_arrow.h>
Public Member Functions | |
Constructor / Destructor | |
| GLC_Arrow (const GLC_Point3d &startPoint, const GLC_Point3d &endPoint, const GLC_Vector3d &viewDir) | |
| Construct an arrow with the given points and view direction. | |
| GLC_Arrow (const GLC_Arrow &arrow) | |
| Copy constructor. | |
| virtual | ~GLC_Arrow () |
| Destructor. | |
Get Functions | |
| const GLC_BoundingBox & | boundingBox () |
| Return the arrow bounding box. | |
| GLC_Point3d | startPoint () const |
| Return the start point of this arrow. | |
| GLC_Point3d | endPoint () const |
| Return the end point of this arrow. | |
| double | headLenght () const |
| Return the lenght of the head of this arrow. | |
| double | headAngle () const |
| Return the angle in radians of the head of this arrow. | |
| GLC_Vector3d | viewDir () const |
| Return the viewing direction of this arrow. | |
| virtual GLC_Geometry * | clone () const |
| Return a copy of the geometry. | |
Set Functions | |
| GLC_Arrow & | operator= (const GLC_Arrow &arrow) |
| Set this arrow from the given arrow. | |
| void | setStartPoint (const GLC_Point3d &startPoint) |
| Set the start point of this arrow. | |
| void | setEndPoint (const GLC_Point3d &endPoint) |
| Set the end point of this arrow. | |
| void | setHeadLength (double headLenght) |
| Set the length of the head of this arrow to the given lenght. | |
| void | setHeadAngle (double headAngle) |
| Set the angle of the head of this arrow to the given angle in radians. | |
| void | setViewDir (const GLC_Vector3d &viewDir) |
| Set the view dir of this arrow to the given vector 3d. | |
Private Member Functions | |
OpenGL Functions | |
| virtual void | glDraw (const GLC_RenderProperties &) |
| Virtual interface for OpenGL Geometry set up. | |
Private services Functions | |
| void | createWire () |
| Create the wire. | |
Private Attributes | |
| GLC_Point3d | m_StartPoint |
| Start point. | |
| GLC_Point3d | m_EndPoint |
| End point. | |
| double | m_HeadLenght |
| Head lenght. | |
| double | m_HeadAngle |
| Head angle. | |
| GLC_Vector3d | m_ViewDir |
| The arrow viewing dir. | |
GLC_Arrow : OpenGL 3D Arrow.
An GLC_Arrow is a wire Simple Arrow
Definition at line 39 of file glc_arrow.h.
| GLC_Arrow::GLC_Arrow | ( | const GLC_Point3d & | startPoint, | |
| const GLC_Point3d & | endPoint, | |||
| const GLC_Vector3d & | viewDir | |||
| ) |
Construct an arrow with the given points and view direction.
Definition at line 29 of file glc_arrow.cpp.
Referenced by clone().
| GLC_Arrow::GLC_Arrow | ( | const GLC_Arrow & | arrow | ) |
Copy constructor.
Definition at line 40 of file glc_arrow.cpp.
| GLC_Arrow::~GLC_Arrow | ( | ) | [virtual] |
Destructor.
Definition at line 51 of file glc_arrow.cpp.
| const GLC_BoundingBox & GLC_Arrow::boundingBox | ( | void | ) | [virtual] |
Return the arrow bounding box.
Implements GLC_Geometry.
Definition at line 58 of file glc_arrow.cpp.
References GLC_WireData::boundingBox(), GLC_BoundingBox::combine(), createWire(), GLC_WireData::isEmpty(), GLC_Geometry::m_pBoundingBox, and GLC_Geometry::m_WireData.
| GLC_Geometry * GLC_Arrow::clone | ( | ) | const [virtual] |
Return a copy of the geometry.
Implements GLC_Geometry.
Definition at line 69 of file glc_arrow.cpp.
References GLC_Arrow().
| void GLC_Arrow::createWire | ( | ) | [private] |
Create the wire.
Definition at line 150 of file glc_arrow.cpp.
References GLC_Geometry::addVerticeGroup(), GLC_WireData::isEmpty(), m_EndPoint, m_HeadAngle, m_HeadLenght, m_StartPoint, m_ViewDir, GLC_Geometry::m_WireData, GLC_Matrix4x4::setColumn(), GLC_Vector3d::x(), GLC_Vector3d::y(), and GLC_Vector3d::z().
Referenced by boundingBox(), and glDraw().
| GLC_Point3d GLC_Arrow::endPoint | ( | ) | const [inline] |
Return the end point of this arrow.
Definition at line 68 of file glc_arrow.h.
| void GLC_Arrow::glDraw | ( | const GLC_RenderProperties & | renderProperties | ) | [private, virtual] |
Virtual interface for OpenGL Geometry set up.
This Virtual function is implemented here.
Throw GLC_OpenGlException
Implements GLC_Geometry.
Definition at line 140 of file glc_arrow.cpp.
References createWire(), GLC_WireData::glDraw(), GLC_WireData::isEmpty(), and GLC_Geometry::m_WireData.
| double GLC_Arrow::headAngle | ( | ) | const [inline] |
Return the angle in radians of the head of this arrow.
Definition at line 76 of file glc_arrow.h.
| double GLC_Arrow::headLenght | ( | ) | const [inline] |
Return the lenght of the head of this arrow.
Definition at line 72 of file glc_arrow.h.
Set this arrow from the given arrow.
Definition at line 77 of file glc_arrow.cpp.
References m_EndPoint, m_HeadAngle, m_HeadLenght, m_StartPoint, and m_ViewDir.
| void GLC_Arrow::setEndPoint | ( | const GLC_Point3d & | endPoint | ) |
Set the end point of this arrow.
Definition at line 100 of file glc_arrow.cpp.
References GLC_Geometry::clearWireAndBoundingBox(), and m_EndPoint.
| void GLC_Arrow::setHeadAngle | ( | double | headAngle | ) |
Set the angle of the head of this arrow to the given angle in radians.
Definition at line 118 of file glc_arrow.cpp.
References GLC_Geometry::clearWireAndBoundingBox(), and m_HeadAngle.
| void GLC_Arrow::setHeadLength | ( | double | headLenght | ) |
Set the length of the head of this arrow to the given lenght.
Definition at line 109 of file glc_arrow.cpp.
References GLC_Geometry::clearWireAndBoundingBox(), and m_HeadLenght.
Referenced by GLC_CuttingPlane::create3DviewInstance().
| void GLC_Arrow::setStartPoint | ( | const GLC_Point3d & | startPoint | ) |
Set the start point of this arrow.
Definition at line 91 of file glc_arrow.cpp.
References GLC_Geometry::clearWireAndBoundingBox(), and m_StartPoint.
| void GLC_Arrow::setViewDir | ( | const GLC_Vector3d & | viewDir | ) |
Set the view dir of this arrow to the given vector 3d.
Definition at line 127 of file glc_arrow.cpp.
References GLC_Geometry::clearWireAndBoundingBox(), m_ViewDir, and GLC_Vector3d::normalize().
Referenced by GLC_CuttingPlane::moveManipulatorRep().
| GLC_Point3d GLC_Arrow::startPoint | ( | ) | const [inline] |
Return the start point of this arrow.
Definition at line 64 of file glc_arrow.h.
| GLC_Vector3d GLC_Arrow::viewDir | ( | ) | const [inline] |
Return the viewing direction of this arrow.
Definition at line 80 of file glc_arrow.h.
GLC_Point3d GLC_Arrow::m_EndPoint [private] |
End point.
Definition at line 144 of file glc_arrow.h.
Referenced by createWire(), operator=(), and setEndPoint().
double GLC_Arrow::m_HeadAngle [private] |
Head angle.
Definition at line 150 of file glc_arrow.h.
Referenced by createWire(), operator=(), and setHeadAngle().
double GLC_Arrow::m_HeadLenght [private] |
Head lenght.
Definition at line 147 of file glc_arrow.h.
Referenced by createWire(), operator=(), and setHeadLength().
GLC_Point3d GLC_Arrow::m_StartPoint [private] |
Start point.
Definition at line 141 of file glc_arrow.h.
Referenced by createWire(), operator=(), and setStartPoint().
GLC_Vector3d GLC_Arrow::m_ViewDir [private] |
The arrow viewing dir.
Definition at line 153 of file glc_arrow.h.
Referenced by createWire(), operator=(), and setViewDir().