1 #ifndef CONSTRAINT_DESCRIPTION_H
2 #define CONSTRAINT_DESCRIPTION_H
11 using namespace vrecko;
13 namespace APConstrainedMovement {
15 #define CONSTRAINED_SNAPPING_DISTANCE 0.5
16 #define MAX_CONSTRAINED_SNAPPING_DISTANCE 10.0
19 #define CONSTRAINED_ROTATION_DISTANCE CONSTRAINED_SNAPPING_DISTANCE * 10
33 int constraintParentID;
39 osg::Vec3 boundAreaNormal;
44 bool loadXMLFile(
const char *xmlFile);
45 virtual bool loadXMLParameters(XERCES_CPP_NAMESPACE_QUALIFIER
DOMNode *pParametersNode);
52 inline void setJustMoving(
bool justMoving) {this->justMoving = justMoving;};
55 inline void setWasTested(
bool wasTested) {this->wasTested = wasTested;};
63 void addConstrainedChildID(
int id);
64 void removeConstrainedChildID(
int id);
65 void addConstrainedDualPartnerID(
int id,
bool addAsFresh);
66 void removeConstrainedDualPartnerID(
int id);
67 void freeFromConstraintParent();
68 void shiftAllConstrainedObjects(
EnvironmentObject* eo,
const osg::Matrix& transformationMatrix);
76 inline void setBoundAreaNormal(osg::Vec3 boundAreaNormal) {this->boundAreaNormal = boundAreaNormal;};