Solver

class tissue_forge.models.vertex.solver.MeshSolverTimers

Mesh solver performance timers

reset() HRESULT

Reset the timers

str() std::string

Get a string representation of the current timer average values

class tissue_forge.models.vertex.solver.MeshSolver

Vertex model mesh solver

A singleton solver performs all vertex model dynamics simulation at runtime.

property timers

Performance timers

static init() HRESULT

Initialize the solver

static get() TissueForge::models::vertex::MeshSolver *

Get the solver singleton

static compact() HRESULT

Reduce internal buffers and storage

static engine_lock() HRESULT

Locks the engine for thread-safe engine operations

static engine_unlock() HRESULT

Unlocks the engine for thread-safe engine operations

static is_dirty() bool

Test whether the current mesh state needs updated

static set_dirty(_isDirty: bool const &) HRESULT

Set whether the current mesh state needs updated

static get_mesh() TissueForge::models::vertex::Mesh *

Get the mesh

static register_type(*args) HRESULT

Overload 1:

Register a body type

Parameters:

_type (BodyType) – type


Overload 2:

Register a surface type

Parameters:

_type (SurfaceType) – type

static find_surface_from_name(_name: std::string const &) TissueForge::models::vertex::SurfaceType *

Find a registered surface type by name

Parameters:

_name (string) – type name

static find_body_from_name(_name: std::string const &) TissueForge::models::vertex::BodyType *

Find a registered body type by name

Parameters:

_name (string) – type name

static get_body_type(typeId: unsigned int const &) TissueForge::models::vertex::BodyType *

Get a body type by id

Parameters:

typeId (int) – type id

static get_surface_type(typeId: unsigned int const &) TissueForge::models::vertex::SurfaceType *

Get a surface type by id

Parameters:

typeId (int) – type id

static num_body_types() int const

Get the number of registered body types

static num_surface_types() int const

Get the number of registered surface types

static num_vertices() unsigned int

Get the number of vertices

static num_surfaces() unsigned int

Get the number of surfaces

static num_bodies() unsigned int

Get the number of bodies

static size_vertices() unsigned int

Get the size of the list of vertices

static size_surfaces() unsigned int

Get the size of the list of surfaces

static size_bodies() unsigned int

Get the size of the list of bodies

static position_changed() HRESULT

Update internal data due to a change in position

static update(_force: bool const & = False) HRESULT

Update the solver if dirty

Parameters:

_force (boolean) – flag to force an update and ignore whether the solver is dirty

static get_log() std::vector< TissueForge::models::vertex::MeshLogEvent,std::allocator< TissueForge::models::vertex::MeshLogEvent > >

Get the current logger events

static log(*args, **kwargs) HRESULT

Log an event

Parameters:
  • type (int) – type of event

  • objIDs (std::vector< int,std::allocator< int > >) – object ids

  • objTypes (std::vector< TissueForge::models::vertex::MeshObjTypeLabel,std::allocator< TissueForge::models::vertex::MeshObjTypeLabel > >) – object type ids

  • name (string) – name of event

static is_3d() bool

Test whether the mesh is 3D.

A 3D mesh has at least one body.

Return type:

boolean

Returns:

true if the mesh is 3D