version 3.3

VRS::ConstraintMaxDistance Class Reference

#include <vrs/sg/constraintmaxdistance.h>

Inheritance diagram for VRS::ConstraintMaxDistance:

VRS::Constraint VRS::SharedObj VRS::Visitable

List of all members.

Public Member Functions

 ConstraintMaxDistance (double maxDistX, double maxDistY, double maxDistZ, const Vector &referencePoint=Vector(0, 0, 0), bool slide=true)
virtual bool check (const Vector &oldPoint, const Vector &desiredPoint, Stack< Vector > *alternativesStack=NULL)
virtual void setReferencePoint (const Vector &point)
 Sets the reference point.
virtual Vector getReferencePoint () const
 Returns the reference point.
virtual void setMaxDistParameters (double x, double y, double z)
 Sets the maximum distances for all 3 axes.
virtual void setMaxDistX (double x)
 Sets the maximum distance for the X-axis.
virtual double getMaxDistX () const
 Returns the maximum distance for the X-axis.
virtual void setMaxDistY (double y)
 Sets the maximum distance for the Y-axis.
virtual double getMaxDistY () const
 Returns the maximum distance for the Y-axis.
virtual void setMaxDistZ (double z)
 Sets the maximum distance for the Z-axis.
virtual double getMaxDistZ () const
 Returns the maximum distance for the Z-axis.
 VRS_TYPEINFO (ConstraintMaxDistance, Constraint)
 VRS_SERIALIZABLE (ConstraintMaxDistance)

Protected Member Functions

 ConstraintMaxDistance ()
 Default constructor. Used for serialization.


Detailed Description

Constraint which checks that the destination point of a movement stays within a maximum distance from a certain reference point. The maximum distance can be specified for each of the X-, Y- and Z-axis. The constraint allows movements that stay inside the ellipsoid which is defined by the 3 maximum distances and is centered in the reference point.

Constructor & Destructor Documentation

VRS::ConstraintMaxDistance::ConstraintMaxDistance ( double  maxDistX,
double  maxDistY,
double  maxDistZ,
const Vector referencePoint = Vector(0, 0, 0),
bool  slide = true 
)

Constructor. The ellipsoid is defined by referencePoint, maxDistX, maxDistY and maxDistZ. If slide is true, the movement will be adjusted to slide along the surface of the ellipsoid. Otherwise the movement stops on the surface.

VRS::ConstraintMaxDistance::ConstraintMaxDistance (  )  [protected]

Default constructor. Used for serialization.


Member Function Documentation

virtual bool VRS::ConstraintMaxDistance::check ( const Vector oldPoint,
const Vector desiredPoint,
Stack< Vector > *  alternativesStack = NULL 
) [virtual]

Returns true if movement from oldPoint to desiredPoint stays inside the max distance ellipsoid. If an alternative stack was passed, an alternative point is computed if the movement is not valid.

Implements VRS::Constraint.

virtual void VRS::ConstraintMaxDistance::setReferencePoint ( const Vector point  )  [virtual]

Sets the reference point.

virtual Vector VRS::ConstraintMaxDistance::getReferencePoint (  )  const [virtual]

Returns the reference point.

virtual void VRS::ConstraintMaxDistance::setMaxDistParameters ( double  x,
double  y,
double  z 
) [virtual]

Sets the maximum distances for all 3 axes.

virtual void VRS::ConstraintMaxDistance::setMaxDistX ( double  x  )  [virtual]

Sets the maximum distance for the X-axis.

virtual double VRS::ConstraintMaxDistance::getMaxDistX (  )  const [virtual]

Returns the maximum distance for the X-axis.

virtual void VRS::ConstraintMaxDistance::setMaxDistY ( double  y  )  [virtual]

Sets the maximum distance for the Y-axis.

virtual double VRS::ConstraintMaxDistance::getMaxDistY (  )  const [virtual]

Returns the maximum distance for the Y-axis.

virtual void VRS::ConstraintMaxDistance::setMaxDistZ ( double  z  )  [virtual]

Sets the maximum distance for the Z-axis.

virtual double VRS::ConstraintMaxDistance::getMaxDistZ (  )  const [virtual]

Returns the maximum distance for the Z-axis.

VRS::ConstraintMaxDistance::VRS_TYPEINFO ( ConstraintMaxDistance  ,
Constraint   
)

VRS::ConstraintMaxDistance::VRS_SERIALIZABLE ( ConstraintMaxDistance   ) 


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

Generated on Mon May 21 06:00:26 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact