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

GLC_Line : OpenGL 3D Line. More...

#include <glc_line.h>

+ Inheritance diagram for GLC_Line:

Public Member Functions

Constructor / Destructor
 GLC_Line (const GLC_Point3d &, const GLC_Point3d &)
 Construct an GLC_Line by to point.
 
 GLC_Line (const GLC_Line &)
 Copy constructor.
 
virtual ~GLC_Line ()
 Default dstructor.
 
Get Functions
GLC_Point3d point1 (void) const
 Return the point1 coordinate.
 
GLC_Point3d point2 (void) const
 Return the point2 coordinate.
 
virtual const GLC_BoundingBoxboundingBox (void)
 Return the point bounding box.
 
virtual GLC_Geometryclone () const
 Return a copy of the geometry.
 
Set Functions
void setCoordinate (const GLC_Point3d &point1, const GLC_Point3d &point2)
 Set Line coordinate by 3D point.
 
void clear ()
 Clear the content of this line Data and makes it empty.
 
GLC_Lineoperator= (const GLC_Line &line)
 Set this line from the given line and return a reference of this line.
 
- Public Member Functions inherited from GLC_Polylines
 GLC_Polylines ()
 Construct an empty polylines.
 
 GLC_Polylines (const GLC_Polylines &polyline)
 Copy constructor.
 
virtual ~GLC_Polylines ()
 Destructor.
 
const GLC_BoundingBoxboundingBox ()
 Return the polylines bounding box.
 
bool isEmpty () const
 Return true if this polylines is empty.
 
GLC_uint addPolyline (const GLfloatVector &data)
 Add a Polyline to this polylines and returns its id if id are managed.
 
GLC_uint addPolyline (const QList< GLC_Point3d > &pointsList)
 Add polyline with the given list of points to this polylines and returns its id if id are managed.
 
GLC_uint addPolyline (const QList< GLC_Point3df > &pointsList)
 Add polyline with the given list of points to this polylines and returns its id if id are managed.
 
GLC_Polylinesoperator= (const GLC_Polylines &polyline)
 Set this polylines from the given polylines and return a reference of this polylines.
 
void clear ()
 Clear the content of this polylines Data and makes it empty.
 
- 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 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_Point1
 First point of the line.
 
GLC_Point3d m_Point2
 First point of the line.
 

Additional Inherited Members

OpenGL Functions
- 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_Line : OpenGL 3D Line.

An GLC_Line is just a simple renderable 3D Line

Definition at line 37 of file glc_line.h.

Constructor & Destructor Documentation

GLC_Line::GLC_Line ( const GLC_Point3d point1,
const GLC_Point3d point2 
)

Construct an GLC_Line by to point.

Definition at line 30 of file glc_line.cpp.

References createWire().

Referenced by clone().

GLC_Line::GLC_Line ( const GLC_Line line)

Copy constructor.

Definition at line 38 of file glc_line.cpp.

References createWire().

GLC_Line::~GLC_Line ( )
virtual

Default dstructor.

Definition at line 46 of file glc_line.cpp.

Member Function Documentation

const GLC_BoundingBox & GLC_Line::boundingBox ( void  )
virtual

Return the point bounding box.

Implements GLC_Geometry.

Definition at line 55 of file glc_line.cpp.

References GLC_Polylines::boundingBox().

void GLC_Line::clear ( )
inlinevirtual

Clear the content of this line Data and makes it empty.

Reimplemented from GLC_Geometry.

Definition at line 86 of file glc_line.h.

References GLC_Polylines::clear().

Referenced by setCoordinate().

GLC_Geometry * GLC_Line::clone ( ) const
virtual

Return a copy of the geometry.

Reimplemented from GLC_Polylines.

Definition at line 60 of file glc_line.cpp.

References GLC_Line().

void GLC_Line::createWire ( )
private

Create the wire.

Definition at line 101 of file glc_line.cpp.

References GLC_Polylines::addPolyline(), m_Point1, and m_Point2.

Referenced by GLC_Line(), and setCoordinate().

void GLC_Line::glDraw ( const GLC_RenderProperties renderProperties)
privatevirtual

Virtual interface for OpenGL Geometry set up.

This Virtual function is implemented here.

Reimplemented from GLC_Polylines.

Definition at line 92 of file glc_line.cpp.

References GLC_Polylines::glDraw().

GLC_Line & GLC_Line::operator= ( const GLC_Line line)

Set this line from the given line and return a reference of this line.

Definition at line 77 of file glc_line.cpp.

References m_Point1, m_Point2, and GLC_Polylines::operator=().

GLC_Point3d GLC_Line::point1 ( void  ) const
inline

Return the point1 coordinate.

Definition at line 62 of file glc_line.h.

Referenced by setCoordinate().

GLC_Point3d GLC_Line::point2 ( void  ) const
inline

Return the point2 coordinate.

Definition at line 66 of file glc_line.h.

Referenced by setCoordinate().

void GLC_Line::setCoordinate ( const GLC_Point3d point1,
const GLC_Point3d point2 
)

Set Line coordinate by 3D point.

Definition at line 69 of file glc_line.cpp.

References clear(), createWire(), m_Point1, m_Point2, point1(), and point2().

Member Data Documentation

GLC_Point3d GLC_Line::m_Point1
private

First point of the line.

Definition at line 122 of file glc_line.h.

Referenced by createWire(), operator=(), and setCoordinate().

GLC_Point3d GLC_Line::m_Point2
private

First point of the line.

Definition at line 125 of file glc_line.h.

Referenced by createWire(), operator=(), and setCoordinate().


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

©2005-2013 Laurent Ribon