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 ) DISTI_METHOD_OVERRIDE;
124 virtual GLSGEN_GLSPOLYLINE_EXPORT
void SetColor(
const GlsColor& color ) DISTI_METHOD_OVERRIDE;
127 virtual GLSGEN_GLSPOLYLINE_EXPORT
void SetFillColor(
const GlsColor& color ) DISTI_METHOD_OVERRIDE;
136 virtual GLSGEN_GLSPOLYLINE_EXPORT
void Draw(
void ) DISTI_METHOD_OVERRIDE;
141 virtual GLSGEN_GLSPOLYLINE_EXPORT
void Scale(
float px,
float py,
float pz,
Vertex* anchor,
int handleBar ) DISTI_METHOD_OVERRIDE;
146 virtual GLSGEN_GLSPOLYLINE_EXPORT
void Rotate(
const Vector& orig,
float angle,
const Vector& axis ) DISTI_METHOD_OVERRIDE;
148 virtual GLSGEN_GLSPOLYLINE_EXPORT
bool Hit(
float x,
float y,
float z,
float scale,
const Vector& directionVector,
Vector* collisionPoint ) DISTI_METHOD_OVERRIDE;
150 virtual GLSGEN_GLSPOLYLINE_EXPORT
void SetValue(
int spec, va_list& args ) DISTI_METHOD_OVERRIDE;
152 virtual GLSGEN_GLSPOLYLINE_EXPORT
void SetAvailableAttributes(
unsigned int value ) DISTI_METHOD_OVERRIDE;
161 virtual GLSGEN_GLSPOLYLINE_EXPORT
void PolygonEnd(
const int end ) DISTI_METHOD_OVERRIDE;
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 ) DISTI_METHOD_OVERRIDE;
215 GLSGEN_GLSPOLYLINE_EXPORT
void DeleteVertexAt(
unsigned int index ) DISTI_METHOD_OVERRIDE;
224 GLSGEN_GLSPOLYLINE_EXPORT
void SetFromGloData(
GlsGloFileAttribute& data ) 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 DisplayObject * CloneObject(bool generateNames=false) DISTI_METHOD_OVERRIDE
void ComputeSegments(void)
virtual void SetValue(int spec, va_list &args) DISTI_METHOD_OVERRIDE
Definition: gls_poly_line.h:82
virtual void Scale(float px, float py, float pz, Vertex *anchor, int handleBar) DISTI_METHOD_OVERRIDE
#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:471
Vector texCoord
Definition: gls_poly_line.h:85
virtual void SetRecalculate(void)
The Polygon class. Implements Polygons.
Definition: glpolygon.h:55
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL) DISTI_METHOD_OVERRIDE
virtual void GetExtents(float &minx, float &miny, float &minz, float &maxx, float &maxy, float &maxz) DISTI_METHOD_OVERRIDE
Vector GlobalNormal(void)
Definition: gls_poly_line.h:178
The disti::GLPolygon class. Implements Polygons.
virtual void Rotate(const Vector &orig, float angle, const Vector &axis) DISTI_METHOD_OVERRIDE
virtual void SetVertices(unsigned int nPoints, Vertex *vertices) DISTI_METHOD_OVERRIDE
Definition: gls_poly_line.h:95
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) DISTI_METHOD_OVERRIDE
virtual void SetFillColor(const GlsColor &color) DISTI_METHOD_OVERRIDE
virtual void CopyGeometry(DisplayObject *srcArg) DISTI_METHOD_OVERRIDE
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
virtual void PreDraw(const OpenGLMatrices &parentMatrices, Culler &culler) DISTI_METHOD_OVERRIDE
Definition: gls_color.h:53
virtual void Rotate(float angle, int axis=Z_AXIS)
virtual bool Hit(float x, float y, float z, float scale, const Vector &directionVector, Vector *collisionPoint) DISTI_METHOD_OVERRIDE
virtual void SetColor(const GlsColor &color) DISTI_METHOD_OVERRIDE
virtual void SetAvailableAttributes(unsigned int value) DISTI_METHOD_OVERRIDE
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *array) DISTI_METHOD_OVERRIDE
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)
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)
virtual void Draw(void) DISTI_METHOD_OVERRIDE
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:675
virtual int PolygonEnd(void)
Vector normal
Definition: gls_poly_line.h:86
The disti::GLTriMesh class. Implements Triangle Meshes.