| GL Studio C++ Runtime API

gls_angular_scale.h
Go to the documentation of this file.
1/*! \file
2 \brief The disti::GlsAngularScale class and global enumerations.
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_ANGULAR_SCALE_H
41#define _GLS_ANGULAR_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_GLSANGULARSCALE ) || defined( GLSGEN_IMPORT_GLSANGULARSCALE ) || defined( GLS_EXPORT_GENERATED ) || defined( GLS_IMPORT_GENERATED ) ) \
54 && defined( _MSC_VER )
55# if defined( GLSGEN_EXPORT_GLSANGULARSCALE ) || defined( GLS_EXPORT_GENERATED )
56# define GLSGEN_GLSANGULARSCALE_EXPORT __declspec( dllexport )
57# else
58# define GLSGEN_GLSANGULARSCALE_EXPORT __declspec( dllimport )
59# endif
60#else
61# define GLSGEN_GLSANGULARSCALE_EXPORT
62#endif
63///////////////////////////////////////////////////////////////////////////////
64
65/// Automatically link the runtime library plugin (on Windows).
66#define LIB_BASE_NAME "gls_angular_scale"
67#include "gls_auto_lib.h"
68#undef LIB_BASE_NAME
69
70 namespace disti
71{
72#ifdef GLES
73// Forward Declaration
74 class GlsGloFileAttribute;
75#endif
76// SetValue enumerations
77 enum
78{
79 GLS_ANGULAR_SCALE_FIRST_VALUE = GLS_LAST_INITIALIZER + 1,
80 GLS_ANGULAR_SCALE_RADII,
81 GLS_ANGULAR_SCALE_DECONFLICT_TICKS,
82 GLS_ANGULAR_SCALE_HALO_ENABLED,
83 GLS_ANGULAR_SCALE_HALO_WIDTH,
84 GLS_ANGULAR_SCALE_HALO_COLOR,
85 GLS_ANGULAR_SCALE_USE_SCALABLE_LINES,
86 GLS_ANGULAR_SCALE_RADIUS,
87 GLS_ANGULAR_SCALE_DATA
88};
89
90/// \details The GlsAngularScaleData class. Stores information for the appearance of one set of tick marks.
91 class GlsAngularScaleData
92{
93 protected:
94 DistiAttribDict _attribDict; ///< The attribute dictionary for this class' members.
95
96 public:
97 bool active; /**< True if this scale is active */
98 bool useLineColor; /**< True if this scale draws with line color */
99 unsigned int ticks; /**< Number of ticks on this scale */
100 float startAngle; /**< Start angle in degrees */
101 float interval; /**< Interval between ticks in degrees */
102 float length; /**< Length of ticks in logical units */
103 float thickness; /**< Thickness of ticks in logical units */
104 GlsColor color; /**< Color to draw ticks if line color is not being used*/
105
106 GlsAngularScaleData()
107 : active( false )
108 , useLineColor( false )
109 , ticks( 0 )
110 , startAngle( 0 )
111 , interval( 0 )
112 , length( 0 )
113 , thickness( 1 )
114 , color( 255, 255, 255, 255 )
115 {
116 InitMetaData();
117 }
118
119 /// Constructor
120 /// \param _active True if this scale is active.
121 /// \param _useLineColor True if this scale draws with line color.
122 /// \param _ticks Number of ticks on this scale.
123 /// \param _startAngle Angle Start angle in degrees.
124 /// \param _interval Interval between ticks in degrees.
125 /// \param _length Length of ticks in logical units.
126 /// \param _thickness Thickness of ticks in logical units.
127 /// \param _color Color to draw ticks if line color is not being used.
128 GlsAngularScaleData(
129 bool _active,
130 bool _useLineColor,
131 unsigned int _ticks,
132 float _startAngle,
133 float _interval,
134 float _length,
135 float _thickness,
136 const GlsColor& _color )
137 : active( _active )
138 , useLineColor( _useLineColor )
139 , ticks( _ticks )
140 , startAngle( _startAngle )
141 , interval( _interval )
142 , length( _length )
143 , thickness( _thickness )
144 , color( _color )
145 {
146 InitMetaData();
147 }
148
149 /// Copy constructor
150 /// \param src The object to copy from.
151 GlsAngularScaleData( const GlsAngularScaleData& src )
152 {
153 InitMetaData();
154 *this = src;
155 }
156
157 /// Assignment operator
158 /// \param src The object to copy from.
159 /// \return the resulting object (this).
160 GlsAngularScaleData& operator=( const GlsAngularScaleData& src )
161 {
162 if( this != &src )
163 {
164 active = src.active;
165 useLineColor = src.useLineColor;
166 ticks = src.ticks;
167 startAngle = src.startAngle;
168 interval = src.interval;
169 length = src.length;
170 thickness = src.thickness;
171 color = src.color;
172
173 _attribDict.CopyCommonValues( src._attribDict );
174 }
175 return *this;
176 }
177
178 virtual ~GlsAngularScaleData()
179 {
180 }
181
182 /// Equality operator
183 /// \param right The object to compare.
184 /// \return Whether or not the objects are equal.
185 bool GLSGEN_GLSANGULARSCALE_EXPORT operator==( const GlsAngularScaleData& 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_GLSANGULARSCALE_EXPORT operator!=( const GlsAngularScaleData& right ) const
191 {
192 return !( this->operator==( right ) );
193 }
194
195 /// Create DistiAttributes for this object's members.
196 void GLSGEN_GLSANGULARSCALE_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 virtual GLSGEN_GLSANGULARSCALE_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 virtual GLSGEN_GLSANGULARSCALE_EXPORT std::istream& ReadValue( std::istream& instr );
207};
208
209#define GLS_ANGULAR_SCALE_MAX 5 ///< The maximum number of unique tick mark types.
210
211 typedef GlsAngularScaleData GlsAngularScaleDataArray[ GLS_ANGULAR_SCALE_MAX ]; ///< Typedef for one GlsAngularScale worth of scale data.
212
213/** Runtime implementation of a GlsAngularScale */
214 class GlsAngularScale : public GLPolygon
215{
216 friend class GlsAngularScaleEditor;
217
218 private:
219 GlsAngularScale& operator=( const GlsAngularScale& ) DISTI_SPECIAL_MEM_FUN_DELETE;
220 GlsAngularScale( const GlsAngularScale& ) DISTI_SPECIAL_MEM_FUN_DELETE;
221
222 public:
223 DISTI_DEPRECATED( "This identifier is forbidden by the C++ standard. Use BaseClass instead." )
224 typedef GLPolygon _BaseClass; ///< Deprecated typedef for the base class.
225 typedef GLPolygon BaseClass; ///< Typedef for the base class.
226
227 /** Create a new GlsAngularScale.
228 * \param generateInstance Whether or not to generate an instance name
229 * for this inputdevice */
230 GLSGEN_GLSANGULARSCALE_EXPORT GlsAngularScale( bool generateInstance = false );
231
232 /** The copy constructor for GlsAngularScale
233 *
234 * \param that The GlsAngularScale object that is being copied
235 * \param generateNames Whether or not to generate a new instance name
236 */
237 GLSGEN_GLSANGULARSCALE_EXPORT GlsAngularScale( const GlsAngularScale& that, const bool generateNames );
238
239 /** Destructs a GlsAngularScale object */
240 virtual GLSGEN_GLSANGULARSCALE_EXPORT ~GlsAngularScale();
241
242 /// \return A pointer to a new GlsAngularScale object.
243 static GLSGEN_GLSANGULARSCALE_EXPORT DisplayObject* CreateInstance();
244
245 virtual GLSGEN_GLSANGULARSCALE_EXPORT void SetAvailableAttributes( unsigned int value ) DISTI_METHOD_OVERRIDE;
246 virtual GLSGEN_GLSANGULARSCALE_EXPORT DisplayObject* CloneObject( bool generateNames = false ) DISTI_METHOD_OVERRIDE;
247 virtual GLSGEN_GLSANGULARSCALE_EXPORT void CopyProperties( DisplayObject* src ) DISTI_METHOD_OVERRIDE;
248 virtual GLSGEN_GLSANGULARSCALE_EXPORT void CopyGeometry( DisplayObject* srcArg ) DISTI_METHOD_OVERRIDE;
249
250#ifndef GLES
251 virtual GLSGEN_GLSANGULARSCALE_EXPORT InterfaceListType* GetCppInterfaceDescription( InterfaceListType* addToThisList = NULL ) DISTI_METHOD_OVERRIDE;
252 virtual GLSGEN_GLSANGULARSCALE_EXPORT void GetCppInterfaceDescriptionFree( InterfaceListType* array ) DISTI_METHOD_OVERRIDE;
253#endif
254
255 virtual GLSGEN_GLSANGULARSCALE_EXPORT void PreDraw( const OpenGLMatrices& parentMatrices, Culler& culler ) DISTI_METHOD_OVERRIDE;
256 virtual GLSGEN_GLSANGULARSCALE_EXPORT void Draw() DISTI_METHOD_OVERRIDE;
257 virtual GLSGEN_GLSANGULARSCALE_EXPORT void Scale( float px, float py, float pz, Vertex* anchor, int handleBar ) DISTI_METHOD_OVERRIDE;
258 virtual GLSGEN_GLSANGULARSCALE_EXPORT void Rotate( const Vector& orig, float angle, const Vector& axis ) DISTI_METHOD_OVERRIDE;
259 virtual GLSGEN_GLSANGULARSCALE_EXPORT bool Hit( float x, float y, float z, float scale, const Vector& directionVector, Vector* collisionPoint ) DISTI_METHOD_OVERRIDE;
260 virtual GLSGEN_GLSANGULARSCALE_EXPORT Vertex* Vertices() DISTI_METHOD_OVERRIDE;
261 virtual GLSGEN_GLSANGULARSCALE_EXPORT void GetExtents( float& minx, float& miny, float& minz, float& maxx, float& maxy, float& maxz ) DISTI_METHOD_OVERRIDE;
262 virtual GLSGEN_GLSANGULARSCALE_EXPORT void GetTransformedExtents( Vector& min, Vector& max, const GlsMatrixType& matrix, bool resetMinMax ) DISTI_METHOD_OVERRIDE;
263 virtual GLSGEN_GLSANGULARSCALE_EXPORT void UpdateBoundingVolume() DISTI_METHOD_OVERRIDE;
264 virtual GLSGEN_GLSANGULARSCALE_EXPORT void SetColor( const GlsColor& color ) DISTI_METHOD_OVERRIDE;
265
266 /// An alias of SetColor, kept for backward compatibility.
267 /// \param color The new color to set.
268 DISTI_DEPRECATED( "Use SetColor() instead." )
269 inline void SetLineColor( const GlsColor& color ) { SetColor( color ); }
270
271#ifndef GLES
272 virtual GLSGEN_GLSANGULARSCALE_EXPORT void AntiAlias( bool alias ) DISTI_METHOD_OVERRIDE;
273#endif
274
275 GLSGEN_GLSANGULARSCALE_EXPORT DisplayObject* handle( DisplayEvent* ev ) DISTI_METHOD_OVERRIDE;
276 GLSGEN_GLSANGULARSCALE_EXPORT virtual void SetValue( int spec, va_list& args ) DISTI_METHOD_OVERRIDE;
277
278 //////////////////////////////////////////////////
279 // GlsAngularScale specific operations
280 //////////////////////////////////////////////////
281
282 /** Initializes data for one of the scales
283 * \param index Zero based index of the scale to set
284 * \param data The data to set
285 */
286 GLSGEN_GLSANGULARSCALE_EXPORT void SetScale( int index, const GlsAngularScaleData& data );
287
288 /** Gets data for one of the scales
289 * \param index Zero based index of the scale to get
290 * \param data The GlsAngularScaleData structure to fill
291 */
292 GLSGEN_GLSANGULARSCALE_EXPORT void GetScale( int index, GlsAngularScaleData& data );
293
294 /** Sets the tick deconfliction state for this scale
295 * \param val Wether or not to enable tick deconfliction
296 */
297 GLSGEN_GLSANGULARSCALE_EXPORT void DeconflictTicks( const bool& val );
298
299 /** Gets the tick deconfliction state for this scale
300 * \return Whether or not tick deconfliction is enabled
301 */
302 GLSGEN_GLSANGULARSCALE_EXPORT bool DeconflictTicks() { return _deconflictTicks; }
303
304 /** Gets the halo state for this scale
305 * \return Whether or not halo is enabled
306 */
307 GLSGEN_GLSANGULARSCALE_EXPORT bool HaloEnabled() { return _haloEnabled; }
308
309 /** Sets the halo state for this scale
310 * \param val Wether or not to enable halo
311 */
312 GLSGEN_GLSANGULARSCALE_EXPORT void HaloEnabled( const bool& val );
313
314 /** Gets the halo width for this scale
315 * \return The halo width for this scale
316 */
317 GLSGEN_GLSANGULARSCALE_EXPORT float HaloWidth() { return _haloWidth; }
318
319 /** Sets the halo width for this scale
320 * \param val New halo width
321 */
322 GLSGEN_GLSANGULARSCALE_EXPORT void HaloWidth( const float& val );
323
324 /** Gets the halo color for this scale
325 * \return The halo color for this scale
326 */
327 GLSGEN_GLSANGULARSCALE_EXPORT GlsColor HaloColor() { return _haloColor; }
328
329 /** Sets the halo color for this scale
330 * \param val New halo color
331 */
332 GLSGEN_GLSANGULARSCALE_EXPORT void HaloColor( const GlsColor& val );
333
334#ifndef GLES
335 /** Gets the drawing mode for this scale
336 * \return The drawing mode for this scale
337 */
338 GLSGEN_GLSANGULARSCALE_EXPORT bool UseScalableLines() { return _useScalableLines; }
339
340 /** Sets the drawing mode for this scale
341 * \param val New drawing mode
342 */
343 GLSGEN_GLSANGULARSCALE_EXPORT void UseScalableLines( const bool& val );
344
345#endif
346 /** Gets the radius for this scale
347 * \return The radius for this scale
348 */
349 GLSGEN_GLSANGULARSCALE_EXPORT float Radius()
350 {
351 return _magnitude[ 0 ];
352 }
353
354 /** Sets the radius for this scale
355 * \param val New radius
356 */
357 GLSGEN_GLSANGULARSCALE_EXPORT void Radius( const float& val );
358
359#ifdef GLES
360 /** Causes the VBO for this object to be recomputed */
361 GLSGEN_GLSANGULARSCALE_EXPORT void InvalidateGeometry()
362 {
363 _geometryRefresh = true;
364 InvalidatePainter();
365 }
366#else
367 /** Causes the VBO for this object to be recomputed */
368 GLSGEN_GLSANGULARSCALE_EXPORT void InvalidateGeometry()
369 {
370 _displayList.Invalidate();
371 InvalidatePainter();
372 }
373
374 /// \return A reference to this object's display list.
375 GLSGEN_GLSANGULARSCALE_EXPORT GlsDisplayList& DisplayList() { return _displayList; }
376#endif
377
378 protected:
379 /** True when the object's vertices need to be recalculated */
380 bool _needsRecalculate;
381
382 /** Calculates _radii based on_magnitude and _radiiUnit */
383 void MagnitudeChanged();
384
385 /** Calculates _radiiUnit and _magnitude based on _radii */
386 void CalculateRadiiUnit();
387
388#ifdef GLES
389 GlsQuadListVC_3D _quads; ///< Manages a VBO for drawing the tick marks.
390# ifdef GLES20
391 GlsQuadListVC_3D _antiAliasQuads; ///< Manages a VBO for drawing a feathered outline for antialiasing.
392# endif
393
394 void BakeVBO(); ///< Updates the VBO(s) when the object changes.
395#endif
396
397#ifndef GLES
398 /// Minimizes calls to glColor when drawing the scale.
399 /// \param newColor The new color to set.
400 void CurrentColor( const GlsColor& newColor );
401
402 /// Minimizes calls to glLineWidth when drawing the scale.
403 /// \param newLineWidth The new line width to set.
404 void CurrentLineWidth( const float& newLineWidth );
405
406 /** Stores the current color. Used when calculating a new display list so that redundant
407 * glColor calls are not made */
408 GlsColor _currentColor;
409
410 /** Stores the current line width. Used when calculating a new display list so that redundant
411 * glLineWidth calls are not made */
412 float _currentLineWidth;
413
414 /** True if the current color has been set. Gets reset every time a new display list is
415 * recalculated. */
416 bool _currentColorSet;
417
418 /** True if the current line width has been set. Gets reset every time a new display list is
419 * recalculated. */
420 bool _currentLineWidthSet;
421
422 /** Stores the scale in a display list for faster drawing */
423 GlsDisplayList _displayList;
424#endif
425
426 /** Recomputes the object's vertices from its radii */
427 void RecomputeVertices();
428
429 /// Determines if a tick with the given angle should be drawn or not. If a higher priority
430 /// scale already has a tick at that level and deconfliction is enabled, then this method
431 /// will return false.
432 /// \param currentLevel The current tick type being considered for drawing.
433 /// \param currentAngle The angle of the proposed tick.
434 /// \return True if the tick should be drawn.
435 bool TickNeeded( int currentLevel, float currentAngle );
436
437 /// Calculates and draws a single scale using the given halo length and thickness
438 /// \param i The index of the scale to draw
439 /// \param haloLength The length of the halo
440 /// \param haloThickness The thickness of the halo
441#ifdef GLES
442 /// \param color The color of the scale
443 void DrawScale( int i, float haloLength, float haloThickness, GlsColor& color );
444#else
445 void DrawScale( int i, float haloLength, float haloThickness );
446#endif
447
448#ifdef GLES
449 /** Set a single attribute from the GLO file.
450 * \param data The attribute to set and its associated data.
451 */
452 virtual GLSGEN_GLSANGULARSCALE_EXPORT void SetFromGloData( GlsGloFileAttribute& data ) DISTI_METHOD_OVERRIDE;
453#endif
454
455#ifndef GLES
456 /** Calculates current tick mark locations and performs OpenGL drawing commands */
457 virtual void DrawGeometry();
458#endif
459
460 /** Always equal to _radiiUnit * _magnitude */
461 Vector _radii[ 2 ];
462
463 /** Unit vectors describing the radii */
464 Vector _radiiUnit[ 2 ];
465
466 /** Magnitudes of the two radii */
467 float _magnitude[ 2 ];
468
469 /** The particulars of each scale */
470 GlsAngularScaleDataArray _scale;
471
472 /** True if duplicated tick marks are removed */
473 bool _deconflictTicks;
474
475 /** True if haloing is enabled */
476 bool _haloEnabled;
477
478 /** Width of the halo in logical units */
479 float _haloWidth;
480
481 /** Color of the halo */
482 GlsColor _haloColor;
483
484#ifndef GLES
485 /** True if scale is drawn with polygon quads instead of lines*/
486 bool _useScalableLines;
487#endif
488};
489
490/** Metadata for scale data */
491 class DistiAttributeConnectionGlsAngularScaleDataArray : public DistiAttributeBase
492{
493 protected:
494 GlsAngularScaleDataArray* _attribPtr; ///< Observer of the underlying storage for the property.
495 unsigned int _arraySize; ///< Always GLS_ANGULAR_SCALE_MAX.
496
497 public:
498 /// Constructor
499 /// \param callback The callback method to call when this property changes.
500 /// \param name The name of this attribute.
501 /// \param attribPtr A pointer to the underlying storage for this property.
502 /// \param arraySize Always GLS_ANGULAR_SCALE_MAX.
503 DistiAttributeConnectionGlsAngularScaleDataArray( CallbackMethodCallerBase* callback, const AttributeName& name, GlsAngularScaleDataArray* attribPtr, int arraySize )
504 : DistiAttributeBase( callback, name, false )
505 , _attribPtr( attribPtr )
506 , _arraySize( arraySize )
507 {
508 }
509
510 virtual GLSGEN_GLSANGULARSCALE_EXPORT ~DistiAttributeConnectionGlsAngularScaleDataArray();
511
512 virtual GLSGEN_GLSANGULARSCALE_EXPORT bool OkToWrite() const DISTI_METHOD_OVERRIDE;
513
514 virtual GLSGEN_GLSANGULARSCALE_EXPORT std::ostream& WriteValue( std::ostream& outstr ) DISTI_METHOD_OVERRIDE;
515 virtual GLSGEN_GLSANGULARSCALE_EXPORT std::istream& ReadValue( std::istream& instr ) DISTI_METHOD_OVERRIDE;
516
517 GLSGEN_GLSANGULARSCALE_EXPORT std::string Type() const DISTI_METHOD_OVERRIDE;
518};
519
520} // namespace disti
521
522#endif
disti::AttributeName
Definition: disti_metadata.h:87
disti::CallbackMethodCallerBase
Definition: callback_caller_base.h:56
disti::Culler
Definition: cull.h:50
disti::DisplayEvent
Definition: events.h:113
disti::DisplayObject
Definition: display.h:96
disti::DisplayObject::AntiAlias
virtual bool AntiAlias()
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::DistiAttributeConnectionGlsAngularScaleDataArray
Definition: gls_angular_scale.h:492
disti::DistiAttributeConnectionGlsAngularScaleDataArray::DistiAttributeConnectionGlsAngularScaleDataArray
DistiAttributeConnectionGlsAngularScaleDataArray(CallbackMethodCallerBase *callback, const AttributeName &name, GlsAngularScaleDataArray *attribPtr, int arraySize)
Definition: gls_angular_scale.h:503
disti::DistiAttributeConnectionGlsAngularScaleDataArray::ReadValue
virtual std::istream & ReadValue(std::istream &instr) DISTI_METHOD_OVERRIDE
disti::DistiAttributeConnectionGlsAngularScaleDataArray::_arraySize
unsigned int _arraySize
Always GLS_ANGULAR_SCALE_MAX.
Definition: gls_angular_scale.h:495
disti::DistiAttributeConnectionGlsAngularScaleDataArray::OkToWrite
virtual bool OkToWrite() const DISTI_METHOD_OVERRIDE
disti::DistiAttributeConnectionGlsAngularScaleDataArray::_attribPtr
GlsAngularScaleDataArray * _attribPtr
Observer of the underlying storage for the property.
Definition: gls_angular_scale.h:494
disti::DistiAttributeConnectionGlsAngularScaleDataArray::WriteValue
virtual std::ostream & WriteValue(std::ostream &outstr) DISTI_METHOD_OVERRIDE
disti::DistiAttributeConnectionGlsAngularScaleDataArray::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::GlsAngularScaleData
Definition: gls_angular_scale.h:92
disti::GlsAngularScaleData::active
bool active
Definition: gls_angular_scale.h:97
disti::GlsAngularScaleData::GlsAngularScaleData
GlsAngularScaleData(const GlsAngularScaleData &src)
Definition: gls_angular_scale.h:151
disti::GlsAngularScaleData::WriteValue
virtual std::ostream & WriteValue(std::ostream &outstr)
disti::GlsAngularScaleData::operator==
bool operator==(const GlsAngularScaleData &right) const
disti::GlsAngularScaleData::startAngle
float startAngle
Definition: gls_angular_scale.h:100
disti::GlsAngularScaleData::length
float length
Definition: gls_angular_scale.h:102
disti::GlsAngularScaleData::GlsAngularScaleData
GlsAngularScaleData(bool _active, bool _useLineColor, unsigned int _ticks, float _startAngle, float _interval, float _length, float _thickness, const GlsColor &_color)
Definition: gls_angular_scale.h:128
disti::GlsAngularScaleData::_attribDict
DistiAttribDict _attribDict
The attribute dictionary for this class' members.
Definition: gls_angular_scale.h:94
disti::GlsAngularScaleData::interval
float interval
Definition: gls_angular_scale.h:101
disti::GlsAngularScaleData::thickness
float thickness
Definition: gls_angular_scale.h:103
disti::GlsAngularScaleData::color
GlsColor color
Definition: gls_angular_scale.h:104
disti::GlsAngularScaleData::ReadValue
virtual std::istream & ReadValue(std::istream &instr)
disti::GlsAngularScaleData::operator=
GlsAngularScaleData & operator=(const GlsAngularScaleData &src)
Definition: gls_angular_scale.h:160
disti::GlsAngularScaleData::ticks
unsigned int ticks
Definition: gls_angular_scale.h:99
disti::GlsAngularScaleData::useLineColor
bool useLineColor
Definition: gls_angular_scale.h:98
disti::GlsAngularScaleData::InitMetaData
void InitMetaData()
Create DistiAttributes for this object's members.
disti::GlsAngularScaleData::operator!=
bool operator!=(const GlsAngularScaleData &right) const
Definition: gls_angular_scale.h:190
disti::GlsAngularScale
Definition: gls_angular_scale.h:215
disti::GlsAngularScale::SetLineColor
void SetLineColor(const GlsColor &color)
Definition: gls_angular_scale.h:269
disti::GlsAngularScale::_quads
GlsQuadListVC_3D _quads
Manages a VBO for drawing the tick marks.
Definition: gls_angular_scale.h:389
disti::GlsAngularScale::_haloColor
GlsColor _haloColor
Definition: gls_angular_scale.h:482
disti::GlsAngularScale::SetAvailableAttributes
virtual void SetAvailableAttributes(unsigned int value) DISTI_METHOD_OVERRIDE
disti::GlsAngularScale::GetScale
void GetScale(int index, GlsAngularScaleData &data)
disti::GlsAngularScale::Draw
virtual void Draw() DISTI_METHOD_OVERRIDE
disti::GlsAngularScale::MagnitudeChanged
void MagnitudeChanged()
disti::GlsAngularScale::Radius
float Radius()
Definition: gls_angular_scale.h:349
disti::GlsAngularScale::DrawScale
void DrawScale(int i, float haloLength, float haloThickness, GlsColor &color)
disti::GlsAngularScale::HaloColor
GlsColor HaloColor()
Definition: gls_angular_scale.h:327
disti::GlsAngularScale::SetColor
virtual void SetColor(const GlsColor &color) DISTI_METHOD_OVERRIDE
disti::GlsAngularScale::DeconflictTicks
void DeconflictTicks(const bool &val)
disti::GlsAngularScale::SetScale
void SetScale(int index, const GlsAngularScaleData &data)
disti::GlsAngularScale::CloneObject
virtual DisplayObject * CloneObject(bool generateNames=false) DISTI_METHOD_OVERRIDE
disti::GlsAngularScale::HaloEnabled
void HaloEnabled(const bool &val)
disti::GlsAngularScale::_haloEnabled
bool _haloEnabled
Definition: gls_angular_scale.h:476
disti::GlsAngularScale::SetFromGloData
virtual void SetFromGloData(GlsGloFileAttribute &data) DISTI_METHOD_OVERRIDE
disti::GlsAngularScale::Hit
virtual bool Hit(float x, float y, float z, float scale, const Vector &directionVector, Vector *collisionPoint) DISTI_METHOD_OVERRIDE
disti::GlsAngularScale::PreDraw
virtual void PreDraw(const OpenGLMatrices &parentMatrices, Culler &culler) DISTI_METHOD_OVERRIDE
disti::GlsAngularScale::RecomputeVertices
void RecomputeVertices()
disti::GlsAngularScale::_scale
GlsAngularScaleDataArray _scale
Definition: gls_angular_scale.h:470
disti::GlsAngularScale::DeconflictTicks
bool DeconflictTicks()
Definition: gls_angular_scale.h:302
disti::GlsAngularScale::_haloWidth
float _haloWidth
Definition: gls_angular_scale.h:479
disti::GlsAngularScale::SetValue
virtual void SetValue(int spec, va_list &args) DISTI_METHOD_OVERRIDE
disti::GlsAngularScale::Rotate
virtual void Rotate(const Vector &orig, float angle, const Vector &axis) DISTI_METHOD_OVERRIDE
disti::GlsAngularScale::HaloEnabled
bool HaloEnabled()
Definition: gls_angular_scale.h:307
disti::GlsAngularScale::handle
DisplayObject * handle(DisplayEvent *ev) DISTI_METHOD_OVERRIDE
disti::GlsAngularScale::Vertices
virtual Vertex * Vertices() DISTI_METHOD_OVERRIDE
disti::GlsAngularScale::HaloWidth
float HaloWidth()
Definition: gls_angular_scale.h:317
disti::GlsAngularScale::CreateInstance
static DisplayObject * CreateInstance()
disti::GlsAngularScale::GetExtents
virtual void GetExtents(float &minx, float &miny, float &minz, float &maxx, float &maxy, float &maxz) DISTI_METHOD_OVERRIDE
disti::GlsAngularScale::_radii
Vector _radii[2]
Definition: gls_angular_scale.h:461
disti::GlsAngularScale::CopyGeometry
virtual void CopyGeometry(DisplayObject *srcArg) DISTI_METHOD_OVERRIDE
disti::GlsAngularScale::HaloColor
void HaloColor(const GlsColor &val)
disti::GlsAngularScale::BakeVBO
void BakeVBO()
Updates the VBO(s) when the object changes.
disti::GlsAngularScale::Radius
void Radius(const float &val)
disti::GlsAngularScale::CalculateRadiiUnit
void CalculateRadiiUnit()
disti::GlsAngularScale::_radiiUnit
Vector _radiiUnit[2]
Definition: gls_angular_scale.h:464
disti::GlsAngularScale::Scale
virtual void Scale(float px, float py, float pz, Vertex *anchor, int handleBar) DISTI_METHOD_OVERRIDE
disti::GlsAngularScale::CopyProperties
virtual void CopyProperties(DisplayObject *src) DISTI_METHOD_OVERRIDE
disti::GlsAngularScale::_deconflictTicks
bool _deconflictTicks
Definition: gls_angular_scale.h:473
disti::GlsAngularScale::UpdateBoundingVolume
virtual void UpdateBoundingVolume() DISTI_METHOD_OVERRIDE
disti::GlsAngularScale::GetTransformedExtents
virtual void GetTransformedExtents(Vector &min, Vector &max, const GlsMatrixType &matrix, bool resetMinMax) DISTI_METHOD_OVERRIDE
disti::GlsAngularScale::HaloWidth
void HaloWidth(const float &val)
disti::GlsAngularScale::InvalidateGeometry
void InvalidateGeometry()
Definition: gls_angular_scale.h:361
disti::GlsAngularScale::_needsRecalculate
bool _needsRecalculate
Definition: gls_angular_scale.h:380
disti::GlsAngularScale::_magnitude
float _magnitude[2]
Definition: gls_angular_scale.h:467
disti::GlsAngularScale::TickNeeded
bool TickNeeded(int currentLevel, float currentAngle)
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::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.
GLSGEN_GLSANGULARSCALE_EXPORT
#define GLSGEN_GLSANGULARSCALE_EXPORT
Provides support for creating DLLs.
Definition: gls_angular_scale.h:61
GLS_ANGULAR_SCALE_MAX
#define GLS_ANGULAR_SCALE_MAX
The maximum number of unique tick mark types.
Definition: gls_angular_scale.h:209
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_quad_storage.h
The disti::GlsQuadListVC_3D and GlsQuadListVCT_2D classes.
disti
Definition: bmpimage.h:47
disti::GlsAngularScaleDataArray
GlsAngularScaleData GlsAngularScaleDataArray[5]
Typedef for one GlsAngularScale worth of scale data.
Definition: gls_angular_scale.h:211