#include <XspLoader.h>
Inherit this class to load data from a Xsp file. More...
Inherit this class to load data from a Xsp file.
To connect client-code data structure with the XspLoader you need to Inherit from this class and override the virtual methods to you fill your structures from the XspLoader events.
Each overridable method is connected to the reading of a given "token" in the Xsp file format.
Public Member Functions | |
virtual | ~XspLoaderDataHook () |
Destructor, does nothing special. More... | |
virtual void | finalizeLoading (bool isOk) |
Called by the XspLoader when the loading is done. More... | |
virtual void | setNumMasses (size_t) |
Called by the XspLoader to specify before loading the number of masses. More... | |
virtual void | setNumSprings (size_t) |
Called by the XspLoader to specify before loading the number of springs. More... | |
virtual void | setGravity (SReal, SReal, SReal) |
Called by the XspLoader to specify the directional gravity. More... | |
virtual void | setViscosity (SReal) |
Called by the XspLoader to specify the viscosity. More... | |
virtual void | addMass (SReal, SReal, SReal, SReal, SReal, SReal, SReal, SReal, bool, bool) |
Add a new mass. More... | |
virtual void | addSpring (size_t, size_t, SReal, SReal, SReal) |
Add a new spring. More... | |
virtual void | addVectorSpring (size_t m1, size_t m2, SReal ks, SReal kd, SReal initpos, SReal, SReal, SReal) |
Add an extended spring. More... | |
|
virtual |
Destructor, does nothing special.
|
inlinevirtual |
Add a new mass.
px,py,pz | 3D position. |
vx,vz,vz | 3D velocity. |
mass. | |
elastic | property. |
fixed | boolean indicates that the mass is "static". |
surface | indicates that the mass is on the surface. |
Reimplemented in sofa::component::mass::DiagonalMass< DataTypes, GeometricalTypes >::Loader, sofa::component::mapping::nonlinear::RigidMapping< TIn, TOut >::Loader, and sofa::component::io::mesh::MeshXspLoadDataHook.
|
inlinevirtual |
Add a new spring.
Reimplemented in sofa::component::solidmechanics::spring::SpringForceField< DataTypes >::Loader, and sofa::component::io::mesh::MeshXspLoadDataHook.
|
inlinevirtual |
Add an extended spring.
Reimplemented in sofa::component::io::mesh::MeshXspLoadDataHook, and sofa::component::solidmechanics::spring::VectorSpringForceField< DataTypes >::Loader.
|
inlinevirtual |
Called by the XspLoader when the loading is done.
This method is called by the XspLoader when the loading is done. Overriding this method allows client-code to implement post-loading checking.
isOk | is set to false this means that the loading code detected a problem and that the loaded information are invalid and should be removed from the container. |
Reimplemented in sofa::component::io::mesh::MeshXspLoadDataHook.
|
inlinevirtual |
Called by the XspLoader to specify the directional gravity.
gx,gy,gz | the three component of the gravity. |
|
inlinevirtual |
Called by the XspLoader to specify before loading the number of masses.
n | number of massses. |
Reimplemented in sofa::component::io::mesh::MeshXspLoadDataHook.
|
inlinevirtual |
Called by the XspLoader to specify before loading the number of springs.
n | number of springs. |
Reimplemented in sofa::component::io::mesh::MeshXspLoadDataHook.