40 #ifndef _GLS_LINEAR_SCALE_H
41 #define _GLS_LINEAR_SCALE_H
47 #include "gls_quad_storage.h"
53 #if (defined(GLSGEN_EXPORT_GLSLINEARSCALE) || \
54 defined(GLSGEN_IMPORT_GLSLINEARSCALE) || \
55 defined(GLS_EXPORT_GENERATED) || \
56 defined(GLS_IMPORT_GENERATED)) \
58 # if defined(GLSGEN_EXPORT_GLSLINEARSCALE) || defined(GLS_EXPORT_GENERATED)
59 # define GLSGEN_GLSLINEARSCALE_EXPORT __declspec(dllexport)
61 # define GLSGEN_GLSLINEARSCALE_EXPORT __declspec(dllimport)
64 # define GLSGEN_GLSLINEARSCALE_EXPORT
68 #define LIB_BASE_NAME "gls_linear_scale"
77 GLS_LINEAR_SCALE_FIRST_VALUE = GLS_LAST_INITIALIZER+1,
78 GLS_LINEAR_SCALE_RADII,
79 GLS_LINEAR_SCALE_DECONFLICT_TICKS,
80 GLS_LINEAR_SCALE_HALO_ENABLED,
81 GLS_LINEAR_SCALE_HALO_WIDTH,
82 GLS_LINEAR_SCALE_HALO_COLOR,
83 GLS_LINEAR_SCALE_TICK_ANCHOR,
84 GLS_LINEAR_SCALE_USE_SCALABLE_LINES,
91 GLS_TICK_ANCHOR_BOTTOM,
92 GLS_TICK_ANCHOR_CENTER
118 color(255,255,255,255)
127 float _startingOffset,
133 useLineColor(_useLineColor),
135 startingOffset(_startingOffset),
138 thickness(_thickness),
144 GlsLinearScaleData(
const GlsLinearScaleData& src)
149 ~GlsLinearScaleData(
void)
153 bool GLSGEN_GLSLINEARSCALE_EXPORT operator==(
const GlsLinearScaleData& right )
const;
155 bool GLSGEN_GLSLINEARSCALE_EXPORT operator!=(
const GlsLinearScaleData& right )
const
157 return !( this->operator==( right ) );
160 void GLSGEN_GLSLINEARSCALE_EXPORT InitMetaData(
void);
163 virtual GLSGEN_GLSLINEARSCALE_EXPORT std::ostream & WriteValue(std::ostream &outstr);
166 virtual GLSGEN_GLSLINEARSCALE_EXPORT std::istream & ReadValue(std::istream &instr);
169 #define GLS_LINEAR_SCALE_MAX 5
171 typedef GlsLinearScaleData GlsLinearScaleDataArray[GLS_LINEAR_SCALE_MAX];
174 class GlsGloFileAttribute;
180 friend class GlsLinearScaleEditor;
191 GLSGEN_GLSLINEARSCALE_EXPORT
GlsLinearScale(
bool generateInstance=
false);
193 GLSGEN_GLSLINEARSCALE_EXPORT GlsLinearScale(
const GlsLinearScale& that,
const bool generateNames );
198 static GLSGEN_GLSLINEARSCALE_EXPORT
DisplayObject* CreateInstance();
214 virtual GLSGEN_GLSLINEARSCALE_EXPORT
void Draw(
void);
216 virtual GLSGEN_GLSLINEARSCALE_EXPORT
void Scale(
float px,
float py,
float pz,
Vertex *anchor,
int handleBar);
217 virtual GLSGEN_GLSLINEARSCALE_EXPORT
void Rotate(
const Vector &orig,
float angle,
const Vector &axis);
218 virtual GLSGEN_GLSLINEARSCALE_EXPORT
bool Hit(
float x,
float y,
float z,
float scale,
const Vector& directionVector,
Vector *collisionPoint);
220 virtual GLSGEN_GLSLINEARSCALE_EXPORT
void SetValue(
int spec,va_list &args);
259 GLSGEN_GLSLINEARSCALE_EXPORT
void HaloEnabled(
const bool &val);
269 GLSGEN_GLSLINEARSCALE_EXPORT
void HaloWidth(
const float& val );
289 GLSGEN_GLSLINEARSCALE_EXPORT
void TickAnchor(
const GlsTickAnchor val);
293 GLSGEN_GLSLINEARSCALE_EXPORT
void InvalidateGeometry(
void) { _geometryRefresh =
true; }
317 GlsQuadListVC_3D _quads;
357 bool TickNeeded(
int currentLevel,
float currentOffset);
373 void DrawScale(
int i,
float haloLength,
float haloThickness);
380 virtual GLSGEN_GLSLINEARSCALE_EXPORT
void SetFromGloData(GlsGloFileAttribute &data);
422 GlsLinearScaleDataArray* _attribPtr;
423 unsigned int _arraySize;
429 _attribPtr(attribPtr),
430 _arraySize(arraySize)
436 virtual std::ostream &
WriteValue(std::ostream &outstr);
437 virtual std::istream &
ReadValue(std::istream &instr);
glsColor color
Definition: gls_linear_scale.h:108
bool _haloEnabled
Definition: gls_linear_scale.h:401
void DrawScale(int i, float haloLength, float haloThickness)
glsColor _currentColor
Definition: gls_linear_scale.h:330
Definition: gls_linear_scale.h:419
bool active
Definition: gls_linear_scale.h:101
float HaloWidth(void)
Definition: gls_linear_scale.h:264
virtual void Scale(float px, float py, float pz, Vertex *anchor, int handleBar)
void GetScale(int index, GlsLinearScaleData &data)
GlsTickAnchor TickAnchor(void)
Definition: gls_linear_scale.h:284
void InvalidateGeometry(void)
Definition: gls_linear_scale.h:308
bool TickNeeded(int currentLevel, float currentOffset)
void Invalidate(void)
Definition: gls_display_list.h:83
bool useLineColor
Definition: gls_linear_scale.h:102
bool DeconflictTicks(void)
Definition: gls_linear_scale.h:248
Definition: dynamic_array.h:63
Class to contain current OpenGL view, projection and draw matrices.
Definition: util.h:281
float _haloWidth
Definition: gls_linear_scale.h:404
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *array)
The Polygon class. Implements Polygons.
Definition: glpolygon.h:56
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:95
virtual ~GlsLinearScale()
The disti::GLPolygon class. Implements Polygons.
float startingOffset
Definition: gls_linear_scale.h:104
bool UseScalableLines(void)
Definition: gls_linear_scale.h:300
bool _useScalableLines
Definition: gls_linear_scale.h:414
Definition: gls_display_list.h:51
unsigned int ticks
Definition: gls_linear_scale.h:103
GlsLinearScaleDataArray _scale
Definition: gls_linear_scale.h:395
virtual void SetValue(int spec, va_list &args)
bool HaloEnabled(void)
Definition: gls_linear_scale.h:254
void UpdateScaleData(void)
float interval
Definition: gls_linear_scale.h:105
glsColor _haloColor
Definition: gls_linear_scale.h:407
Vector _radiiNormalized[2]
Definition: gls_linear_scale.h:392
virtual void DrawGeometry(void)
bool _deconflictTicks
Definition: gls_linear_scale.h:398
Definition: disti_metadata.h:179
void SetScale(int index, const GlsLinearScaleData &data)
glsColor HaloColor(void)
Definition: gls_linear_scale.h:274
virtual void CopyProperties(DisplayObject *src)
virtual void SetAvailableAttributes(unsigned int value)
bool _currentLineWidthSet
Definition: gls_linear_scale.h:342
virtual DisplayObject * CloneObject(bool generateNames=false)
virtual void PreDraw(const OpenGLMatrices &parentMatrices, Culler &culler)
Definition: disti_metadata.h:676
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL)
Definition: callback_caller_base.h:56
Definition: gls_color.h:54
Definition: gls_linear_scale.h:178
virtual void SetColor(const glsColor &color)
virtual std::istream & ReadValue(std::istream &instr)
GlsTickAnchor _tickAnchor
Definition: gls_linear_scale.h:410
virtual std::ostream & WriteValue(std::ostream &outstr)
float _currentLineWidth
Definition: gls_linear_scale.h:334
float thickness
Definition: gls_linear_scale.h:107
GlsDisplayList & DisplayList(void)
Definition: gls_linear_scale.h:311
void CurrentColor(const glsColor &newColor)
Vector _radii[2]
Definition: gls_linear_scale.h:389
void RecomputeVertices(void)
float length
Definition: gls_linear_scale.h:106
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:345
Definition: disti_metadata.h:83
Definition: bmpimage.h:46
The disti::GlsDisplayList class.
virtual void CopyGeometry(DisplayObject *srcArg)
bool _currentColorSet
Definition: gls_linear_scale.h:338