GLC_lib  2.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Private Attributes | List of all members
GLC_Arrow Class Reference

GLC_Arrow : OpenGL 3D Arrow. More...

#include <glc_arrow.h>

+ Inheritance diagram for GLC_Arrow:

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_BoundingBoxboundingBox ()
 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_Geometryclone () const
 Return a copy of the geometry.
 
Set Functions
GLC_Arrowoperator= (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.
 
- Public Member Functions inherited from GLC_Geometry
 GLC_Geometry (const QString &name, const bool type)
 Default constructor.
 
 GLC_Geometry (const GLC_Geometry &sourceGeom)
 Copy constructor.
 
GLC_Geometryoperator= (const GLC_Geometry &sourceGeom)
 Overload "=" operator.
 
virtual ~GLC_Geometry ()
 Destructor.
 
GLC_uint id () const
 Get Object ID.
 
QString name () const
 Get Object Name.
 
bool isValid (void) const
 Return true if the geometry is valid.
 
bool hasMaterial () const
 Return true if the geometry has material.
 
GLC_MaterialfirstMaterial (void) const
 Return first material of geometry.
 
int materialCount () const
 Return the number of materials.
 
GLC_Materialmaterial (const GLC_uint key) const
 Return the specified mesh sub material.
 
QSet< GLC_Material * > materialSet () const
 Get materials Set.
 
QList< GLC_uintmaterialIds () const
 Get materials ID List.
 
bool containsMaterial (const GLC_uint key) const
 Return true if Material key is in the mesh.
 
bool boundingBoxIsValid () const
 Return true if the bounding box is valid.
 
bool isTransparent () const
 Get the geometry transparency.
 
bool hasTransparentMaterials () const
 Return true if the geometry contains transparent materials.
 
bool usedColorPerVertex () const
 Return true if color per vertex is used.
 
bool typeIsWire () const
 Return true if the geometry type is wireframe.
 
virtual unsigned int faceCount (int lod=0) const
 Get the number of faces.
 
virtual unsigned int VertexCount () const
 Get the number of vertex.
 
GLfloat lineWidth () const
 Return the line width.
 
QColor wireColor () const
 Return this geometry wire color.
 
bool wireDataIsEmpty () const
 Return true if wire data is empty.
 
GLfloatVector wirePositionVector () const
 Return the wire position vector.
 
int wirePolylineCount () const
 Return the number of wire polylines.
 
GLuint wirePolylineOffset (int index) const
 Return the polyline offset from the given index.
 
GLsizei wirePolylineSize (int index) const
 Return the polyline size from the given index.
 
virtual double volume ()
 Return the volume of this geometry.
 
bool vboIsUsed () const
 Return true if this geometry will try to use VBO.
 
virtual void clear ()
 Clear the content of the geometry and makes it empty.
 
virtual void replaceMasterMaterial (GLC_Material *)
 Replace the Master material.
 
void addMaterial (GLC_Material *)
 Add material to the geometry.
 
void colorPerVertex (const bool colorPerVertex)
 Set the color per vertex usage.
 
void updateTransparentMaterialNumber ()
 Update the transparent material number.
 
virtual void reverseNormals ()
 Reverse normal.
 
virtual void setCurrentLod (const int)
 Set the lod Index.
 
void setId (const GLC_uint id)
 Set Geometry Id.
 
void setName (const QString name)
 Set geometry name.
 
GLC_uint addVerticeGroup (const GLfloatVector &vector)
 Add a vertice group to the geometry and returns its id.
 
void setLineWidth (GLfloat lineWidth)
 Set Line width.
 
void setWireColor (const QColor &color)
 Set this geometry wire color.
 
virtual void copyVboToClientSide ()
 Copy VBO to the Client Side.
 
virtual void releaseVboClientSide (bool update=false)
 Release client VBO.
 
virtual void setVboUsage (bool usage)
 Set VBO usage.
 
virtual void glLoadTexture (void)
 Load each textures of materials.
 
virtual void render (const GLC_RenderProperties &)
 Virtual interface for OpenGL execution.
 

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.
 

Additional Inherited Members

- Protected Member Functions inherited from GLC_Geometry
void removeMaterial (GLC_uint)
 Remove the specified material from the geometry.
 
void clearWireAndBoundingBox ()
 Clear the wire data and the bounding box of this geometry.
 
virtual void glPropGeom (const GLC_RenderProperties &)
 Virtual interface for OpenGL Geometry properties.
 
- Protected Attributes inherited from GLC_Geometry
bool m_GeometryIsValid
 Geometry validity.
 
GLC_BoundingBoxm_pBoundingBox
 Bounding box.
 
MaterialHash m_MaterialHash
 Material Hash table.
 
bool m_UseColorPerVertex
 Color per vertex usage.
 
bool m_IsSelected
 Selection state.
 
GLC_WireData m_WireData
 Wire Data.
 
QColor m_WireColor
 The wire color.
 
GLfloat m_LineWidth
 The line width.
 

Detailed Description

GLC_Arrow : OpenGL 3D Arrow.

An GLC_Arrow is a wire Simple Arrow

Definition at line 39 of file glc_arrow.h.

Constructor & Destructor Documentation

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.

Member Function Documentation

const GLC_BoundingBox & GLC_Arrow::boundingBox ( void  )
virtual
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
GLC_Point3d GLC_Arrow::endPoint ( ) const
inline

Return the end point of this arrow.

Definition at line 68 of file glc_arrow.h.

Referenced by setEndPoint().

void GLC_Arrow::glDraw ( const GLC_RenderProperties renderProperties)
privatevirtual

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.

Referenced by setHeadAngle().

double GLC_Arrow::headLenght ( ) const
inline

Return the lenght of the head of this arrow.

Definition at line 72 of file glc_arrow.h.

Referenced by setHeadLength().

GLC_Arrow & GLC_Arrow::operator= ( const GLC_Arrow arrow)

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, m_ViewDir, and GLC_Geometry::operator=().

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(), endPoint(), 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(), headAngle(), 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(), headLenght(), 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(), m_StartPoint, and 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.

Referenced by setStartPoint().

GLC_Vector3d GLC_Arrow::viewDir ( ) const
inline

Return the viewing direction of this arrow.

Definition at line 80 of file glc_arrow.h.

Member Data Documentation

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().


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

©2005-2013 Laurent Ribon