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 )
146 ~GlsLinearScaleData(
void )
150 bool GLSGEN_GLSLINEARSCALE_EXPORT operator==(
const GlsLinearScaleData& right )
const;
152 bool GLSGEN_GLSLINEARSCALE_EXPORT operator!=(
const GlsLinearScaleData& right )
const
154 return !( this->operator==( right ) );
157 void GLSGEN_GLSLINEARSCALE_EXPORT InitMetaData(
void );
160 virtual GLSGEN_GLSLINEARSCALE_EXPORT std::ostream& WriteValue( std::ostream& outstr );
163 virtual GLSGEN_GLSLINEARSCALE_EXPORT std::istream& ReadValue( std::istream& instr );
166 #define GLS_LINEAR_SCALE_MAX 5
168 typedef GlsLinearScaleData GlsLinearScaleDataArray[ GLS_LINEAR_SCALE_MAX ];
171 class GlsGloFileAttribute;
177 friend class GlsLinearScaleEditor;
189 GLSGEN_GLSLINEARSCALE_EXPORT
GlsLinearScale(
bool generateInstance =
false );
191 GLSGEN_GLSLINEARSCALE_EXPORT GlsLinearScale(
const GlsLinearScale& that,
const bool generateNames );
196 static GLSGEN_GLSLINEARSCALE_EXPORT
DisplayObject* CreateInstance();
212 virtual GLSGEN_GLSLINEARSCALE_EXPORT
void Draw(
void );
214 virtual GLSGEN_GLSLINEARSCALE_EXPORT
void Scale(
float px,
float py,
float pz,
Vertex* anchor,
int handleBar );
215 virtual GLSGEN_GLSLINEARSCALE_EXPORT
void Rotate(
const Vector& orig,
float angle,
const Vector& axis );
216 virtual GLSGEN_GLSLINEARSCALE_EXPORT
bool Hit(
float x,
float y,
float z,
float scale,
const Vector& directionVector,
Vector* collisionPoint );
218 virtual GLSGEN_GLSLINEARSCALE_EXPORT
void SetValue(
int spec, va_list& args );
220 virtual GLSGEN_GLSLINEARSCALE_EXPORT
void SetColor(
const GlsColor& color );
256 GLSGEN_GLSLINEARSCALE_EXPORT
void HaloEnabled(
const bool& val );
266 GLSGEN_GLSLINEARSCALE_EXPORT
void HaloWidth(
const float& val );
286 GLSGEN_GLSLINEARSCALE_EXPORT
void TickAnchor(
const GlsTickAnchor val );
290 GLSGEN_GLSLINEARSCALE_EXPORT
void InvalidateGeometry(
void ) { _geometryRefresh =
true; }
354 bool TickNeeded(
int currentLevel,
float currentOffset );
370 void DrawScale(
int i,
float haloLength,
float haloThickness );
419 GlsLinearScaleDataArray* _attribPtr;
420 unsigned int _arraySize;
425 , _attribPtr( attribPtr )
426 , _arraySize( arraySize )
432 virtual std::ostream&
WriteValue( std::ostream& outstr );
433 virtual std::istream&
ReadValue( std::istream& instr );
bool _haloEnabled
Definition: gls_linear_scale.h:398
void DrawScale(int i, float haloLength, float haloThickness)
Definition: gls_linear_scale.h:416
bool active
Definition: gls_linear_scale.h:98
float HaloWidth(void)
Definition: gls_linear_scale.h:261
virtual void Scale(float px, float py, float pz, Vertex *anchor, int handleBar)
void GetScale(int index, GlsLinearScaleData &data)
GlsColor _currentColor
Definition: gls_linear_scale.h:327
GlsTickAnchor TickAnchor(void)
Definition: gls_linear_scale.h:281
void InvalidateGeometry(void)
Definition: gls_linear_scale.h:305
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:246
Definition: dynamic_array.h:62
Class to contain current OpenGL view, projection and draw matrices.
Definition: util.h:278
float _haloWidth
Definition: gls_linear_scale.h:401
The disti::GlsQuadListVC_3D and GlsQuadListVCT_2D classes.
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *array)
The Polygon class. Implements Polygons.
Definition: glpolygon.h:55
virtual bool OkToWrite() const
virtual void Rotate(const Vector &orig, float angle, const Vector &axis)
void CurrentLineWidth(const float &newLineWidth)
Definition: gls_linear_scale.h:92
virtual ~GlsLinearScale()
The disti::GLPolygon class. Implements Polygons.
float startingOffset
Definition: gls_linear_scale.h:101
bool UseScalableLines(void)
Definition: gls_linear_scale.h:297
bool _useScalableLines
Definition: gls_linear_scale.h:411
Definition: gls_display_list.h:50
unsigned int ticks
Definition: gls_linear_scale.h:100
Definition: gls_glo_file.h:835
GlsLinearScaleDataArray _scale
Definition: gls_linear_scale.h:392
virtual void SetValue(int spec, va_list &args)
GlsColor HaloColor(void)
Definition: gls_linear_scale.h:271
bool HaloEnabled(void)
Definition: gls_linear_scale.h:251
void UpdateScaleData(void)
float interval
Definition: gls_linear_scale.h:102
void CurrentColor(const GlsColor &newColor)
Vector _radiiNormalized[2]
Definition: gls_linear_scale.h:389
virtual void DrawGeometry(void)
bool _deconflictTicks
Definition: gls_linear_scale.h:395
Definition: disti_metadata.h:174
void SetScale(int index, const GlsLinearScaleData &data)
virtual void CopyProperties(DisplayObject *src)
virtual void SetAvailableAttributes(unsigned int value)
bool _currentLineWidthSet
Definition: gls_linear_scale.h:339
Definition: gls_color.h:53
virtual DisplayObject * CloneObject(bool generateNames=false)
virtual void PreDraw(const OpenGLMatrices &parentMatrices, Culler &culler)
Definition: disti_metadata.h:667
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL)
Definition: callback_caller_base.h:55
Definition: gls_linear_scale.h:175
virtual std::istream & ReadValue(std::istream &instr)
GlsTickAnchor _tickAnchor
Definition: gls_linear_scale.h:407
virtual std::ostream & WriteValue(std::ostream &outstr)
float _currentLineWidth
Definition: gls_linear_scale.h:331
float thickness
Definition: gls_linear_scale.h:104
GlsColor _haloColor
Definition: gls_linear_scale.h:404
virtual void SetColor(const GlsColor &color)
GlsColor color
Definition: gls_linear_scale.h:105
GlsDisplayList & DisplayList(void)
Definition: gls_linear_scale.h:308
Vector _radii[2]
Definition: gls_linear_scale.h:386
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.
virtual bool Hit(float x, float y, float z, float scale, const Vector &directionVector, Vector *collisionPoint)
GlsDisplayList _displayList
Definition: gls_linear_scale.h:342
Definition: disti_metadata.h:79
Definition: gls_quad_storage.h:63
Definition: bmpimage.h:46
The disti::GlsDisplayList class.
virtual void CopyGeometry(DisplayObject *srcArg)
bool _currentColorSet
Definition: gls_linear_scale.h:335