1 #ifndef _GLSSCHEMATICPOLYLINEINTERCONNECT_H
2 #define _GLSSCHEMATICPOLYLINEINTERCONNECT_H
46 #include "gls_triangle_storage.h"
52 #if (defined(GLSGEN_EXPORT_GLSSCHEMATICPOLYLINEINTERCONNECT) || \
53 defined(GLSGEN_IMPORT_GLSSCHEMATICPOLYLINEINTERCONNECT) || \
54 defined(GLS_EXPORT_GENERATED) || \
55 defined(GLS_IMPORT_GENERATED)) \
57 # if defined(GLSGEN_EXPORT_GLSSCHEMATICPOLYLINEINTERCONNECT) || defined(GLS_EXPORT_GENERATED)
58 # define GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT __declspec(dllexport)
60 # define GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT __declspec(dllimport)
63 # define GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
67 #define LIB_BASE_NAME "gls_schematic_poly_line_interconnect"
76 GLS_SCHEMATICPOLYLINEINTERCONNECT_FIRST_VALUE = GLS_LAST_INITIALIZER+1,
77 GLS_SCHEMATICPOLYLINEINTERCONNECT_ORIENTATION,
78 GLS_SCHEMATICPOLYLINEINTERCONNECT_LINE_THICKNESS,
79 GLS_SCHEMATICPOLYLINEINTERCONNECT_ROUNDED_CORNERS,
80 GLS_SCHEMATICPOLYLINEINTERCONNECT_CORNER_RADIUS,
81 GLS_SCHEMATICPOLYLINEINTERCONNECT_FORCE_EXACT_CORNER_RADIUS,
82 GLS_SCHEMATICPOLYLINEINTERCONNECT_CORNER_SEGMENTS,
83 GLS_SCHEMATICPOLYLINEINTERCONNECT_INTERCONNECT_TEXTURE_REPEAT_LENGTH,
84 GLS_SCHEMATICPOLYLINEINTERCONNECT_FLOW_TEXTURE_INDEX,
85 GLS_SCHEMATICPOLYLINEINTERCONNECT_FLOW_TEXTURE_REPEAT_LENGTH,
86 GLS_SCHEMATICPOLYLINEINTERCONNECT_SHOW_FLOW,
87 GLS_SCHEMATICPOLYLINEINTERCONNECT_FLOW_RATE,
88 GLS_SCHEMATICPOLYLINEINTERCONNECT_SHOW_FLOW_BLINK,
89 GLS_SCHEMATICPOLYLINEINTERCONNECT_FLOW_BLINK_RATE,
90 GLS_SCHEMATICPOLYLINEINTERCONNECT_FLOW_BLINK_START_COLOR,
91 GLS_SCHEMATICPOLYLINEINTERCONNECT_FLOW_BLINK_END_COLOR,
92 GLS_SCHEMATICPOLYLINEINTERCONNECT_USE_DISPLAY_LIST,
93 GLS_SCHEMATICPOLYLINEINTERCONNECT_LAST_VALUE = GLS_SCHEMATICPOLYLINEINTERCONNECT_USE_DISPLAY_LIST
97 class GlsGloFileAttribute;
109 friend class GlsSchematicPolyLineInterconnectEditor;
119 static GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
DisplayObject* CreateInstance();
135 virtual GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
void Calculate(
double time);
137 virtual GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
void Draw(
void);
143 virtual GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
void SetValue(
int spec,va_list &args);
145 virtual GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
void Scale(
float px,
float py,
float pz,
Vertex *anchor,
int handleBar = 0);
147 virtual GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
void GetExtents(
float &x,
float &y,
float &z,
float &x1,
float &y1,
float &z1);
149 virtual GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
bool Hit(
float x,
float y,
float z,
float scale,
const Vector& directionVector,
Vector* collisionPoint);
151 virtual GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
void Rotate(
const Vector &orig,
float angle,
const Vector &axis);
153 virtual GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
Vertex WorldVertex(
unsigned int i);
155 virtual GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
void SetVertices(
unsigned int nPoints,
Vertex *vertices);
157 virtual GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
void DeleteVertex(
unsigned int index);
158 virtual GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
void InsertVertex(
unsigned int index);
181 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
SetLineThickness(
const float lineThickness );
186 virtual float GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
GetLineThickness(
void );
191 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
SetRoundedCorners(
const bool roundedCorners );
196 virtual bool GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
GetRoundedCorners(
void );
202 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
SetCornerRadius(
const float cornerRadius );
207 virtual float GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
GetCornerRadius(
void );
214 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
SetForceExactCornerRadius(
const bool forceExactCornerRadius );
225 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
SetCornerSegments(
const unsigned int cornerSegments );
230 virtual unsigned int GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
GetCornerSegments(
void );
258 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
SetFlowTextureIndex(
const int flowTextureIndex );
271 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
SetFlowTextureRepeatLength(
const float flowTextureRepeatLength );
281 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
SetShowFlow(
const bool showFlow );
286 virtual bool GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
GetShowFlow(
void );
291 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
SetFlowRate(
const float flowRate );
296 virtual float GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
GetFlowRate(
void );
301 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
SetShowFlowBlink(
const bool showFlowBlink );
306 virtual bool GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
GetShowFlowBlink(
void );
311 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
SetFlowBlinkRate(
const float flowBlinkRate );
316 virtual float GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
GetFlowBlinkRate(
void );
342 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
SetUseDisplayList(
const bool useDisplayList );
347 virtual bool GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
GetUseDisplayList(
void );
354 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
SetEndingChamferDistance(
const float endingChamferDistance );
371 inline InterconnectVertex(
const float leftX = 0.0f,
const float leftY = 0.0f,
const float rightX = 0.0f,
const float rightY = 0.0f,
372 const float interconnectU = 0.0f,
const float flowU = 0.0f ) :
373 _leftX( leftX ), _leftY( leftY ),
374 _rightX( rightX), _rightY( rightY ),
375 _interconnectU( interconnectU ), _flowU( flowU )
424 virtual void BakeInterconnectGeometry(
const bool drawFlowUVs );
465 const bool forceExactCornerRadius,
CornerCircle &c,
bool forceCircle =
false );
484 float curLength,
const float totalLength,
485 const unsigned int numInterconnectRepeats,
const unsigned int numFlowRepeats,
486 const bool lastSegmentInPath =
false );
498 float curLength,
const float totalLength,
499 const unsigned int numInterconnectRepeats,
const unsigned int numFlowRepeats );
504 virtual GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
void SetFromGloData(GlsGloFileAttribute &data);
546 GlsTriangleStrip2D _interconnectTris;
547 GlsTriangleStrip2D _flowTris;
virtual bool GetShowFlowBlink(void)
virtual void SetInterconnectTextureIndex(const int interconnectTextureIndex)
float _flowTextureRepeatLength
Definition: gls_schematic_poly_line_interconnect.h:519
virtual void SetCornerSegments(const unsigned int cornerSegments)
virtual void GetExtents(float &x, float &y, float &z, float &x1, float &y1, float &z1)
Vector _orientation[2]
Definition: gls_schematic_poly_line_interconnect.h:507
bool _isRounded
Definition: gls_schematic_poly_line_interconnect.h:386
virtual bool Hit(float x, float y, float z, float scale, const Vector &directionVector, Vector *collisionPoint)
virtual void SetCornerRadius(const float cornerRadius)
virtual DisplayObject * handle(DisplayEvent *ev)
virtual void SetRebuild(void)
bool _isLeftTurn
Definition: gls_schematic_poly_line_interconnect.h:390
bool _showFlowBlink
Definition: gls_schematic_poly_line_interconnect.h:524
virtual glsColor GetFlowBlinkStartColor(void)
Definition: dynamic_array.h:63
float _interconnectU
Definition: gls_schematic_poly_line_interconnect.h:367
Class to contain current OpenGL view, projection and draw matrices.
Definition: util.h:281
virtual VectorArray GetUniqueVerts(const unsigned int numVertices, Vertex *vertices)
virtual void SetValue(int spec, va_list &args)
virtual void Rotate(const Vector &orig, float angle, const Vector &axis)
The Polygon class. Implements Polygons.
Definition: glpolygon.h:56
virtual float ComputePathLength(CornerCircleArray &cornerCircles)
bool _needsRebuild
Definition: gls_schematic_poly_line_interconnect.h:529
Vector _tangent_v0_v1
Definition: gls_schematic_poly_line_interconnect.h:391
virtual void PreDraw(const OpenGLMatrices &parentMatrices, Culler &culler)
glsColor _flowBlinkStartColor
Definition: gls_schematic_poly_line_interconnect.h:526
virtual void SetInterconnectTextureRepeatLength(const float interconnectTextureRepeatLength)
float _flowU
Definition: gls_schematic_poly_line_interconnect.h:368
GlsDisplayList _flowDisplayList
Definition: gls_schematic_poly_line_interconnect.h:536
bool _drawPreviewPath
Definition: gls_schematic_poly_line_interconnect.h:541
virtual void DeleteVertex(unsigned int index)
virtual int GetInterconnectTextureIndex(void)
The disti::GLPolygon class. Implements Polygons.
virtual float GetFlowTextureRepeatLength(void)
virtual void SetRoundedCorners(const bool roundedCorners)
float _endingChamferDistance
Definition: gls_schematic_poly_line_interconnect.h:539
DynamicArray< InterconnectVertex, true > InterconnectVertexArray
Definition: gls_schematic_poly_line_interconnect.h:380
bool _roundedCorners
Definition: gls_schematic_poly_line_interconnect.h:509
virtual float GetFlowRate(void)
virtual void EnablePreviewPath(const bool enablePreviewPath)
InterconnectVertexArray _interconnectVerts
Definition: gls_schematic_poly_line_interconnect.h:531
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL)
DynamicArray< Vector, true > VectorArray
Definition: gls_schematic_poly_line_interconnect.h:399
Definition: gls_display_list.h:51
int _flowTextureIndex
Definition: gls_schematic_poly_line_interconnect.h:518
virtual unsigned int GetCornerSegments(void)
virtual float AddInterconnectRoundedCorner(InterconnectVertexArray &interconnectVerts, const CornerCircle &c, float lineThickness, float curLength, const float totalLength, const unsigned int numInterconnectRepeats, const unsigned int numFlowRepeats)
virtual int GetFlowTextureIndex(void)
virtual bool GetRoundedCorners(void)
virtual float AddInterconnectLineSegment(InterconnectVertexArray &interconnectVerts, const Vector &start, const Vector &finish, float lineThickness, float curLength, const float totalLength, const unsigned int numInterconnectRepeats, const unsigned int numFlowRepeats, const bool lastSegmentInPath=false)
float _rightY
Definition: gls_schematic_poly_line_interconnect.h:366
virtual void SetFlowBlinkEndColor(const glsColor &endColor)
virtual void GetOrientationVectors(Vector &iVector, Vector &jVector)
virtual void SetFlowTextureIndex(const int flowTextureIndex)
bool _useDisplayList
Definition: gls_schematic_poly_line_interconnect.h:534
virtual void SetFlowTextureRepeatLength(const float flowTextureRepeatLength)
GlsDisplayList _interconnectDisplayList
Definition: gls_schematic_poly_line_interconnect.h:535
float _radius
Definition: gls_schematic_poly_line_interconnect.h:388
virtual void CopyProperties(DisplayObject *src)
virtual void Scale(float px, float py, float pz, Vertex *anchor, int handleBar=0)
virtual void EmitPreviewPathGeometry(void)
InterconnectVertex(const float leftX=0.0f, const float leftY=0.0f, const float rightX=0.0f, const float rightY=0.0f, const float interconnectU=0.0f, const float flowU=0.0f)
Definition: gls_schematic_poly_line_interconnect.h:371
virtual glsColor GetFlowBlinkEndColor(void)
virtual void CalculateTextureCoordinates(void)
virtual void SetForceExactCornerRadius(const bool forceExactCornerRadius)
virtual void Calculate(double time)
virtual void SetFlowRate(const float flowRate)
float _leftY
Definition: gls_schematic_poly_line_interconnect.h:365
Vector _v2
Definition: gls_schematic_poly_line_interconnect.h:385
virtual GlsMatrixType GetOrientationMatrix(void)
virtual void CopyGeometry(DisplayObject *src)
CornerCircleArray _previewCornerCircles
Definition: gls_schematic_poly_line_interconnect.h:543
float _lineThickness
Definition: gls_schematic_poly_line_interconnect.h:508
virtual bool GetShowFlow(void)
glsColor _flowBlinkEndColor
Definition: gls_schematic_poly_line_interconnect.h:527
Definition: gls_color.h:54
virtual void SetUseDisplayList(const bool useDisplayList)
virtual void InsertVertex(unsigned int index)
virtual void SetFlowBlinkStartColor(const glsColor &startColor)
virtual float GetCornerRadius(void)
virtual bool FindCornerCircle(const Vector &v0, const Vector &v1, const Vector &v2, const float desiredCornerRadius, const float minRadius, const bool forceExactCornerRadius, CornerCircle &c, bool forceCircle=false)
virtual float GetInterconnectTextureRepeatLength(void)
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *array)
Definition: gls_schematic_poly_line_interconnect.h:101
virtual void Rebuild(void)
Vector _tangent_v1_v2
Definition: gls_schematic_poly_line_interconnect.h:392
Definition: gls_schematic_poly_line_interconnect.h:383
virtual ~GlsSchematicPolyLineInterconnect()
VectorArray _previewPathPoints
Definition: gls_schematic_poly_line_interconnect.h:542
double _lastCalculateTime
Definition: gls_schematic_poly_line_interconnect.h:530
float _cornerRadius
Definition: gls_schematic_poly_line_interconnect.h:510
Vector _center
Definition: gls_schematic_poly_line_interconnect.h:387
virtual void SetOrientationVectors(const Vector &iVector, const Vector &jVector)
virtual bool GetUseDisplayList(void)
virtual float GetLineThickness(void)
virtual void SetVertices(unsigned int nPoints, Vertex *vertices)
float _interconnectTextureRepeatLength
Definition: gls_schematic_poly_line_interconnect.h:515
virtual void SetShowFlowBlink(const bool showFlowBlink)
virtual bool GetForceExactCornerRadius(void)
virtual void SetEndingChamferDistance(const float endingChamferDistance)
float _flowRate
Definition: gls_schematic_poly_line_interconnect.h:523
virtual void SetAvailableAttributes(unsigned int value)
virtual DisplayObject * CloneObject(bool generateNames=false)
Macros and helper code to determine what subset of C++11/14/17 is available.
virtual Vertex WorldVertex(unsigned int i)
DynamicArray< CornerCircle, true > CornerCircleArray
Definition: gls_schematic_poly_line_interconnect.h:396
float _flowBlinkRate
Definition: gls_schematic_poly_line_interconnect.h:525
double _endTheta
Definition: gls_schematic_poly_line_interconnect.h:389
virtual void SetShowFlow(const bool showFlow)
virtual float GetFlowBlinkRate(void)
virtual void SetFlowBlinkRate(const float flowBlinkRate)
Definition: bmpimage.h:46
unsigned int _cornerSegments
Definition: gls_schematic_poly_line_interconnect.h:514
virtual void EmitInterconnectGeometry(const bool drawFlowUVs)
virtual void VerticesChanged(void)
The disti::GlsDisplayList class.
bool _forceExactCornerRadius
Definition: gls_schematic_poly_line_interconnect.h:511
virtual float GetEndingChamferDistance(void)
Definition: gls_schematic_poly_line_interconnect.h:363
bool _showFlow
Definition: gls_schematic_poly_line_interconnect.h:522
virtual void OrientationChanged(void)
virtual void SetLineThickness(const float lineThickness)
GlsSchematicPolyLineInterconnect(void)