1 #ifndef _GLSSCHEMATICPOLYLINEINTERCONNECT_H
2 #define _GLSSCHEMATICPOLYLINEINTERCONNECT_H
52 #if( defined( GLSGEN_EXPORT_GLSSCHEMATICPOLYLINEINTERCONNECT ) || defined( GLSGEN_IMPORT_GLSSCHEMATICPOLYLINEINTERCONNECT ) || defined( GLS_EXPORT_GENERATED ) || defined( GLS_IMPORT_GENERATED ) ) \
53 && defined( _MSC_VER )
54 # if defined( GLSGEN_EXPORT_GLSSCHEMATICPOLYLINEINTERCONNECT ) || defined( GLS_EXPORT_GENERATED )
55 # define GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT __declspec( dllexport )
57 # define GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT __declspec( dllimport )
60 # define GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
64 #define LIB_BASE_NAME "gls_schematic_poly_line_interconnect"
73 GLS_SCHEMATICPOLYLINEINTERCONNECT_FIRST_VALUE = GLS_LAST_INITIALIZER + 1,
74 GLS_SCHEMATICPOLYLINEINTERCONNECT_ORIENTATION,
75 GLS_SCHEMATICPOLYLINEINTERCONNECT_LINE_THICKNESS,
76 GLS_SCHEMATICPOLYLINEINTERCONNECT_ROUNDED_CORNERS,
77 GLS_SCHEMATICPOLYLINEINTERCONNECT_CORNER_RADIUS,
78 GLS_SCHEMATICPOLYLINEINTERCONNECT_FORCE_EXACT_CORNER_RADIUS,
79 GLS_SCHEMATICPOLYLINEINTERCONNECT_CORNER_SEGMENTS,
80 GLS_SCHEMATICPOLYLINEINTERCONNECT_INTERCONNECT_TEXTURE_REPEAT_LENGTH,
81 GLS_SCHEMATICPOLYLINEINTERCONNECT_FLOW_TEXTURE_INDEX,
82 GLS_SCHEMATICPOLYLINEINTERCONNECT_FLOW_TEXTURE_REPEAT_LENGTH,
83 GLS_SCHEMATICPOLYLINEINTERCONNECT_SHOW_FLOW,
84 GLS_SCHEMATICPOLYLINEINTERCONNECT_FLOW_RATE,
85 GLS_SCHEMATICPOLYLINEINTERCONNECT_SHOW_FLOW_BLINK,
86 GLS_SCHEMATICPOLYLINEINTERCONNECT_FLOW_BLINK_RATE,
87 GLS_SCHEMATICPOLYLINEINTERCONNECT_FLOW_BLINK_START_COLOR,
88 GLS_SCHEMATICPOLYLINEINTERCONNECT_FLOW_BLINK_END_COLOR,
89 GLS_SCHEMATICPOLYLINEINTERCONNECT_USE_DISPLAY_LIST,
90 GLS_SCHEMATICPOLYLINEINTERCONNECT_LAST_VALUE = GLS_SCHEMATICPOLYLINEINTERCONNECT_USE_DISPLAY_LIST
94 class GlsGloFileAttribute;
106 friend class GlsSchematicPolyLineInterconnectEditor;
116 static GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
DisplayObject* CreateInstance();
132 virtual GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
void Calculate(
double time );
134 virtual GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
void Draw(
void );
140 virtual GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
void SetValue(
int spec, va_list& args );
142 virtual GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
void Scale(
float px,
float py,
float pz,
Vertex* anchor,
int handleBar = 0 );
144 virtual GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
void GetExtents(
float& x,
float& y,
float& z,
float& x1,
float& y1,
float& z1 );
146 virtual GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
bool Hit(
float x,
float y,
float z,
float scale,
const Vector& directionVector,
Vector* collisionPoint );
148 virtual GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
void Rotate(
const Vector& orig,
float angle,
const Vector& axis );
150 virtual GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
Vertex WorldVertex(
unsigned int i );
152 virtual GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
void SetVertices(
unsigned int nPoints,
Vertex* vertices );
154 virtual GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
void DeleteVertex(
unsigned int index );
155 virtual GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
void InsertVertex(
unsigned int index );
178 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
SetLineThickness(
const float lineThickness );
183 virtual float GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
GetLineThickness(
void );
188 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
SetRoundedCorners(
const bool roundedCorners );
193 virtual bool GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
GetRoundedCorners(
void );
199 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
SetCornerRadius(
const float cornerRadius );
204 virtual float GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
GetCornerRadius(
void );
211 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
SetForceExactCornerRadius(
const bool forceExactCornerRadius );
222 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
SetCornerSegments(
const unsigned int cornerSegments );
227 virtual unsigned int GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
GetCornerSegments(
void );
255 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
SetFlowTextureIndex(
const int flowTextureIndex );
268 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
SetFlowTextureRepeatLength(
const float flowTextureRepeatLength );
278 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
SetShowFlow(
const bool showFlow );
283 virtual bool GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
GetShowFlow(
void );
288 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
SetFlowRate(
const float flowRate );
293 virtual float GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
GetFlowRate(
void );
298 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
SetShowFlowBlink(
const bool showFlowBlink );
303 virtual bool GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
GetShowFlowBlink(
void );
308 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
SetFlowBlinkRate(
const float flowBlinkRate );
313 virtual float GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
GetFlowBlinkRate(
void );
339 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
SetUseDisplayList(
const bool useDisplayList );
344 virtual bool GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
GetUseDisplayList(
void );
351 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
SetEndingChamferDistance(
const float endingChamferDistance );
368 inline InterconnectVertex(
const float leftX = 0.0f,
const float leftY = 0.0f,
const float rightX = 0.0f,
const float rightY = 0.0f,
369 const float interconnectU = 0.0f,
const float flowU = 0.0f )
374 , _interconnectU( interconnectU )
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 );
virtual bool GetShowFlowBlink(void)
virtual void SetInterconnectTextureIndex(const int interconnectTextureIndex)
Definition: gls_triangle_storage.h:56
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)
GlsColor _flowBlinkEndColor
Definition: gls_schematic_poly_line_interconnect.h:527
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
Definition: dynamic_array.h:62
float _interconnectU
Definition: gls_schematic_poly_line_interconnect.h:364
Class to contain current OpenGL view, projection and draw matrices.
Definition: util.h:276
virtual VectorArray GetUniqueVerts(const unsigned int numVertices, Vertex *vertices)
virtual void SetValue(int spec, va_list &args)
virtual void SetFlowBlinkEndColor(const GlsColor &endColor)
virtual void Rotate(const Vector &orig, float angle, const Vector &axis)
The Polygon class. Implements Polygons.
Definition: glpolygon.h:55
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:365
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)
virtual GlsColor GetFlowBlinkEndColor(void)
The disti::GLPolygon class. Implements Polygons.
virtual float GetFlowTextureRepeatLength(void)
DynamicArray< InterconnectVertex, true > InterconnectVertexArray
Definition: gls_schematic_poly_line_interconnect.h:380
virtual void SetRoundedCorners(const bool roundedCorners)
float _endingChamferDistance
Definition: gls_schematic_poly_line_interconnect.h:539
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)
Definition: gls_display_list.h:50
int _flowTextureIndex
Definition: gls_schematic_poly_line_interconnect.h:518
virtual unsigned int GetCornerSegments(void)
Definition: gls_glo_file.h:982
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:363
virtual void SetFlowBlinkStartColor(const GlsColor &startColor)
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:368
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:362
Vector _v2
Definition: gls_schematic_poly_line_interconnect.h:385
virtual GlsMatrixType GetOrientationMatrix(void)
virtual void CopyGeometry(DisplayObject *src)
Definition: gls_color.h:53
CornerCircleArray _previewCornerCircles
Definition: gls_schematic_poly_line_interconnect.h:543
float _lineThickness
Definition: gls_schematic_poly_line_interconnect.h:508
virtual bool GetShowFlow(void)
The disti::GlsTriangleStrip2D class.
virtual GlsColor GetFlowBlinkStartColor(void)
virtual void SetUseDisplayList(const bool useDisplayList)
virtual void InsertVertex(unsigned int index)
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:98
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)
DynamicArray< Vector, true > VectorArray
Definition: gls_schematic_poly_line_interconnect.h:399
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)
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
DynamicArray< CornerCircle, true > CornerCircleArray
Definition: gls_schematic_poly_line_interconnect.h:396
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:360
bool _showFlow
Definition: gls_schematic_poly_line_interconnect.h:522
virtual void OrientationChanged(void)
virtual void SetLineThickness(const float lineThickness)
GlsSchematicPolyLineInterconnect(void)