40 #ifndef INCLUDED_GLS_POLYLINE_H
41 #define INCLUDED_GLS_POLYLINE_H
52 #if( defined( GLSGEN_EXPORT_GLSPOLYLINE ) || defined( GLSGEN_IMPORT_GLSPOLYLINE ) || defined( GLS_EXPORT_GENERATED ) || defined( GLS_IMPORT_GENERATED ) ) \
53 && defined( _MSC_VER )
54 # if defined( GLSGEN_EXPORT_GLSPOLYLINE ) || defined( GLS_EXPORT_GENERATED )
55 # define GLSGEN_GLSPOLYLINE_EXPORT __declspec( dllexport )
57 # define GLSGEN_GLSPOLYLINE_EXPORT __declspec( dllimport )
60 # define GLSGEN_GLSPOLYLINE_EXPORT
64 #define LIB_BASE_NAME "gls_poly_line"
73 GLS_POLY_LINE_FIRST_VALUE = GLS_LAST_INITIALIZER + 1,
74 GLS_POLY_LINE_THICKNESS,
76 GLS_POLY_LINE_HALO_COLOR,
77 GLS_POLY_LINE_HALO_THICKNESS,
79 GLS_POLY_LINE_LAST_INITIALIZER = GLS_POLY_LINE_NORMAL
97 friend class GlsPolyLineEditor;
104 DISTI_DEPRECATED(
"This identifier is forbidden by the C++ standard. Use BaseClass instead." )
112 GLSGEN_GLSPOLYLINE_EXPORT
GlsPolyLine(
const GlsPolyLine& that,
const bool generateNames );
117 static GLSGEN_GLSPOLYLINE_EXPORT
DisplayObject* CreateInstance();
121 virtual GLSGEN_GLSPOLYLINE_EXPORT
void GetExtents(
float& minx,
float& miny,
float& minz,
float& maxx,
float& maxy,
float& maxz );
136 virtual GLSGEN_GLSPOLYLINE_EXPORT
void Draw(
void );
141 virtual GLSGEN_GLSPOLYLINE_EXPORT
void Scale(
float px,
float py,
float pz,
Vertex* anchor,
int handleBar );
146 virtual GLSGEN_GLSPOLYLINE_EXPORT
void Rotate(
const Vector& orig,
float angle,
const Vector& axis );
148 virtual GLSGEN_GLSPOLYLINE_EXPORT
bool Hit(
float x,
float y,
float z,
float scale,
const Vector& directionVector,
Vector* collisionPoint );
150 virtual GLSGEN_GLSPOLYLINE_EXPORT
void SetValue(
int spec, va_list& args );
161 virtual GLSGEN_GLSPOLYLINE_EXPORT
void PolygonEnd(
const int end );
170 GLSGEN_GLSPOLYLINE_EXPORT
void Thickness(
const float& val );
175 GLSGEN_GLSPOLYLINE_EXPORT
float Thickness(
void ) {
return _thickness; }
181 GLSGEN_GLSPOLYLINE_EXPORT
void Halo(
const bool& val );
184 GLSGEN_GLSPOLYLINE_EXPORT
bool Halo(
void ) {
return _halo; }
195 GLSGEN_GLSPOLYLINE_EXPORT
void HaloThickness(
const float& val );
202 return _haloThickness;
203 _needsRecalculate =
true;
212 virtual GLSGEN_GLSPOLYLINE_EXPORT
void SetVertices(
unsigned int nPoints,
Vertex* vertices );
215 GLSGEN_GLSPOLYLINE_EXPORT
void DeleteVertexAt(
unsigned int index ) DISTI_METHOD_OVERRIDE;
230 GlsPolyLineTriangleList _triangles;
236 float _haloThickness;
237 GlsPolyLineTriangleList _haloTriangles;
239 bool _needsRecalculate;
241 unsigned int _endCapIndex;
254 void ComputeSegments( GlsPolyLineTriangleList& array,
float thickness,
bool calculatingHalos =
false );
256 void ComputeCorner( GlsPolyLineTriangleList& array,
float thickness,
float cornerRadius,
const Vector& refVert,
const Vector& v1,
const Vector& v2,
const Vector& v3,
const Vector& v4,
const Vector& l1,
const Vector& l2,
bool calculatingHalos =
false );
258 void DrawTriangles( GlsPolyLineTriangleList& array );
virtual void PreDraw(const OpenGLMatrices &parentMatrices, Culler &culler)
void ComputeSegments(void)
Definition: gls_poly_line.h:82
#define DISTI_DEPRECATED(msg)
Defines whether this compiler supports the C++14 deprecated attribute.
Definition: gls_cpp_lang_support.h:436
GlsColor HaloColor(void)
Definition: gls_poly_line.h:190
The disti::DynamicArray class. A templated array of objects capable of dynamically growing...
Class to contain current OpenGL view, projection and draw matrices.
Definition: util.h:296
Vector texCoord
Definition: gls_poly_line.h:85
virtual void GetExtents(float &minx, float &miny, float &minz, float &maxx, float &maxy, float &maxz)
virtual void SetRecalculate(void)
The Polygon class. Implements Polygons.
Definition: glpolygon.h:55
virtual void SetVertices(unsigned int nPoints, Vertex *vertices)
virtual void SetFillColor(const GlsColor &color)
Vector GlobalNormal(void)
Definition: gls_poly_line.h:178
The disti::GLPolygon class. Implements Polygons.
virtual bool Hit(float x, float y, float z, float scale, const Vector &directionVector, Vector *collisionPoint)
virtual void SetValue(int spec, va_list &args)
virtual void Scale(float px, float py, float pz, Vertex *anchor, int handleBar)
Definition: gls_poly_line.h:95
virtual void SetAvailableAttributes(unsigned int value)
Definition: gls_glo_file.h:988
void ComputeCorner(GlsPolyLineTriangleList &array, float thickness, float cornerRadius, const Vector &refVert, const Vector &v1, const Vector &v2, const Vector &v3, const Vector &v4, const Vector &l1, const Vector &l2, bool calculatingHalos=false)
virtual void CopyProperties(DisplayObject *src)
virtual void SetColor(const GlsColor &color)
Vector vertex
Definition: gls_poly_line.h:84
float HaloThickness(void)
Definition: gls_poly_line.h:200
Definition: gls_poly_line.h:89
Definition: gls_vertex_array.h:58
Definition: gls_color.h:53
virtual void Rotate(float angle, int axis=Z_AXIS)
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL)
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *array)
virtual void Scale(float px, float py, float pz, Vertex *anchor, int handleBar=0)
void DeleteVertexAt(unsigned int index) DISTI_METHOD_OVERRIDE
virtual void SetColor(const GlsColor &color)
virtual void Rotate(const Vector &orig, float angle, const Vector &axis)
An object for managing vertices, texture coordinates, colors and normals for GLPolygon and other disp...
bool Halo(void)
Definition: gls_poly_line.h:184
void VerticesChanged(void)
Macros and helper code to determine what subset of C++11/14/17 is available.
float Thickness(void)
Definition: gls_poly_line.h:175
Definition: bmpimage.h:46
void SetFillColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
Definition: display.h:678
virtual int PolygonEnd(void)
virtual void CopyGeometry(DisplayObject *srcArg)
virtual DisplayObject * CloneObject(bool generateNames=false)
Vector normal
Definition: gls_poly_line.h:86
The disti::GLTriMesh class. Implements Triangle Meshes.