ALBA
|
#include <albaGizmoAutoscaleHelper.h>
Public Member Functions | |
albaGizmoAutoscaleHelper () | |
virtual | ~albaGizmoAutoscaleHelper () |
albaTypeMacro (albaGizmoAutoscaleHelper, albaTransformBase) | |
void | SetRenderer (vtkRenderer *ren) |
vtkRenderer * | GetRenderer () |
void | SetFollowScale (bool flag) |
bool | GetFollowScale () |
void | FollowScaleOn () |
void | FollowScaleOff () |
void | SetRenderWindowHeightPercentage (double percentage) |
double | GetRenderWindowHeightPercentage () |
void | SetActor (vtkActor *actor) |
vtkActor * | GetActor () |
void | SetVME (albaVME *vme) |
albaVME * | GetVME () |
virtual int | DeepCopy (albaGizmoAutoscaleHelper *trans) |
virtual unsigned long | GetMTime () |
Public Member Functions inherited from albaTransformBase | |
albaTransformBase () | |
~albaTransformBase () | |
albaTransformBase (const albaTransformBase &) | |
albaAbstractTypeMacro (albaTransformBase, albaReferenceCounted) | |
virtual void | Print (std::ostream &os, const int indent=0) const |
virtual const albaMatrix & | GetMatrix () |
albaMatrix * | GetMatrixPointer () |
void | TransformPoint (const float in[3], float out[3]) |
void | TransformPoint (const double in[3], double out[3]) |
void | TransformNormalAtPoint (const float point[3], const float in[3], float out[3]) |
void | TransformNormalAtPoint (const double point[3], const double in[3], double out[3]) |
void | TransformVectorAtPoint (const float point[3], const float in[3], float out[3]) |
void | TransformVectorAtPoint (const double point[3], const double in[3], double out[3]) |
virtual void | Update () |
void | Modified () |
virtual void | InternalTransformPoint (const double in[3], double out[3]) |
virtual void | InternalTransformPoint (const float in[3], float out[3]) |
virtual unsigned long | GetMTime () |
virtual unsigned long | GetUpdateTime () |
void | SetTimeStamp (albaTimeStamp t) |
albaTimeStamp | GetTimeStamp () |
Public Member Functions inherited from albaReferenceCounted | |
albaReferenceCounted () | |
virtual | ~albaReferenceCounted () |
albaAbstractTypeMacro (albaReferenceCounted, albaObject) | |
virtual void | Delete () |
void | Register (void *obj) |
virtual void | UnRegister (void *obj) |
int | GetReferenceCount () |
void | SetReferenceCount (int) |
Public Member Functions inherited from albaObject | |
albaObject () | |
virtual | ~albaObject () |
virtual void | Delete () |
virtual const char * | GetTypeName () const |
virtual bool | IsA (const char *type_name) const |
virtual bool | IsA (const albaTypeID &type_id) const |
virtual albaObject * | NewObjectInstance () const =0 |
virtual const albaTypeID & | GetTypeId () const |
virtual void | Print (std::ostream &os, const int indent=0) const |
albaObject (const albaObject &c) | |
Public Member Functions inherited from albaEventBroadcaster | |
albaEventBroadcaster (void *owner=NULL) | |
virtual | ~albaEventBroadcaster () |
albaEventBroadcaster (const albaEventBroadcaster &c) | |
void | AddObserver (albaObserver *obj) |
void | AddObserver (albaObserver &obj) |
albaObserverCallback * | AddObserverCallback (void(*f)(void *sender, albaID eid, void *clientdata, void *calldata)) |
bool | RemoveObserver (albaObserver *obj) |
void | RemoveAllObservers () |
bool | IsObserver (albaObserver *obj) |
bool | HasObservers () |
void | GetObservers (std::vector< albaObserver * > &olist) |
void | InvokeEvent (albaEventBase &e) |
void | InvokeEvent (albaEventBase *e) |
void | InvokeEvent (void *sender, albaID id=ID_NO_EVENT, void *data=NULL) |
void | SetChannel (albaID ch) |
albaID | GetChannel () |
virtual void | SetListener (albaObserver *o) |
Public Member Functions inherited from albaEventSender | |
albaEventSender () | |
virtual void | SetListener (albaObserver *o) |
virtual albaObserver * | GetListener () |
virtual bool | HasListener () |
virtual void | InvokeEvent (albaEventBase &e) |
virtual void | InvokeEvent (albaEventBase *e) |
virtual void | InvokeEvent (void *sender, albaID id=ID_NO_EVENT, void *data=NULL) |
Protected Member Functions | |
void | SetBounds (albaOBB *bounds) |
albaOBB * | GetBounds () |
void | UpdatePoseMatrix (albaMatrix *matrix, albaMatrix *old_view_matrix, albaMatrix *new_view_matrix) |
void | RecomputeAll () |
void | AutoFitting () |
virtual void | InternalUpdate () |
virtual void | InternalUpdate ()=0 |
Static Protected Member Functions | |
static void | AutoFitting (albaMatrix *matrix, albaOBB *tracked_bounds, vtkRenderer *ren) |
static void | ComputeScaling (albaOBB *inBox, albaOBB *outBox, double *scale) |
static void | InternalProcessEvents (vtkObject *sender, unsigned long channel, void *clientdata, void *calldata) |
Protected Attributes | |
double | m_RenderWindowHeightPercentage |
vtkRenderer * | m_Renderer |
vtkCamera * | m_Camera |
bool | m_FollowScale |
albaOBB * | m_Bounds |
double | m_VMEBounds [6] |
float | m_OldViewAngle |
double | m_OldDistance |
albaMatrix * | m_OldViewMatrix |
vtkCallbackCommand * | m_EventRouter |
vtkActor * | m_Actor |
albaVME * | m_VME |
Protected Attributes inherited from albaTransformBase | |
albaAutoPointer< albaMatrix > | m_Matrix |
albaMTime | m_MTime |
albaMTime | m_UpdateTime |
albaMutexLock | m_UpdateMutex |
albaTimeStamp | m_TimeStamp |
Protected Attributes inherited from albaReferenceCounted | |
int | m_ReferenceCount |
Protected Attributes inherited from albaObject | |
bool | m_HeapFlag |
Protected Attributes inherited from albaEventBroadcaster | |
albaObserversList | m_Observers |
albaID | m_Channel |
Protected Attributes inherited from albaEventSender | |
albaObserver * | m_Listener |
Additional Inherited Members | |
Static Public Member Functions inherited from albaObject | |
static const char * | GetStaticTypeName () |
static bool | IsStaticType (const char *type_name) |
static bool | IsStaticType (const albaTypeID &type_id) |
static const albaTypeID & | GetStaticTypeId () |
static albaObject * | SafeDownCast (albaObject *o) |
Protected Types inherited from albaEventBroadcaster | |
typedef std::list< albaObserver * > | albaObserversList |
Helper object for gizmo autoscaling ie actor2D-like behavior.
Definition at line 40 of file albaGizmoAutoscaleHelper.h.
albaGizmoAutoscaleHelper::albaGizmoAutoscaleHelper | ( | ) |
|
virtual |
albaGizmoAutoscaleHelper::albaTypeMacro | ( | albaGizmoAutoscaleHelper | , |
albaTransformBase | |||
) |
void albaGizmoAutoscaleHelper::SetRenderer | ( | vtkRenderer * | ren | ) |
Set the renderer used as input for this transform.
|
inline |
Return the renderer used as input for this transform.
Definition at line 52 of file albaGizmoAutoscaleHelper.h.
|
inline |
Enable/Disable following of the camera scaling (on by default)
Definition at line 55 of file albaGizmoAutoscaleHelper.h.
References albaTransformBase::Modified().
|
inline |
Definition at line 56 of file albaGizmoAutoscaleHelper.h.
|
inline |
Definition at line 57 of file albaGizmoAutoscaleHelper.h.
|
inline |
Definition at line 58 of file albaGizmoAutoscaleHelper.h.
|
inline |
Set the size of the gizmo when autoscale is enabled.
The size is expressed as gizmoHeight / renderWindowHeight. Max size is 1 (gizmo height equal to the render window one). This setting has no effect when autoscale is off
Definition at line 62 of file albaGizmoAutoscaleHelper.h.
|
inline |
Definition at line 63 of file albaGizmoAutoscaleHelper.h.
|
inline |
Set the prop to be autoscaled (to be used from the pipe)
Definition at line 66 of file albaGizmoAutoscaleHelper.h.
|
inline |
Definition at line 67 of file albaGizmoAutoscaleHelper.h.
void albaGizmoAutoscaleHelper::SetVME | ( | albaVME * | vme | ) |
Set the vme to be autoscaled (to be used from the pipe)
|
inline |
Definition at line 71 of file albaGizmoAutoscaleHelper.h.
|
virtual |
|
virtual |
Get the MTime: this is the bit of magic that makes everything work.
This MTime takes in consideration also the camera's MTime
Reimplemented from albaTransformBase.
|
inlineprotected |
Set the bounds of the object that should follow the camera.
This is necessary to allow the the right scaling.
Definition at line 85 of file albaGizmoAutoscaleHelper.h.
|
inlineprotected |
Definition at line 86 of file albaGizmoAutoscaleHelper.h.
|
protected |
Change the given matrix to follow camera movements.
|
protected |
|
staticprotected |
Change matrix scale to create a transform making two boxes to fit.Translation and Orientation are left unchanged.
Fitting can occur according to different modalities.
|
inlineprotected |
Definition at line 98 of file albaGizmoAutoscaleHelper.h.
References AutoFitting().
Referenced by AutoFitting().
|
staticprotected |
Compute scale between two boxes in order to fit viewport Y.
|
protectedvirtual |
Updates the internal matrix.
Implements albaTransformBase.
|
staticprotected |
|
protected |
gizmoHeight / renderWindowHeight (1 at maximum)
Definition at line 104 of file albaGizmoAutoscaleHelper.h.
|
protected |
This stores the renderer used as input.
Definition at line 111 of file albaGizmoAutoscaleHelper.h.
|
protected |
this is to find if the render's active camera is changed
Definition at line 112 of file albaGizmoAutoscaleHelper.h.
|
protected |
Flag for enabling the scaling according to camera frustum.
Definition at line 113 of file albaGizmoAutoscaleHelper.h.
|
protected |
m_Bounds of the object that should follow the camera
Definition at line 115 of file albaGizmoAutoscaleHelper.h.
|
protected |
Input VME bounds
Definition at line 117 of file albaGizmoAutoscaleHelper.h.
|
protected |
Definition at line 119 of file albaGizmoAutoscaleHelper.h.
|
protected |
Definition at line 120 of file albaGizmoAutoscaleHelper.h.
|
protected |
Definition at line 121 of file albaGizmoAutoscaleHelper.h.
|
protected |
Definition at line 123 of file albaGizmoAutoscaleHelper.h.
|
protected |
Definition at line 125 of file albaGizmoAutoscaleHelper.h.
|
protected |
Definition at line 126 of file albaGizmoAutoscaleHelper.h.