API Documentation
Loading...
Searching...
No Matches
RulerModel.h
Go to the documentation of this file.
1#pragma once
2#include <NDEVR/Model.h>
3#if NDEVR_RULER_MODEL
4namespace NDEVR
5{
6 class RulerModel : public Model
7 {
8 public:
9 static const int MARGIN = 4;
10 enum RulerOrientation
11 {
12 e_ruler_horizontal
13 , e_ruler_vertical
14 };
15
16 public:
17 RulerModel(RulerOrientation orientation, bool is_left_or_top, const Model& parent);
18 ~RulerModel();
19 public:
20 void updateRuler();
21 protected:
22 Model minorLinesModel();
23 Model majorLinesModel();
24 Model labelRootModel();
25 void setAxis();
26 Bounds<3, fltp08> worldBounds() const;
27 Vector<2, fltp08> worldSpan() const;
28 Vector<2, fltp08> scale() const;
29 Vector<2, fltp08> worldOffset() const;
30 Vector<2, fltp08> worldGridSpacing() const;
31 fltp08 convertPixelToModel(uint04 dim, uint04 pixel);
32 uint04 convertModelToPixel(uint04 dim, fltp08 model);
33
34 String getFormattedTickText(fltp08 value, fltp08 spacing, uint01 dim);
35 protected:
36 RulerOrientation m_orientation;
37 bool m_is_opaque;
38 bool m_is_left_or_top;
39 bool m_draw_minor;
40 Vector<2, uint01> axis;
41 Vector<2, fltp08> m_last_paint_scale;
42 Vector<2, fltp08> m_last_world_spacing;
43 Vector<2, fltp08> m_last_world_offset;
44 };
45}
46#endif
Definition ACIColor.h:37
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:120
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition BaseValues.hpp:181