SOFA API  1df67014
Open source framework for multi-physics simuation
sofa::helper::io::SphereLoaderDataHook Class Reference

#include <SphereLoader.h>

Inherit this class to load data from sphere description. More...

Inheritance diagram for sofa::helper::io::SphereLoaderDataHook:

Detailed Description

Inherit this class to load data from sphere description.

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 SphereLoader events.

See also
SphereLoader for an example of use.

Public Member Functions

virtual ~SphereLoaderDataHook ()
 
virtual void finalizeLoading (const bool isOk)
 Called by the XspLoader when the loading is done. More...
 
virtual void setNumSpheres (const int n)
 Called by the XspLoader to specify before loading the number of spheres. More...
 
virtual void addSphere (const SReal, const SReal, const SReal, const SReal)
 Called by the Loader to specify the number of Spheres before actual loading. More...
 

Constructor details

◆ ~SphereLoaderDataHook()

virtual sofa::helper::io::SphereLoaderDataHook::~SphereLoaderDataHook ( )
inlinevirtual

Function details

◆ addSphere()

virtual void sofa::helper::io::SphereLoaderDataHook::addSphere ( const  SReal,
const  SReal,
const  SReal,
const  SReal 
)
inlinevirtual

Called by the Loader to specify the number of Spheres before actual loading.

Parameters
px,py,pz3D position of the center.
rthe radius of the sphere.

Reimplemented in sofa::component::mapping::nonlinear::RigidMapping< TIn, TOut >::Loader.

◆ finalizeLoading()

virtual void sofa::helper::io::SphereLoaderDataHook::finalizeLoading ( const bool  isOk)
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.

Parameters
isOkis set to false this means that the loading code detected a problem and that the loaded informations are invalid and should be removed from the container.

◆ setNumSpheres()

virtual void sofa::helper::io::SphereLoaderDataHook::setNumSpheres ( const int  n)
inlinevirtual

Called by the XspLoader to specify before loading the number of spheres.

Parameters
nnumber of sphere.