| GL Studio C++ Runtime API

gls_linear_scale.h
Go to the documentation of this file.
1/*! \file
2 \brief The disti::GlsLinearScale class.
3
4 \par Copyright Information
5
6 Copyright (c) 2017 by The DiSTI Corporation.<br>
7 11301 Corporate Blvd., Suite 100<br>
8 Orlando, Florida 32817<br>
9 USA<br>
10 <br>
11 All rights reserved.<br>
12
13 This Software contains proprietary trade secrets of DiSTI and may not be
14 reproduced, in whole or part, in any form, or by any means of electronic,
15 mechanical, or otherwise, without the written permission of DiSTI. Said
16 permission may be derived through the purchase of applicable DiSTI product
17 licenses which detail the distribution rights of this content and any
18 Derivative Works based on this or other copyrighted DiSTI Software.
19
20 NO WARRANTY. THE SOFTWARE IS PROVIDED "AS-IS," WITHOUT WARRANTY OF ANY KIND,
21 AND ANY USE OF THIS SOFTWARE PRODUCT IS AT YOUR OWN RISK. TO THE MAXIMUM EXTENT
22 PERMITTED BY APPLICABLE LAW, DISTI AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES
23 AND CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
24 IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY AND/OR FITNESS FOR A
25 PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT, WITH REGARD TO THE SOFTWARE.
26
27 LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW,
28 IN NO EVENT SHALL DISTI OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
29 INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION,
30 DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS
31 INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR
32 INABILITY TO USE THE SOFTWARE, EVEN IF DISTI HAS BEEN ADVISED OF THE POSSIBILITY
33 OF SUCH DAMAGES. DISTI'S ENTIRE LIABILITY AND YOUR EXCLUSIVE REMEDY SHALL NOT
34 EXCEED FIVE DOLLARS (US$5.00).
35
36 The aforementioned terms and restrictions are governed by the laws of the
37 State of Florida and the United States of America.
38
39*/
40#ifndef _GLS_LINEAR_SCALE_H
41#define _GLS_LINEAR_SCALE_H
42
43#include "glpolygon.h"
44#include "gls_cpp_lang_support.h"
45
46#ifdef GLES
47# include "gls_quad_storage.h"
48#else
49# include "gls_display_list.h"
50#endif
51
52/// Provides support for creating DLLs.
53#if( defined( GLSGEN_EXPORT_GLSLINEARSCALE ) || defined( GLSGEN_IMPORT_GLSLINEARSCALE ) || defined( GLS_EXPORT_GENERATED ) || defined( GLS_IMPORT_GENERATED ) ) \
54 && defined( _MSC_VER )
55# if defined( GLSGEN_EXPORT_GLSLINEARSCALE ) || defined( GLS_EXPORT_GENERATED )
56# define GLSGEN_GLSLINEARSCALE_EXPORT __declspec( dllexport )
57# else
58# define GLSGEN_GLSLINEARSCALE_EXPORT __declspec( dllimport )
59# endif
60#else
61# define GLSGEN_GLSLINEARSCALE_EXPORT
62#endif
63///////////////////////////////////////////////////////////////////////////////
64
65/// Automatically link the runtime library plugin (on Windows).
66#define LIB_BASE_NAME "gls_linear_scale"
67#include "gls_auto_lib.h"
68#undef LIB_BASE_NAME
69
70 namespace disti
71{
72// SetValue enumerations
73 enum
74{
75 GLS_LINEAR_SCALE_FIRST_VALUE = GLS_LAST_INITIALIZER + 1,
76 GLS_LINEAR_SCALE_RADII,
77 GLS_LINEAR_SCALE_DECONFLICT_TICKS,
78 GLS_LINEAR_SCALE_HALO_ENABLED,
79 GLS_LINEAR_SCALE_HALO_WIDTH,
80 GLS_LINEAR_SCALE_HALO_COLOR,
81 GLS_LINEAR_SCALE_TICK_ANCHOR,
82 GLS_LINEAR_SCALE_USE_SCALABLE_LINES,
83 GLS_LINEAR_SCALE_DATA
84};
85
86/// Tick anchor behavior
87 typedef enum
88{
89 GLS_TICK_ANCHOR_TOP,
90 GLS_TICK_ANCHOR_BOTTOM,
91 GLS_TICK_ANCHOR_CENTER
92} GlsTickAnchor;
93
94/// \details The GlsLinearScaleData class. Stores information for the appearance of one set of tick marks.
95 class GlsLinearScaleData
96{
97 protected:
98 DistiAttribDict _attribDict; ///< The attribute dictionary for this class' members.
99
100 public:
101 bool active; ///< True if this scale is active.
102 bool useLineColor; ///< True if this scale draws with line color.
103 unsigned int ticks; ///< Number of ticks on this scale.
104 float startingOffset; ///< Start offset in logical units.
105 float interval; ///< Interval between ticks in logical units.
106 float length; ///< Length of ticks in logical units.
107 float thickness; ///< Thickness of ticks in logical units.
108 GlsColor color; ///< Color to draw ticks if line color is not being used.
109
110 GlsLinearScaleData()
111 : active( false )
112 , useLineColor( false )
113 , ticks( 0 )
114 , startingOffset( 0 )
115 , interval( 0 )
116 , length( 0 )
117 , thickness( 1 )
118 , color( 255, 255, 255, 255 )
119 {
120 InitMetaData();
121 }
122
123 /// Constructor
124 /// \param _active True if this scale is active.
125 /// \param _useLineColor True if this scale draws with line color.
126 /// \param _ticks Number of ticks on this scale.
127 /// \param _startingOffset Start offset in logical units.
128 /// \param _interval Interval between ticks in degrees.
129 /// \param _length Length of ticks in logical units.
130 /// \param _thickness Thickness of ticks in logical units.
131 /// \param _color Color to draw ticks if line color is not being used.
132 GlsLinearScaleData(
133 bool _active,
134 bool _useLineColor,
135 unsigned int _ticks,
136 float _startingOffset,
137 float _interval,
138 float _length,
139 float _thickness,
140 const GlsColor& _color )
141 : active( _active )
142 , useLineColor( _useLineColor )
143 , ticks( _ticks )
144 , startingOffset( _startingOffset )
145 , interval( _interval )
146 , length( _length )
147 , thickness( _thickness )
148 , color( _color )
149 {
150 InitMetaData();
151 }
152
153 /// Copy constructor
154 /// \param src The object to copy from.
155 GlsLinearScaleData( const GlsLinearScaleData& src )
156 {
157 InitMetaData();
158 *this = src;
159 }
160
161 /// Assignment operator
162 /// \param src The object to copy from.
163 /// \return The resulting object (this).
164 GlsLinearScaleData& operator=( const GlsLinearScaleData& src )
165 {
166 if( this != &src )
167 {
168 active = src.active;
169 useLineColor = src.useLineColor;
170 ticks = src.ticks;
171 startingOffset = src.startingOffset;
172 interval = src.interval;
173 length = src.length;
174 thickness = src.thickness;
175 color = src.color;
176
177 _attribDict.CopyCommonValues( src._attribDict );
178 }
179 return *this;
180 }
181
182 /// Equality operator
183 /// \param right The object to compare.
184 /// \return Whether or not the objects are equal.
185 bool GLSGEN_GLSLINEARSCALE_EXPORT operator==( const GlsLinearScaleData& right ) const;
186
187 /// Inequality operator
188 /// \param right The object to compare.
189 /// \return Whether or not the objects are not equal.
190 bool GLSGEN_GLSLINEARSCALE_EXPORT operator!=( const GlsLinearScaleData& right ) const
191 {
192 return !( this->operator==( right ) );
193 }
194
195 /// Create DistiAttributes for this object's members.
196 void GLSGEN_GLSLINEARSCALE_EXPORT InitMetaData();
197
198 /// Writes this to a stream.
199 /// \param outstr The stream to write to.
200 /// \return The stream in its current state.
201 GLSGEN_GLSLINEARSCALE_EXPORT std::ostream& WriteValue( std::ostream& outstr );
202
203 /// Reads this from a stream.
204 /// \param instr The stream to read from.
205 /// \return The stream in its current state.
206 GLSGEN_GLSLINEARSCALE_EXPORT std::istream& ReadValue( std::istream& instr );
207};
208
209#define GLS_LINEAR_SCALE_MAX 5 ///< The maximum number of unique tick mark types.
210
211 typedef GlsLinearScaleData GlsLinearScaleDataArray[ GLS_LINEAR_SCALE_MAX ]; ///< Typedef for one GlsLinearScale worth of scale data.
212
213#ifdef GLES
214 class GlsGloFileAttribute;
215#endif
216
217/** Runtime implementation of a GlsLinearScale */
218 class GlsLinearScale : public GLPolygon
219{
220 friend class GlsLinearScaleEditor;
221
222 private:
223 GlsLinearScale& operator=( const GlsLinearScale& ) DISTI_SPECIAL_MEM_FUN_DELETE;
224 GlsLinearScale( const GlsLinearScale& ) DISTI_SPECIAL_MEM_FUN_DELETE;
225
226 public:
227 DISTI_DEPRECATED( "This identifier is forbidden by the C++ standard. Use BaseClass instead." )
228 typedef GLPolygon _BaseClass; ///< Deprecated typedef for the base class.
229 typedef GLPolygon BaseClass; ///< Typedef for the base class.
230
231 /** Create a new GlsLinearScale.
232 * \param generateInstance Whether or not to generate an instance name
233 * for this inputdevice */
234 GLSGEN_GLSLINEARSCALE_EXPORT GlsLinearScale( bool generateInstance = false );
235
236 /// Copy constructor
237 /// \param that The object to copy from.
238 /// \param generateNames Whether or not to generate an instance name.
239 GLSGEN_GLSLINEARSCALE_EXPORT GlsLinearScale( const GlsLinearScale& that, const bool generateNames );
240
241 /** Destructs a GlsLinearScale object */
242 virtual GLSGEN_GLSLINEARSCALE_EXPORT ~GlsLinearScale();
243
244 /// \return A pointer to a new GlsLinearScale object.
245 static GLSGEN_GLSLINEARSCALE_EXPORT DisplayObject* CreateInstance();
246
247 virtual GLSGEN_GLSLINEARSCALE_EXPORT void SetAvailableAttributes( unsigned int value ) DISTI_METHOD_OVERRIDE;
248 virtual GLSGEN_GLSLINEARSCALE_EXPORT DisplayObject* CloneObject( bool generateNames = false ) DISTI_METHOD_OVERRIDE;
249 virtual GLSGEN_GLSLINEARSCALE_EXPORT void CopyProperties( DisplayObject* src ) DISTI_METHOD_OVERRIDE;
250 virtual GLSGEN_GLSLINEARSCALE_EXPORT void CopyGeometry( DisplayObject* srcArg ) DISTI_METHOD_OVERRIDE;
251
252#ifndef GLES
253 virtual GLSGEN_GLSLINEARSCALE_EXPORT InterfaceListType* GetCppInterfaceDescription( InterfaceListType* addToThisList = NULL ) DISTI_METHOD_OVERRIDE;
254 virtual GLSGEN_GLSLINEARSCALE_EXPORT void GetCppInterfaceDescriptionFree( InterfaceListType* array ) DISTI_METHOD_OVERRIDE;
255#endif
256
257 virtual GLSGEN_GLSLINEARSCALE_EXPORT void PreDraw( const OpenGLMatrices& parentMatrices, Culler& culler ) DISTI_METHOD_OVERRIDE;
258 virtual GLSGEN_GLSLINEARSCALE_EXPORT void Draw() DISTI_METHOD_OVERRIDE;
259 virtual GLSGEN_GLSLINEARSCALE_EXPORT void Scale( float px, float py, float pz, Vertex* anchor, int handleBar ) DISTI_METHOD_OVERRIDE;
260 virtual GLSGEN_GLSLINEARSCALE_EXPORT void Rotate( const Vector& orig, float angle, const Vector& axis ) DISTI_METHOD_OVERRIDE;
261 virtual GLSGEN_GLSLINEARSCALE_EXPORT bool Hit( float x, float y, float z, float scale, const Vector& directionVector, Vector* collisionPoint ) DISTI_METHOD_OVERRIDE;
262 virtual GLSGEN_GLSLINEARSCALE_EXPORT void SetValue( int spec, va_list& args ) DISTI_METHOD_OVERRIDE;
263 virtual GLSGEN_GLSLINEARSCALE_EXPORT void SetColor( const GlsColor& color ) DISTI_METHOD_OVERRIDE;
264
265 //////////////////////////////////////////////////
266 // GlsLinearScale specific operations
267 //////////////////////////////////////////////////
268
269 /** Initializes data for one of the scales
270 * \param index Zero based index of the scale to set
271 * \param data The data to set
272 */
273 GLSGEN_GLSLINEARSCALE_EXPORT void SetScale( int index, const GlsLinearScaleData& data );
274
275 /** Gets the data for one of the scales
276 * \param index Zero based index of the scale to get
277 * \param data The GlsLinearScaleData structure to fill
278 */
279 GLSGEN_GLSLINEARSCALE_EXPORT void GetScale( int index, GlsLinearScaleData& data );
280
281 /** Sets the tick deconfliction state for this scale
282 * \param val Wether or not to enable tick deconfliction
283 */
284 GLSGEN_GLSLINEARSCALE_EXPORT void DeconflictTicks( const bool& val );
285
286 /** Gets the tick deconfliction state for this scale
287 * \return Whether or not tick deconfliction is enabled
288 */
289 GLSGEN_GLSLINEARSCALE_EXPORT bool DeconflictTicks() { return _deconflictTicks; }
290
291 /** Gets the halo state for this scale
292 * \return Whether or not halo is enabled
293 */
294 GLSGEN_GLSLINEARSCALE_EXPORT bool HaloEnabled() { return _haloEnabled; }
295
296 /** Sets the halo state for this scale
297 * \param val Wether or not to enable halo
298 */
299 GLSGEN_GLSLINEARSCALE_EXPORT void HaloEnabled( const bool& val );
300
301 /** Gets the halo width for this scale
302 * \return The halo width for this scale
303 */
304 GLSGEN_GLSLINEARSCALE_EXPORT float HaloWidth() { return _haloWidth; }
305
306 /** Sets the halo width for this scale
307 * \param val New halo width
308 */
309 GLSGEN_GLSLINEARSCALE_EXPORT void HaloWidth( const float& val );
310
311 /** Gets the halo color for this scale
312 * \return The halo color for this scale
313 */
314 GLSGEN_GLSLINEARSCALE_EXPORT GlsColor HaloColor() { return _haloColor; }
315
316 /** Sets the halo color for this scale
317 * \param val New halo color
318 */
319 GLSGEN_GLSLINEARSCALE_EXPORT void HaloColor( const GlsColor& val );
320
321 /** Gets the tick anchor for this scale
322 * \return The tick anchor for this scale
323 */
324 GLSGEN_GLSLINEARSCALE_EXPORT GlsTickAnchor TickAnchor() { return _tickAnchor; }
325
326 /** Sets the tick anchor for this scale
327 * \param val New tick anchor
328 */
329 GLSGEN_GLSLINEARSCALE_EXPORT void TickAnchor( const GlsTickAnchor val );
330
331#ifdef GLES
332 /** Causes the VBO for this object to be recomputed */
333 GLSGEN_GLSLINEARSCALE_EXPORT void InvalidateGeometry()
334 {
335 _geometryRefresh = true;
336 InvalidatePainter();
337 }
338#endif
339
340#ifndef GLES
341 /** Gets the drawing mode for this scale
342 * \return The drawing mode for this scale
343 */
344 GLSGEN_GLSLINEARSCALE_EXPORT bool UseScalableLines() { return _useScalableLines; }
345
346 /** Sets the drawing mode for this scale
347 * \param val New drawing mode
348 */
349 GLSGEN_GLSLINEARSCALE_EXPORT void UseScalableLines( const bool& val );
350
351 /** Causes the display list for this object to be recomputed */
352 GLSGEN_GLSLINEARSCALE_EXPORT void InvalidateGeometry()
353 {
354 _displayList.Invalidate();
355 InvalidatePainter();
356 }
357
358 /// \return A reference to this object's display list.
359 GLSGEN_GLSLINEARSCALE_EXPORT GlsDisplayList& DisplayList() { return _displayList; }
360#endif
361
362 protected:
363#ifdef GLES
364 GlsQuadListVC_3D _quads; ///< Manages a VBO for drawing the tick marks.
365# ifdef GLES20
366 GlsQuadListVC_3D _antiAliasQuads; ///< Manages a VBO for drawing a feathered outline for antialiasing.
367# endif
368
369 void BakeVBO(); ///< Updates the VBO(s) when the object changes.
370#else
371 /// Minimizes calls to glColor when drawing the scale.
372 /// \param newColor The new color to set.
373 void CurrentColor( const GlsColor& newColor );
374
375 /// Minimizes calls to glLineWidth when drawing the scale.
376 /// \param newLineWidth The new line width to set.
377 void CurrentLineWidth( const float& newLineWidth );
378
379 /** Stores the current color. Used when calculating a new display list so that redundant
380 * glColor calls are not made */
381 GlsColor _currentColor;
382
383 /** Stores the current line width. Used when calculating a new display list so that redundant
384 * glLineWidth calls are not made */
385 float _currentLineWidth;
386
387 /** True if the current color has been set. Gets reset every time a new display list is
388 * recalculated. */
389 bool _currentColorSet;
390
391 /** True if the current line width has been set. Gets reset every time a new display list is
392 * recalculated. */
393 bool _currentLineWidthSet;
394
395 /** Stores the scale in a display list for faster drawing */
396 GlsDisplayList _displayList;
397#endif
398
399 /** Recomputes the object's vertices from its radii */
400 void RecomputeVertices();
401
402 /** Recomputes the object's vertices and its radii */
403 void UpdateScaleData();
404
405 /// Determines if a tick with the given offset should be drawn or not. If a higher priority
406 /// scale already has a tick at that level and deconfliction is enabled, then this method
407 /// will return false
408 /// \param currentLevel The current tick type being considered for drawing.
409 /// \param currentOffset The offset of the proposed tick.
410 /// \return True if the tick should be drawn.
411 bool TickNeeded( int currentLevel, float currentOffset );
412
413#ifdef GLES
414 /** Calculates and draws a single scale using the given halo length and thickness
415 * \param i The index of the scale to draw
416 * \param haloLength The length of the halo
417 * \param haloThickness The thickness of the halo
418 * \param color The color of the scale
419 */
420 void DrawScale( int i, float haloLength, float haloThickness, GlsColor& color );
421#else
422 /** Calculates and draws a single scale using the given halo length and thickness
423 * \param i The index of the scale to draw
424 * \param haloLength The length of the halo
425 * \param haloThickness The thickness of the halo
426 */
427 void DrawScale( int i, float haloLength, float haloThickness );
428#endif
429
430#ifdef GLES
431 /** Set a single attribute from the GLO file.
432 * \param data The attribute to set and its associated data.
433 */
434 virtual GLSGEN_GLSLINEARSCALE_EXPORT void SetFromGloData( GlsGloFileAttribute& data ) DISTI_METHOD_OVERRIDE;
435#endif
436
437#ifndef GLES
438 /** Calculates current tick mark locations and performs OpenGL drawing commands */
439 virtual void DrawGeometry();
440#endif
441
442 /** Two radius vectors that are used to define the orientation of the scale */
443 Vector _radii[ 2 ];
444
445 /** Normalized radius vectors, cached because they are needed often */
446 Vector _radiiNormalized[ 2 ];
447
448 /** The particulars of each scale */
449 GlsLinearScaleDataArray _scale;
450
451 /** True if duplicated tick marks are removed */
452 bool _deconflictTicks;
453
454 /** True if haloing is enabled */
455 bool _haloEnabled;
456
457 /** Width of the halo in logical units */
458 float _haloWidth;
459
460 /** Color of the halo */
461 GlsColor _haloColor;
462
463 /** Anchor to determine where ticks will draw */
464 GlsTickAnchor _tickAnchor;
465
466#ifndef GLES
467 /** True if scale is drawn with polygon quads instead of lines*/
468 bool _useScalableLines;
469#endif
470};
471
472/** Metadata for scale data */
473 class DistiAttributeConnectionGlsLinearScaleDataArray : public DistiAttributeBase
474{
475 protected:
476 GlsLinearScaleDataArray* _attribPtr; ///< Observer of the underlying storage for the property.
477 unsigned int _arraySize; ///< Always GLS_LINEAR_SCALE_MAX.
478
479 public:
480 /// Constructor
481 /// \param callback The callback method to call when this property changes.
482 /// \param name The name of this attribute.
483 /// \param attribPtr A pointer to the underlying storage for this property.
484 /// \param arraySize Always GLS_LINEAR_SCALE_MAX.
485 DistiAttributeConnectionGlsLinearScaleDataArray( CallbackMethodCallerBase* callback, const AttributeName& name, GlsLinearScaleDataArray* attribPtr, int arraySize )
486 : DistiAttributeBase( callback, name, false )
487 , _attribPtr( attribPtr )
488 , _arraySize( arraySize )
489 {
490 }
491
492 virtual GLSGEN_GLSLINEARSCALE_EXPORT ~DistiAttributeConnectionGlsLinearScaleDataArray();
493
494 virtual GLSGEN_GLSLINEARSCALE_EXPORT bool OkToWrite() const DISTI_METHOD_OVERRIDE;
495
496 virtual GLSGEN_GLSLINEARSCALE_EXPORT std::ostream& WriteValue( std::ostream& outstr ) DISTI_METHOD_OVERRIDE;
497 virtual GLSGEN_GLSLINEARSCALE_EXPORT std::istream& ReadValue( std::istream& instr ) DISTI_METHOD_OVERRIDE;
498
499 GLSGEN_GLSLINEARSCALE_EXPORT std::string Type() const DISTI_METHOD_OVERRIDE;
500};
501
502} // namespace disti
503
504#endif
disti::AttributeName
Definition: disti_metadata.h:87
disti::CallbackMethodCallerBase
Definition: callback_caller_base.h:56
disti::Culler
Definition: cull.h:50
disti::DisplayObject
Definition: display.h:96
disti::DisplayObject::_geometryRefresh
bool _geometryRefresh
Whether or not the geometry (VBOs etc.) needs to be updated on the GPU.
Definition: display.h:1539
disti::DisplayObject::InvalidatePainter
void InvalidatePainter()
disti::DistiAttribDict
Definition: disti_metadata.h:750
disti::DistiAttribDict::CopyCommonValues
void CopyCommonValues(const DistiAttribDict &dict)
disti::DistiAttributeBase
Definition: disti_metadata.h:220
disti::DistiAttributeConnectionGlsLinearScaleDataArray
Definition: gls_linear_scale.h:474
disti::DistiAttributeConnectionGlsLinearScaleDataArray::_attribPtr
GlsLinearScaleDataArray * _attribPtr
Observer of the underlying storage for the property.
Definition: gls_linear_scale.h:476
disti::DistiAttributeConnectionGlsLinearScaleDataArray::ReadValue
virtual std::istream & ReadValue(std::istream &instr) DISTI_METHOD_OVERRIDE
disti::DistiAttributeConnectionGlsLinearScaleDataArray::_arraySize
unsigned int _arraySize
Always GLS_LINEAR_SCALE_MAX.
Definition: gls_linear_scale.h:477
disti::DistiAttributeConnectionGlsLinearScaleDataArray::OkToWrite
virtual bool OkToWrite() const DISTI_METHOD_OVERRIDE
disti::DistiAttributeConnectionGlsLinearScaleDataArray::DistiAttributeConnectionGlsLinearScaleDataArray
DistiAttributeConnectionGlsLinearScaleDataArray(CallbackMethodCallerBase *callback, const AttributeName &name, GlsLinearScaleDataArray *attribPtr, int arraySize)
Definition: gls_linear_scale.h:485
disti::DistiAttributeConnectionGlsLinearScaleDataArray::WriteValue
virtual std::ostream & WriteValue(std::ostream &outstr) DISTI_METHOD_OVERRIDE
disti::DistiAttributeConnectionGlsLinearScaleDataArray::Type
std::string Type() const DISTI_METHOD_OVERRIDE
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::GlsLinearScaleData
Definition: gls_linear_scale.h:96
disti::GlsLinearScaleData::active
bool active
True if this scale is active.
Definition: gls_linear_scale.h:101
disti::GlsLinearScaleData::length
float length
Length of ticks in logical units.
Definition: gls_linear_scale.h:106
disti::GlsLinearScaleData::GlsLinearScaleData
GlsLinearScaleData(const GlsLinearScaleData &src)
Definition: gls_linear_scale.h:155
disti::GlsLinearScaleData::operator==
bool operator==(const GlsLinearScaleData &right) const
disti::GlsLinearScaleData::_attribDict
DistiAttribDict _attribDict
The attribute dictionary for this class' members.
Definition: gls_linear_scale.h:98
disti::GlsLinearScaleData::interval
float interval
Interval between ticks in logical units.
Definition: gls_linear_scale.h:105
disti::GlsLinearScaleData::thickness
float thickness
Thickness of ticks in logical units.
Definition: gls_linear_scale.h:107
disti::GlsLinearScaleData::color
GlsColor color
Color to draw ticks if line color is not being used.
Definition: gls_linear_scale.h:108
disti::GlsLinearScaleData::startingOffset
float startingOffset
Start offset in logical units.
Definition: gls_linear_scale.h:104
disti::GlsLinearScaleData::ticks
unsigned int ticks
Number of ticks on this scale.
Definition: gls_linear_scale.h:103
disti::GlsLinearScaleData::operator!=
bool operator!=(const GlsLinearScaleData &right) const
Definition: gls_linear_scale.h:190
disti::GlsLinearScaleData::ReadValue
std::istream & ReadValue(std::istream &instr)
disti::GlsLinearScaleData::WriteValue
std::ostream & WriteValue(std::ostream &outstr)
disti::GlsLinearScaleData::useLineColor
bool useLineColor
True if this scale draws with line color.
Definition: gls_linear_scale.h:102
disti::GlsLinearScaleData::InitMetaData
void InitMetaData()
Create DistiAttributes for this object's members.
disti::GlsLinearScaleData::operator=
GlsLinearScaleData & operator=(const GlsLinearScaleData &src)
Definition: gls_linear_scale.h:164
disti::GlsLinearScaleData::GlsLinearScaleData
GlsLinearScaleData(bool _active, bool _useLineColor, unsigned int _ticks, float _startingOffset, float _interval, float _length, float _thickness, const GlsColor &_color)
Definition: gls_linear_scale.h:132
disti::GlsLinearScale
Definition: gls_linear_scale.h:219
disti::GlsLinearScale::_quads
GlsQuadListVC_3D _quads
Manages a VBO for drawing the tick marks.
Definition: gls_linear_scale.h:364
disti::GlsLinearScale::_haloColor
GlsColor _haloColor
Definition: gls_linear_scale.h:461
disti::GlsLinearScale::UpdateScaleData
void UpdateScaleData()
disti::GlsLinearScale::SetAvailableAttributes
virtual void SetAvailableAttributes(unsigned int value) DISTI_METHOD_OVERRIDE
disti::GlsLinearScale::Draw
virtual void Draw() DISTI_METHOD_OVERRIDE
disti::GlsLinearScale::DrawScale
void DrawScale(int i, float haloLength, float haloThickness, GlsColor &color)
disti::GlsLinearScale::HaloColor
GlsColor HaloColor()
Definition: gls_linear_scale.h:314
disti::GlsLinearScale::SetColor
virtual void SetColor(const GlsColor &color) DISTI_METHOD_OVERRIDE
disti::GlsLinearScale::CloneObject
virtual DisplayObject * CloneObject(bool generateNames=false) DISTI_METHOD_OVERRIDE
disti::GlsLinearScale::HaloEnabled
void HaloEnabled(const bool &val)
disti::GlsLinearScale::TickAnchor
GlsTickAnchor TickAnchor()
Definition: gls_linear_scale.h:324
disti::GlsLinearScale::_haloEnabled
bool _haloEnabled
Definition: gls_linear_scale.h:455
disti::GlsLinearScale::SetFromGloData
virtual void SetFromGloData(GlsGloFileAttribute &data) DISTI_METHOD_OVERRIDE
disti::GlsLinearScale::TickNeeded
bool TickNeeded(int currentLevel, float currentOffset)
disti::GlsLinearScale::Hit
virtual bool Hit(float x, float y, float z, float scale, const Vector &directionVector, Vector *collisionPoint) DISTI_METHOD_OVERRIDE
disti::GlsLinearScale::PreDraw
virtual void PreDraw(const OpenGLMatrices &parentMatrices, Culler &culler) DISTI_METHOD_OVERRIDE
disti::GlsLinearScale::RecomputeVertices
void RecomputeVertices()
disti::GlsLinearScale::DeconflictTicks
bool DeconflictTicks()
Definition: gls_linear_scale.h:289
disti::GlsLinearScale::_haloWidth
float _haloWidth
Definition: gls_linear_scale.h:458
disti::GlsLinearScale::SetValue
virtual void SetValue(int spec, va_list &args) DISTI_METHOD_OVERRIDE
disti::GlsLinearScale::Rotate
virtual void Rotate(const Vector &orig, float angle, const Vector &axis) DISTI_METHOD_OVERRIDE
disti::GlsLinearScale::HaloEnabled
bool HaloEnabled()
Definition: gls_linear_scale.h:294
disti::GlsLinearScale::HaloWidth
float HaloWidth()
Definition: gls_linear_scale.h:304
disti::GlsLinearScale::CreateInstance
static DisplayObject * CreateInstance()
disti::GlsLinearScale::_radii
Vector _radii[2]
Definition: gls_linear_scale.h:443
disti::GlsLinearScale::CopyGeometry
virtual void CopyGeometry(DisplayObject *srcArg) DISTI_METHOD_OVERRIDE
disti::GlsLinearScale::HaloColor
void HaloColor(const GlsColor &val)
disti::GlsLinearScale::BakeVBO
void BakeVBO()
Updates the VBO(s) when the object changes.
disti::GlsLinearScale::TickAnchor
void TickAnchor(const GlsTickAnchor val)
disti::GlsLinearScale::Scale
virtual void Scale(float px, float py, float pz, Vertex *anchor, int handleBar) DISTI_METHOD_OVERRIDE
disti::GlsLinearScale::CopyProperties
virtual void CopyProperties(DisplayObject *src) DISTI_METHOD_OVERRIDE
disti::GlsLinearScale::_deconflictTicks
bool _deconflictTicks
Definition: gls_linear_scale.h:452
disti::GlsLinearScale::GetScale
void GetScale(int index, GlsLinearScaleData &data)
disti::GlsLinearScale::_radiiNormalized
Vector _radiiNormalized[2]
Definition: gls_linear_scale.h:446
disti::GlsLinearScale::HaloWidth
void HaloWidth(const float &val)
disti::GlsLinearScale::InvalidateGeometry
void InvalidateGeometry()
Definition: gls_linear_scale.h:333
disti::GlsLinearScale::_tickAnchor
GlsTickAnchor _tickAnchor
Definition: gls_linear_scale.h:464
disti::GlsLinearScale::SetScale
void SetScale(int index, const GlsLinearScaleData &data)
disti::GlsLinearScale::_scale
GlsLinearScaleDataArray _scale
Definition: gls_linear_scale.h:449
disti::GlsQuadListVC_3D
Definition: gls_quad_storage.h:64
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.
GLS_LINEAR_SCALE_MAX
#define GLS_LINEAR_SCALE_MAX
The maximum number of unique tick mark types.
Definition: gls_linear_scale.h:209
GLSGEN_GLSLINEARSCALE_EXPORT
#define GLSGEN_GLSLINEARSCALE_EXPORT
Provides support for creating DLLs.
Definition: gls_linear_scale.h:61
gls_quad_storage.h
The disti::GlsQuadListVC_3D and GlsQuadListVCT_2D classes.
disti
Definition: bmpimage.h:47
disti::GlsLinearScaleDataArray
GlsLinearScaleData GlsLinearScaleDataArray[5]
Typedef for one GlsLinearScale worth of scale data.
Definition: gls_linear_scale.h:211
disti::GlsTickAnchor
GlsTickAnchor
Tick anchor behavior.
Definition: gls_linear_scale.h:88