17#ifndef __albaAvatar3D_h
18#define __albaAvatar3D_h
32class vtkALBARayCast3DPicker;
35class vtkOutlineSource;
40class vtkAssemblyPath;;
42class vtkRenderWindowInteractor;
83 CANONICAL_TO_WORLD_SCALE
Avatars are entities moving in the virtual world according to user's movements, and thus representing...
virtual vtkAbstractPropPicker * GetPicker()
return the picker used by this avatar: from the picker is possible to obtain information about the pi...
virtual void CreateGui()
Create the dialog that show the interface for settings.
vtkCellPicker * m_Picker2D
vtkALBARayCast3DPicker * GetPicker3D()
Return picker 3D used by 3DAvatar for picking.
void WorldToNormalizedDisplay(albaMatrix &world_pose, double xy[2])
map world coords to normalized display coords
virtual void OnMove3DEvent(albaEventInteraction *e)
process a move event
virtual void Show()
Show the 3D cursor.
virtual void SetTracker(albaDeviceButtonsPadTracker *tracker)
return the tracker this avatar is the tracker attached to this avatar
void SetCoordsFrame(int frame)
Display the original tracker's coords in the debug text area.
void SetDebugTextPosition(double *pos)
where to display the text
void SetLastPoseMatrix(albaMatrix &matrix)
Internally used to set the last pose matrix.
virtual void UpdateDebugText(const char *title, albaMatrix &pose)
internally used to update debug text on the screen
virtual void OnEvent(albaEventBase *event)
Process events coming from tracker.
void SetPicker3D(vtkALBARayCast3DPicker *picker)
Internally used to redefine the 3D picker class.
vtkProp3D * m_WorkingBoxActor
Prop3D of the working box.
virtual int InternalInitialize()
redefined to add the Cursor actor into the selected renderer
void SetDisplayDebugText(int vis)
Display the debug text showing trackers coordinate.
vtkCellPicker * GetPicker2D()
Return picker 2D used by 3DAvatar for 2D picking.
void CanonicalToWorld(albaTransform *trans)
virtual void SetRendererAndView(vtkRenderer *ren, albaView *view)
Set/Get the renderer this avatar is attached to.
void DisplayWorkingBoxOn()
void WorldToDisplay(albaMatrix &world_pose, double xy[2])
map world coords to tracker coords
vtkTextMapper * m_DebugTextMapper
void CanonicalToWorld(const albaMatrix &pose, albaMatrix &dest)
Transform a matrix from Canonical to World space.
void TrackerToDisplay(albaMatrix &tracker_pose, double xy[2])
map tracker coords to display normalized coords
void WorldToCanonical(const albaMatrix &pose, albaMatrix &dest)
albaCameraTransform * GetCanonicalToWorldTransform()
return transform between canonical and world space
vtkActor2D * m_DebugTextActor
int m_CoordsFrame
Whether to display the original tracker's coords.
void TrackerToWorld(albaMatrix &tracker_pose, albaMatrix &world_pose, int use_scale=1, int use_rot=1, int use_trans=1)
Transform a matrix from Tracker frame to World frame, the function can optionally avoid to map on the...
void CanonicalToWorld(albaMatrix &pose)
int GetDisplayDebugText()
virtual int InternalStore(albaStorageElement *node)
This is used to allow nested serialization of subclasses.
void SetDisplayWorkingBox(int vis)
Display a box showing where input coords are mapped.
int m_DisplayWorkingBox
Whether display the working box.
albaMatrix & GetLastPoseMatrix()
return the last pose matrix of the avatar's 3d actor in world coordinates.
int GetDisplayWorkingBox()
double * m_DebugTextPosition
void SetDebugTextPosition(double posx, double posy)
albaAbstractTypeMacro(albaAvatar3D, albaAvatar)
vtkOutlineSource * m_WorkingBox
Working box the tracker coords are mapped to.
virtual int InternalRestore(albaStorageElement *node)
This is called by Restore() and must be reimplemented by subclasses The element from which the object...
virtual void Hide()
Hide the 3D cursor, i.e.
void WorldToTracker(albaMatrix &world_pose, albaMatrix &tracker_pose, int use_scale=1, int use_rot=1, int use_trans=1)
albaMatrix m_LastPoseMatrix
virtual void OnPostResetCamera(albaEventBase *event)
process event sent after a camera reset
int GetFittingMode()
return the mapping rule currently in use
vtkALBARayCast3DPicker * m_Picker3D
Used to pick in a VTK Render window.
double * GetDebugTextPosition()
void DisplayWorkingBoxOff()
virtual void InternalShutdown()
redefined to remove Cursor from renderer
int m_DisplayDebugText
Whether display Debug text.
void WorldToCanonical(albaMatrix &pose)
void OnUpdateBoundsEvent(albaDeviceButtonsPadTracker *tracker)
process an event signaling a change of the tracked bounds
void WorldToCanonical(albaTransform *trans)
albaCameraTransform * m_CanonicalToWorldTransform
int m_FittingMode
specify the current mapping rule from canonical to world
void SetFittingMode(int type)
Set mapping rule, i.e.
Avatars are entities moving in the virtual world according to user's movements, and thus representing...
Implementation of the message object for the Subject/Observer design pattern.
Event class to transport a triggering button and a position from pointing devices.
base class for 3D interaction modalities with 6DOF
albaMatrix - Time stamped 4x4 Matrix.
Abstract class representing the interface for the unit of information stored in the storage.
albaView is the base class for Views in alba.