In file tetrahedrisation/ActiveTetra3D.h:

class ActiveTetra3D : public Tetra3D, public DeformableModel3D

Class of a 3D active Tetrahedrisation

Inheritance:


Public Fields

NO_UNIT
no mass and units used
METER_UNIT
all vertex position are in meters
MILLIMETER_UNIT POSITION_UNIT
all vertex position are in millimeters
EXPLICIT
using an explicit (Euler method)
IMPLICIT
using an implicit integration method
HOUBOLT
Houbolt Method (implicit)
ASYNCHRONOUS INTEGRATION_METHOD
use asynchronous update of vertices

Public Methods

inline InternalForceTetra3D* getInternalForceType () const
returns the internal force type applying on the whole tetrahedrisation
INTEGRATION_METHOD getIntegrationMethod (void) const
return the integration method
void setIntegrationMethod (const INTEGRATION_METHOD im)
set the integration method
POSITION_UNIT getUnit (void) const
return the integration method
void setUnit (const POSITION_UNIT un)
set the unit used to store vertex position
void setTimeStep (const double ts)
set the time step
double getUnitScale () const
returns the scale factor used to compute physical parameters in SI
void allocRigidityMatrix (unsigned int nb, bool symmetric=true)
allocate the rigidity of size n*n as well as the force and result vector
MTLSymSparse* getRigidityMatrix ()
returns the current symmetric rigidity Matrix
MTLSparse* getNonSymmetricRigidityMatrix ()
returns the current rigidity Matrix
MTLVec* getForceVector ()
returns the current force vector
MTLVec* getResultVector ()
returns the current result vector
unsigned int getNumberCGIterations () const
return the maximum number of iterations to perform in the conjugated gradient algorithm
void setNumberCGIterations (const unsigned int _nbCGIter)
set the maximum number of iterations to perform in the conjugated gradient algorithm
virtual void selectObject (const Vec2 pixel, Camera3D *cam)
The callback function called when a mouse is clicked to select the closest edge, zone, vertex or triangle
virtual void redraw (Camera3D *)
redraw active triangulation 3D
void grab (const Vec2& pixel, Camera3D *cam)
grab vertices from a mouse click in a 3D camera
virtual Vec3 * grab2D (const Vec3& dir, const Vec3& pos)
grab vertices from a mouse click in a 2D camera
unsigned short int getGrabRange (void) const
returns model grab range
static void drawVector (const Vec3& from, const Vec3& arrow, const Color& color, double width)
draw an arrow
virtual TetraZone3D* newZone (char *zoneName)
create a new zone with a given name
virtual TetraSurfaceZone3D* newSurfaceZone (char *zoneName)
create a new zone with a given name
void computeEdgesLengthAndDirection (void)
pre-computation fuction for spring internal forces
void computeEdgesSquareLengthVariation (void)
pre-computation function for non-linear elastic forces
void updateTimeStep (void)
Automatic computation of the time step
void computeInternalForces (void)
computes all vertices internal forces
void computeExternalForces (void)
compute external forces
void updatePosition (void)
updates all vertices position
void computeStiffnessMatrix (void)
assembly stiffness matrix
void computeMassOnVertices ()
compute the mass associated to each vertex
void computeRenumbering (void)
compute renumbering of vertices which displacement is not imposed
void computeInducedForce (MTLVec &F)
compute force induced by the displacement of some vertices
void solveSystem (MTLVec &F, MTLSymSparse *, MTLVec &, int, double)
solve the system F=K*U and return U, displacement of vertices which displacement is not imposed
void updatePosition (MTLVec &U)
update position of vertices knowing their rest position and their displacement
void computeDisplacement (int, double)
compute displacement of all vertices given some displacements and external forces
ActiveTetraTetrahedron3D* getBarycentricCoordinates (Vec3 &, Vec3 &)
return tetrahedron in which the given point is @first param : coordinates of the given point in the image @second param : barycentric coordinates of the given point
void setMassDensity (const double r)
set mass density
inline double getMassDensity (void)
get mass density
void iterate (const unsigned int n)
model deformation callback
void asynchronousIterate (const unsigned int n)
asynchronous deformation callback
void setInternalForce (InternalForceTetra3D *ft)
set a given internal force as the main internal force applying on all vertices : updates the internalForceType field of all vertices and eventually call the ft->setGlobalFunction()
void setInternalForce (char *forceName)
find the internal force corresponding to its name
void apply (void (ActiveTetraVertex3D::*ptr)(void))
apply member function on each mesh vertex
void apply (void (ActiveTetraVertex3D::*ptr)(void) const)
apply member function on each mesh vertex
void apply (void (ActiveTetraVertex3D::*ptr)(int), int val)
apply member function on each mesh vertex
void apply (void (ActiveTetraVertex3D::*ptr)(double), double)
apply member function on each mesh vertex
void apply (void (ActiveTetraVertex3D::*ptr)(unsigned int), unsigned int val)
apply member function on each mesh vertex
void apply (void (ActiveTetraVertex3D::*ptr)(float), float val)
apply member function on each mesh vertex
void applyDouble (void (ActiveTetraVertex3D::*ptr)(const double), const double val)
apply member function on each mesh vertex
void apply (void (ActiveTetraVertex3D::*ptr)(void *), void *val)
apply member function on each mesh vertex
void apply (void (ActiveTetraEdge3D::*ptr)(void))
apply member function on each mesh edge
void apply (void (ActiveTetraEdge3D::*ptr)(void) const)
apply member function on each mesh edge
void apply (void (ActiveTetraTriangle3D::*ptr)(void))
apply member function on each mesh triangle
void apply (void (ActiveTetraTriangle3D::*ptr)(void) const)
apply member function on each mesh triangle
void apply (void (ActiveTetraTriangle3D::*ptr)(bool), bool)
apply member function on each mesh triangle
void apply (void (ActiveTetraTetrahedron3D::*ptr)(void))
apply member function on each mesh tetrahedron
void apply (void (ActiveTetraTetrahedron3D::*ptr)(void) const)
apply member function on each mesh tetrahedron
void apply (void (ActiveTetraTetrahedron3D::*ptr)(bool), bool)
apply member function on each mesh tetrahedron
void applyDouble (void (ActiveTetraTetrahedron3D::*ptr)(const double), const double)
apply member function on each mesh tetrahedron
void applyVect (void (ActiveTetraTetrahedron3D::*ptr)(const Vec3), const Vec3)
apply member function on each mesh tetrahedron
inline ActiveTetraVertex3D* getVertex (const unsigned int n) const
returns mesh vertex given its reference
inline ActiveTetraEdge3D* getEdge (const unsigned int n) const
returns mesh edge given its reference
inline ActiveTetraTriangle3D* getTriangle (const unsigned int n) const
returns mesh triangle given its reference
inline ActiveTetraTetrahedron3D* getTetrahedron (const unsigned int n) const
returns mesh tetrahedron given its reference
inline ActiveTetraZone3D* getZone (const unsigned int n) const
returns mesh zone given its reference
inline ActiveTetraSurfaceZone3D* getSurfaceZone (const unsigned int n) const
returns mesh surface zone given its reference
ActiveTetraVertex3D* getSelectedVertex (void) const
returns mesh selected vertex
ActiveTetraEdge3D* getSelectedEdge (void) const
returns mesh selected edge
ActiveTetraTriangle3D* getSelectedTriangle (void) const
returns mesh selected triangle
ActiveTetraTetrahedron3D* getSelectedTetrahedron (void) const
returns mesh selected tetrahedron
ActiveTetraZone3D* getSelectedZone (void) const
returns mesh selected zone
ActiveTetraSurfaceZone3D* getSelectedSurfaceZone (void) const
returns mesh selected surfacezone
inline ActiveTetraVertex3DIterator firstVertex (void) const
returns an iterator on vertices, initialized on first vertex
inline ActiveTetraVertex3DIterator lastVertex (void) const
returns an iterator on vertices, initialized on first vertex
inline ActiveTetraEdge3DIterator firstEdge (void)
returns an iterator on edges, initialized on first edge
inline ActiveTetraEdge3DIterator lastEdge (void)
returns an iterator on edges, initialized on first edge
inline ActiveTetraTriangle3DIterator firstTriangle (void)
returns an iterator on triangles, initialized on first triangle
inline ActiveTetraTriangle3DIterator lastTriangle (void)
returns an iterator on triangles, initialized on first triangle
inline ActiveTetraTetrahedron3DIterator firstTetrahedron (void) const
returns an iterator on tetrahedra, initialized on first tetrahedron
inline ActiveTetraTetrahedron3DIterator lastTetrahedron (void) const
returns an iterator on tetrahedra, initialized on first tetrahedron
inline ActiveTetraZone3DIterator firstZone (void) const
returns an iterator on zones, initialized on first zone
inline ActiveTetraZone3DIterator lastZone (void) const
returns an iterator on zones, initialized on first zone
inline ActiveTetraSurfaceZone3DIterator firstSurfaceZone (void) const
returns an iterator on zones, initialized on first zone
inline ActiveTetraSurfaceZone3DIterator lastSurfaceZone (void) const
returns an iterator on zones, initialized on last zone
void setRestPosition ()
set the current Tetrahedrisation geometry as the geometry at rest position
void resetElasticTensors ()
reset all elastic tensor in order to recompute them
inline double getTimeStep () const
return the time step for the integration of the internal force
virtual TetraTetrahedron3D* newTetrahedron (TetraVertex3D* v0, TetraVertex3D* v1, TetraVertex3D* v2, TetraVertex3D* v3, bool orientation=true)
creat new 3D tetrahedron
virtual TetraTriangle3D* newTriangle (TetraVertex3D *v0, TetraVertex3D *v1, TetraVertex3D *v2)
create new 3D triangle
virtual TetraEdge3D* newEdge (TetraVertex3D *v0, TetraVertex3D *v1=0)
create new 3D edge
virtual TetraVertex3D* newVertex (Vec3 p=Vec3(), bool empty=false)
create new 3D vertex
TclActiveTetra3D* getInterface (void) const
returns 3D tetrahedrisation interface

Public

typedef enum
tells what are the units for the position of all vertices
typedef enum
different time integration methods
constructors
ActiveTetra3D (const TclString& name, Scene3D *scene)
build active tetrahedrisation from file
ActiveTetra3D (Scene3D *scene=NULL)
create an empty Triangulation constructor that is called by inherited class
destructor
virtual ~ActiveTetra3D ()
delete object from scene

Protected Fields

double unitScale
constants that is used to convert physical parameters into SI units
double asynchCoeff
coeff used for asynchronous
std::vector priorityStat
priorityStat
std::vector <ActiveTetraVertex3D*> priorityQueue
priority queue
double timeStep
time step for integration of the partial differential equation (in s)
bool initializedElasticForce
whether the edge and vertex tensor has been initialized
InternalForceTetra3D* mainInternalForce
internal force used for all vertices internal force computation
unsigned int numberCGIterations
maximum number of iterations to perform in the conjugated gradient algorithm
MTLSymSparse* stiffnessMatrix
symmetric stiffness matrix (in kg/s^2)
MTLSparse* stiffnessMatrix2
non symmetric stiffness matrix (in kg/s^2)
itl::cholesky * preconditioner
cholesky preconditioner
MTLVec* forceVector
vector used to store all external forces applied on vertices
MTLVec* resultVector
vector used to store the solution of the linear equation used by implicit scheme resolution
std::map <ActiveTetraVertex3D*, unsigned int> renum
store renumbering for stiffness matrix
std::map <ActiveTetraVertex3D*,Vec3 > displacementList
store list of vertices which displacement is imposed
RangeInformation* rangeInformation
the range information used for all vertices
double massDensity
mass density (in kg/m^3)
INTEGRATION_METHOD integrationMethod
chosen integration Method
POSITION_UNIT positionUnit
chosen unit to store vertex position
bool meshChanged
whether to recompute some data (mass, stiffness, time step)
SET_TETRAHEDRISATION_1D_TEXTURE_COORDINATES texture1DFunction
texture 1D function
bool displayClosestPoint
whether the closest point of each vertex should be displayed
bool displayNormals
whether to display surface normal at vertices
bool displayForces
whether to display surface forces at vertices
static Color normalsColor
normal display color
static float normalsWidth
normal display width
static double normalsScale
normals arrows display scale
static Color forcesColor [6]
each force display color
static float forcesWidth
each force display width
static double forcesScale
force display scale
bool displayGrabArrow
whether mouse grab arrow should be displayed on next redraw
Vec3 grabOrg
mouse grab arrow origin
Vec3 grabArrow
mouse grab arrow
static Color grabArrowColor
grab arrow display color
unsigned short int grabRange
mouse grab extension
Timer globalTimer
Some data to compute simulation frequencies

Protected Methods

void readMainModuleActive3D (GFInput &input)
general format read function for main module
void readPositionConstraintModule (GFInput &input)
general format read function for position constraint module
void readMobilityModule (GFInput &input)
general format read function for mobility module
void skipPositionConstraintModule (GFInput &input)
general format skip function for position constraint module
void skipMobilityModule (GFInput &input)
general format skip function for mobility module
void writePositionConstraintModule (GFOutput &output)
general format write function for position constraint module
void writeMobilityModule (GFOutput &output)
general format write function for mobility module
void readForceConstraintModule (GFInput &input)
general format read function for force constraint module
void skipForceConstraintModule (GFInput &input)
general format skip function for force constraint module
void writeForceConstraintModule (GFOutput &output)
general format write function for force constraint module
void readRestPositionModule (GFInput &input)
general format read function for rest position module
void skipRestPositionModule (GFInput &input)
general format skip function for rest position module
void writeRestPositionModule (GFOutput &output)
general format write function for rest position module
void readPreviousPositionModule (GFInput &input)
general format read function for rest position module
void skipPreviousPositionModule (GFInput &input)
general format skip function for rest position module
void writePreviousPositionModule (GFOutput &output)
general format write function for rest position module
virtual void readPositionConstraint (TclString name, GFInput &input)
read function for position constraint module
virtual void skipPositionConstraint (TclString name, GFInput &input)
skip function for position constraint module
virtual void writePositionConstraint (Constraint *c, GFOutput &output)
write function for position constraint module
virtual void readForceConstraint (TclString name, GFInput &input)
read function for force constraint module
virtual void skipForceConstraint (TclString name, GFInput &input)
skip function for force constraint module
virtual void writeForceConstraint (Constraint *c, GFOutput &output)
write function for force constraint module
void init ()
constructors common code
void initGeneralFormat ()
constructors common code for the I/O routines
void initInternalForce ()
constructors common code for creating internal force InternalTriangulationForce3D objects
double getInternalEnergy ()
returns the internal energy
void initDisplay ()
constructors common code for initialising display variables

Inherited from Tetra3D:

Public Classes

class FileNotFound: public Exception
class NotAManifold: public Exception

Public Fields

TetraTriangleMap triangleList
TclString filename

Public Methods

void createTetrahedrisation( unsigned int nbVertices, Vec3 *positionTable, unsigned int nbTetrahedra, unsigned int **vertexTetrahedronTable, unsigned int nbTriangles=0, unsigned int **vertexTriangleTable=NULL, unsigned int nbEdges=0, unsigned int **vertexEdgeTable=NULL)
void readMainModule(GFInput &input)
void readFile(const TclString name)
void computeCenter()
virtual void renumber()
void topologyCheck()
bool topologyCheck2()
void saveAsGHS3D(char *name)
void saveAsTr(char *name)
void saveAsPrecomputedTr(char *name)
void readMainModule3D(GFInput &input)
void skipMainModule(GFInput &input)
void writeMainModule(GFOutput &output)
void readTextureModule(GFInput &input)
void skipTextureModule(GFInput &input)
void writeTextureModule(GFOutput &output)
virtual void translate(const Vec3& tr)
virtual void rotate(const Rotation3D& rotation)
virtual void scale(const double scale)
virtual double computeClosestDistance(DataTypes::MouseClick& mc) const
void unselect(void)
void select(TetraVertex3D *v)
void select(TetraEdge3D *e)
void select(TetraTriangle3D *t)
void select(TetraTetrahedron3D *t)
void select(TetraZone3D *z)
void select(TetraSurfaceZone3D *z)
void selectVertex(int ref)
void selectEdge(int ref)
void selectTriangle(int ref)
void selectTetrahedron(int ref)
void selectZone(int ref)
void selectSurfaceZone(int ref)
void unselectVertex()
void unselectEdge()
void unselectTriangle()
void setSurfaceChanged()
virtual void updateCenter(Vec3& center, unsigned int& n)
virtual double updateRadius(const Vec3& center)
inline TetraSurfaceZone3D* getCuttingSurfaceZone(void) const
void setCuttingSurfaceZone( TetraSurfaceZone3D * sz)
inline std::set <TetraVertex3D*> ::iterator firstVirtualVertex(void)
inline std::set <TetraVertex3D*> ::iterator lastVirtualVertex(void)
void flipNormals(void)
bool areNormalsFlipped() const
virtual void surfaceHasChanged()
std::list intersectWithPlane(const Vec3& normal, const Vec3& origin, const Vec3& vx, const Vec3& vy)
virtual TclString getSurfaceSliceableName() const
void computeVerticesAverageEdgeSize()

Public

exceptions

Protected Classes

enum SELECTION_MODE
SELECT_ZONE
select model zone
SELECT_SURFACE_ZONE
select model surface zone
SELECT_EDGE
select tetrahedrisation edge
SELECT_VERTEX
select tetrahedrisation vertex
SELECT_TRIANGLE
select tetrahedrisation triangle
EDIT_ZONE
edit the selected zone
EDIT_SURFACE_ZONE
edit the selected surface zone
GRAB
grab closest vertices
REMOVE_TETRAHEDRON
remove closest tetrahedron

Protected Fields

std::set <TetraVertex3D *> virtualVertexList
ObjectsList <TetraTetrahedron3D> tetrahedronList
TetraEdgeMap edgeList
ObjectsList <TetraVertex3D> vertexList
ObjectsList <TetraZone3D> zoneList
ObjectsList <TetraSurfaceZone3D> surfaceZoneList
TetraSurfaceZone3D* cuttingSurfaceZone
TclString tetrahedrisationname
Vec3 center
Vec3 referenceCenter
double radius
bool surfaceChanged
static double normalScale
bool flipNormal
SELECTION_MODE selectionMode
Material selectedMaterial
GLuint triangleDisplayList
GLuint edgeDisplayList
GLuint volumeEdgeDisplayList
GLuint vertexDisplayList
GLUquadricObj* Sphere
TetraVertex3D* selectedVertex
TetraTriangle3D* selectedTriangle
TetraEdge3D* selectedEdge
TetraTetrahedron3D* selectedTetrahedron
TetraZone3D* selectedZone
TetraSurfaceZone3D* selectedSurfaceZone

Protected Methods

void buildTriangleDisplayList()
void buildEdgeDisplayList()
void buildVolumeEdgeDisplayList()
void buildVertexDisplayList()
void volumeWireframeRedraw(Camera3D *cam)
void findSurfaceTriangleList(std::mapTetraTriangle3D *> *list, TetraTriangle3D *t)
void addVertex(TetraVertex3D *v)
void addEdge(TetraEdge3D *e)
void addTriangle(TetraTriangle3D *t)
void addTetrahedron(TetraTetrahedron3D *t)
void addZone(TetraZone3D *z)
void addSurfaceZone(TetraSurfaceZone3D *z)

Documentation

Class of a 3D active Tetrahedrisation
typedef enum
tells what are the units for the position of all vertices

NO_UNIT
no mass and units used

METER_UNIT
all vertex position are in meters

MILLIMETER_UNIT POSITION_UNIT
all vertex position are in millimeters

typedef enum
different time integration methods

EXPLICIT
using an explicit (Euler method)

IMPLICIT
using an implicit integration method

HOUBOLT
Houbolt Method (implicit)

ASYNCHRONOUS INTEGRATION_METHOD
use asynchronous update of vertices

double unitScale
constants that is used to convert physical parameters into SI units

double asynchCoeff
coeff used for asynchronous

std::vector priorityStat
priorityStat

std::vector <ActiveTetraVertex3D*> priorityQueue
priority queue

double timeStep
time step for integration of the partial differential equation (in s)

bool initializedElasticForce
whether the edge and vertex tensor has been initialized

InternalForceTetra3D* mainInternalForce
internal force used for all vertices internal force computation

unsigned int numberCGIterations
maximum number of iterations to perform in the conjugated gradient algorithm

MTLSymSparse* stiffnessMatrix
symmetric stiffness matrix (in kg/s^2)

MTLSparse* stiffnessMatrix2
non symmetric stiffness matrix (in kg/s^2)

itl::cholesky * preconditioner
cholesky preconditioner

MTLVec* forceVector
vector used to store all external forces applied on vertices

MTLVec* resultVector
vector used to store the solution of the linear equation used by implicit scheme resolution

std::map <ActiveTetraVertex3D*, unsigned int> renum
store renumbering for stiffness matrix

std::map <ActiveTetraVertex3D*,Vec3 > displacementList
store list of vertices which displacement is imposed

RangeInformation* rangeInformation
the range information used for all vertices

double massDensity
mass density (in kg/m^3)

INTEGRATION_METHOD integrationMethod
chosen integration Method

POSITION_UNIT positionUnit
chosen unit to store vertex position

bool meshChanged
whether to recompute some data (mass, stiffness, time step)

SET_TETRAHEDRISATION_1D_TEXTURE_COORDINATES texture1DFunction
texture 1D function

bool displayClosestPoint
whether the closest point of each vertex should be displayed

bool displayNormals
whether to display surface normal at vertices

bool displayForces
whether to display surface forces at vertices

static Color normalsColor
normal display color

static float normalsWidth
normal display width

static double normalsScale
normals arrows display scale

static Color forcesColor[6]
each force display color

static float forcesWidth
each force display width

static double forcesScale
force display scale

bool displayGrabArrow
whether mouse grab arrow should be displayed on next redraw

Vec3 grabOrg
mouse grab arrow origin

Vec3 grabArrow
mouse grab arrow

static Color grabArrowColor
grab arrow display color

unsigned short int grabRange
mouse grab extension

void readMainModuleActive3D(GFInput &input)
general format read function for main module

void readPositionConstraintModule(GFInput &input)
general format read function for position constraint module

void readMobilityModule(GFInput &input)
general format read function for mobility module

void skipPositionConstraintModule(GFInput &input)
general format skip function for position constraint module

void skipMobilityModule(GFInput &input)
general format skip function for mobility module

void writePositionConstraintModule(GFOutput &output)
general format write function for position constraint module

void writeMobilityModule(GFOutput &output)
general format write function for mobility module

void readForceConstraintModule(GFInput &input)
general format read function for force constraint module

void skipForceConstraintModule(GFInput &input)
general format skip function for force constraint module

void writeForceConstraintModule(GFOutput &output)
general format write function for force constraint module

void readRestPositionModule(GFInput &input)
general format read function for rest position module

void skipRestPositionModule(GFInput &input)
general format skip function for rest position module

void writeRestPositionModule(GFOutput &output)
general format write function for rest position module

void readPreviousPositionModule(GFInput &input)
general format read function for rest position module

void skipPreviousPositionModule(GFInput &input)
general format skip function for rest position module

void writePreviousPositionModule(GFOutput &output)
general format write function for rest position module

virtual void readPositionConstraint(TclString name, GFInput &input)
read function for position constraint module

virtual void skipPositionConstraint(TclString name, GFInput &input)
skip function for position constraint module

virtual void writePositionConstraint(Constraint *c, GFOutput &output)
write function for position constraint module

virtual void readForceConstraint(TclString name, GFInput &input)
read function for force constraint module

virtual void skipForceConstraint(TclString name, GFInput &input)
skip function for force constraint module

virtual void writeForceConstraint(Constraint *c, GFOutput &output)
write function for force constraint module

void init()
constructors common code

void initGeneralFormat()
constructors common code for the I/O routines

void initInternalForce()
constructors common code for creating internal force InternalTriangulationForce3D objects

double getInternalEnergy()
returns the internal energy

void initDisplay()
constructors common code for initialising display variables

Timer globalTimer
Some data to compute simulation frequencies

constructors

ActiveTetra3D(const TclString& name, Scene3D *scene)
build active tetrahedrisation from file
Parameters:
name - tetrahedrisation file name
scene - scene to build object in

ActiveTetra3D(Scene3D *scene=NULL)
create an empty Triangulation constructor that is called by inherited class

destructor

virtual ~ActiveTetra3D()
delete object from scene

inline InternalForceTetra3D* getInternalForceType() const
returns the internal force type applying on the whole tetrahedrisation

INTEGRATION_METHOD getIntegrationMethod(void) const
return the integration method

void setIntegrationMethod(const INTEGRATION_METHOD im)
set the integration method

POSITION_UNIT getUnit(void) const
return the integration method

void setUnit(const POSITION_UNIT un)
set the unit used to store vertex position

void setTimeStep(const double ts)
set the time step

double getUnitScale() const
returns the scale factor used to compute physical parameters in SI

void allocRigidityMatrix(unsigned int nb, bool symmetric=true)
allocate the rigidity of size n*n as well as the force and result vector
Parameters:
nb - the size of each vector

MTLSymSparse* getRigidityMatrix()
returns the current symmetric rigidity Matrix

MTLSparse* getNonSymmetricRigidityMatrix()
returns the current rigidity Matrix

MTLVec* getForceVector()
returns the current force vector

MTLVec* getResultVector()
returns the current result vector

unsigned int getNumberCGIterations() const
return the maximum number of iterations to perform in the conjugated gradient algorithm

void setNumberCGIterations(const unsigned int _nbCGIter)
set the maximum number of iterations to perform in the conjugated gradient algorithm

virtual void selectObject(const Vec2 pixel, Camera3D *cam)
The callback function called when a mouse is clicked to select the closest edge, zone, vertex or triangle. In this case, call the inherited and treat the case of grabbing
Parameters:
pixel - mouse click point
cam - click point camera

virtual void redraw(Camera3D *)
redraw active triangulation 3D

void grab(const Vec2& pixel, Camera3D *cam)
grab vertices from a mouse click in a 3D camera
Parameters:
pixel - mouse click point
cam - click point camera

virtual Vec3 * grab2D(const Vec3& dir, const Vec3& pos)
grab vertices from a mouse click in a 2D camera
Returns:
closest model vertex to pos in camera plane (may be 0)
Parameters:
pos - click point position in 3D space
cam - camera the mouse click occured in

unsigned short int getGrabRange(void) const
returns model grab range

static void drawVector(const Vec3& from, const Vec3& arrow, const Color& color, double width)
draw an arrow
Parameters:
from - vector origin
arraow - vector coordinates
color - arrow color
width - vector line width

virtual TetraZone3D* newZone(char *zoneName)
create a new zone with a given name

virtual TetraSurfaceZone3D* newSurfaceZone(char *zoneName)
create a new zone with a given name

void computeEdgesLengthAndDirection(void)
pre-computation fuction for spring internal forces

void computeEdgesSquareLengthVariation(void)
pre-computation function for non-linear elastic forces

void updateTimeStep(void)
Automatic computation of the time step

void computeInternalForces(void)
computes all vertices internal forces

void computeExternalForces(void)
compute external forces

void updatePosition(void)
updates all vertices position

void computeStiffnessMatrix(void)
assembly stiffness matrix

void computeMassOnVertices()
compute the mass associated to each vertex

void computeRenumbering(void)
compute renumbering of vertices which displacement is not imposed

void computeInducedForce(MTLVec &F)
compute force induced by the displacement of some vertices

void solveSystem(MTLVec &F, MTLSymSparse *, MTLVec &, int, double)
solve the system F=K*U and return U, displacement of vertices which displacement is not imposed

void updatePosition(MTLVec &U)
update position of vertices knowing their rest position and their displacement

void computeDisplacement(int, double)
compute displacement of all vertices given some displacements and external forces

ActiveTetraTetrahedron3D* getBarycentricCoordinates(Vec3 &, Vec3 &)
return tetrahedron in which the given point is @first param : coordinates of the given point in the image @second param : barycentric coordinates of the given point

void setMassDensity(const double r)
set mass density

inline double getMassDensity(void)
get mass density

void iterate(const unsigned int n)
model deformation callback
Parameters:
n - number of deformation stages to achieve

void asynchronousIterate(const unsigned int n)
asynchronous deformation callback
Parameters:
n - number of deformation stages to achieve

void setInternalForce(InternalForceTetra3D *ft)
set a given internal force as the main internal force applying on all vertices : updates the internalForceType field of all vertices and eventually call the ft->setGlobalFunction()
Parameters:
ft - the internal force

void setInternalForce(char *forceName)
find the internal force corresponding to its name. If no internal force can be found then used the first internal force un the global list of forces. Then set that internal force as the main internal force applying on all vertices : updates the internalForceType field of all vertices and eventually call the ft->setGlobalFunction()
Parameters:
forceName - the internal force name

void apply(void (ActiveTetraVertex3D::*ptr)(void))
apply member function on each mesh vertex
Parameters:
ptr - vertex member function without any arguments

void apply(void (ActiveTetraVertex3D::*ptr)(void) const)
apply member function on each mesh vertex
Parameters:
ptr - vertex member function without any arguments

void apply(void (ActiveTetraVertex3D::*ptr)(int), int val)
apply member function on each mesh vertex
Parameters:
ptr - vertex member function with a single integer argument
val - integer value to transmit as argument

void apply(void (ActiveTetraVertex3D::*ptr)(double), double)
apply member function on each mesh vertex
Parameters:
ptr - vertex member function with a single double argument
val - integer value to transmit as argument

void apply(void (ActiveTetraVertex3D::*ptr)(unsigned int), unsigned int val)
apply member function on each mesh vertex
Parameters:
ptr - vertex member function with a single unsigned integer argument
val - unsigned integer value to transmit as argument

void apply(void (ActiveTetraVertex3D::*ptr)(float), float val)
apply member function on each mesh vertex
Parameters:
ptr - vertex member function with a single float argument
val - float value to transmit as argument

void applyDouble(void (ActiveTetraVertex3D::*ptr)(const double), const double val)
apply member function on each mesh vertex
Parameters:
ptr - vertex member function with a single double argument
val - double value to transmit as argument

void apply(void (ActiveTetraVertex3D::*ptr)(void *), void *val)
apply member function on each mesh vertex
Parameters:
ptr - vertex member function with a single double argument
val - pointer to transmit as argument

void apply(void (ActiveTetraEdge3D::*ptr)(void))
apply member function on each mesh edge
Parameters:
ptr - edge member function without any arguments

void apply(void (ActiveTetraEdge3D::*ptr)(void) const)
apply member function on each mesh edge
Parameters:
ptr - edge member function without any arguments

void apply(void (ActiveTetraTriangle3D::*ptr)(void))
apply member function on each mesh triangle
Parameters:
ptr - face member function without any arguments

void apply(void (ActiveTetraTriangle3D::*ptr)(void) const)
apply member function on each mesh triangle
Parameters:
ptr - face member function without any arguments

void apply(void (ActiveTetraTriangle3D::*ptr)(bool), bool)
apply member function on each mesh triangle
Parameters:
ptr - face member function without any arguments

void apply(void (ActiveTetraTetrahedron3D::*ptr)(void))
apply member function on each mesh tetrahedron
Parameters:
ptr - face member function without any arguments

void apply(void (ActiveTetraTetrahedron3D::*ptr)(void) const)
apply member function on each mesh tetrahedron
Parameters:
ptr - face member function without any arguments

void apply(void (ActiveTetraTetrahedron3D::*ptr)(bool), bool)
apply member function on each mesh tetrahedron
Parameters:
ptr - face member function without any arguments

void applyDouble(void (ActiveTetraTetrahedron3D::*ptr)(const double), const double)
apply member function on each mesh tetrahedron
Parameters:
ptr - face member function without any arguments

void applyVect(void (ActiveTetraTetrahedron3D::*ptr)(const Vec3), const Vec3)
apply member function on each mesh tetrahedron
Parameters:
ptr - face member function without any arguments

inline ActiveTetraVertex3D* getVertex(const unsigned int n) const
returns mesh vertex given its reference

inline ActiveTetraEdge3D* getEdge(const unsigned int n) const
returns mesh edge given its reference

inline ActiveTetraTriangle3D* getTriangle(const unsigned int n) const
returns mesh triangle given its reference

inline ActiveTetraTetrahedron3D* getTetrahedron(const unsigned int n) const
returns mesh tetrahedron given its reference

inline ActiveTetraZone3D* getZone(const unsigned int n) const
returns mesh zone given its reference

inline ActiveTetraSurfaceZone3D* getSurfaceZone(const unsigned int n) const
returns mesh surface zone given its reference

ActiveTetraVertex3D* getSelectedVertex(void) const
returns mesh selected vertex

ActiveTetraEdge3D* getSelectedEdge(void) const
returns mesh selected edge

ActiveTetraTriangle3D* getSelectedTriangle(void) const
returns mesh selected triangle

ActiveTetraTetrahedron3D* getSelectedTetrahedron(void) const
returns mesh selected tetrahedron

ActiveTetraZone3D* getSelectedZone(void) const
returns mesh selected zone

ActiveTetraSurfaceZone3D* getSelectedSurfaceZone(void) const
returns mesh selected surfacezone

inline ActiveTetraVertex3DIterator firstVertex(void) const
returns an iterator on vertices, initialized on first vertex

inline ActiveTetraVertex3DIterator lastVertex(void) const
returns an iterator on vertices, initialized on first vertex

inline ActiveTetraEdge3DIterator firstEdge(void)
returns an iterator on edges, initialized on first edge

inline ActiveTetraEdge3DIterator lastEdge(void)
returns an iterator on edges, initialized on first edge

inline ActiveTetraTriangle3DIterator firstTriangle(void)
returns an iterator on triangles, initialized on first triangle

inline ActiveTetraTriangle3DIterator lastTriangle(void)
returns an iterator on triangles, initialized on first triangle

inline ActiveTetraTetrahedron3DIterator firstTetrahedron(void) const
returns an iterator on tetrahedra, initialized on first tetrahedron

inline ActiveTetraTetrahedron3DIterator lastTetrahedron(void) const
returns an iterator on tetrahedra, initialized on first tetrahedron

inline ActiveTetraZone3DIterator firstZone(void) const
returns an iterator on zones, initialized on first zone

inline ActiveTetraZone3DIterator lastZone(void) const
returns an iterator on zones, initialized on first zone

inline ActiveTetraSurfaceZone3DIterator firstSurfaceZone(void) const
returns an iterator on zones, initialized on first zone

inline ActiveTetraSurfaceZone3DIterator lastSurfaceZone(void) const
returns an iterator on zones, initialized on last zone

void setRestPosition()
set the current Tetrahedrisation geometry as the geometry at rest position

void resetElasticTensors()
reset all elastic tensor in order to recompute them

inline double getTimeStep() const
return the time step for the integration of the internal force

virtual TetraTetrahedron3D* newTetrahedron(TetraVertex3D* v0, TetraVertex3D* v1, TetraVertex3D* v2, TetraVertex3D* v3, bool orientation=true)
creat new 3D tetrahedron
Parameters:
mesh - tetrahedrisation containing the tetrahedron

virtual TetraTriangle3D* newTriangle(TetraVertex3D *v0, TetraVertex3D *v1, TetraVertex3D *v2)
create new 3D triangle
Parameters:
mesh - tetrahedrisation containing the triangle

virtual TetraEdge3D* newEdge(TetraVertex3D *v0, TetraVertex3D *v1=0)
create new 3D edge
Parameters:
mesh - tetrahedrisation containing the edge

virtual TetraVertex3D* newVertex(Vec3 p=Vec3(), bool empty=false)
create new 3D vertex
Parameters:
mesh - tetrahedrisation containing the vertex

TclActiveTetra3D* getInterface(void) const
returns 3D tetrahedrisation interface


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de