40 #ifndef _GLS_ANGULAR_SCALE_H
41 #define _GLS_ANGULAR_SCALE_H
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 )
58 # define GLSGEN_GLSANGULARSCALE_EXPORT __declspec( dllimport )
61 # define GLSGEN_GLSANGULARSCALE_EXPORT
65 #define LIB_BASE_NAME "gls_angular_scale"
73 class GlsGloFileAttribute;
78 GLS_ANGULAR_SCALE_FIRST_VALUE = GLS_LAST_INITIALIZER + 1,
79 GLS_ANGULAR_SCALE_RADII,
80 GLS_ANGULAR_SCALE_DECONFLICT_TICKS,
81 GLS_ANGULAR_SCALE_HALO_ENABLED,
82 GLS_ANGULAR_SCALE_HALO_WIDTH,
83 GLS_ANGULAR_SCALE_HALO_COLOR,
84 GLS_ANGULAR_SCALE_USE_SCALABLE_LINES,
85 GLS_ANGULAR_SCALE_RADIUS,
86 GLS_ANGULAR_SCALE_DATA
106 , useLineColor( false )
112 , color( 255, 255, 255, 255 )
127 , useLineColor( _useLineColor )
129 , startAngle( _startAngle )
130 , interval( _interval )
132 , thickness( _thickness )
138 GlsAngularScaleData(
const GlsAngularScaleData& src )
144 GlsAngularScaleData& operator=(
const GlsAngularScaleData& src )
149 useLineColor = src.useLineColor;
151 startAngle = src.startAngle;
152 interval = src.interval;
154 thickness = src.thickness;
162 virtual ~GlsAngularScaleData()
166 bool GLSGEN_GLSANGULARSCALE_EXPORT operator==(
const GlsAngularScaleData& right )
const;
168 bool GLSGEN_GLSANGULARSCALE_EXPORT operator!=(
const GlsAngularScaleData& right )
const
170 return !( this->operator==( right ) );
173 void GLSGEN_GLSANGULARSCALE_EXPORT InitMetaData();
176 virtual GLSGEN_GLSANGULARSCALE_EXPORT std::ostream& WriteValue( std::ostream& outstr );
179 virtual GLSGEN_GLSANGULARSCALE_EXPORT std::istream& ReadValue( std::istream& instr );
182 #define GLS_ANGULAR_SCALE_MAX 5
184 typedef GlsAngularScaleData GlsAngularScaleDataArray[ GLS_ANGULAR_SCALE_MAX ];
189 friend class GlsAngularScaleEditor;
196 DISTI_DEPRECATED(
"This identifier is forbidden by the C++ standard. Use BaseClass instead." )
203 GLSGEN_GLSANGULARSCALE_EXPORT
GlsAngularScale(
bool generateInstance =
false );
210 GLSGEN_GLSANGULARSCALE_EXPORT GlsAngularScale(
const GlsAngularScale& that,
const bool generateNames );
215 static GLSGEN_GLSANGULARSCALE_EXPORT
DisplayObject* CreateInstance();
217 virtual GLSGEN_GLSANGULARSCALE_EXPORT
void SetAvailableAttributes(
unsigned int value ) DISTI_METHOD_OVERRIDE;
219 virtual GLSGEN_GLSANGULARSCALE_EXPORT
DisplayObject*
CloneObject(
bool generateNames =
false ) DISTI_METHOD_OVERRIDE;
230 virtual GLSGEN_GLSANGULARSCALE_EXPORT
void Draw() DISTI_METHOD_OVERRIDE;
232 virtual GLSGEN_GLSANGULARSCALE_EXPORT
void Scale(
float px,
float py,
float pz,
Vertex* anchor,
int handleBar ) DISTI_METHOD_OVERRIDE;
233 virtual GLSGEN_GLSANGULARSCALE_EXPORT
void Rotate(
const Vector& orig,
float angle,
const Vector& axis ) DISTI_METHOD_OVERRIDE;
234 virtual GLSGEN_GLSANGULARSCALE_EXPORT
bool Hit(
float x,
float y,
float z,
float scale,
const Vector& directionVector,
Vector* collisionPoint ) DISTI_METHOD_OVERRIDE;
236 virtual GLSGEN_GLSANGULARSCALE_EXPORT
Vertex*
Vertices() DISTI_METHOD_OVERRIDE;
237 virtual GLSGEN_GLSANGULARSCALE_EXPORT
void GetExtents(
float& minx,
float& miny,
float& minz,
float& maxx,
float& maxy,
float& maxz ) DISTI_METHOD_OVERRIDE;
241 virtual GLSGEN_GLSANGULARSCALE_EXPORT
void SetColor(
const GlsColor& color ) DISTI_METHOD_OVERRIDE;
245 virtual GLSGEN_GLSANGULARSCALE_EXPORT
void AntiAlias(
bool alias ) DISTI_METHOD_OVERRIDE;
250 virtual void SetValue(
int spec, va_list& args ) DISTI_METHOD_OVERRIDE;
286 GLSGEN_GLSANGULARSCALE_EXPORT
void HaloEnabled(
const bool& val );
296 GLSGEN_GLSANGULARSCALE_EXPORT
void HaloWidth(
const float& val );
323 GLSGEN_GLSANGULARSCALE_EXPORT
float Radius()
331 GLSGEN_GLSANGULARSCALE_EXPORT
void Radius(
const float& val );
337 _geometryRefresh =
true;
403 bool TickNeeded(
int currentLevel,
float currentAngle );
413 void DrawScale(
int i,
float haloLength,
float haloThickness );
420 virtual GLSGEN_GLSANGULARSCALE_EXPORT
void SetFromGloData(
GlsGloFileAttribute& data ) DISTI_METHOD_OVERRIDE;
462 GlsAngularScaleDataArray* _attribPtr;
463 unsigned int _arraySize;
468 , _attribPtr( attribPtr )
469 , _arraySize( arraySize )
474 virtual GLSGEN_GLSANGULARSCALE_EXPORT
bool OkToWrite()
const;
475 virtual GLSGEN_GLSANGULARSCALE_EXPORT std::ostream&
WriteValue( std::ostream& outstr );
476 virtual GLSGEN_GLSANGULARSCALE_EXPORT std::istream&
ReadValue( std::istream& instr );
void SetScale(int index, const GlsAngularScaleData &data)
float thickness
Definition: gls_angular_scale.h:101
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *array) DISTI_METHOD_OVERRIDE
Definition: gls_angular_scale.h:89
void CopyCommonValues(const DistiAttribDict &dict)
virtual std::ostream & WriteValue(std::ostream &outstr)
#define DISTI_DEPRECATED(msg)
Defines whether this compiler supports the C++14 deprecated attribute.
Definition: gls_cpp_lang_support.h:436
virtual Vertex * Vertices() DISTI_METHOD_OVERRIDE
void Invalidate(void)
Definition: gls_display_list.h:82
void DrawScale(int i, float haloLength, float haloThickness)
Definition: dynamic_array.h:66
bool _haloEnabled
Definition: gls_angular_scale.h:444
Class to contain current OpenGL view, projection and draw matrices.
Definition: util.h:471
GlsColor _haloColor
Definition: gls_angular_scale.h:450
virtual void Scale(float px, float py, float pz, Vertex *anchor, int handleBar) DISTI_METHOD_OVERRIDE
bool _needsRecalculate
Definition: gls_angular_scale.h:354
void CalculateRadiiUnit()
void GetScale(int index, GlsAngularScaleData &data)
The disti::GlsQuadListVC_3D and GlsQuadListVCT_2D classes.
The Polygon class. Implements Polygons.
Definition: glpolygon.h:55
bool _useScalableLines
Definition: gls_angular_scale.h:454
virtual DisplayObject * CloneObject(bool generateNames=false) DISTI_METHOD_OVERRIDE
virtual void GetExtents(float &minx, float &miny, float &minz, float &maxx, float &maxy, float &maxz) DISTI_METHOD_OVERRIDE
GlsDisplayList _displayList
Definition: gls_angular_scale.h:394
virtual void CopyProperties(DisplayObject *src) DISTI_METHOD_OVERRIDE
The disti::GLPolygon class. Implements Polygons.
GlsColor HaloColor()
Definition: gls_angular_scale.h:301
virtual void SetAvailableAttributes(unsigned int value) DISTI_METHOD_OVERRIDE
float length
Definition: gls_angular_scale.h:100
GlsColor color
Definition: gls_angular_scale.h:102
float startAngle
Definition: gls_angular_scale.h:98
Definition: gls_display_list.h:50
bool UseScalableLines()
Definition: gls_angular_scale.h:312
virtual void PreDraw(const OpenGLMatrices &parentMatrices, Culler &culler) DISTI_METHOD_OVERRIDE
Definition: gls_glo_file.h:988
void CurrentColor(const GlsColor &newColor)
virtual void Draw() DISTI_METHOD_OVERRIDE
DisplayObject * handle(DisplayEvent *ev) DISTI_METHOD_OVERRIDE
GlsColor _currentColor
Definition: gls_angular_scale.h:379
virtual void CopyGeometry(DisplayObject *srcArg) DISTI_METHOD_OVERRIDE
GlsDisplayList & DisplayList()
Definition: gls_angular_scale.h:349
float _haloWidth
Definition: gls_angular_scale.h:447
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL) DISTI_METHOD_OVERRIDE
float Radius()
Definition: gls_angular_scale.h:323
bool _currentLineWidthSet
Definition: gls_angular_scale.h:391
virtual void DrawGeometry()
virtual void Rotate(const Vector &orig, float angle, const Vector &axis) DISTI_METHOD_OVERRIDE
virtual ~GlsAngularScale()
Definition: disti_metadata.h:186
virtual void SetColor(const GlsColor &color) DISTI_METHOD_OVERRIDE
bool DeconflictTicks()
Definition: gls_angular_scale.h:276
Definition: gls_color.h:53
virtual void GetTransformedExtents(Vector &min, Vector &max, const GlsMatrixType &matrix, bool resetMinMax) DISTI_METHOD_OVERRIDE
Definition: disti_metadata.h:668
bool HaloEnabled()
Definition: gls_angular_scale.h:281
Definition: callback_caller_base.h:55
bool TickNeeded(int currentLevel, float currentAngle)
bool _currentColorSet
Definition: gls_angular_scale.h:387
Vector _radii[2]
Definition: gls_angular_scale.h:429
bool useLineColor
Definition: gls_angular_scale.h:96
float HaloWidth()
Definition: gls_angular_scale.h:291
GlsAngularScaleDataArray _scale
Definition: gls_angular_scale.h:438
void CurrentLineWidth(const float &newLineWidth)
void InvalidateGeometry()
Definition: gls_angular_scale.h:342
virtual bool OkToWrite() const
virtual bool Hit(float x, float y, float z, float scale, const Vector &directionVector, Vector *collisionPoint) DISTI_METHOD_OVERRIDE
virtual void SetValue(int spec, va_list &args) DISTI_METHOD_OVERRIDE
virtual std::istream & ReadValue(std::istream &instr)
virtual bool AntiAlias(void)
virtual void UpdateBoundingVolume() DISTI_METHOD_OVERRIDE
unsigned int ticks
Definition: gls_angular_scale.h:97
bool active
Definition: gls_angular_scale.h:95
float interval
Definition: gls_angular_scale.h:99
Macros and helper code to determine what subset of C++11/14/17 is available.
Definition: disti_metadata.h:85
Vector _radiiUnit[2]
Definition: gls_angular_scale.h:432
Definition: gls_angular_scale.h:459
bool _deconflictTicks
Definition: gls_angular_scale.h:441
Definition: gls_quad_storage.h:63
Definition: bmpimage.h:46
The disti::GlsDisplayList class.
Definition: gls_angular_scale.h:187
float _magnitude[2]
Definition: gls_angular_scale.h:435
float _currentLineWidth
Definition: gls_angular_scale.h:383