| GL Studio C++ Runtime API

gls_schematic_poly_line_interconnect.h
Go to the documentation of this file.
1#ifndef _GLSSCHEMATICPOLYLINEINTERCONNECT_H
2#define _GLSSCHEMATICPOLYLINEINTERCONNECT_H
3/*! \file
4 \brief The disti::GlsSchematicPolyLineInterconnect class.
5
6 \par Copyright Information
7
8 Copyright (c) 2017 by The DiSTI Corporation.<br>
9 11301 Corporate Blvd; Suite 100<br>
10 Orlando, Florida 32817<br>
11 USA<br>
12 <br>
13 All rights reserved.<br>
14
15 This Software contains proprietary trade secrets of DiSTI and may not be
16 reproduced, in whole or part, in any form, or by any means of electronic,
17 mechanical, or otherwise, without the written permission of DiSTI. Said
18 permission may be derived through the purchase of applicable DiSTI product
19 licenses which detail the distribution rights of this content and any
20 Derivative Works based on this or other copyrighted DiSTI Software.
21
22 NO WARRANTY. THE SOFTWARE IS PROVIDED "AS-IS," WITHOUT WARRANTY OF ANY KIND,
23 AND ANY USE OF THIS SOFTWARE PRODUCT IS AT YOUR OWN RISK. TO THE MAXIMUM EXTENT
24 PERMITTED BY APPLICABLE LAW, DISTI AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES
25 AND CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
26 IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY AND/OR FITNESS FOR A
27 PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT, WITH REGARD TO THE SOFTWARE.
28
29 LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW,
30 IN NO EVENT SHALL DISTI OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
31 INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION,
32 DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS
33 INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR
34 INABILITY TO USE THE SOFTWARE, EVEN IF DISTI HAS BEEN ADVISED OF THE POSSIBILITY
35 OF SUCH DAMAGES. DISTI'S ENTIRE LIABILITY AND YOUR EXCLUSIVE REMEDY SHALL NOT
36 EXCEED FIVE DOLLARS (US$5.00).
37
38 The aforementioned terms and restrictions are governed by the laws of the
39 State of Florida and the United States of America.
40*/
41
42#include "glpolygon.h"
43#include "gls_cpp_lang_support.h"
44
45#ifdef GLES
46# include "gls_triangle_storage.h"
47#else
48# include "gls_display_list.h"
49#endif
50
51/// Provides support for creating DLLs.
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 )
56# else
57# define GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT __declspec( dllimport )
58# endif
59#else
60# define GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
61#endif
62///////////////////////////////////////////////////////////////////////////////
63
64/// Automatically link the runtime library plugin (on Windows).
65#define LIB_BASE_NAME "gls_schematic_poly_line_interconnect"
66#include "gls_auto_lib.h"
67#undef LIB_BASE_NAME
68
69 namespace disti
70{
71// SetValue enumerations
72 enum
73{
74 GLS_SCHEMATICPOLYLINEINTERCONNECT_FIRST_VALUE = GLS_LAST_INITIALIZER + 1,
75 GLS_SCHEMATICPOLYLINEINTERCONNECT_ORIENTATION,
76 GLS_SCHEMATICPOLYLINEINTERCONNECT_LINE_THICKNESS,
77 GLS_SCHEMATICPOLYLINEINTERCONNECT_ROUNDED_CORNERS,
78 GLS_SCHEMATICPOLYLINEINTERCONNECT_CORNER_RADIUS,
79 GLS_SCHEMATICPOLYLINEINTERCONNECT_FORCE_EXACT_CORNER_RADIUS,
80 GLS_SCHEMATICPOLYLINEINTERCONNECT_CORNER_SEGMENTS,
81 GLS_SCHEMATICPOLYLINEINTERCONNECT_INTERCONNECT_TEXTURE_REPEAT_LENGTH,
82 GLS_SCHEMATICPOLYLINEINTERCONNECT_FLOW_TEXTURE_INDEX,
83 GLS_SCHEMATICPOLYLINEINTERCONNECT_FLOW_TEXTURE_REPEAT_LENGTH,
84 GLS_SCHEMATICPOLYLINEINTERCONNECT_SHOW_FLOW,
85 GLS_SCHEMATICPOLYLINEINTERCONNECT_FLOW_RATE,
86 GLS_SCHEMATICPOLYLINEINTERCONNECT_SHOW_FLOW_BLINK,
87 GLS_SCHEMATICPOLYLINEINTERCONNECT_FLOW_BLINK_RATE,
88 GLS_SCHEMATICPOLYLINEINTERCONNECT_FLOW_BLINK_START_COLOR,
89 GLS_SCHEMATICPOLYLINEINTERCONNECT_FLOW_BLINK_END_COLOR,
90 GLS_SCHEMATICPOLYLINEINTERCONNECT_USE_DISPLAY_LIST,
91 GLS_SCHEMATICPOLYLINEINTERCONNECT_LAST_VALUE = GLS_SCHEMATICPOLYLINEINTERCONNECT_USE_DISPLAY_LIST
92};
93
94#ifdef GLES
95 class GlsGloFileAttribute;
96#endif
97
98/** Runtime implementation of a GlsSchematicPolyLineInterconnect */
99 class GlsSchematicPolyLineInterconnect : public GLPolygon
100{
101 private:
102 GlsSchematicPolyLineInterconnect& operator=( const GlsSchematicPolyLineInterconnect& ) DISTI_SPECIAL_MEM_FUN_DELETE;
103 GlsSchematicPolyLineInterconnect( const GlsSchematicPolyLineInterconnect& ) DISTI_SPECIAL_MEM_FUN_DELETE;
104
105 public:
106 DISTI_DEPRECATED( "This identifier is forbidden by the C++ standard. Use BaseClass instead." )
107 typedef GLPolygon _BaseClass; ///< Deprecated typedef for the base class.
108 typedef GLPolygon BaseClass; ///< Typedef for the base class.
109 friend class GlsSchematicPolyLineInterconnectEditor;
110
111 GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT GlsSchematicPolyLineInterconnect();
112
113 /// Copy constructor
114 /// \param that The object to copy from.
115 /// \param generateNames Whether or not to generate an instance name for this object.
116 GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT GlsSchematicPolyLineInterconnect( const GlsSchematicPolyLineInterconnect& that, const bool generateNames );
117
118 /** Destructs a GlsSchematicPolyLineInterconnect object */
119 virtual GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT ~GlsSchematicPolyLineInterconnect();
120
121 /// \return A pointer to a new GlsSchematicPolyLineInterconnect object.
122 static GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT DisplayObject* CreateInstance();
123
124 //////////////////////////////////////////////////
125 // Overridden base class methods
126 //////////////////////////////////////////////////
127
128 virtual GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT void SetAvailableAttributes( unsigned int value ) DISTI_METHOD_OVERRIDE;
129 virtual GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT DisplayObject* CloneObject( bool generateNames = false ) DISTI_METHOD_OVERRIDE;
130 virtual GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT void CopyGeometry( DisplayObject* src ) DISTI_METHOD_OVERRIDE;
131 virtual GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT void CopyProperties( DisplayObject* src ) DISTI_METHOD_OVERRIDE;
132
133#ifndef GLES
134 virtual GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT InterfaceListType* GetCppInterfaceDescription( InterfaceListType* addToThisList = NULL ) DISTI_METHOD_OVERRIDE;
135 virtual GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT void GetCppInterfaceDescriptionFree( InterfaceListType* array ) DISTI_METHOD_OVERRIDE;
136#endif
137
138 virtual GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT void Calculate( double time ) DISTI_METHOD_OVERRIDE;
139 virtual GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT void PreDraw( const OpenGLMatrices& parentMatrices, Culler& culler ) DISTI_METHOD_OVERRIDE;
140 virtual GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT void Draw() DISTI_METHOD_OVERRIDE;
141
142 virtual GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT void CalculateTextureCoordinates() DISTI_METHOD_OVERRIDE;
143
144 virtual GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT DisplayObject* handle( DisplayEvent* ev ) DISTI_METHOD_OVERRIDE;
145
146 virtual GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT void SetValue( int spec, va_list& args ) DISTI_METHOD_OVERRIDE;
147
148 virtual GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT void Scale( float px, float py, float pz, Vertex* anchor, int handleBar = 0 ) DISTI_METHOD_OVERRIDE;
149
150 virtual GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT void GetExtents( float& x, float& y, float& z, float& x1, float& y1, float& z1 ) DISTI_METHOD_OVERRIDE;
151
152 virtual GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT bool Hit( float x, float y, float z, float scale, const Vector& directionVector, Vector* collisionPoint ) DISTI_METHOD_OVERRIDE;
153
154 virtual GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT void Rotate( const Vector& orig, float angle, const Vector& axis ) DISTI_METHOD_OVERRIDE;
155
156 virtual GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT Vertex WorldVertex( unsigned int i ) DISTI_METHOD_OVERRIDE;
157
158 virtual GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT void SetVertices( unsigned int nPoints, Vertex* vertices ) DISTI_METHOD_OVERRIDE;
159
160 GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT void DeleteVertexAt( unsigned int index ) DISTI_METHOD_OVERRIDE;
161 GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT void InsertVertexAt( unsigned int index ) DISTI_METHOD_OVERRIDE;
162
163 //////////////////////////////////////////////////
164 // GlsSchematicPolyLineInterconnect specific operations
165 //////////////////////////////////////////////////
166
167 /** set the i and j orientation vectors that orient the 2-D schematic in 3 space
168 * \param iVector new iVector
169 * \param jVector new jVector
170 * \pre i and j should be orhogonal
171 */
172 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT SetOrientationVectors( const Vector& iVector, const Vector& jVector );
173
174 /** get the i and j orientation vectors that orient the 2-D schematic in 3 space
175 * \param iVector [out] iVector
176 * \param jVector [out] jVector
177 */
178 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT GetOrientationVectors( Vector& iVector /*out*/, Vector& jVector /*out*/ );
179
180 /** set the line thickness in logical units
181 * \param lineThickness new line thickness in logical units
182 * \pre lineThickness > 0.0f
183 */
184 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT SetLineThickness( const float lineThickness );
185
186 /** get the line thickness in logical units
187 * \return the line thickness in logical units
188 */
189 virtual float GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT GetLineThickness();
190
191 /** set rounded corners
192 * \param roundedCorners true for rounded corners
193 */
194 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT SetRoundedCorners( const bool roundedCorners );
195
196 /** get rounded corners
197 * \return rounded corners
198 */
199 virtual bool GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT GetRoundedCorners();
200
201 /** set the corner radius in logical units
202 * \param cornerRadius new corner radisu in logical units
203 * \pre cornerRadius > 0.0f
204 */
205 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT SetCornerRadius( const float cornerRadius );
206
207 /** get the corner radius in logical units
208 * \return the corner radius in logical units
209 */
210 virtual float GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT GetCornerRadius();
211
212 /** set force exact corner radius
213 * \param forceExactCornerRadius true to force rounded corners to use the exact corner radius
214 * specified by SetCornerRadius(). If true, a corner that cannot be made
215 * with this radius will not be rounded.
216 */
217 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT SetForceExactCornerRadius( const bool forceExactCornerRadius );
218
219 /** get force exact corner radius state
220 * \return force exact corner radius state
221 */
222 virtual bool GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT GetForceExactCornerRadius();
223
224 /** set the number of segments used in rounded corners
225 * \param cornerSegments number of segments to use in rounded corners
226 * \pre 2 <= cornerSegments <= 100
227 */
228 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT SetCornerSegments( const unsigned int cornerSegments );
229
230 /** get the number of segments used in rounded corners
231 * \return the number of segments used in rounded corners
232 */
233 virtual unsigned int GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT GetCornerSegments();
234
235 /** set the interconnect texture index
236 * \param interconnectTextureIndex new interconnect texture index else NO_TEXTURE if no interconnect texture
237 */
238 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT SetInterconnectTextureIndex( const int interconnectTextureIndex );
239
240 /** get the interconnect texture index else NO_TEXTURE if no interconnect texture
241 * \return the interconnect texture index else NO_TEXTURE if no interconnect texture
242 */
243 virtual int GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT GetInterconnectTextureIndex();
244
245 /** set the number of logical units per interconnect texture repeat ( >0.0 )
246 * NOTE: number of actual repeats for the whole interconnect is always rounded
247 * to the nearest whole number so that adjacent interconnect's textures lineup
248 * \param interconnectTextureRepeatLength new interconnect texture repeat length
249 * \pre interconnectTextureRepeatLength > 0.0f
250 */
251 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT SetInterconnectTextureRepeatLength( const float interconnectTextureRepeatLength );
252
253 /** get the number of logical units per interconnect texture repeat ( >0.0 )
254 * \return the number of logical units per interconnect texture repeat ( >0.0 )
255 */
256 virtual float GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT GetInterconnectTextureRepeatLength();
257
258 /** set the flow texture index
259 * \param flowTextureIndex new flow texture index else NO_TEXTURE if no flow texture
260 */
261 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT SetFlowTextureIndex( const int flowTextureIndex );
262
263 /** get the flow texture index else NO_TEXTURE if no flow texture
264 * \return the flow texture index else NO_TEXTURE if no flow texture
265 */
266 virtual int GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT GetFlowTextureIndex();
267
268 /** set the number of logical units per flow texture repeat ( >0.0 )
269 * NOTE: number of actual repeats for the whole interconnect is always rounded
270 * to the nearest whole number so that adjacent interconnect's textures lineup
271 * \param flowTextureRepeatLength new flow texture repeat length
272 * \pre flowTextureRepeatLength > 0.0f
273 */
274 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT SetFlowTextureRepeatLength( const float flowTextureRepeatLength );
275
276 /** get the number of logical units per flow texture repeat ( >0.0 )
277 * \return the number of logical units per flow texture repeat ( >0.0 )
278 */
279 virtual float GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT GetFlowTextureRepeatLength();
280
281 /** set whether or not the flow is displayed
282 * \param showFlow true to show flow else false
283 */
284 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT SetShowFlow( const bool showFlow );
285
286 /** get whether or not the flow is displayed
287 * \return true if flow is show else false
288 */
289 virtual bool GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT GetShowFlow();
290
291 /** set the flow rate in "flow textures" / second
292 * \param flowRate flow rate in "flow textures" / second
293 */
294 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT SetFlowRate( const float flowRate );
295
296 /** get the flow rate in "flow textures" / second
297 * \return the flow rate in "flow textures" / second
298 */
299 virtual float GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT GetFlowRate();
300
301 /** set whether or not the flow blink is displayed (NOTE: normal flow is not drawn if flow blink is true)
302 * \param showFlowBlink true to show flow blink else false
303 */
304 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT SetShowFlowBlink( const bool showFlowBlink );
305
306 /** get whether or not the flow blink is displayed (NOTE: normal flow is not drawn if flow blink is true)
307 * \return true if flow blink is shown else false
308 */
309 virtual bool GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT GetShowFlowBlink();
310
311 /** set the flow blink rate in hz
312 * \param flowBlinkRate flow blink rate in hz
313 */
314 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT SetFlowBlinkRate( const float flowBlinkRate );
315
316 /** get the flow blink rate in hz
317 * \return the flow blink rate in hz
318 */
319 virtual float GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT GetFlowBlinkRate();
320
321 /** set the flow blink start color
322 * \param startColor flow blink start color
323 */
324 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT SetFlowBlinkStartColor( const GlsColor& startColor );
325
326 /** get the flow blink start color
327 * \return the flow blink start color
328 */
329 virtual GlsColor GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT GetFlowBlinkStartColor();
330
331 /** set the flow blink end color
332 * \param endColor flow blink end color
333 */
334 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT SetFlowBlinkEndColor( const GlsColor& endColor );
335
336 /** get the flow blink end color
337 * \return the flow blink end color
338 */
339 virtual GlsColor GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT GetFlowBlinkEndColor();
340
341#ifndef GLES
342 /** enable/disable using display list for drawing
343 * \param useDisplayList true to use display list
344 */
345 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT SetUseDisplayList( const bool useDisplayList );
346
347 /** get use display list
348 * \return true if using display list for drawing
349 */
350 virtual bool GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT GetUseDisplayList();
351#endif
352
353 /** set the last segment chamfer distance (NOTE: not controllable in editor, usually used by the GlsSchematicTeeInterconnect plugin at runtime)
354 * \param endingChamferDistance distance from end of last line segment to start chamfer ( 0.0f to disable )
355 * \pre endingChamferDistance >= 0.0f
356 */
357 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT SetEndingChamferDistance( const float endingChamferDistance );
358
359 /** get the last segment chamfer distance (NOTE: not controllable in editor, usually used by the GlsSchematicTeeInterconnect plugin at runtime)
360 * \return distance from end of last line segment to start chamfer ( 0.0f to disable )
361 */
362 virtual float GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT GetEndingChamferDistance();
363
364 protected:
365 /** helper struct for storing computed verts for interconnect */
366 struct InterconnectVertex
367 {
368 float _leftX; ///< Left side X coord in 2D plane.
369 float _leftY; ///< Left side Y coord in 2D plane.
370 float _rightX; ///< Right side X coord in 2D plane.
371 float _rightY; ///< Right side Y coord in 2D plane.
372
373 float _interconnectU; ///< Corresponding U texture coord for interconnect texture.
374 float _flowU; ///< Corresponding U texture coord for flow texture.
375
376 /// Constructor
377 /// \param leftX Left side X coord in 2D plane.
378 /// \param leftY Left side Y coord in 2D plane.
379 /// \param rightX Right side X coord in 2D plane.
380 /// \param rightY Right side Y coord in 2D plane.
381 /// \param interconnectU Corresponding U texture coord for interconnect texture.
382 /// \param flowU Corresponding U texture coord for flow texture.
383 inline InterconnectVertex( const float leftX = 0.0f, const float leftY = 0.0f, const float rightX = 0.0f, const float rightY = 0.0f,
384 const float interconnectU = 0.0f, const float flowU = 0.0f )
385 : _leftX( leftX )
386 , _leftY( leftY )
387 , _rightX( rightX )
388 , _rightY( rightY )
389 , _interconnectU( interconnectU )
390 , _flowU( flowU )
391 {}
392 };
393
394 /** array of InterconnectVertex */
395 typedef DynamicArray<InterconnectVertex> InterconnectVertexArray;
396
397 /** helper struct for storing info for corners in the poly line */
398 struct CornerCircle
399 {
400 Vector _v0; ///< Corner flows from _v0, _v1, _v2.
401 Vector _v1; ///< Corner flows from _v0, _v1, _v2.
402 Vector _v2; ///< Corner flows from _v0, _v1, _v2.
403 bool _isRounded; ///< True if the corner is to be rounded.
404 Vector _center; ///< Center of circle making round corner.
405 float _radius; ///< Radius of circle making round corner.
406 double _startTheta; ///< Starting theta for arc in circle making round corner.
407 double _endTheta; ///< Ending theta for arc in circle making round corner.
408 bool _isLeftTurn; ///< True if corners is a left turn else false.
409 Vector _tangent_v0_v1; ///< Tangent point of corner circle on v0, v1.
410 Vector _tangent_v1_v2; ///< Tangent point of corner circle on v1, v2.
411 };
412
413 /** array of CornerCircle */
414 typedef DynamicArray<CornerCircle> CornerCircleArray;
415
416 /** array of Vector */
417 typedef DynamicArray<Vector> VectorArray;
418
419 /** notify that vertices have changed
420 */
421 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT VerticesChanged();
422
423 /** notify that the orientation vectors have changed
424 */
425 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT OrientationChanged();
426
427 /** get the rotation matrix for the current _orientation vectors
428 * \return the rotation matrix for the current _orientation vectors
429 */
430 virtual GlsMatrixType GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT GetOrientationMatrix();
431
432 /** flag line to be rebuilt on next draw */
433 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT SetRebuild();
434
435 /** rebuild the polyline */
436 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT Rebuild();
437
438#ifdef GLES
439 /** prepare and bake the geometry in _interconnectQuads to a VBO as quads and an outline
440 * \param drawFlowUVs true to draw with flow UV's else false to draw with interconnect UV's
441 */
442 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT BakeInterconnectGeometry( const bool drawFlowUVs );
443
444 /** Bakes the VBOS
445 */
446 void BakeVBOs();
447#else
448 /** emit the geomentry in _interconnectQuads to OpenGL as quads and an outline
449 * \param drawFlowUVs true to draw with flow UV's else false to draw with interconnect UV's
450 */
451 virtual void EmitInterconnectGeometry( const bool drawFlowUVs );
452
453 /** turn on/off preview Path drawing ( useful for debugging and when the object is selected in the editor )
454 * \param enablePreviewPath true to enable else false
455 */
456 virtual void EnablePreviewPath( const bool enablePreviewPath );
457
458 /** emit the preview path geometry to GL -- mainly used fir debugging and when the line is selected in the editor */
459 virtual void EmitPreviewPathGeometry();
460#endif
461
462 /** Eliminate adjacent vertices that are not unique between each other
463 * \param numVertices number of input vertices
464 * \param vertices input vertices
465 * \return array of unique verts
466 */
467 virtual VectorArray GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT GetUniqueVerts( const unsigned int numVertices, Vertex* vertices );
468
469 /** Find a corner circle that will fit the corner defined by v0 -> v1 -> v2
470 * \param v0 starting point
471 * \param v1 corner point
472 * \param v2 ending point
473 * \param desiredCornerRadius desired radius for corner circle
474 * \param minRadius minimum radius for ccorner circle
475 * \param forceExactCornerRadius true if the corner can only be rounded with a radius equal to the desiredCornerRadius
476 * else false to allow a smaller radius to be used if needed (>minRadius)
477 * \param c [out] receives corner info
478 * \param forceCircle [optional, defaults to false] true to force a rounded corner to be found
479 * (used to avoid lack of precision issues when the circle is tangent at the midpoint of either v0 -> v1, or v1 -> v2
480 * \return true if a rounded corner was found
481 */
482 virtual bool GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT FindCornerCircle( const Vector& v0, const Vector& v1, const Vector& v2, const float desiredCornerRadius, const float minRadius,
483 const bool forceExactCornerRadius, CornerCircle& c, bool forceCircle = false );
484
485 /// Compute the length of the path described by the given corner array.
486 /// \param cornerCircles The corners in question.
487 /// \return The length of the computed path.
488 virtual float GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT ComputePathLength( CornerCircleArray& cornerCircles );
489
490 /// Add a line segment to the given array of interconnect verts.
491 /// \param interconnectVerts Receives line segment is start and finish are not virtually the same point.
492 /// \param start Starting point of line segment.
493 /// \param finish Finish point of line segment.
494 /// \param lineThickness Thickness of line segment.
495 /// \param curLength Current length of path at the starting point.
496 /// \param totalLength Total length of path that contains the line segment.
497 /// \param numInterconnectRepeats Number of interconnect texture repeats over entire path that contains the line segment.
498 /// \param numFlowRepeats Number of flow texture repeats over entire path that contains the line segment.
499 /// \param lastSegmentInPath [optional, defaults to false] true if this line segment is the last in the path.
500 /// \return The length of the resulting segment.
501 virtual float GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT AddInterconnectLineSegment( InterconnectVertexArray& interconnectVerts, const Vector& start, const Vector& finish, float lineThickness,
502 float curLength, const float totalLength,
503 const unsigned int numInterconnectRepeats, const unsigned int numFlowRepeats,
504 const bool lastSegmentInPath = false );
505
506 /// Add a rounded to the given array of interconnect verts.
507 /// \param interconnectVerts Receives line segment is start and finish are not virtually the same point.
508 /// \param c Info for rounded corner to add.
509 /// \param lineThickness Thickness of line segment.
510 /// \param curLength Current length of path at the starting point.
511 /// \param totalLength Total length of path that contains the line segment.
512 /// \param numInterconnectRepeats Number of interconnect texture repeats over entire path that contains the line segment.
513 /// \param numFlowRepeats Number of flow texture repeats over entire path that contains the line segment.
514 /// \return The size of the resulting corner.
515 virtual GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT float AddInterconnectRoundedCorner( InterconnectVertexArray& interconnectVerts, const CornerCircle& c, float lineThickness,
516 float curLength, const float totalLength,
517 const unsigned int numInterconnectRepeats, const unsigned int numFlowRepeats );
518#ifdef GLES
519 /** Set a single attribute from the GLO file.
520 * \param data The attribute to set and its associated data.
521 */
522 virtual void GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT SetFromGloData( GlsGloFileAttribute& data ) DISTI_METHOD_OVERRIDE;
523#endif
524
525 Vector _orientation[ 2 ]; /**< Two orthogonal vectors defining the orientation */
526 float _lineThickness; /**< thickness of line in logical units ( >0.0 )*/
527 bool _roundedCorners; /**< true for rounded corners */
528 float _cornerRadius; /**< radius for rounded corners ( >0.0 )*/
529 bool _forceExactCornerRadius; /**< true to force rounded corners to use the exact corner radius
530 * specified by _cornerRadius. If true, a corner that cannot be made with this radius
531 * will not be rounded. */
532 unsigned int _cornerSegments; /**< number of segments to use in rounded corners (2 <= cornerSegments <= 100) */
533 float _interconnectTextureRepeatLength; /**< number of logical units per interconnect texture repeat ( >0.0 )
534 * NOTE: number of actual repeats for the whole interconnect is always rounded
535 * to the nearest whole number so that adjacent interconnect's textures lineup */
536 int _flowTextureIndex; /**< texture index for flow texture else NO_TEXTURE */
537 float _flowTextureRepeatLength; /**< number of logical units per flow texture repeat ( >0.0 )
538 * NOTE: number of actual repeats for the whole interconnect is always rounded
539 * to the nearest whole number so that adjacent interconnect's textures lineup */
540 bool _showFlow; /**< true to draw flow in interconnect else false */
541 float _flowRate; /**< the flow rate in "flow textures" / second */
542 bool _showFlowBlink; /**< true to draw the flow blink else false (NOTE: normal flow is not drawn if flow blink is true) */
543 float _flowBlinkRate; /**< rate of flow blink in hz >= 0.0 */
544 GlsColor _flowBlinkStartColor; /**< starting color for flow blink */
545 GlsColor _flowBlinkEndColor; /**< ending color for flow blink */
546
547 bool _needsRebuild; /**< true if the line needs to be rebuilt */
548 double _lastCalculateTime; /**< last time stamp given to Calculate() method */
549 InterconnectVertexArray _interconnectVerts; /**< 2D verts and texture coords computed for interconnect */
550
551#ifndef GLES
552 bool _useDisplayList; /**< true to draw using display lists */
553 GlsDisplayList _interconnectDisplayList; /**< display list for drawing interconnect (if using display lists) */
554 GlsDisplayList _flowDisplayList; /**< display list for drawing flow (if using display lists) */
555#endif
556
557 float _endingChamferDistance; /**< distance from end of last line segment to start chamfer ( 0.0f to disable ) ( >= 0.0f ) */
558
559 bool _drawPreviewPath; /**< true to draw the preview path (mainly used in editor) */
560 VectorArray _previewPathPoints; /**< points in preview path */
561 CornerCircleArray _previewCornerCircles; /**< corners in preview path */
562
563#ifdef GLES
564 GlsTriangleStrip2D _interconnectTris; /**< Triangle strip for the interconnect */
565 GlsTriangleStrip2D _flowTris; /**< Triangle strip for the flows */
566#endif
567};
568
569} // namespace disti
570
571#endif
disti::Culler
Definition: cull.h:50
disti::DisplayEvent
Definition: events.h:113
disti::DisplayObject
Definition: display.h:96
disti::DynamicArray
Definition: dynamic_array.h:79
disti::GLPolygon
The Polygon class. Implements Polygons.
Definition: glpolygon.h:56
disti::GlsColor
Definition: gls_color.h:54
disti::GlsDisplayList
Definition: gls_display_list.h:51
disti::GlsGloFileAttribute
Definition: gls_glo_file.h:1243
disti::GlsMatrixAffine< double >
disti::GlsSchematicPolyLineInterconnect
Definition: gls_schematic_poly_line_interconnect.h:100
disti::GlsSchematicPolyLineInterconnect::CalculateTextureCoordinates
virtual void CalculateTextureCoordinates() DISTI_METHOD_OVERRIDE
disti::GlsSchematicPolyLineInterconnect::SetFlowTextureIndex
virtual void SetFlowTextureIndex(const int flowTextureIndex)
disti::GlsSchematicPolyLineInterconnect::_endingChamferDistance
float _endingChamferDistance
Definition: gls_schematic_poly_line_interconnect.h:557
disti::GlsSchematicPolyLineInterconnect::SetShowFlow
virtual void SetShowFlow(const bool showFlow)
disti::GlsSchematicPolyLineInterconnect::SetFlowTextureRepeatLength
virtual void SetFlowTextureRepeatLength(const float flowTextureRepeatLength)
disti::GlsSchematicPolyLineInterconnect::SetLineThickness
virtual void SetLineThickness(const float lineThickness)
disti::GlsSchematicPolyLineInterconnect::SetAvailableAttributes
virtual void SetAvailableAttributes(unsigned int value) DISTI_METHOD_OVERRIDE
disti::GlsSchematicPolyLineInterconnect::GetFlowBlinkStartColor
virtual GlsColor GetFlowBlinkStartColor()
disti::GlsSchematicPolyLineInterconnect::SetRoundedCorners
virtual void SetRoundedCorners(const bool roundedCorners)
disti::GlsSchematicPolyLineInterconnect::GetShowFlowBlink
virtual bool GetShowFlowBlink()
disti::GlsSchematicPolyLineInterconnect::Draw
virtual void Draw() DISTI_METHOD_OVERRIDE
disti::GlsSchematicPolyLineInterconnect::_flowTextureRepeatLength
float _flowTextureRepeatLength
Definition: gls_schematic_poly_line_interconnect.h:537
disti::GlsSchematicPolyLineInterconnect::GetOrientationMatrix
virtual GlsMatrixType GetOrientationMatrix()
disti::GlsSchematicPolyLineInterconnect::AddInterconnectRoundedCorner
virtual float AddInterconnectRoundedCorner(InterconnectVertexArray &interconnectVerts, const CornerCircle &c, float lineThickness, float curLength, const float totalLength, const unsigned int numInterconnectRepeats, const unsigned int numFlowRepeats)
disti::GlsSchematicPolyLineInterconnect::_roundedCorners
bool _roundedCorners
Definition: gls_schematic_poly_line_interconnect.h:527
disti::GlsSchematicPolyLineInterconnect::GetRoundedCorners
virtual bool GetRoundedCorners()
disti::GlsSchematicPolyLineInterconnect::SetFlowRate
virtual void SetFlowRate(const float flowRate)
disti::GlsSchematicPolyLineInterconnect::_flowBlinkStartColor
GlsColor _flowBlinkStartColor
Definition: gls_schematic_poly_line_interconnect.h:544
disti::GlsSchematicPolyLineInterconnect::OrientationChanged
virtual void OrientationChanged()
disti::GlsSchematicPolyLineInterconnect::_interconnectVerts
InterconnectVertexArray _interconnectVerts
Definition: gls_schematic_poly_line_interconnect.h:549
disti::GlsSchematicPolyLineInterconnect::_forceExactCornerRadius
bool _forceExactCornerRadius
Definition: gls_schematic_poly_line_interconnect.h:529
disti::GlsSchematicPolyLineInterconnect::CloneObject
virtual DisplayObject * CloneObject(bool generateNames=false) DISTI_METHOD_OVERRIDE
disti::GlsSchematicPolyLineInterconnect::SetOrientationVectors
virtual void SetOrientationVectors(const Vector &iVector, const Vector &jVector)
disti::GlsSchematicPolyLineInterconnect::_needsRebuild
bool _needsRebuild
Definition: gls_schematic_poly_line_interconnect.h:547
disti::GlsSchematicPolyLineInterconnect::SetInterconnectTextureIndex
virtual void SetInterconnectTextureIndex(const int interconnectTextureIndex)
disti::GlsSchematicPolyLineInterconnect::SetCornerRadius
virtual void SetCornerRadius(const float cornerRadius)
disti::GlsSchematicPolyLineInterconnect::_previewCornerCircles
CornerCircleArray _previewCornerCircles
Definition: gls_schematic_poly_line_interconnect.h:561
disti::GlsSchematicPolyLineInterconnect::SetFromGloData
virtual void SetFromGloData(GlsGloFileAttribute &data) DISTI_METHOD_OVERRIDE
disti::GlsSchematicPolyLineInterconnect::CornerCircleArray
DynamicArray< CornerCircle > CornerCircleArray
Definition: gls_schematic_poly_line_interconnect.h:414
disti::GlsSchematicPolyLineInterconnect::Hit
virtual bool Hit(float x, float y, float z, float scale, const Vector &directionVector, Vector *collisionPoint) DISTI_METHOD_OVERRIDE
disti::GlsSchematicPolyLineInterconnect::PreDraw
virtual void PreDraw(const OpenGLMatrices &parentMatrices, Culler &culler) DISTI_METHOD_OVERRIDE
disti::GlsSchematicPolyLineInterconnect::SetEndingChamferDistance
virtual void SetEndingChamferDistance(const float endingChamferDistance)
disti::GlsSchematicPolyLineInterconnect::_interconnectTextureRepeatLength
float _interconnectTextureRepeatLength
Definition: gls_schematic_poly_line_interconnect.h:533
disti::GlsSchematicPolyLineInterconnect::_flowBlinkRate
float _flowBlinkRate
Definition: gls_schematic_poly_line_interconnect.h:543
disti::GlsSchematicPolyLineInterconnect::_cornerRadius
float _cornerRadius
Definition: gls_schematic_poly_line_interconnect.h:528
disti::GlsSchematicPolyLineInterconnect::handle
virtual DisplayObject * handle(DisplayEvent *ev) DISTI_METHOD_OVERRIDE
disti::GlsSchematicPolyLineInterconnect::GetFlowRate
virtual float GetFlowRate()
disti::GlsSchematicPolyLineInterconnect::WorldVertex
virtual Vertex WorldVertex(unsigned int i) DISTI_METHOD_OVERRIDE
disti::GlsSchematicPolyLineInterconnect::GetFlowBlinkRate
virtual float GetFlowBlinkRate()
disti::GlsSchematicPolyLineInterconnect::SetFlowBlinkEndColor
virtual void SetFlowBlinkEndColor(const GlsColor &endColor)
disti::GlsSchematicPolyLineInterconnect::SetValue
virtual void SetValue(int spec, va_list &args) DISTI_METHOD_OVERRIDE
disti::GlsSchematicPolyLineInterconnect::DeleteVertexAt
void DeleteVertexAt(unsigned int index) DISTI_METHOD_OVERRIDE
disti::GlsSchematicPolyLineInterconnect::AddInterconnectLineSegment
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)
disti::GlsSchematicPolyLineInterconnect::GetFlowTextureIndex
virtual int GetFlowTextureIndex()
disti::GlsSchematicPolyLineInterconnect::SetRebuild
virtual void SetRebuild()
disti::GlsSchematicPolyLineInterconnect::SetFlowBlinkRate
virtual void SetFlowBlinkRate(const float flowBlinkRate)
disti::GlsSchematicPolyLineInterconnect::_orientation
Vector _orientation[2]
Definition: gls_schematic_poly_line_interconnect.h:525
disti::GlsSchematicPolyLineInterconnect::Rotate
virtual void Rotate(const Vector &orig, float angle, const Vector &axis) DISTI_METHOD_OVERRIDE
disti::GlsSchematicPolyLineInterconnect::GetInterconnectTextureIndex
virtual int GetInterconnectTextureIndex()
disti::GlsSchematicPolyLineInterconnect::_flowTris
GlsTriangleStrip2D _flowTris
Definition: gls_schematic_poly_line_interconnect.h:565
disti::GlsSchematicPolyLineInterconnect::_lineThickness
float _lineThickness
Definition: gls_schematic_poly_line_interconnect.h:526
disti::GlsSchematicPolyLineInterconnect::SetFlowBlinkStartColor
virtual void SetFlowBlinkStartColor(const GlsColor &startColor)
disti::GlsSchematicPolyLineInterconnect::_interconnectTris
GlsTriangleStrip2D _interconnectTris
Definition: gls_schematic_poly_line_interconnect.h:564
disti::GlsSchematicPolyLineInterconnect::GetInterconnectTextureRepeatLength
virtual float GetInterconnectTextureRepeatLength()
disti::GlsSchematicPolyLineInterconnect::_showFlowBlink
bool _showFlowBlink
Definition: gls_schematic_poly_line_interconnect.h:542
disti::GlsSchematicPolyLineInterconnect::Calculate
virtual void Calculate(double time) DISTI_METHOD_OVERRIDE
disti::GlsSchematicPolyLineInterconnect::CreateInstance
static DisplayObject * CreateInstance()
disti::GlsSchematicPolyLineInterconnect::CopyGeometry
virtual void CopyGeometry(DisplayObject *src) DISTI_METHOD_OVERRIDE
disti::GlsSchematicPolyLineInterconnect::SetVertices
virtual void SetVertices(unsigned int nPoints, Vertex *vertices) DISTI_METHOD_OVERRIDE
disti::GlsSchematicPolyLineInterconnect::FindCornerCircle
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)
disti::GlsSchematicPolyLineInterconnect::SetShowFlowBlink
virtual void SetShowFlowBlink(const bool showFlowBlink)
disti::GlsSchematicPolyLineInterconnect::InterconnectVertexArray
DynamicArray< InterconnectVertex > InterconnectVertexArray
Definition: gls_schematic_poly_line_interconnect.h:395
disti::GlsSchematicPolyLineInterconnect::GetCornerSegments
virtual unsigned int GetCornerSegments()
disti::GlsSchematicPolyLineInterconnect::GetLineThickness
virtual float GetLineThickness()
disti::GlsSchematicPolyLineInterconnect::Rebuild
virtual void Rebuild()
disti::GlsSchematicPolyLineInterconnect::SetInterconnectTextureRepeatLength
virtual void SetInterconnectTextureRepeatLength(const float interconnectTextureRepeatLength)
disti::GlsSchematicPolyLineInterconnect::_flowRate
float _flowRate
Definition: gls_schematic_poly_line_interconnect.h:541
disti::GlsSchematicPolyLineInterconnect::CopyProperties
virtual void CopyProperties(DisplayObject *src) DISTI_METHOD_OVERRIDE
disti::GlsSchematicPolyLineInterconnect::GetUniqueVerts
virtual VectorArray GetUniqueVerts(const unsigned int numVertices, Vertex *vertices)
disti::GlsSchematicPolyLineInterconnect::Scale
virtual void Scale(float px, float py, float pz, Vertex *anchor, int handleBar=0) DISTI_METHOD_OVERRIDE
disti::GlsSchematicPolyLineInterconnect::GetFlowTextureRepeatLength
virtual float GetFlowTextureRepeatLength()
disti::GlsSchematicPolyLineInterconnect::_lastCalculateTime
double _lastCalculateTime
Definition: gls_schematic_poly_line_interconnect.h:548
disti::GlsSchematicPolyLineInterconnect::ComputePathLength
virtual float ComputePathLength(CornerCircleArray &cornerCircles)
disti::GlsSchematicPolyLineInterconnect::GetExtents
virtual void GetExtents(float &x, float &y, float &z, float &x1, float &y1, float &z1) DISTI_METHOD_OVERRIDE
disti::GlsSchematicPolyLineInterconnect::GetShowFlow
virtual bool GetShowFlow()
disti::GlsSchematicPolyLineInterconnect::GetOrientationVectors
virtual void GetOrientationVectors(Vector &iVector, Vector &jVector)
disti::GlsSchematicPolyLineInterconnect::_previewPathPoints
VectorArray _previewPathPoints
Definition: gls_schematic_poly_line_interconnect.h:560
disti::GlsSchematicPolyLineInterconnect::SetCornerSegments
virtual void SetCornerSegments(const unsigned int cornerSegments)
disti::GlsSchematicPolyLineInterconnect::_flowBlinkEndColor
GlsColor _flowBlinkEndColor
Definition: gls_schematic_poly_line_interconnect.h:545
disti::GlsSchematicPolyLineInterconnect::GetEndingChamferDistance
virtual float GetEndingChamferDistance()
disti::GlsSchematicPolyLineInterconnect::_drawPreviewPath
bool _drawPreviewPath
Definition: gls_schematic_poly_line_interconnect.h:559
disti::GlsSchematicPolyLineInterconnect::_flowTextureIndex
int _flowTextureIndex
Definition: gls_schematic_poly_line_interconnect.h:536
disti::GlsSchematicPolyLineInterconnect::VerticesChanged
virtual void VerticesChanged()
disti::GlsSchematicPolyLineInterconnect::_cornerSegments
unsigned int _cornerSegments
Definition: gls_schematic_poly_line_interconnect.h:532
disti::GlsSchematicPolyLineInterconnect::GetCornerRadius
virtual float GetCornerRadius()
disti::GlsSchematicPolyLineInterconnect::BakeInterconnectGeometry
virtual void BakeInterconnectGeometry(const bool drawFlowUVs)
disti::GlsSchematicPolyLineInterconnect::SetForceExactCornerRadius
virtual void SetForceExactCornerRadius(const bool forceExactCornerRadius)
disti::GlsSchematicPolyLineInterconnect::_showFlow
bool _showFlow
Definition: gls_schematic_poly_line_interconnect.h:540
disti::GlsSchematicPolyLineInterconnect::VectorArray
DynamicArray< Vector > VectorArray
Definition: gls_schematic_poly_line_interconnect.h:417
disti::GlsSchematicPolyLineInterconnect::GetForceExactCornerRadius
virtual bool GetForceExactCornerRadius()
disti::GlsSchematicPolyLineInterconnect::GetFlowBlinkEndColor
virtual GlsColor GetFlowBlinkEndColor()
disti::GlsSchematicPolyLineInterconnect::BakeVBOs
void BakeVBOs()
disti::GlsSchematicPolyLineInterconnect::InsertVertexAt
void InsertVertexAt(unsigned int index) DISTI_METHOD_OVERRIDE
disti::GlsTriangleStrip2D
Definition: gls_triangle_storage.h:58
disti::OpenGLMatrices
Class to contain current OpenGL view, projection and draw matrices.
Definition: util.h:544
disti::VertexNoColor
Definition: vertex.h:85
disti::Vertex
Definition: vertex.h:420
glpolygon.h
The disti::GLPolygon class. Implements Polygons.
gls_auto_lib.h
The gls_auto_lib.
gls_cpp_lang_support.h
Macros and helper code to determine what subset of C++11/14/17 is available.
DISTI_SPECIAL_MEM_FUN_DELETE
#define DISTI_SPECIAL_MEM_FUN_DELETE
Macro to wrap function deletion, removed on compilers that don't support it.
Definition: gls_cpp_lang_support.h:246
DISTI_DEPRECATED
#define DISTI_DEPRECATED(msg)
Defines whether this compiler supports the C++14 deprecated attribute.
Definition: gls_cpp_lang_support.h:488
DISTI_METHOD_OVERRIDE
#define DISTI_METHOD_OVERRIDE
Macro to wrap the override keyword, removed on compilers that don't support it.
Definition: gls_cpp_lang_support.h:222
gls_display_list.h
The disti::GlsDisplayList class.
GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
#define GLSGEN_GLSSCHEMATICPOLYLINEINTERCONNECT_EXPORT
Provides support for creating DLLs.
Definition: gls_schematic_poly_line_interconnect.h:60
gls_triangle_storage.h
The disti::GlsTriangleStrip2D class.
disti
Definition: bmpimage.h:47
disti::GlsSchematicPolyLineInterconnect::CornerCircle
Definition: gls_schematic_poly_line_interconnect.h:399
disti::GlsSchematicPolyLineInterconnect::CornerCircle::_radius
float _radius
Radius of circle making round corner.
Definition: gls_schematic_poly_line_interconnect.h:405
disti::GlsSchematicPolyLineInterconnect::CornerCircle::_isRounded
bool _isRounded
True if the corner is to be rounded.
Definition: gls_schematic_poly_line_interconnect.h:403
disti::GlsSchematicPolyLineInterconnect::CornerCircle::_v0
Vector _v0
Corner flows from _v0, _v1, _v2.
Definition: gls_schematic_poly_line_interconnect.h:400
disti::GlsSchematicPolyLineInterconnect::CornerCircle::_tangent_v1_v2
Vector _tangent_v1_v2
Tangent point of corner circle on v1, v2.
Definition: gls_schematic_poly_line_interconnect.h:410
disti::GlsSchematicPolyLineInterconnect::CornerCircle::_isLeftTurn
bool _isLeftTurn
True if corners is a left turn else false.
Definition: gls_schematic_poly_line_interconnect.h:408
disti::GlsSchematicPolyLineInterconnect::CornerCircle::_v1
Vector _v1
Corner flows from _v0, _v1, _v2.
Definition: gls_schematic_poly_line_interconnect.h:401
disti::GlsSchematicPolyLineInterconnect::CornerCircle::_v2
Vector _v2
Corner flows from _v0, _v1, _v2.
Definition: gls_schematic_poly_line_interconnect.h:402
disti::GlsSchematicPolyLineInterconnect::CornerCircle::_tangent_v0_v1
Vector _tangent_v0_v1
Tangent point of corner circle on v0, v1.
Definition: gls_schematic_poly_line_interconnect.h:409
disti::GlsSchematicPolyLineInterconnect::CornerCircle::_startTheta
double _startTheta
Starting theta for arc in circle making round corner.
Definition: gls_schematic_poly_line_interconnect.h:406
disti::GlsSchematicPolyLineInterconnect::CornerCircle::_center
Vector _center
Center of circle making round corner.
Definition: gls_schematic_poly_line_interconnect.h:404
disti::GlsSchematicPolyLineInterconnect::CornerCircle::_endTheta
double _endTheta
Ending theta for arc in circle making round corner.
Definition: gls_schematic_poly_line_interconnect.h:407
disti::GlsSchematicPolyLineInterconnect::InterconnectVertex
Definition: gls_schematic_poly_line_interconnect.h:367
disti::GlsSchematicPolyLineInterconnect::InterconnectVertex::_leftY
float _leftY
Left side Y coord in 2D plane.
Definition: gls_schematic_poly_line_interconnect.h:369
disti::GlsSchematicPolyLineInterconnect::InterconnectVertex::InterconnectVertex
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:383
disti::GlsSchematicPolyLineInterconnect::InterconnectVertex::_leftX
float _leftX
Left side X coord in 2D plane.
Definition: gls_schematic_poly_line_interconnect.h:368
disti::GlsSchematicPolyLineInterconnect::InterconnectVertex::_rightY
float _rightY
Right side Y coord in 2D plane.
Definition: gls_schematic_poly_line_interconnect.h:371
disti::GlsSchematicPolyLineInterconnect::InterconnectVertex::_rightX
float _rightX
Right side X coord in 2D plane.
Definition: gls_schematic_poly_line_interconnect.h:370
disti::GlsSchematicPolyLineInterconnect::InterconnectVertex::_flowU
float _flowU
Corresponding U texture coord for flow texture.
Definition: gls_schematic_poly_line_interconnect.h:374
disti::GlsSchematicPolyLineInterconnect::InterconnectVertex::_interconnectU
float _interconnectU
Corresponding U texture coord for interconnect texture.
Definition: gls_schematic_poly_line_interconnect.h:373