41 VL_DEBUG_SET_OBJECT_NAME()
154 vx >=
camera()->viewport()->width() ||
155 vy >=
camera()->viewport()->height())
165 int numRulers = (X?1:0)+(Y?1:0)+(Z?1:0);
166 if(numRulers == 0)
return scales;
172 const float mmArmLength = numArmTicks*mmStep;
175 int numAxisPoints = ( 2*numArmTicks + 1)*2;
178 points->
resize(numAxisPoints);
180 scalesPoints->
resize(numRulers*points->
size());
185 for(t = 0; t < numArmTicks; t++)
187 float height = mmTickSize;
210 for(
size_t p=0; p < points->
size(); i++, p++)
212 scalesPoints->
at(i) = points->
at(p);
221 for(
size_t p=0; p < points->
size(); i++, p++)
223 scalesPoints->
at(i) = points->
at(p);
233 for(
size_t p=0; p < points->
size(); i++, p++)
235 scalesPoints->
at(i) = points->
at(p);
bool mouseInViewport(int mx, int my, int &vx, int &vy)
const mat4 & viewMatrix() const
Returns the Camera's view matrix (inverse of the modeling matrix).
Vector3< float > fvec3
A 3 components vector with float precision.
fvec2 vec2
Defined as: 'typedef fvec2 vec2'. See also VL_PIPELINE_PRECISION.
float zoomSpeed() const
Zoom speed multiplicative factor (default = 1).
virtual void mouseMoveEvent(int x, int y)
Event generated when the mouse moves.
void setVertexArray(ArrayAbstract *data)
Conventional vertex array.
virtual void enableEvent(bool enabled)
Event generated whenever setEnabled() is called.
Camera * camera()
The camera through which the manipulator is used.
virtual void mouseUpEvent(EMouseButton, int x, int y)
Event generated when one of the mouse buttons is released.
void transform(const mat4 &m)
Transforms the vectors contained in the buffer.
size_t size() const
Returns the number of elements of an array.
The Geometry class is a Renderable that implements a polygonal mesh made of polygons, lines and points.
Viewport * viewport()
The viewport bound to a camera.
void setCamera(Camera *camera)
The camera through which the manipulator is used.
Visualization Library main namespace.
virtual void setContinuousUpdate(bool continuous)
If the OpenGL context is a widget this function sets whether its area is continuously updated at each...
int height() const
Returns the height in pixels of an OpenGLContext.
FlatManipulator()
Constructor.
void setViewMatrix(const mat4 &mat)
Sets the Camera's view matrix (inverse of the modeling matrix).
static Matrix4 & getRotation(Matrix4 &out, float degrees, float x, float y, float z)
T_VectorType & at(size_t i)
fvec3 vec3
Defined as: 'typedef fvec3 vec3'. See also VL_PIPELINE_PRECISION.
static Matrix4 & getTranslation(Matrix4 &out, const Vector3< float > &v)
virtual void mouseDownEvent(EMouseButton, int x, int y)
Event generated when one of the mouse buttons is pressed.
int zoomButton() const
Mouse button used to zoom.
static Matrix4 & getScaling(Matrix4 &out, const Vector3< float > &v)
vl::ref< vl::Geometry > makeScales(bool X=true, bool Y=true, bool Z=true, int numArmTicks=50, float mmStep=10, float mmTickSize=4, vl::fvec4 color=vl::fvec4(1, 1, 1, 1))
Makes an orthogonal cross-hair scales (reticle).
const T_Scalar & x() const
OpenGLContext * openglContext()
Returns the OpenGLContext to which this UIEventListener is bound or NULL if no context is bound...
EManipMode mode() const
Returns the current manipulator state.
Represents a virtual camera defining, among other things, the point of view from which scenes can be ...
virtual void setMouseVisible(bool)
If the OpenGL context is a widget this function sets whether the mouse is visible over it or not...
Wraps the OpenGL function glDrawArrays().
const T_Scalar & y() const
int translationButton() const
Mouse button used to translate the view.
virtual void update()=0
If the OpenGLContext is a widget this function requests a redraw and generates an updateEvent()...
Collection< DrawCall > & drawCalls()
Returns the list of DrawCall objects bound to a Geometry.