1 #ifndef CONSTRAINED_OBJECT_MOVEMENT_H
2 #define CONSTRAINED_OBJECT_MOVEMENT_H
11 #include <osg/ShapeDrawable>
15 using namespace vrecko;
17 namespace APConstrainedMovement {
27 virtual void update(
void);
32 virtual CAINFO* createInfo();
33 virtual void fillDefaultInfo();
35 virtual bool activate();
36 virtual void deactivate();
59 void issueRequests(
bool bStopIfNoSelection);
62 bool objectTransformationFromPointer(
EnvironmentObject *eo, osg::Matrix *outTrans, osg::Vec3 *outTranslationVector);
67 bool applyConstrainedSnapping(
EnvironmentObject *eo, osg::Matrix *inoutTrans, osg::Vec3 *inoutTranslationVector);
74 void readWatchedObjectIDs();
76 void writeObjectPosition(
int id, ofstream &stream);
77 void writeObjectRotation(
int id, ofstream &stream);
78 void writeObjectFullMatrix(
int id, ofstream &stream);
79 void writeObjectPositionsAndRotations();
81 void compareObjectPosition(
int id, ifstream &stream,
double &linearDifference,
double &quadraticDifference);
82 void compareObjectRotation(
int id, ifstream &stream,
double &linearDifference,
double &quadraticDifference);
83 void compareObjectPositionsAndRotations();
85 void loadObjectFullMatrix(
int id, ifstream &stream);
86 void loadObjectPositionsAndRotations();