Voxelyze
Public Member Functions
CVX_External Class Reference

Container for all external influences on a voxel such as forces and prescribed displacements. More...

#include <VX_External.h>

List of all members.

Public Member Functions

 ~CVX_External ()
 destructor
 CVX_External (const CVX_External &eIn)
 Copy constructor.
CVX_Externaloperator= (const CVX_External &eIn)
 Equals operator.
bool operator== (const CVX_External &b)
 comparison operator
void reset ()
 Resets this external to defaults - i.e., no effect on a voxel (forces, fixed, displacements, etc)
bool isEmpty ()
 returns true if this external is empty - i.e is exerting no effect on a voxel
bool isFixed (dofComponent dof) const
 Returns true if the specified degree of freedom is fixed for this voxel.
bool isFixedAll () const
 Returns true if all 6 degrees of freedom are fixed for this voxel.
bool isFixedAllTranslation () const
 Returns true if all translational degrees of freedom are fixed.
bool isFixedAllRotation () const
 Returns true if all rotationsl degrees of freedom are fixed.
bool isFixedAny () const
 Returns true if any of the 6 degrees of freedom are fixed for this voxel.
bool isFixedAnyTranslation () const
 Returns true if any of the three translational degrees of freedom are fixed.
bool isFixedAnyRotation () const
 Returns true if any of the three rotational degrees of freedom are fixed.
Vec3D< double > translation () const
 Returns any external translation that has been applied to this external.
Vec3D< double > rotation () const
 Returns any external rotation that has been applied to this external as a rotation vector.
Quat3D< double > rotationQuat () const
 Returns any external rotation that has been applied to this external as a quaternion.
void setFixed (bool xTranslate, bool yTranslate, bool zTranslate, bool xRotate, bool yRotate, bool zRotate)
 Sets any of the degrees of freedom specified as "true" to fixed for this voxel. (GCS)
void setFixed (dofComponent dof, bool fixed=true)
 Sets the specified degree of freedom to either fixed or free, depending on the value of fixed. Either way, sets the translational or rotational displacement of this degree of freedom to zero.
void setFixedAll (bool fixed=true)
 Sets all 6 degrees of freedom to either fixed or free depending on the value of fixed. Either way, sets all displacements to zero.
void setDisplacement (dofComponent dof, double displacement=0.0)
 Fixes the specified degree of freedom and applies the prescribed displacement if specified.
void setDisplacementAll (const Vec3D< double > &translation=Vec3D< double >(0, 0, 0), const Vec3D< double > &rotation=Vec3D< double >(0, 0, 0))
 Fixes the all degrees of freedom and applies the specified translation and rotation.
void clearDisplacement (dofComponent dof)
 Clears any prescribed displacement from this degree of freedom and unfixes it, too.
void clearDisplacementAll ()
 Clears all prescribed displacement from this voxel and completely unfixes it, too.
Vec3D< float > force () const
 Returns the current applied external force in newtons.
Vec3D< float > moment () const
 Returns the current applied external moment in N-m.
void setForce (const float xForce, const float yForce, const float zForce)
 Applies forces to this voxel in the global coordinate system. Has no effect in any fixed degrees of freedom.
void setForce (const Vec3D< float > &force)
 Convenience function for setExternalForce(float, float, float).
void setMoment (const float xMoment, const float yMoment, const float zMoment)
 Applies moments to this voxel in the global coordinate system. All rotations according to the right-hand rule. Has no effect in any fixed degrees of freedom.
void setMoment (const Vec3D< float > &moment)
 Convenience function for setExternalMoment(float, float, float).
void addForce (const float xForce, const float yForce, const float zForce)
 Applies forces to this voxel in the global coordinate system. Has no effect in any fixed degrees of freedom.
void addForce (const Vec3D< float > &force)
 Convenience function for setExternalForce(float, float, float).
void addMoment (const float xMoment, const float yMoment, const float zMoment)
 Applies moments to this voxel in the global coordinate system. All rotations according to the right-hand rule. Has no effect in any fixed degrees of freedom.
void addMoment (const Vec3D< float > &moment)
 Convenience function for setExternalMoment(float, float, float).
void clearForce ()
 Clears all applied forces from this voxel.
void clearMoment ()
 Clears all applied moments from this voxel.

Detailed Description

Container for all external influences on a voxel such as forces and prescribed displacements.

dof = degree(s) of freedom (three translational, three rotational = 6 total)


Member Function Documentation

void CVX_External::addForce ( const float  xForce,
const float  yForce,
const float  zForce 
) [inline]

Applies forces to this voxel in the global coordinate system. Has no effect in any fixed degrees of freedom.

Parameters:
xForceForce in the X direction in newtons.
yForceForce in the Y direction in newtons.
zForceForce in the Z direction in newtons.
void CVX_External::addMoment ( const float  xMoment,
const float  yMoment,
const float  zMoment 
) [inline]

Applies moments to this voxel in the global coordinate system. All rotations according to the right-hand rule. Has no effect in any fixed degrees of freedom.

Parameters:
xMomentMoment in the X axis rotation in newton-meters.
yMomentMoment in the Y axis rotation in newton-meters.
zMomentMoment in the Z axis rotation in newton-meters.
void CVX_External::clearDisplacement ( dofComponent  dof)

Clears any prescribed displacement from this degree of freedom and unfixes it, too.

Parameters:
[in]dofthe degree of freedom in question.
bool CVX_External::isFixed ( dofComponent  dof) const [inline]

Returns true if the specified degree of freedom is fixed for this voxel.

Parameters:
[in]dofDegree of freedom to query according to the dofComponent enum.
void CVX_External::setDisplacement ( dofComponent  dof,
double  displacement = 0.0 
)

Fixes the specified degree of freedom and applies the prescribed displacement if specified.

Parameters:
[in]dofthe degree of freedom in question.
[in]displacementThe displacement in meters (translational dofs) or radians (rotational dofs) to apply. Large fixed displacements may cause instability.
void CVX_External::setDisplacementAll ( const Vec3D< double > &  translation = Vec3D<double>(0,0,0),
const Vec3D< double > &  rotation = Vec3D<double>(0,0,0) 
)

Fixes the all degrees of freedom and applies the specified translation and rotation.

Parameters:
[in]translationThe translation in meters from this voxel's nominal position to fix it at.
[in]rotationThe rotation (in the form of a rotation vector) from this voxel's nominal orientation to fix it at.
void CVX_External::setFixed ( bool  xTranslate,
bool  yTranslate,
bool  zTranslate,
bool  xRotate,
bool  yRotate,
bool  zRotate 
)

Sets any of the degrees of freedom specified as "true" to fixed for this voxel. (GCS)

Parameters:
[in]xTranslateTranslation in the X direction
[in]yTranslateTranslation in the Y direction
[in]zTranslateTranslation in the Z direction
[in]xRotateRotation about the X axis
[in]yRotateRotation about the Y axis
[in]zRotateRotation about the Z axis
void CVX_External::setFixed ( dofComponent  dof,
bool  fixed = true 
) [inline]

Sets the specified degree of freedom to either fixed or free, depending on the value of fixed. Either way, sets the translational or rotational displacement of this degree of freedom to zero.

Parameters:
[in]dofthe degree of freedom in question
[in]fixedWhether this degree of freedom should be fixed (true) or free (false).
void CVX_External::setFixedAll ( bool  fixed = true) [inline]

Sets all 6 degrees of freedom to either fixed or free depending on the value of fixed. Either way, sets all displacements to zero.

Parameters:
[in]fixedWhether all degrees of freedom should be fixed (true) or free (false).
void CVX_External::setForce ( const float  xForce,
const float  yForce,
const float  zForce 
) [inline]

Applies forces to this voxel in the global coordinate system. Has no effect in any fixed degrees of freedom.

Parameters:
xForceForce in the X direction in newtons.
yForceForce in the Y direction in newtons.
zForceForce in the Z direction in newtons.
void CVX_External::setMoment ( const float  xMoment,
const float  yMoment,
const float  zMoment 
) [inline]

Applies moments to this voxel in the global coordinate system. All rotations according to the right-hand rule. Has no effect in any fixed degrees of freedom.

Parameters:
xMomentMoment in the X axis rotation in newton-meters.
yMomentMoment in the Y axis rotation in newton-meters.
zMomentMoment in the Z axis rotation in newton-meters.

The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations Enumerator Friends