40 #ifndef _GLS_LINEAR_SCALE_H
41 #define _GLS_LINEAR_SCALE_H
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 )
58 # define GLSGEN_GLSLINEARSCALE_EXPORT __declspec( dllimport )
61 # define GLSGEN_GLSLINEARSCALE_EXPORT
65 #define LIB_BASE_NAME "gls_linear_scale"
74 GLS_LINEAR_SCALE_FIRST_VALUE = GLS_LAST_INITIALIZER + 1,
75 GLS_LINEAR_SCALE_RADII,
76 GLS_LINEAR_SCALE_DECONFLICT_TICKS,
77 GLS_LINEAR_SCALE_HALO_ENABLED,
78 GLS_LINEAR_SCALE_HALO_WIDTH,
79 GLS_LINEAR_SCALE_HALO_COLOR,
80 GLS_LINEAR_SCALE_TICK_ANCHOR,
81 GLS_LINEAR_SCALE_USE_SCALABLE_LINES,
88 GLS_TICK_ANCHOR_BOTTOM,
89 GLS_TICK_ANCHOR_CENTER
109 , useLineColor( false )
111 , startingOffset( 0 )
115 , color( 255, 255, 255, 255 )
124 float _startingOffset,
130 , useLineColor( _useLineColor )
132 , startingOffset( _startingOffset )
133 , interval( _interval )
135 , thickness( _thickness )
141 GlsLinearScaleData(
const GlsLinearScaleData& src )
147 GlsLinearScaleData& operator=(
const GlsLinearScaleData& src )
152 useLineColor = src.useLineColor;
154 startingOffset = src.startingOffset;
155 interval = src.interval;
157 thickness = src.thickness;
165 bool GLSGEN_GLSLINEARSCALE_EXPORT operator==(
const GlsLinearScaleData& right )
const;
167 bool GLSGEN_GLSLINEARSCALE_EXPORT operator!=(
const GlsLinearScaleData& right )
const
169 return !( this->operator==( right ) );
172 void GLSGEN_GLSLINEARSCALE_EXPORT InitMetaData(
void );
175 GLSGEN_GLSLINEARSCALE_EXPORT std::ostream& WriteValue( std::ostream& outstr );
178 GLSGEN_GLSLINEARSCALE_EXPORT std::istream& ReadValue( std::istream& instr );
181 #define GLS_LINEAR_SCALE_MAX 5
183 typedef GlsLinearScaleData GlsLinearScaleDataArray[ GLS_LINEAR_SCALE_MAX ];
186 class GlsGloFileAttribute;
192 friend class GlsLinearScaleEditor;
199 DISTI_DEPRECATED(
"This identifier is forbidden by the C++ standard. Use BaseClass instead." )
206 GLSGEN_GLSLINEARSCALE_EXPORT
GlsLinearScale(
bool generateInstance =
false );
208 GLSGEN_GLSLINEARSCALE_EXPORT GlsLinearScale(
const GlsLinearScale& that,
const bool generateNames );
213 static GLSGEN_GLSLINEARSCALE_EXPORT
DisplayObject* CreateInstance();
215 virtual GLSGEN_GLSLINEARSCALE_EXPORT
void SetAvailableAttributes(
unsigned int value ) DISTI_METHOD_OVERRIDE;
217 virtual GLSGEN_GLSLINEARSCALE_EXPORT
DisplayObject*
CloneObject(
bool generateNames =
false ) DISTI_METHOD_OVERRIDE;
229 virtual GLSGEN_GLSLINEARSCALE_EXPORT
void Draw(
void ) DISTI_METHOD_OVERRIDE;
231 virtual GLSGEN_GLSLINEARSCALE_EXPORT
void Scale(
float px,
float py,
float pz,
Vertex* anchor,
int handleBar ) DISTI_METHOD_OVERRIDE;
232 virtual GLSGEN_GLSLINEARSCALE_EXPORT
void Rotate(
const Vector& orig,
float angle,
const Vector& axis ) DISTI_METHOD_OVERRIDE;
233 virtual GLSGEN_GLSLINEARSCALE_EXPORT
bool Hit(
float x,
float y,
float z,
float scale,
const Vector& directionVector,
Vector* collisionPoint ) DISTI_METHOD_OVERRIDE;
235 virtual GLSGEN_GLSLINEARSCALE_EXPORT
void SetValue(
int spec, va_list& args ) DISTI_METHOD_OVERRIDE;
237 virtual GLSGEN_GLSLINEARSCALE_EXPORT
void SetColor(
const GlsColor& color ) DISTI_METHOD_OVERRIDE;
273 GLSGEN_GLSLINEARSCALE_EXPORT
void HaloEnabled(
const bool& val );
283 GLSGEN_GLSLINEARSCALE_EXPORT
void HaloWidth(
const float& val );
303 GLSGEN_GLSLINEARSCALE_EXPORT
void TickAnchor(
const GlsTickAnchor val );
309 _geometryRefresh =
true;
379 bool TickNeeded(
int currentLevel,
float currentOffset );
395 void DrawScale(
int i,
float haloLength,
float haloThickness );
402 virtual GLSGEN_GLSLINEARSCALE_EXPORT
void SetFromGloData(
GlsGloFileAttribute& data ) DISTI_METHOD_OVERRIDE;
444 GlsLinearScaleDataArray* _attribPtr;
445 unsigned int _arraySize;
450 , _attribPtr( attribPtr )
451 , _arraySize( arraySize )
456 virtual GLSGEN_GLSLINEARSCALE_EXPORT
bool OkToWrite()
const;
457 virtual GLSGEN_GLSLINEARSCALE_EXPORT std::ostream&
WriteValue( std::ostream& outstr );
458 virtual GLSGEN_GLSLINEARSCALE_EXPORT std::istream&
ReadValue( std::istream& instr );
bool _haloEnabled
Definition: gls_linear_scale.h:423
void DrawScale(int i, float haloLength, float haloThickness)
Definition: gls_linear_scale.h:441
bool active
Definition: gls_linear_scale.h:98
virtual void SetAvailableAttributes(unsigned int value) DISTI_METHOD_OVERRIDE
float HaloWidth(void)
Definition: gls_linear_scale.h:278
void GetScale(int index, GlsLinearScaleData &data)
void CopyCommonValues(const DistiAttribDict &dict)
GlsColor _currentColor
Definition: gls_linear_scale.h:352
#define DISTI_DEPRECATED(msg)
Defines whether this compiler supports the C++14 deprecated attribute.
Definition: gls_cpp_lang_support.h:436
GlsTickAnchor TickAnchor(void)
Definition: gls_linear_scale.h:298
void InvalidateGeometry(void)
Definition: gls_linear_scale.h:326
bool TickNeeded(int currentLevel, float currentOffset)
void Invalidate(void)
Definition: gls_display_list.h:82
bool useLineColor
Definition: gls_linear_scale.h:99
bool DeconflictTicks(void)
Definition: gls_linear_scale.h:263
Definition: dynamic_array.h:66
Class to contain current OpenGL view, projection and draw matrices.
Definition: util.h:473
float _haloWidth
Definition: gls_linear_scale.h:426
virtual void CopyGeometry(DisplayObject *srcArg) DISTI_METHOD_OVERRIDE
The disti::GlsQuadListVC_3D and GlsQuadListVCT_2D classes.
The Polygon class. Implements Polygons.
Definition: glpolygon.h:55
virtual bool OkToWrite() const
void CurrentLineWidth(const float &newLineWidth)
Definition: gls_linear_scale.h:92
virtual ~GlsLinearScale()
The disti::GLPolygon class. Implements Polygons.
virtual DisplayObject * CloneObject(bool generateNames=false) DISTI_METHOD_OVERRIDE
float startingOffset
Definition: gls_linear_scale.h:101
bool UseScalableLines(void)
Definition: gls_linear_scale.h:318
bool _useScalableLines
Definition: gls_linear_scale.h:436
Definition: gls_display_list.h:50
unsigned int ticks
Definition: gls_linear_scale.h:100
Definition: gls_glo_file.h:988
GlsLinearScaleDataArray _scale
Definition: gls_linear_scale.h:417
GlsColor HaloColor(void)
Definition: gls_linear_scale.h:288
bool HaloEnabled(void)
Definition: gls_linear_scale.h:268
void UpdateScaleData(void)
float interval
Definition: gls_linear_scale.h:102
void CurrentColor(const GlsColor &newColor)
Vector _radiiNormalized[2]
Definition: gls_linear_scale.h:414
virtual void SetValue(int spec, va_list &args) DISTI_METHOD_OVERRIDE
virtual void DrawGeometry(void)
bool _deconflictTicks
Definition: gls_linear_scale.h:420
Definition: disti_metadata.h:186
void SetScale(int index, const GlsLinearScaleData &data)
bool _currentLineWidthSet
Definition: gls_linear_scale.h:364
Definition: gls_color.h:53
Definition: disti_metadata.h:668
virtual void SetColor(const GlsColor &color) DISTI_METHOD_OVERRIDE
Definition: callback_caller_base.h:55
Definition: gls_linear_scale.h:190
virtual void Scale(float px, float py, float pz, Vertex *anchor, int handleBar) DISTI_METHOD_OVERRIDE
virtual void Draw(void) DISTI_METHOD_OVERRIDE
virtual std::istream & ReadValue(std::istream &instr)
GlsTickAnchor _tickAnchor
Definition: gls_linear_scale.h:432
virtual std::ostream & WriteValue(std::ostream &outstr)
float _currentLineWidth
Definition: gls_linear_scale.h:356
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *array) DISTI_METHOD_OVERRIDE
float thickness
Definition: gls_linear_scale.h:104
virtual void PreDraw(const OpenGLMatrices &parentMatrices, Culler &culler) DISTI_METHOD_OVERRIDE
GlsColor _haloColor
Definition: gls_linear_scale.h:429
virtual void Rotate(const Vector &orig, float angle, const Vector &axis) DISTI_METHOD_OVERRIDE
GlsColor color
Definition: gls_linear_scale.h:105
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL) DISTI_METHOD_OVERRIDE
GlsDisplayList & DisplayList(void)
Definition: gls_linear_scale.h:333
Vector _radii[2]
Definition: gls_linear_scale.h:411
void RecomputeVertices(void)
float length
Definition: gls_linear_scale.h:103
Macros and helper code to determine what subset of C++11/14/17 is available.
GlsDisplayList _displayList
Definition: gls_linear_scale.h:367
Definition: disti_metadata.h:85
virtual bool Hit(float x, float y, float z, float scale, const Vector &directionVector, Vector *collisionPoint) DISTI_METHOD_OVERRIDE
Definition: gls_quad_storage.h:63
virtual void CopyProperties(DisplayObject *src) DISTI_METHOD_OVERRIDE
Definition: bmpimage.h:46
The disti::GlsDisplayList class.
bool _currentColorSet
Definition: gls_linear_scale.h:360