GL Studio C++ Runtime API
gls_schematic_tee_interconnect.h
Go to the documentation of this file.
1 #ifndef _GLSSCHEMATICTEEINTERCONNECT_H
2 #define _GLSSCHEMATICTEEINTERCONNECT_H
3 
4 /*! \file
5  \brief The disti::GlsSchematicTeeInterconnect class.
6 
7  \par Copyright Information
8 
9  Copyright (c) 2017 by The DiSTI Corporation.<br>
10  11301 Corporate Blvd; Suite 100<br>
11  Orlando, Florida 32817<br>
12  USA<br>
13  <br>
14  All rights reserved.<br>
15 
16  This Software contains proprietary trade secrets of DiSTI and may not be
17 reproduced, in whole or part, in any form, or by any means of electronic,
18 mechanical, or otherwise, without the written permission of DiSTI. Said
19 permission may be derived through the purchase of applicable DiSTI product
20 licenses which detail the distribution rights of this content and any
21 Derivative Works based on this or other copyrighted DiSTI Software.
22 
23  NO WARRANTY. THE SOFTWARE IS PROVIDED "AS-IS," WITHOUT WARRANTY OF ANY KIND,
24 AND ANY USE OF THIS SOFTWARE PRODUCT IS AT YOUR OWN RISK. TO THE MAXIMUM EXTENT
25 PERMITTED BY APPLICABLE LAW, DISTI AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES
26 AND CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
27 IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY AND/OR FITNESS FOR A
28 PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT, WITH REGARD TO THE SOFTWARE.
29 
30  LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW,
31 IN NO EVENT SHALL DISTI OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
32 INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION,
33 DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS
34 INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR
35 INABILITY TO USE THE SOFTWARE, EVEN IF DISTI HAS BEEN ADVISED OF THE POSSIBILITY
36 OF SUCH DAMAGES. DISTI'S ENTIRE LIABILITY AND YOUR EXCLUSIVE REMEDY SHALL NOT
37 EXCEED FIVE DOLLARS (US$5.00).
38 
39  The aforementioned terms and restrictions are governed by the laws of the
40 State of Florida and the United States of America.
41 */
42 
43 #include "glpolygon.h"
44 #include "gls_cpp_lang_support.h"
46 
47 //////////////////// Provides support for creating DLLs ////////////////////////
48 #if( defined( GLSGEN_EXPORT_GLSSCHEMATICTEEINTERCONNECT ) || defined( GLSGEN_IMPORT_GLSSCHEMATICTEEINTERCONNECT ) || defined( GLS_EXPORT_GENERATED ) || defined( GLS_IMPORT_GENERATED ) ) \
49  && defined( _MSC_VER )
50 # if defined( GLSGEN_EXPORT_GLSSCHEMATICTEEINTERCONNECT ) || defined( GLS_EXPORT_GENERATED )
51 # define GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT __declspec( dllexport )
52 # else
53 # define GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT __declspec( dllimport )
54 # endif
55 #else
56 # define GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT
57 #endif
58 ///////////////////////////////////////////////////////////////////////////////
59 
60 #define LIB_BASE_NAME "gls_schematic_tee_interconnect"
61 #include "gls_auto_lib.h"
62 #undef LIB_BASE_NAME
63 
64 namespace disti
65 {
66 // SetValue enumerations
67 enum
68 {
69  GLS_SCHEMATICTEEINTERCONNECT_FIRST_VALUE = GLS_LAST_INITIALIZER + 1,
70  GLS_SCHEMATICTEEINTERCONNECT_LEFT_LINE_THICKNESS,
71  GLS_SCHEMATICTEEINTERCONNECT_RIGHT_LINE_THICKNESS,
72  GLS_SCHEMATICTEEINTERCONNECT_BASE_LINE_THICKNESS,
73  GLS_SCHEMATICTEEINTERCONNECT_LEFT_INTERCONNECT_TEXTURE_INDEX,
74  GLS_SCHEMATICTEEINTERCONNECT_RIGHT_INTERCONNECT_TEXTURE_INDEX,
75  GLS_SCHEMATICTEEINTERCONNECT_BASE_INTERCONNECT_TEXTURE_INDEX,
76  GLS_SCHEMATICTEEINTERCONNECT_LEFT_INTERCONNECT_TEXTURE_REPEAT_LENGTH,
77  GLS_SCHEMATICTEEINTERCONNECT_RIGHT_INTERCONNECT_TEXTURE_REPEAT_LENGTH,
78  GLS_SCHEMATICTEEINTERCONNECT_BASE_INTERCONNECT_TEXTURE_REPEAT_LENGTH,
79  GLS_SCHEMATICTEEINTERCONNECT_LEFT_FLOW_TEXTURE_INDEX,
80  GLS_SCHEMATICTEEINTERCONNECT_RIGHT_FLOW_TEXTURE_INDEX,
81  GLS_SCHEMATICTEEINTERCONNECT_BASE_FLOW_TEXTURE_INDEX,
82  GLS_SCHEMATICTEEINTERCONNECT_LEFT_FLOW_TEXTURE_REPEAT_LENGTH,
83  GLS_SCHEMATICTEEINTERCONNECT_RIGHT_FLOW_TEXTURE_REPEAT_LENGTH,
84  GLS_SCHEMATICTEEINTERCONNECT_BASE_FLOW_TEXTURE_REPEAT_LENGTH,
85  GLS_SCHEMATICTEEINTERCONNECT_LEFT_SHOW_FLOW,
86  GLS_SCHEMATICTEEINTERCONNECT_RIGHT_SHOW_FLOW,
87  GLS_SCHEMATICTEEINTERCONNECT_BASE_SHOW_FLOW,
88  GLS_SCHEMATICTEEINTERCONNECT_LEFT_FLOW_RATE,
89  GLS_SCHEMATICTEEINTERCONNECT_RIGHT_FLOW_RATE,
90  GLS_SCHEMATICTEEINTERCONNECT_BASE_FLOW_RATE,
91  GLS_SCHEMATICTEEINTERCONNECT_LEFT_SHOW_FLOW_BLINK,
92  GLS_SCHEMATICTEEINTERCONNECT_RIGHT_SHOW_FLOW_BLINK,
93  GLS_SCHEMATICTEEINTERCONNECT_BASE_SHOW_FLOW_BLINK,
94  GLS_SCHEMATICTEEINTERCONNECT_LEFT_FLOW_BLINK_RATE,
95  GLS_SCHEMATICTEEINTERCONNECT_RIGHT_FLOW_BLINK_RATE,
96  GLS_SCHEMATICTEEINTERCONNECT_BASE_FLOW_BLINK_RATE,
97  GLS_SCHEMATICTEEINTERCONNECT_LEFT_FLOW_BLINK_START_COLOR,
98  GLS_SCHEMATICTEEINTERCONNECT_RIGHT_FLOW_BLINK_START_COLOR,
99  GLS_SCHEMATICTEEINTERCONNECT_BASE_FLOW_BLINK_START_COLOR,
100  GLS_SCHEMATICTEEINTERCONNECT_LEFT_FLOW_BLINK_END_COLOR,
101  GLS_SCHEMATICTEEINTERCONNECT_RIGHT_FLOW_BLINK_END_COLOR,
102  GLS_SCHEMATICTEEINTERCONNECT_BASE_FLOW_BLINK_END_COLOR,
103  GLS_SCHEMATICTEEINTERCONNECT_USE_DISPLAY_LIST,
104  GLS_SCHEMATICTEEINTERCONNECT_TOP_VISIBLE,
105  GLS_SCHEMATICTEEINTERCONNECT_TOP_LINE_THICKNESS,
106  GLS_SCHEMATICTEEINTERCONNECT_TOP_INTERCONNECT_TEXTURE_INDEX,
107  GLS_SCHEMATICTEEINTERCONNECT_TOP_INTERCONNECT_TEXTURE_REPEAT_LENGTH,
108  GLS_SCHEMATICTEEINTERCONNECT_TOP_FLOW_TEXTURE_INDEX,
109  GLS_SCHEMATICTEEINTERCONNECT_TOP_FLOW_TEXTURE_REPEAT_LENGTH,
110  GLS_SCHEMATICTEEINTERCONNECT_TOP_SHOW_FLOW,
111  GLS_SCHEMATICTEEINTERCONNECT_TOP_FLOW_RATE,
112  GLS_SCHEMATICTEEINTERCONNECT_TOP_SHOW_FLOW_BLINK,
113  GLS_SCHEMATICTEEINTERCONNECT_TOP_FLOW_BLINK_RATE,
114  GLS_SCHEMATICTEEINTERCONNECT_TOP_FLOW_BLINK_START_COLOR,
115  GLS_SCHEMATICTEEINTERCONNECT_TOP_FLOW_BLINK_END_COLOR
116 };
117 
118 #ifdef GLES
119 class GlsGloFileAttribute;
120 #endif
121 
122 /** Runtime implementation of a GlsSchematicTeeInterconnect */
124 {
125 private:
128 
129  void CopyPropertiesInternal( GlsSchematicTeeInterconnect* src );
130 
131 public:
132  typedef GLPolygon _BaseClass;
133  friend class GlsSchematicTeeInterconnectEditor;
134 
135  /** Create a new GlsSchematicTeeInterconnect.
136  * \param generateInstance Whether or not to generate an instance name
137  * for this inputdevice */
138  GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT GlsSchematicTeeInterconnect( bool generateInstance = false );
139  GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT GlsSchematicTeeInterconnect( const GlsSchematicTeeInterconnect& that, const bool generateNames );
140 
141  /** Destructs a GlsSchematicTeeInterconnect object */
142  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT ~GlsSchematicTeeInterconnect();
143 
144  static GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT DisplayObject* CreateInstance();
145 
146  //////////////////////////////////////////////////
147  // Overridden base class methods
148  //////////////////////////////////////////////////
149 
150  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT void SetAvailableAttributes( unsigned int value );
151  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT DisplayObject* CloneObject( bool generateNames = false );
152  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT void CopyProperties( DisplayObject* src );
153 
154 #ifndef GLES
155  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT InterfaceListType* GetCppInterfaceDescription( InterfaceListType* addToThisList = NULL );
156  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT void GetCppInterfaceDescriptionFree( InterfaceListType* array );
157 #endif
158 
159  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT void Calculate( double time );
160  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT void PreDraw( const OpenGLMatrices& parentMatrices, Culler& culler );
161  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT void Draw( void );
162 
163  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT void CalculateTextureCoordinates( void );
164 
165  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT bool Hit( float x, float y, float z, float scale, const Vector& directionVector, Vector* collisionPoint );
166 
167  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT DisplayObject* handle( DisplayEvent* ev );
168 
169  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT void SetValue( int spec, va_list& args );
170 
171  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT void Scale( float px, float py, float pz, Vertex* anchor, int handleBar = 0 )
172  {
173  _BaseClass::Scale( px, py, pz, anchor, handleBar );
174  SetRebuild();
175  }
176 
177  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT void Rotate( const Vector& orig, float angle, const Vector& axis )
178  {
179  _BaseClass::Rotate( orig, angle, axis );
180  SetRebuild();
181  }
182 
183  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT void SetVertices( unsigned int nPoints, Vertex* vertices )
184  {
185  _BaseClass::SetVertices( nPoints, vertices );
186  SetRebuild();
187  }
188 
189 #ifdef GLES
190  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT void Parent( DisplayFrame* parent );
191  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT DisplayFrame* Parent( void ) { return DisplayObject::Parent(); }
192 #endif
193 
194  //////////////////////////////////////////////////
195  // GlsSchematicTeeInterconnect specific operations
196  //////////////////////////////////////////////////
197 
198  // see GlsSchematicPolyLineInterconnect::SetLineThickness
199  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT void SetLeftLineThickness( const float lineThickness );
200  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT float GetLeftLineThickness( void ) { return ( _left->GetLineThickness() ); }
201  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT void SetRightLineThickness( const float lineThickness );
202  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT float GetRightLineThickness( void ) { return ( _right->GetLineThickness() ); }
203  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT void SetBaseLineThickness( const float lineThickness );
204  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT float GetBaseLineThickness( void ) { return ( _base->GetLineThickness() ); }
205  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT void SetTopLineThickness( const float lineThickness );
206  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT float GetTopLineThickness( void ) { return ( _top->GetLineThickness() ); }
207 
208  // see GlsSchematicPolyLineInterconnect::SetInterconnectTextureIndex
209  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT void SetLeftInterconnectTextureIndex( const int textureIndex );
210  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT int GetLeftInterconnectTextureIndex( void ) { return ( _left->TextureIndex() ); }
211  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT void SetRightInterconnectTextureIndex( const int textureIndex );
212  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT int GetRightInterconnectTextureIndex( void ) { return ( _right->TextureIndex() ); }
213  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT void SetBaseInterconnectTextureIndex( const int textureIndex );
214  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT int GetBaseInterconnectTextureIndex( void ) { return ( _base->TextureIndex() ); }
215  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT void SetTopInterconnectTextureIndex( const int textureIndex );
216  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT int GetTopInterconnectTextureIndex( void ) { return ( _top->TextureIndex() ); }
217 
218  // see GlsSchematicPolyLineInterconnect::SetInterconnectTextureRepeatLength
219  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT void SetLeftInterconnectTextureRepeatLength( const float textureRepeatLength );
220  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT float GetLeftInterconnectTextureRepeatLength( void ) { return ( _left->GetInterconnectTextureRepeatLength() ); }
221  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT void SetRightInterconnectTextureRepeatLength( const float textureRepeatLength );
222  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT float GetRightInterconnectTextureRepeatLength( void ) { return ( _right->GetInterconnectTextureRepeatLength() ); }
223  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT void SetBaseInterconnectTextureRepeatLength( const float textureRepeatLength );
224  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT float GetBaseInterconnectTextureRepeatLength( void ) { return ( _base->GetInterconnectTextureRepeatLength() ); }
225  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT void SetTopInterconnectTextureRepeatLength( const float textureRepeatLength );
226  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT float GetTopInterconnectTextureRepeatLength( void ) { return ( _top->GetInterconnectTextureRepeatLength() ); }
227 
228  // see GlsSchematicPolyLineInterconnect::SetFlowTextureIndex
229  virtual void GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT SetLeftFlowTextureIndex( const int textureIndex );
230  virtual int GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT GetLeftFlowTextureIndex( void ) { return ( _left->GetFlowTextureIndex() ); }
231  virtual void GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT SetRightFlowTextureIndex( const int textureIndex );
232  virtual int GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT GetRightFlowTextureIndex( void ) { return ( _right->GetFlowTextureIndex() ); }
233  virtual void GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT SetBaseFlowTextureIndex( const int textureIndex );
234  virtual int GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT GetBaseFlowTextureIndex( void ) { return ( _base->GetFlowTextureIndex() ); }
235  virtual void GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT SetTopFlowTextureIndex( const int textureIndex );
236  virtual int GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT GetTopFlowTextureIndex( void ) { return ( _top->GetFlowTextureIndex() ); }
237 
238  // see GlsSchematicPolyLineInterconnect::SetFlowTextureRepeatLength
239  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT void SetLeftFlowTextureRepeatLength( const float textureRepeatLength );
240  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT float GetLeftFlowTextureRepeatLength( void ) { return ( _left->GetFlowTextureRepeatLength() ); }
241  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT void SetRightFlowTextureRepeatLength( const float textureRepeatLength );
242  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT float GetRightFlowTextureRepeatLength( void ) { return ( _right->GetFlowTextureRepeatLength() ); }
243  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT void SetBaseFlowTextureRepeatLength( const float textureRepeatLength );
244  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT float GetBaseFlowTextureRepeatLength( void ) { return ( _base->GetFlowTextureRepeatLength() ); }
245  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT void SetTopFlowTextureRepeatLength( const float textureRepeatLength );
246  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT float GetTopFlowTextureRepeatLength( void ) { return ( _top->GetFlowTextureRepeatLength() ); }
247 
248  // see GlsSchematicPolyLineInterconnect::SetShowFlow
249  virtual void GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT SetLeftShowFlow( const bool showFlow );
250  virtual bool GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT GetLeftShowFlow( void ) { return ( _left->GetShowFlow() ); }
251  virtual void GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT SetRightShowFlow( const bool showFlow );
252  virtual bool GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT GetRightShowFlow( void ) { return ( _right->GetShowFlow() ); }
253  virtual void GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT SetBaseShowFlow( const bool showFlow );
254  virtual bool GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT GetBaseShowFlow( void ) { return ( _base->GetShowFlow() ); }
255  virtual void GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT SetTopShowFlow( const bool showFlow );
256  virtual bool GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT GetTopShowFlow( void ) { return ( _top->GetShowFlow() ); }
257 
258  // see GlsSchematicPolyLineInterconnect::SetFlowRate
259  virtual void GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT SetLeftFlowRate( const float flowRate );
260  virtual float GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT GetLeftFlowRate( void ) { return ( _left->GetFlowRate() ); }
261  virtual void GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT SetRightFlowRate( const float flowRate );
262  virtual float GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT GetRightFlowRate( void ) { return ( _right->GetFlowRate() ); }
263  virtual void GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT SetBaseFlowRate( const float flowRate );
264  virtual float GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT GetBaseFlowRate( void ) { return ( _base->GetFlowRate() ); }
265  virtual void GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT SetTopFlowRate( const float flowRate );
266  virtual float GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT GetTopFlowRate( void ) { return ( _top->GetFlowRate() ); }
267 
268  // see GlsSchematicPolyLineInterconnect::SetShowFlowBlink
269  virtual void GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT SetLeftShowFlowBlink( const bool showFlowBlink );
270  virtual bool GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT GetLeftShowFlowBlink( void ) { return ( _left->GetShowFlowBlink() ); }
271  virtual void GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT SetRightShowFlowBlink( const bool showFlowBlink );
272  virtual bool GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT GetRightShowFlowBlink( void ) { return ( _right->GetShowFlowBlink() ); }
273  virtual void GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT SetBaseShowFlowBlink( const bool showFlowBlink );
274  virtual bool GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT GetBaseShowFlowBlink( void ) { return ( _base->GetShowFlowBlink() ); }
275  virtual void GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT SetTopShowFlowBlink( const bool showFlowBlink );
276  virtual bool GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT GetTopShowFlowBlink( void ) { return ( _top->GetShowFlowBlink() ); }
277 
278  // see GlsSchematicPolyLineInterconnect::SetFlowBlinkRate
279  virtual void GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT SetLeftFlowBlinkRate( const float flowBlinkRate );
280  virtual float GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT GetLeftFlowBlinkRate( void ) { return ( _left->GetFlowBlinkRate() ); }
281  virtual void GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT SetRightFlowBlinkRate( const float flowBlinkRate );
282  virtual float GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT GetRightFlowBlinkRate( void ) { return ( _right->GetFlowBlinkRate() ); }
283  virtual void GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT SetBaseFlowBlinkRate( const float flowBlinkRate );
284  virtual float GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT GetBaseFlowBlinkRate( void ) { return ( _base->GetFlowBlinkRate() ); }
285  virtual void GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT SetTopFlowBlinkRate( const float flowBlinkRate );
286  virtual float GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT GetTopFlowBlinkRate( void ) { return ( _top->GetFlowBlinkRate() ); }
287 
288  // see GlsSchematicPolyLineInterconnect::SetFlowBlinkStartColor
289  virtual void GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT SetLeftFlowBlinkStartColor( const GlsColor& startColor );
290  virtual GlsColor GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT GetLeftFlowBlinkStartColor( void ) { return ( _left->GetFlowBlinkStartColor() ); }
291  virtual void GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT SetRightFlowBlinkStartColor( const GlsColor& startColor );
292  virtual GlsColor GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT GetRightFlowBlinkStartColor( void ) { return ( _right->GetFlowBlinkStartColor() ); }
293  virtual void GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT SetBaseFlowBlinkStartColor( const GlsColor& startColor );
294  virtual GlsColor GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT GetBaseFlowBlinkStartColor( void ) { return ( _base->GetFlowBlinkStartColor() ); }
295  virtual void GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT SetTopFlowBlinkStartColor( const GlsColor& startColor );
296  virtual GlsColor GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT GetTopFlowBlinkStartColor( void ) { return ( _top->GetFlowBlinkStartColor() ); }
297 
298  // see GlsSchematicPolyLineInterconnect::SetFlowBlinkEndColor
299  virtual void GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT SetLeftFlowBlinkEndColor( const GlsColor& endColor );
300  virtual GlsColor GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT GetLeftFlowBlinkEndColor( void ) { return ( _left->GetFlowBlinkEndColor() ); }
301  virtual void GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT SetRightFlowBlinkEndColor( const GlsColor& endColor );
302  virtual GlsColor GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT GetRightFlowBlinkEndColor( void ) { return ( _right->GetFlowBlinkEndColor() ); }
303  virtual void GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT SetBaseFlowBlinkEndColor( const GlsColor& endColor );
304  virtual GlsColor GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT GetBaseFlowBlinkEndColor( void ) { return ( _base->GetFlowBlinkEndColor() ); }
305  virtual void GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT SetTopFlowBlinkEndColor( const GlsColor& endColor );
306  virtual GlsColor GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT GetTopFlowBlinkEndColor( void ) { return ( _top->GetFlowBlinkEndColor() ); }
307 
308  /** set the top of the tee visible
309  * \param topVisible true to set top visible
310  */
311  virtual void SetTopVisible( const bool topVisible );
312 
313  /** determine if the top of the tee is visible
314  * \return true if top is visible
315  */
316  virtual bool GetTopVisible( void ) { return ( _top->Visibility() ); }
317 
318 #ifndef GLES
319  /** enable/disable using display list for drawing
320  * \param useDisplayList true to use display list
321  */
322  virtual void GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT SetUseDisplayList( const bool useDisplayList );
323 
324  /** get use display list
325  * \return true if using display list for drawing
326  */
327  virtual bool GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT GetUseDisplayList( void ) { return ( _left->GetUseDisplayList() ); }
328 #endif
329 
330 protected:
331  /** helper method to setup render attributes on the given leg to the render attributes of the tee
332  * and then draw the leg
333  * \param leg leg to configure and draw
334  */
335  virtual void DrawLeg( GlsSchematicPolyLineInterconnect* leg );
336 
337  /** flag lines to be adjusted for vertices on next draw */
338  virtual void SetRebuild( void ) { _needsRebuild = true; }
339 
340  /** adjust lines to match vertices */
341  virtual void Rebuild( void );
342 
343 #ifdef GLES
344  /** Set a single attribute from the GLO file.
345  * \param data The attribute to set and its associated data.
346  */
347  virtual GLSGEN_GLSSCHEMATICTEEINTERCONNECT_EXPORT void SetFromGloData( GlsGloFileAttribute& data );
348 #endif
349 
350  GlsSchematicPolyLineInterconnect* _left; /**< left side of tee */
351  GlsSchematicPolyLineInterconnect* _right; /**< right side of tee */
353  GlsSchematicPolyLineInterconnect* _top; /**< top of tee (visible if top enabled) */
354 
355  bool _needsRebuild; /**< true if the lines need to be adjusted to match the vertices */
356 };
357 
358 } // namespace disti
359 
360 #endif
Definition: cull.h:49
Definition: display_frame.h:83
Definition: vertex.h:408
virtual void SetVertices(unsigned int nPoints, Vertex *vertices)
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *array)
Definition: dynamic_array.h:62
Class to contain current OpenGL view, projection and draw matrices.
Definition: util.h:278
The disti::GlsSchematicPolyLineInterconnect class.
bool _needsRebuild
Definition: gls_schematic_tee_interconnect.h:355
GlsSchematicPolyLineInterconnect * _base
Definition: gls_schematic_tee_interconnect.h:352
The Polygon class. Implements Polygons.
Definition: glpolygon.h:55
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL)
virtual void CopyProperties(DisplayObject *src)
virtual void Scale(float px, float py, float pz, Vertex *anchor, int handleBar=0)
Definition: gls_schematic_tee_interconnect.h:171
DisplayFrame * Parent(void) const
Definition: display.h:897
virtual DisplayObject * handle(DisplayEvent *ev)
GlsSchematicPolyLineInterconnect * _right
Definition: gls_schematic_tee_interconnect.h:351
Definition: display.h:97
GlsSchematicPolyLineInterconnect * _left
Definition: gls_schematic_tee_interconnect.h:350
virtual GlsColor GetFlowBlinkEndColor(void)
The disti::GLPolygon class. Implements Polygons.
virtual float GetFlowTextureRepeatLength(void)
bool Visibility(void) const
Definition: display.h:1419
GlsSchematicPolyLineInterconnect * _top
Definition: gls_schematic_tee_interconnect.h:353
Definition: gls_glo_file.h:835
virtual void SetValue(int spec, va_list &args)
Definition: gls_schematic_tee_interconnect.h:123
virtual bool Hit(float x, float y, float z, float scale, const Vector &directionVector, Vector *collisionPoint)
virtual void SetVertices(unsigned int nPoints, Vertex *vertices)
Definition: gls_schematic_tee_interconnect.h:183
virtual void SetUseDisplayList(const bool useDisplayList)
virtual int TextureIndex(void)
virtual bool GetTopVisible(void)
Definition: gls_schematic_tee_interconnect.h:316
virtual void PreDraw(const OpenGLMatrices &parentMatrices, Culler &culler)
Definition: events.h:110
virtual void Rotate(float angle, int axis=Z_AXIS)
virtual void Calculate(double time)
virtual GlsColor GetFlowBlinkStartColor(void)
The gls_auto_lib.
virtual float GetInterconnectTextureRepeatLength(void)
virtual void Rotate(const Vector &orig, float angle, const Vector &axis)
Definition: gls_schematic_tee_interconnect.h:177
virtual void SetAvailableAttributes(unsigned int value)
Definition: gls_schematic_poly_line_interconnect.h:98
void Scale(int handleBar, float px, float py, Vertex *anchor=NULL)
Definition: display.h:1111
Definition: vertex.h:83
virtual void DrawLeg(GlsSchematicPolyLineInterconnect *leg)
virtual void SetTopVisible(const bool topVisible)
virtual void SetRebuild(void)
Definition: gls_schematic_tee_interconnect.h:338
Macros and helper code to determine what subset of C++11/14/17 is available.
virtual DisplayObject * CloneObject(bool generateNames=false)
virtual void CalculateTextureCoordinates(void)
Definition: bmpimage.h:46
virtual bool GetUseDisplayList(void)
Definition: gls_schematic_tee_interconnect.h:327