17#ifndef __albaGizmoAutoscaleHelper_h
18#define __albaGizmoAutoscaleHelper_h
29class vtkCallbackCommand;
66 void SetActor(vtkActor *actor) {m_Actor = actor;};
117 double m_VMEBounds[6];
Helper object for gizmo autoscaling ie actor2D-like behavior.
void SetRenderWindowHeightPercentage(double percentage)
Set the size of the gizmo when autoscale is enabled.
bool m_FollowScale
Flag for enabling the scaling according to camera frustum.
void UpdatePoseMatrix(albaMatrix *matrix, albaMatrix *old_view_matrix, albaMatrix *new_view_matrix)
Change the given matrix to follow camera movements.
vtkCamera * m_Camera
this is to find if the render's active camera is changed
void SetBounds(albaOBB *bounds)
Set the bounds of the object that should follow the camera.
albaMatrix * m_OldViewMatrix
virtual int DeepCopy(albaGizmoAutoscaleHelper *trans)
double m_RenderWindowHeightPercentage
gizmoHeight / renderWindowHeight (1 at maximum)
static void ComputeScaling(albaOBB *inBox, albaOBB *outBox, double *scale)
Compute scale between two boxes in order to fit viewport Y.
virtual ~albaGizmoAutoscaleHelper()
vtkCallbackCommand * m_EventRouter
virtual void InternalUpdate()
Updates the internal matrix.
albaTypeMacro(albaGizmoAutoscaleHelper, albaTransformBase)
void SetVME(albaVME *vme)
Set the vme to be autoscaled (to be used from the pipe)
void SetRenderer(vtkRenderer *ren)
Set the renderer used as input for this transform.
void SetFollowScale(bool flag)
Enable/Disable following of the camera scaling (on by default)
double GetRenderWindowHeightPercentage()
static void InternalProcessEvents(vtkObject *sender, unsigned long channel, void *clientdata, void *calldata)
vtkRenderer * GetRenderer()
Return the renderer used as input for this transform.
virtual unsigned long GetMTime()
Get the MTime: this is the bit of magic that makes everything work.
static void AutoFitting(albaMatrix *matrix, albaOBB *tracked_bounds, vtkRenderer *ren)
Change matrix scale to create a transform making two boxes to fit.Translation and Orientation are lef...
vtkRenderer * m_Renderer
This stores the renderer used as input.
albaGizmoAutoscaleHelper()
void SetActor(vtkActor *actor)
Set the prop to be autoscaled (to be used from the pipe)
albaOBB * m_Bounds
m_Bounds of the object that should follow the camera
albaMatrix - Time stamped 4x4 Matrix.
This class simply stores a Box boundary (i.e.