HomerCursorModel Class Reference

#include <HomerCursorModel.h>

Inherits CursorTransformationModel.

Collaboration diagram for HomerCursorModel:

List of all members.


Public Member Functions

virtual std::string getName ()
virtual TransformationData generateCursorTransformation (TransformationData userTransformation, User *user)
void setCursorRange (float range)
virtual void startForwardAnimation (std::vector< PICKEDENTITY > *entities)
virtual void startBackwardAnimation ()
virtual bool isAnimating ()
virtual bool isForwardAnimating ()
virtual bool isBackwardAnimating ()

Private Member Functions

 HomerCursorModel (ArgumentVector *args=NULL)
TransformationData forwardAnimation (TransformationData userTransformation, User *user)
TransformationData backwardAnimation (TransformationData userTransformation, User *user)
TransformationData getNotAnimatedCursorTrans (TransformationData userTransformation, User *user)

Private Attributes

Entityentity
ArgumentVectorargs
bool picked
bool forwardAnimating
bool backwardAnimating
double lastTime
float dist
gmtl::Vec3f direction
TransformationData cursorTrans
TransformationData rayDestTrans
RayCastSelectionChangeModelrayCastSelectionChangeModel
float animationSpeed
float range
gmtl::Vec3f cursorOffset
float forwardDistanceThreshold
float backwardDistanceThreshold

Friends

class HomerCursorModelFactory

Detailed Description

This class implements the Homer-Technique. Use togehter with HomerManipulationActionModel and RayCastSelectionChangeModel

Constructor & Destructor Documentation

HomerCursorModel::HomerCursorModel ( ArgumentVector args = NULL  )  [private]

Constructor TODO not very pretty (use timestamps!) Constructor

Parameters:
an argument vector containg the animationSpeed


Member Function Documentation

TransformationData HomerCursorModel::backwardAnimation ( TransformationData  userTransformation,
User user 
) [private]

moves the cursor from the entity back to the handTransformation

TransformationData HomerCursorModel::forwardAnimation ( TransformationData  userTransformation,
User user 
) [private]

moves the cursor from the handTransformation to the positon where the entity should be picked

TransformationData HomerCursorModel::generateCursorTransformation ( TransformationData  userTransformation,
User user 
) [virtual]

The method calculates the transformation of the cursor in world coordinates. The transformation maps the cursor to the user's hand if nothing is picked. If an entity is picked, it returns the user's hand transformation + the offset to the entity and calculates the transformation while animating as well. If you want it to look nice, you should enable the usePickingOffset - option in RayCastSeletionChangeModel

Parameters:
userTransformation transformation of the User
user the user to calculate the cursor-transformation for
Returns:
transformation of the user's cursor

Implements CursorTransformationModel.

std::string HomerCursorModel::getName (  )  [virtual]

The method returns the name of the CursorTransformationModel, which is also the name of the class: "HomerCursorModel". This name has to be equal with the name which is checked in the CursorTransformationModelFactory.

Returns:
name of the model

Implements CursorTransformationModel.

TransformationData HomerCursorModel::getNotAnimatedCursorTrans ( TransformationData  userTransformation,
User user 
) [private]

bool HomerCursorModel::isAnimating (  )  [virtual]

Returns:
true if the model is animating the cursor at the moment, false otherwise

bool HomerCursorModel::isBackwardAnimating (  )  [virtual]

bool HomerCursorModel::isForwardAnimating (  )  [virtual]

void HomerCursorModel::setCursorRange ( float  range  ) 

void HomerCursorModel::startBackwardAnimation (  )  [virtual]

starts the animation of moving the cursor from the entity back to the position of the user's hand

void HomerCursorModel::startForwardAnimation ( std::vector< PICKEDENTITY > *  entities  )  [virtual]

starts the animation of moving the cursor to the entity


Friends And Related Function Documentation

friend class HomerCursorModelFactory [friend]


Member Data Documentation

gmtl::Vec3f HomerCursorModel::cursorOffset [private]

gmtl::Vec3f HomerCursorModel::direction [private]

float HomerCursorModel::dist [private]

double HomerCursorModel::lastTime [private]

bool HomerCursorModel::picked [private]

float HomerCursorModel::range [private]


The documentation for this class was generated from the following files:

Generated on Wed Oct 20 16:11:57 2010 for inVRs by doxygen 1.5.8