Documentation


animal::octree::ConstrainedVertex Class Reference

#include <ConstrainedVertex.h>

List of all members.

Public Types

enum  {
  POS = 0, VEL, ACC, VELHALF,
  NB_AUXILIARY_VECTORS
}

Public Member Functions

 ConstrainedVertex (Vec3d v, CVertex *cv1, CVertex *cv2, CVertex *cv3, CVertex *cv4, CVertex *cv5, CVertex *cv6, CVertex *cv7, CVertex *cv8, Cell *connectedCell)
 Ensure isFree().

 ConstrainedVertex (Vec3d position, Cell *connectedCell)
 ConstrainedVertex (FloatingPointType x, FloatingPointType y, FloatingPointType z, Cell *connectedCell)
 ConstrainedVertex (const ConstrainedVertex &cmsv)
ConstrainedVertex & operator= (const ConstrainedVertex &cmsv)
 ~ConstrainedVertex ()
 Destructor Require( _childs.size() == 0 ) : no one should be pointing to us !

bool isFree () const
 Return true iff the ConstrainedVertex is free Info : isFree() <=> _nParents = 0.

Vec3d get_Vec3d () const
 operator const Vec3d () const
Vec3d getPosition () const
void addPosition (Vec3d addPos)
 operator const FloatingPointType * ()
 Return a const pointer to FloatingPointTypes for coordinates mainly used with glVertex3fv( (FloatingPointType*)CV ).

FloatingPointType operator[] (int) const
FloatingPointType * get_FloatingPointTypePointerCopy () const
 Will return the same result as the "operator const FloatingPointType*()" BUT we DO allocate a NEW FloatingPointType table for x, y and z so you should free the pointer returned here after use.

void updatePosition (ConstrainedVertex *parent, Vec3d v)
 Update our children's position If we changed the position.

void updateChildrensPosition (Vec3d v, unsigned int depth)
void updateChildrensPositionOptimized (Vec3d v, unsigned int depth)
void updateChildrensPositionOptimizedNotFree (Vec3d v)
void updateConstrainedChildrensPosition (Vec3d v, unsigned int depth)
GeoLink * getGeoLink () const
void freeIt ()
 Free the vertex from its parents Require : !isFree() Ensure : isFree().

Vec3d getParameters (Cell *cStart, unsigned short vId)
 Gives the parameters alpha, beta, gamma In our (grand^n)-father cell, starting from cell cStart until we find a free Vertex of ID vId.

Vec3d getParameters (Cell *cStart, unsigned int depth, unsigned short vId)
 Gives the parameters alpha, beta, gamma In our (grand^n)-father cell, starting from cell cStart until we find the Vertex of ID vId.

ConstrainedVertex * getFathersFreeVertex (Cell *cStart, unsigned short vId)
 Gives the vertex In our (grand^n)-father cell, starting from cell cStart until we find a free Vertex of ID vId.

Cell * getFathersFreeVertexCell (Cell *cStart, unsigned short vId)
void softLinkIt (ConstrainedVertex *cv1, ConstrainedVertex *cv2)
void softLinkIt (ConstrainedVertex *cv1, ConstrainedVertex *cv2, ConstrainedVertex *cv3, ConstrainedVertex *cv4)
void softLinkIt (ConstrainedVertex *cv1, ConstrainedVertex *cv2, ConstrainedVertex *cv3, ConstrainedVertex *cv4, ConstrainedVertex *cv5, ConstrainedVertex *cv6, ConstrainedVertex *cv7, ConstrainedVertex *cv8)
void hardLinkIt (ConstrainedVertex *cv1, ConstrainedVertex *cv2, ConstrainedVertex *cv3, ConstrainedVertex *cv4)
void hardLinkIt (ConstrainedVertex *cv1, ConstrainedVertex *cv2)
 Link the current vertex to 2 parents.

bool isChild (const ConstrainedVertex *cv) const
 isChild Return true iff cv is in the child list

void addChild (ConstrainedVertex *cv)
 addChild Require : !isChild( cv ) Ensure : isChild( cv )

void removeChild (ConstrainedVertex *cv)
 removeChild Require : isChild(cv) Ensure : !isChild(cv)

unsigned int getChildPos (ConstrainedVertex *cv) const
 Return the id of the cv child in the list of childs Require : isChild(cv).

ConstrainedVertex * child (const unsigned int pos) const
 Return the "pos" child Require : pos < _childs.size().

unsigned int nChildren () const
bool isParent (const ConstrainedVertex *cv) const
void unregisterCell (const Cell *unconnectedCell)
 Let me now that unconnectedCell is no more connected to me.

void registerCell (Cell *connectedCell)
 Let me now that connectedCell is connected to me.

unsigned short nConnectedCells () const
 Return the number of connected cells.

bool isConnected (const Cell *cell) const
 Returns true if cell is in our connectedCells list.

Cell * connectedCell (unsigned short id) const
 Return the connected Cell number id starting from 0 to nConnectedCell().

Cell * fatherCell () const
unsigned int getDepth () const
void setData (const ConstrainedVertexData &d)
ConstrainedVertexData getData () const
void updateFrame ()
 Update me then update my free children then my.

Frame computeFrame ()
Frame & getFrame ()
bool hasMainCell () const
void setMainCell (Cell *mainCell, unsigned int vId)
Cell * getMainCell () const
 End alpha, beta, gamma factors.

unsigned short getMainCellVertexId () const
ConstrainedVertex * getSmallestCellsFreeVertexSharingFaceForVertex (Cell *neighbour, unsigned int face, unsigned int vertex)
Cell * getCellWithFreeVertexConnectedToVertex (Cell *cell, unsigned int direction, unsigned int vertexId) const
void setPosition (Vec3d newPos)
 Set the position by modifying _position variable Nothing is done on children !!

void setPositionAndPropagate (Vec3d newPos)
 Set the position by modifying _position variable Also modify our DEPENDANT children recursively to keep geometric coherancy.

void setPositionAndPropagateAll (Vec3d newPos, unsigned int depth)
 Set the position by modifying _position variable Also modify all our children recursively to keep geometric coherancy This is for MR edition purpose only ! This is limited to the given depth.

Vec3d computePosition () const
 Compute the position of the vertex from our parents.

Vec3d getDelta () const
 Same thing for delta.

void setDelta (Vec3d d)
Vec3d computeDelta () const
Vec3d & value (int value_id)
 Get the auxiliary value tagged by the id.

const Vec3d & value (int value_id) const
 Get the auxiliary value tagged by the id.

void setValue (int value_id, Vec3d newPos)
 Set the auxiliary value tagged by the id.

void setValueAndPropagate (int value_id, Vec3d newPos)
 Set the tagged value, and also modify our DEPENDANT children recursively to keep geometric coherancy.

Vec3d computeValue (int value_id) const
 Compute the tagged value.

void computeValueFromParents (int value_id)
 Compute the tagged value from the corrsponding values of the parents.

void computeValueFromRelatives (int value_id)
 Same as computeValueFromParents( int value_id ) applied to a free node.

unsigned int getConstrainedDepth () const

Static Public Member Functions

FloatingPointType getAlpha (Cell *cell, unsigned int faceId, unsigned int vId, unsigned int diffDepth)
FloatingPointType getBeta (Cell *cell, unsigned int faceId, unsigned int vId, unsigned int diffDepth)
FloatingPointType getGamma (Cell *cell, unsigned int faceId, unsigned int vId, unsigned int diffDepth)
std::set< ConstrainedVertex * > getFreeParentVertices (Cell *cell)
 Return a set containing the list of free vertices parents of the 8 vertices of the cell.


Public Attributes

FloatingPointType _mass
ConstrainedVertex * _connectedVertices [3][2]
FloatingPointType _connectedVerticesFactors [3][2]
unsigned int _lastConstrainedDepth

Protected Member Functions

void copyAllData (const ConstrainedVertex &cmsv)

Static Protected Member Functions

std::deque< unsigned int > getAlphaFactors (Cell *cell, unsigned int faceId, unsigned int depthLeft)
std::deque< unsigned int > getBetaFactors (Cell *cell, unsigned int faceId, unsigned int depthLeft)
std::deque< unsigned int > getGammaFactors (Cell *cell, unsigned int faceId, unsigned int depthLeft)

Protected Attributes

Vec3d _position
 The space coordinated of the free Vertex Used only if isFree() See the Constructor.

Vec3d _velocity
FloatingPointType _positionROPointer [3]
 Used for "operator const FloatingPointType*() const;" function.

std::vector< ConstrainedVertex * > _childs
 Debugging purpose : Keep a trace of who is linking to us.

deque< Cell * > _connectedCells
 Which cell are connected to us Used only by father cells, ie if this vertex is associated to a cell C, it will not be associated to any cell of a different "age" A cell must register itself when : it creates this vertex it's connecting to it A cell must unregister itself when : it deletes this vertex it is no more connected to it See : registerCell(), unregisterCell() important : a maximum of 8 cells are possible.

Cell * _fatherCell
unsigned short _vertexId
Cell * _mainCell
ConstrainedVertexData _data
GeoLink * _geoLink
Frame _frame
animal::Array< NB_AUXILIARY_VECTORS,
Vec3d > 
_aux
 Set the CV to a new position.

Vec3d _delta


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
POS 
VEL 
ACC 
VELHALF 
NB_AUXILIARY_VECTORS 

Definition at line 368 of file ConstrainedVertex.h.


Constructor & Destructor Documentation

animal::octree::ConstrainedVertex::ConstrainedVertex (  Vec3d  position,
CVertex *  cv1,
CVertex *  cv2,
CVertex *  cv3,
CVertex *  cv4,
CVertex *  cv5,
CVertex *  cv6,
CVertex *  cv7,
CVertex *  cv8,
Cell *  connectedCell
) 
 

Ensure isFree().

Definition at line 37 of file ConstrainedVertex.cpp.

References _geoLink, animal::octree::Cell, animal::octree::CVertex, Ensure, isFree(), and animal::octree::Vec3d.

animal::octree::ConstrainedVertex::ConstrainedVertex (  Vec3d  position,
Cell *  connectedCell
) 
 

Definition at line 65 of file ConstrainedVertex.cpp.

References animal::octree::Cell, Ensure, isFree(), nChildren(), and animal::octree::Vec3d.

animal::octree::ConstrainedVertex::ConstrainedVertex (  FloatingPointType  x,
FloatingPointType  y,
FloatingPointType  z,
Cell *  connectedCell
) 
 

Definition at line 80 of file ConstrainedVertex.cpp.

References animal::octree::Cell, Ensure, animal::octree::FloatingPointType, isFree(), nChildren(), and animal::octree::Vec3d.

animal::octree::ConstrainedVertex::ConstrainedVertex (  const ConstrainedVertex &  cmsv  ) 
 

Definition at line 93 of file ConstrainedVertex.cpp.

References copyAllData().

animal::octree::ConstrainedVertex::~ConstrainedVertex (   ) 
 

Destructor Require( _childs.size() == 0 ) : no one should be pointing to us !

Definition at line 109 of file ConstrainedVertex.cpp.

References _geoLink, child(), getDepth(), getMainCell(), getMainCellVertexId(), nChildren(), nConnectedCells(), Require, and unregisterCell().


Member Function Documentation

void animal::octree::ConstrainedVertex::addChild (  ConstrainedVertex *  cv  ) 
 

addChild Require : !isChild( cv ) Ensure : isChild( cv )

Definition at line 699 of file ConstrainedVertex.cpp.

References _childs, Ensure, isChild(), and Require.

void animal::octree::ConstrainedVertex::addPosition (  Vec3d  addPos  ) 
 

ConstrainedVertex * animal::octree::ConstrainedVertex::child (  const unsigned int  pos  )  const
 

Return the "pos" child Require : pos < _childs.size().

Definition at line 738 of file ConstrainedVertex.cpp.

References _childs, nChildren(), and Require.

Referenced by animal::octree::getWeightsHash(), setPositionAndPropagate(), setValueAndPropagate(), and ~ConstrainedVertex().

Vec3d animal::octree::ConstrainedVertex::computeDelta (   )  const
 

Definition at line 1894 of file ConstrainedVertex.cpp.

References getDelta(), getGeoLink(), animal::octree::GeoLink::getGeoParent(), animal::octree::GeoLink::getNGeoParents(), isFree(), Require, and animal::octree::Vec3d.

Frame animal::octree::ConstrainedVertex::computeFrame (   ) 
 

Definition at line 990 of file ConstrainedVertex.cpp.

References _connectedVertices, _connectedVerticesFactors, _mainCell, _vertexId, animal::octree::Cell, connectedCell(), getCellWithFreeVertexConnectedToVertex(), getPosition(), animal::octree::getVertexFreeCell(), hasMainCell(), Require, and animal::octree::Vec3d.

Referenced by updateFrame().

Vec3d animal::octree::ConstrainedVertex::computePosition (   )  const
 

Compute the position of the vertex from our parents.

Precondition:
!isFree()

Definition at line 1794 of file ConstrainedVertex.cpp.

References getGeoLink(), animal::octree::GeoLink::getGeoParent(), animal::octree::GeoLink::getNGeoParents(), getPosition(), isFree(), Require, and animal::octree::Vec3d.

Referenced by animal::octree::OctreeEngine::readPositionsFrom().

Vec3d animal::octree::ConstrainedVertex::computeValue (  int  value_id  )  const
 

Compute the tagged value.

Precondition:
!isFree()

Definition at line 1915 of file ConstrainedVertex.cpp.

References getGeoLink(), animal::octree::GeoLink::getGeoParent(), animal::octree::GeoLink::getNGeoParents(), isFree(), Require, value(), and animal::octree::Vec3d.

void animal::octree::ConstrainedVertex::computeValueFromParents (  int  value_id  ) 
 

Compute the tagged value from the corrsponding values of the parents.

Precondition:
!isFree()

Definition at line 1931 of file ConstrainedVertex.cpp.

References getGeoLink(), animal::octree::GeoLink::getGeoParent(), animal::octree::GeoLink::getNGeoParents(), isFree(), Require, setValue(), value(), and animal::octree::Vec3d.

Referenced by hardLinkIt(), animal::octree::OctreeEngine::v_eq_a_plus_alpha_b(), and animal::octree::OctreeEngine::writePositionsTo().

void animal::octree::ConstrainedVertex::computeValueFromRelatives (  int  value_id  ) 
 

Same as computeValueFromParents( int value_id ) applied to a free node.

The parents are the would-be parents if the node were not free.

Precondition:
isFree()

Definition at line 1947 of file ConstrainedVertex.cpp.

References getGeoLink(), animal::octree::GeoLink::getGeoParent(), animal::octree::GeoLink::getNGeoParents(), isFree(), Require, setValue(), value(), and animal::octree::Vec3d.

Referenced by softLinkIt().

Cell * animal::octree::ConstrainedVertex::connectedCell (  unsigned short  id  )  const
 

Return the connected Cell number id starting from 0 to nConnectedCell().

Require : id < nConnectedCells()

Definition at line 824 of file ConstrainedVertex.cpp.

References _connectedCells, animal::octree::Cell, nConnectedCells(), and Require.

Referenced by computeFrame(), getConstrainedDepth(), animal::octree::SFVec3fCellConstrained::globalLinearUpdatePositions(), and isConnected().

void animal::octree::ConstrainedVertex::copyAllData (  const ConstrainedVertex &  cmsv  )  [protected]
 

Definition at line 158 of file ConstrainedVertex.cpp.

References _childs, _connectedCells, _data, _fatherCell, _frame, _geoLink, _mainCell, _position, _positionROPointer, and _vertexId.

Referenced by ConstrainedVertex(), and operator=().

Cell * animal::octree::ConstrainedVertex::fatherCell (   )  const
 

Definition at line 844 of file ConstrainedVertex.cpp.

References _fatherCell, and animal::octree::Cell.

void animal::octree::ConstrainedVertex::freeIt (   ) 
 

Free the vertex from its parents Require : !isFree() Ensure : isFree().

Definition at line 556 of file ConstrainedVertex.cpp.

References _geoLink, Ensure, animal::octree::GeoLink::freeIt(), getGeoLink(), isFree(), and Require.

FloatingPointType * animal::octree::ConstrainedVertex::get_FloatingPointTypePointerCopy (   )  const
 

Will return the same result as the "operator const FloatingPointType*()" BUT we DO allocate a NEW FloatingPointType table for x, y and z so you should free the pointer returned here after use.

Definition at line 223 of file ConstrainedVertex.cpp.

References animal::octree::FloatingPointType, get_Vec3d(), and animal::octree::Vec3d.

Vec3d animal::octree::ConstrainedVertex::get_Vec3d (   )  const
 

Returns:
the space coordinates of the Vertex

Definition at line 198 of file ConstrainedVertex.cpp.

References _position, and animal::octree::Vec3d.

Referenced by get_FloatingPointTypePointerCopy(), getPosition(), operator const FloatingPointType *(), operator const Vec3d(), and operator[]().

FloatingPointType animal::octree::ConstrainedVertex::getAlpha (  Cell *  cell,
unsigned int  faceId,
unsigned int  vId,
unsigned int  diffDepth
)  [static]
 

Definition at line 1541 of file ConstrainedVertex.cpp.

References animal::octree::Cell, animal::octree::FloatingPointType, getAlphaFactors(), and Require.

std::deque< unsigned int > animal::octree::ConstrainedVertex::getAlphaFactors (  Cell *  cell,
unsigned int  faceId,
unsigned int  depthLeft
)  [static, protected]
 

Definition at line 1619 of file ConstrainedVertex.cpp.

References animal::octree::Cell, and Require.

Referenced by getAlpha().

FloatingPointType animal::octree::ConstrainedVertex::getBeta (  Cell *  cell,
unsigned int  faceId,
unsigned int  vId,
unsigned int  diffDepth
)  [static]
 

Definition at line 1567 of file ConstrainedVertex.cpp.

References animal::octree::Cell, animal::octree::FloatingPointType, getBetaFactors(), and Require.

std::deque< unsigned int > animal::octree::ConstrainedVertex::getBetaFactors (  Cell *  cell,
unsigned int  faceId,
unsigned int  depthLeft
)  [static, protected]
 

Definition at line 1643 of file ConstrainedVertex.cpp.

References animal::octree::Cell, and Require.

Referenced by getBeta().

Cell * animal::octree::ConstrainedVertex::getCellWithFreeVertexConnectedToVertex (  Cell *  cell,
unsigned int  direction,
unsigned int  vertexId
)  const
 

Definition at line 935 of file ConstrainedVertex.cpp.

References animal::octree::Cell, Ensure, and Require.

Referenced by computeFrame().

unsigned int animal::octree::ConstrainedVertex::getChildPos (  ConstrainedVertex *  cv  )  const
 

Return the id of the cv child in the list of childs Require : isChild(cv).

Definition at line 723 of file ConstrainedVertex.cpp.

References _childs, isChild(), and Require.

Referenced by removeChild().

unsigned int animal::octree::ConstrainedVertex::getConstrainedDepth (   )  const
 

Definition at line 1094 of file ConstrainedVertex.cpp.

References _vertexId, animal::octree::Cell, connectedCell(), getMainCell(), nConnectedCells(), and Require.

ConstrainedVertexData animal::octree::ConstrainedVertex::getData (   )  const
 

Definition at line 865 of file ConstrainedVertex.cpp.

References _data.

Vec3d animal::octree::ConstrainedVertex::getDelta (   )  const
 

Same thing for delta.

Definition at line 1886 of file ConstrainedVertex.cpp.

References _delta, and animal::octree::Vec3d.

Referenced by computeDelta(), animal::octree::SFVec3fCellConstrained::globalLinearUpdatePositions(), setPositionAndPropagateAll(), and updateChildrensPositionOptimizedNotFree().

unsigned int animal::octree::ConstrainedVertex::getDepth (   )  const
 

Definition at line 849 of file ConstrainedVertex.cpp.

References getMainCell().

Referenced by animal::octree::SFVec3fCellConstrained::globalLinearUpdatePositions(), and ~ConstrainedVertex().

ConstrainedVertex * animal::octree::ConstrainedVertex::getFathersFreeVertex (  Cell *  cStart,
unsigned short  vId
) 
 

Gives the vertex In our (grand^n)-father cell, starting from cell cStart until we find a free Vertex of ID vId.

Definition at line 1450 of file ConstrainedVertex.cpp.

References animal::octree::Cell, Ensure, and isFree().

Referenced by getFathersFreeVertexCell().

Cell * animal::octree::ConstrainedVertex::getFathersFreeVertexCell (  Cell *  cStart,
unsigned short  vId
) 
 

Definition at line 1466 of file ConstrainedVertex.cpp.

References animal::octree::Cell, getFathersFreeVertex(), and getMainCell().

Frame & animal::octree::ConstrainedVertex::getFrame (   ) 
 

Definition at line 1373 of file ConstrainedVertex.cpp.

References _frame.

Referenced by setPosition().

std::set< ConstrainedVertex * > animal::octree::ConstrainedVertex::getFreeParentVertices (  Cell *  cell  )  [static]
 

Return a set containing the list of free vertices parents of the 8 vertices of the cell.

Definition at line 1703 of file ConstrainedVertex.cpp.

References animal::octree::Cell, getGeoLink(), animal::octree::GeoLink::getGeoParent(), animal::octree::GeoLink::getGeoParentId(), animal::octree::GeoLink::getNGeoParents(), and isFree().

FloatingPointType animal::octree::ConstrainedVertex::getGamma (  Cell *  cell,
unsigned int  faceId,
unsigned int  vId,
unsigned int  diffDepth
)  [static]
 

Definition at line 1593 of file ConstrainedVertex.cpp.

References animal::octree::Cell, animal::octree::FloatingPointType, getGammaFactors(), and Require.

std::deque< unsigned int > animal::octree::ConstrainedVertex::getGammaFactors (  Cell *  cell,
unsigned int  faceId,
unsigned int  depthLeft
)  [static, protected]
 

Definition at line 1667 of file ConstrainedVertex.cpp.

References animal::octree::Cell.

Referenced by getGamma().

GeoLink * animal::octree::ConstrainedVertex::getGeoLink (   )  const
 

Definition at line 876 of file ConstrainedVertex.cpp.

References _geoLink, and Require.

Referenced by computeDelta(), animal::octree::computeDirectManipulationSkinning(), computePosition(), computeValue(), computeValueFromParents(), computeValueFromRelatives(), freeIt(), getFreeParentVertices(), hardLinkIt(), isParent(), softLinkIt(), updateChildrensPositionOptimizedNotFree(), updateConstrainedChildrensPosition(), and updatePosition().

Cell * animal::octree::ConstrainedVertex::getMainCell (   )  const
 

End alpha, beta, gamma factors.

Definition at line 1694 of file ConstrainedVertex.cpp.

References _mainCell, and animal::octree::Cell.

Referenced by getConstrainedDepth(), getDepth(), getFathersFreeVertexCell(), animal::octree::operator<<(), and ~ConstrainedVertex().

unsigned short animal::octree::ConstrainedVertex::getMainCellVertexId (   )  const [inline]
 

Definition at line 252 of file ConstrainedVertex.h.

References _vertexId.

Referenced by animal::octree::operator<<(), and ~ConstrainedVertex().

Vec3d animal::octree::ConstrainedVertex::getParameters (  Cell *  cStart,
unsigned int  depth,
unsigned short  vId
) 
 

Gives the parameters alpha, beta, gamma In our (grand^n)-father cell, starting from cell cStart until we find the Vertex of ID vId.

Definition at line 1492 of file ConstrainedVertex.cpp.

References animal::octree::Cell, animal::octree::FloatingPointType, and animal::octree::Vec3d.

Vec3d animal::octree::ConstrainedVertex::getParameters (  Cell *  cStart,
unsigned short  vId
) 
 

Gives the parameters alpha, beta, gamma In our (grand^n)-father cell, starting from cell cStart until we find a free Vertex of ID vId.

Definition at line 1406 of file ConstrainedVertex.cpp.

References animal::octree::Cell, animal::octree::FloatingPointType, isFree(), and animal::octree::Vec3d.

Vec3d animal::octree::ConstrainedVertex::getPosition (   )  const
 

Definition at line 871 of file ConstrainedVertex.cpp.

References get_Vec3d(), and animal::octree::Vec3d.

Referenced by computeFrame(), computePosition(), X3DTK::X3D::DeformableOctreeNode::drawVertex(), hardLinkIt(), X3DTK::X3D::DeformableOctreeNode::slotMoveXMinus(), X3DTK::X3D::DeformableOctreeNode::slotMoveXPlus(), X3DTK::X3D::DeformableOctreeNode::slotMoveYMinus(), X3DTK::X3D::DeformableOctreeNode::slotMoveYPlus(), X3DTK::X3D::DeformableOctreeNode::slotMoveZMinus(), X3DTK::X3D::DeformableOctreeNode::slotMoveZPlus(), softLinkIt(), and animal::octree::OctreeEngine::writePositionsTo().

ConstrainedVertex * animal::octree::ConstrainedVertex::getSmallestCellsFreeVertexSharingFaceForVertex (  Cell *  neighbour,
unsigned int  face,
unsigned int  vertex
) 
 

Definition at line 883 of file ConstrainedVertex.cpp.

References animal::octree::Cell, Ensure, and Require.

void animal::octree::ConstrainedVertex::hardLinkIt (  ConstrainedVertex *  cv1,
ConstrainedVertex *  cv2
) 
 

Link the current vertex to 2 parents.

Require : isFree() Ensure : !isFree()

Definition at line 629 of file ConstrainedVertex.cpp.

References _geoLink, computeValueFromParents(), Ensure, getGeoLink(), getPosition(), animal::octree::GeoLink::hardLinkIt(), isFree(), POS, Require, setValue(), and VEL.

void animal::octree::ConstrainedVertex::hardLinkIt (  ConstrainedVertex *  cv1,
ConstrainedVertex *  cv2,
ConstrainedVertex *  cv3,
ConstrainedVertex *  cv4
) 
 

Definition at line 605 of file ConstrainedVertex.cpp.

References _geoLink, computeValueFromParents(), Ensure, getGeoLink(), getPosition(), animal::octree::GeoLink::hardLinkIt(), isFree(), POS, Require, setValue(), and VEL.

bool animal::octree::ConstrainedVertex::hasMainCell (   )  const
 

Definition at line 1378 of file ConstrainedVertex.cpp.

References _mainCell.

Referenced by computeFrame().

bool animal::octree::ConstrainedVertex::isChild (  const ConstrainedVertex *  cv  )  const
 

isChild Return true iff cv is in the child list

Definition at line 686 of file ConstrainedVertex.cpp.

References _childs.

Referenced by addChild(), getChildPos(), animal::octree::GeoLink::hardLinkIt(), and removeChild().

bool animal::octree::ConstrainedVertex::isConnected (  const Cell *  cell  )  const
 

Returns true if cell is in our connectedCells list.

Definition at line 831 of file ConstrainedVertex.cpp.

References animal::octree::Cell, connectedCell(), and nConnectedCells().

Referenced by registerCell(), and unregisterCell().

bool animal::octree::ConstrainedVertex::isFree (   )  const
 

Return true iff the ConstrainedVertex is free Info : isFree() <=> _nParents = 0.

Definition at line 188 of file ConstrainedVertex.cpp.

References _geoLink, and animal::octree::GeoLink::isFree().

Referenced by computeDelta(), animal::octree::computeDirectManipulationSkinning(), computePosition(), computeValue(), computeValueFromParents(), computeValueFromRelatives(), ConstrainedVertex(), X3DTK::X3D::DeformableOctreeNode::drawOctreeVertices(), freeIt(), getFathersFreeVertex(), getFreeParentVertices(), getParameters(), animal::octree::getVertexFreeCell(), animal::octree::getWeightsHash(), animal::octree::SFVec3fCellConstrained::globalLinearUpdatePositions(), hardLinkIt(), animal::octree::OctreeEngine::readPositionsFrom(), setPositionAndPropagate(), setPositionAndPropagateAll(), setValueAndPropagate(), updateChildrensPositionOptimizedNotFree(), updateConstrainedChildrensPosition(), animal::octree::OctreeEngine::v_eq_a_plus_alpha_b(), and animal::octree::OctreeEngine::writePositionsTo().

bool animal::octree::ConstrainedVertex::isParent (  const ConstrainedVertex *  cv  )  const
 

Definition at line 751 of file ConstrainedVertex.cpp.

References getGeoLink(), and animal::octree::GeoLink::isParent().

unsigned int animal::octree::ConstrainedVertex::nChildren (   )  const
 

Definition at line 744 of file ConstrainedVertex.cpp.

References _childs.

Referenced by child(), ConstrainedVertex(), setPositionAndPropagate(), setValueAndPropagate(), and ~ConstrainedVertex().

unsigned short animal::octree::ConstrainedVertex::nConnectedCells (   )  const
 

Return the number of connected cells.

Ensure : result is <= 8

Definition at line 807 of file ConstrainedVertex.cpp.

References _connectedCells.

Referenced by connectedCell(), getConstrainedDepth(), animal::octree::SFVec3fCellConstrained::globalLinearUpdatePositions(), isConnected(), and ~ConstrainedVertex().

animal::octree::ConstrainedVertex::operator const FloatingPointType * (   ) 
 

Return a const pointer to FloatingPointTypes for coordinates mainly used with glVertex3fv( (FloatingPointType*)CV ).

Definition at line 207 of file ConstrainedVertex.cpp.

References _positionROPointer, get_Vec3d(), and animal::octree::Vec3d.

animal::octree::ConstrainedVertex::operator const Vec3d (   )  const
 

Definition at line 548 of file ConstrainedVertex.cpp.

References get_Vec3d().

ConstrainedVertex & animal::octree::ConstrainedVertex::operator= (  const ConstrainedVertex &  cmsv  ) 
 

Definition at line 99 of file ConstrainedVertex.cpp.

References copyAllData().

FloatingPointType animal::octree::ConstrainedVertex::operator[] (  int   )  const
 

Definition at line 218 of file ConstrainedVertex.cpp.

References animal::octree::FloatingPointType, and get_Vec3d().

void animal::octree::ConstrainedVertex::registerCell (  Cell *  connectedCell  ) 
 

Let me now that connectedCell is connected to me.

Require : !isConnected( connectedCell ) Ensure : isConnected( connectedCell )

Definition at line 767 of file ConstrainedVertex.cpp.

References _connectedCells, animal::octree::Cell, Ensure, isConnected(), and Require.

void animal::octree::ConstrainedVertex::removeChild (  ConstrainedVertex *  cv  ) 
 

removeChild Require : isChild(cv) Ensure : !isChild(cv)

Definition at line 713 of file ConstrainedVertex.cpp.

References _childs, Ensure, getChildPos(), isChild(), and Require.

void animal::octree::ConstrainedVertex::setData (  const ConstrainedVertexData &  d  ) 
 

Definition at line 861 of file ConstrainedVertex.cpp.

References _data.

void animal::octree::ConstrainedVertex::setDelta (  Vec3d  d  ) 
 

Definition at line 1890 of file ConstrainedVertex.cpp.

References _delta, and animal::octree::Vec3d.

Referenced by animal::octree::SFVec3fCellConstrained::globalLinearUpdatePositions(), setPositionAndPropagateAll(), animal::octree::Octree::setPositionMethod(), and updateChildrensPositionOptimizedNotFree().

void animal::octree::ConstrainedVertex::setMainCell (  Cell *  mainCell,
unsigned int  vId
) 
 

Definition at line 1382 of file ConstrainedVertex.cpp.

References _geoLink, _mainCell, _vertexId, animal::octree::Cell, and animal::octree::GeoLink::changeCell().

void animal::octree::ConstrainedVertex::setPosition (  Vec3d  newPos  ) 
 

Set the position by modifying _position variable Nothing is done on children !!

Definition at line 1814 of file ConstrainedVertex.cpp.

References _position, getFrame(), animal::octree::Frame::setOrigin(), and animal::octree::Vec3d.

Referenced by animal::octree::OctreeParticleSystemEngine< t_Vector, t_Real, t_Masses >::postUpdateVerticesPositions(), animal::octree::OctreeEngine::readPositionsFrom(), setPositionAndPropagate(), setPositionAndPropagateAll(), and updateChildrensPositionOptimized().

void animal::octree::ConstrainedVertex::setPositionAndPropagate (  Vec3d  newPos  ) 
 

Set the position by modifying _position variable Also modify our DEPENDANT children recursively to keep geometric coherancy.

Precondition:
isFree()

Definition at line 1824 of file ConstrainedVertex.cpp.

References child(), isFree(), nChildren(), Require, setPosition(), and animal::octree::Vec3d.

void animal::octree::ConstrainedVertex::setPositionAndPropagateAll (  Vec3d  newPos,
unsigned int  depth
) 
 

Set the position by modifying _position variable Also modify all our children recursively to keep geometric coherancy This is for MR edition purpose only ! This is limited to the given depth.

Definition at line 1864 of file ConstrainedVertex.cpp.

References _position, getDelta(), isFree(), setDelta(), setPosition(), updateChildrensPositionOptimized(), updateChildrensPositionOptimizedNotFree(), and animal::octree::Vec3d.

Referenced by X3DTK::X3D::DeformableOctreeNode::slotMoveXMinus(), X3DTK::X3D::DeformableOctreeNode::slotMoveXPlus(), X3DTK::X3D::DeformableOctreeNode::slotMoveYMinus(), X3DTK::X3D::DeformableOctreeNode::slotMoveYPlus(), X3DTK::X3D::DeformableOctreeNode::slotMoveZMinus(), and X3DTK::X3D::DeformableOctreeNode::slotMoveZPlus().

void animal::octree::ConstrainedVertex::setValue (  int  value_id,
Vec3d  newPos
) 
 

Set the auxiliary value tagged by the id.

Nothing is done on children !!

Definition at line 1963 of file ConstrainedVertex.cpp.

References _aux, and animal::octree::Vec3d.

Referenced by computeValueFromParents(), computeValueFromRelatives(), hardLinkIt(), softLinkIt(), animal::octree::OctreeEngine::v_assign(), animal::octree::OctreeEngine::v_eq(), animal::octree::OctreeEngine::v_eq_a_plus_alpha_b(), and animal::octree::OctreeEngine::writePositionsTo().

void animal::octree::ConstrainedVertex::setValueAndPropagate (  int  value_id,
Vec3d  newPos
) 
 

Set the tagged value, and also modify our DEPENDANT children recursively to keep geometric coherancy.

Definition at line 1978 of file ConstrainedVertex.cpp.

References _aux, child(), isFree(), nChildren(), Require, and animal::octree::Vec3d.

void animal::octree::ConstrainedVertex::softLinkIt (  ConstrainedVertex *  cv1,
ConstrainedVertex *  cv2,
ConstrainedVertex *  cv3,
ConstrainedVertex *  cv4,
ConstrainedVertex *  cv5,
ConstrainedVertex *  cv6,
ConstrainedVertex *  cv7,
ConstrainedVertex *  cv8
) 
 

Definition at line 593 of file ConstrainedVertex.cpp.

References _geoLink, computeValueFromRelatives(), getGeoLink(), getPosition(), POS, Require, setValue(), animal::octree::GeoLink::softLinkIt(), and VEL.

void animal::octree::ConstrainedVertex::softLinkIt (  ConstrainedVertex *  cv1,
ConstrainedVertex *  cv2,
ConstrainedVertex *  cv3,
ConstrainedVertex *  cv4
) 
 

Definition at line 582 of file ConstrainedVertex.cpp.

References _geoLink, computeValueFromRelatives(), getGeoLink(), getPosition(), POS, Require, setValue(), animal::octree::GeoLink::softLinkIt(), and VEL.

void animal::octree::ConstrainedVertex::softLinkIt (  ConstrainedVertex *  cv1,
ConstrainedVertex *  cv2
) 
 

Definition at line 571 of file ConstrainedVertex.cpp.

References _geoLink, computeValueFromRelatives(), getGeoLink(), getPosition(), POS, Require, setValue(), animal::octree::GeoLink::softLinkIt(), and VEL.

void animal::octree::ConstrainedVertex::unregisterCell (  const Cell *  unconnectedCell  ) 
 

Let me now that unconnectedCell is no more connected to me.

Require : isConnected( unconnectedCell ) Ensure : !isConnected( unconnectedCell )

Definition at line 782 of file ConstrainedVertex.cpp.

References _connectedCells, animal::octree::Cell, Ensure, isConnected(), and Require.

Referenced by ~ConstrainedVertex().

void animal::octree::ConstrainedVertex::updateChildrensPosition (  Vec3d  v,
unsigned int  depth
) 
 

Definition at line 496 of file ConstrainedVertex.cpp.

References _childs, and animal::octree::Vec3d.

Referenced by updatePosition().

void animal::octree::ConstrainedVertex::updateChildrensPositionOptimized (  Vec3d  v,
unsigned int  depth
) 
 

Definition at line 294 of file ConstrainedVertex.cpp.

References _childs, _position, setPosition(), and animal::octree::Vec3d.

Referenced by setPositionAndPropagateAll().

void animal::octree::ConstrainedVertex::updateChildrensPositionOptimizedNotFree (  Vec3d  v  ) 
 

Definition at line 382 of file ConstrainedVertex.cpp.

References _childs, _position, getDelta(), getGeoLink(), animal::octree::GeoLink::getGeoParent(), animal::octree::GeoLink::getGeoParentId(), animal::octree::GeoLink::getNGeoParents(), isFree(), Require, setDelta(), and animal::octree::Vec3d.

Referenced by setPositionAndPropagateAll().

void animal::octree::ConstrainedVertex::updateConstrainedChildrensPosition (  Vec3d  v,
unsigned int  depth
) 
 

Definition at line 512 of file ConstrainedVertex.cpp.

References _childs, _position, getGeoLink(), animal::octree::GeoLink::getNGeoParents(), isFree(), Require, and animal::octree::Vec3d.

void animal::octree::ConstrainedVertex::updateFrame (   ) 
 

Update me then update my free children then my.

Definition at line 984 of file ConstrainedVertex.cpp.

References _frame, and computeFrame().

void animal::octree::ConstrainedVertex::updatePosition (  ConstrainedVertex *  parent,
Vec3d  v
) 
 

Update our children's position If we changed the position.

Definition at line 532 of file ConstrainedVertex.cpp.

References _geoLink, _position, getGeoLink(), animal::octree::GeoLink::getNGeoParents(), animal::octree::GeoLink::isGeoLinkParent(), Require, updateChildrensPosition(), and animal::octree::Vec3d.

const Vec3d & animal::octree::ConstrainedVertex::value (  int  value_id  )  const
 

Get the auxiliary value tagged by the id.

Definition at line 1973 of file ConstrainedVertex.cpp.

References _aux, and animal::octree::Vec3d.

Vec3d & animal::octree::ConstrainedVertex::value (  int  value_id  ) 
 

Get the auxiliary value tagged by the id.

Definition at line 1968 of file ConstrainedVertex.cpp.

References _aux, and animal::octree::Vec3d.

Referenced by computeValue(), computeValueFromParents(), computeValueFromRelatives(), animal::octree::OctreeEngine::readPositionsFrom(), animal::octree::OctreeEngine::v_eq(), and animal::octree::OctreeEngine::v_eq_a_plus_alpha_b().


Member Data Documentation

animal::Array<NB_AUXILIARY_VECTORS,Vec3d> animal::octree::ConstrainedVertex::_aux [protected]
 

Set the CV to a new position.

Require : isFree

Definition at line 432 of file ConstrainedVertex.h.

Referenced by setValue(), setValueAndPropagate(), and value().

std::vector<ConstrainedVertex*> animal::octree::ConstrainedVertex::_childs [protected]
 

Debugging purpose : Keep a trace of who is linking to us.

Definition at line 299 of file ConstrainedVertex.h.

Referenced by addChild(), child(), copyAllData(), getChildPos(), isChild(), nChildren(), removeChild(), updateChildrensPosition(), updateChildrensPositionOptimized(), updateChildrensPositionOptimizedNotFree(), and updateConstrainedChildrensPosition().

deque<Cell*> animal::octree::ConstrainedVertex::_connectedCells [protected]
 

Which cell are connected to us Used only by father cells, ie if this vertex is associated to a cell C, it will not be associated to any cell of a different "age" A cell must register itself when : it creates this vertex it's connecting to it A cell must unregister itself when : it deletes this vertex it is no more connected to it See : registerCell(), unregisterCell() important : a maximum of 8 cells are possible.

  • * - * - * -

Definition at line 313 of file ConstrainedVertex.h.

Referenced by connectedCell(), copyAllData(), nConnectedCells(), registerCell(), and unregisterCell().

ConstrainedVertex* animal::octree::ConstrainedVertex::_connectedVertices[3][2]
 

Definition at line 436 of file ConstrainedVertex.h.

Referenced by animal::octree::computeDirectManipulationSkinning(), and computeFrame().

FloatingPointType animal::octree::ConstrainedVertex::_connectedVerticesFactors[3][2]
 

Definition at line 437 of file ConstrainedVertex.h.

Referenced by animal::octree::computeDirectManipulationSkinning(), and computeFrame().

ConstrainedVertexData animal::octree::ConstrainedVertex::_data [protected]
 

Definition at line 323 of file ConstrainedVertex.h.

Referenced by copyAllData(), getData(), and setData().

Vec3d animal::octree::ConstrainedVertex::_delta [protected]
 

Definition at line 433 of file ConstrainedVertex.h.

Referenced by getDelta(), and setDelta().

Cell* animal::octree::ConstrainedVertex::_fatherCell [protected]
 

Definition at line 315 of file ConstrainedVertex.h.

Referenced by copyAllData(), and fatherCell().

Frame animal::octree::ConstrainedVertex::_frame [protected]
 

Definition at line 327 of file ConstrainedVertex.h.

Referenced by copyAllData(), getFrame(), and updateFrame().

GeoLink* animal::octree::ConstrainedVertex::_geoLink [protected]
 

Definition at line 325 of file ConstrainedVertex.h.

Referenced by ConstrainedVertex(), copyAllData(), freeIt(), getGeoLink(), hardLinkIt(), isFree(), setMainCell(), softLinkIt(), updatePosition(), and ~ConstrainedVertex().

unsigned int animal::octree::ConstrainedVertex::_lastConstrainedDepth
 

Definition at line 441 of file ConstrainedVertex.h.

Cell* animal::octree::ConstrainedVertex::_mainCell [protected]
 

Definition at line 320 of file ConstrainedVertex.h.

Referenced by computeFrame(), copyAllData(), getMainCell(), hasMainCell(), and setMainCell().

FloatingPointType animal::octree::ConstrainedVertex::_mass
 

Definition at line 274 of file ConstrainedVertex.h.

Referenced by animal::octree::OctreeParticleSystemEngine< t_Vector, t_Real, t_Masses >::postUpdateVerticesPositions().

Vec3d animal::octree::ConstrainedVertex::_position [protected]
 

The space coordinated of the free Vertex Used only if isFree() See the Constructor.

Definition at line 286 of file ConstrainedVertex.h.

Referenced by copyAllData(), get_Vec3d(), setPosition(), setPositionAndPropagateAll(), updateChildrensPositionOptimized(), updateChildrensPositionOptimizedNotFree(), updateConstrainedChildrensPosition(), and updatePosition().

FloatingPointType animal::octree::ConstrainedVertex::_positionROPointer[3] [protected]
 

Used for "operator const FloatingPointType*() const;" function.

Definition at line 294 of file ConstrainedVertex.h.

Referenced by copyAllData(), and operator const FloatingPointType *().

Vec3d animal::octree::ConstrainedVertex::_velocity [protected]
 

Definition at line 288 of file ConstrainedVertex.h.

unsigned short animal::octree::ConstrainedVertex::_vertexId [protected]
 

Definition at line 318 of file ConstrainedVertex.h.

Referenced by computeFrame(), copyAllData(), getConstrainedDepth(), getMainCellVertexId(), and setMainCell().


The documentation for this class was generated from the following files:
Generated on Thu Dec 23 13:52:32 2004 by doxygen 1.3.6