Tissue Forge C 0.2.1
Interactive, particle-based physics, chemistry and biology modeling and simulation environment
Loading...
Searching...
No Matches
tfCSurface.h File Reference
#include <tf_port_c.h>
#include <tfC_io.h>
#include <tfCStyle.h>
Include dependency graph for tfCSurface.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  tfVertexSolverSurfaceTypeStyleSpec
 Surface type style definition in Tissue Forge C. More...
 
struct  tfVertexSolverSurfaceTypeSpec
 Surface type definition in Tissue Forge C. More...
 
struct  tfVertexSolverSurfaceHandleHandle
 Handle to a models::vertex::SurfaceHandle instance. More...
 
struct  tfVertexSolverSurfaceTypeHandle
 Handle to a models::vertex::SurfaceType instance. More...
 

Functions

struct tfVertexSolverSurfaceTypeSpec tfVertexSolverSurfaceTypeSpec_init ()
 Get a default definition.
 
struct tfVertexSolverSurfaceTypeStyleSpec tfVertexSolverSurfaceTypeStyleSpec_init ()
 Get a default definition.
 
HRESULT tfVertexSolverSurfaceHandle_init (struct tfVertexSolverSurfaceHandleHandle *handle, int id)
 Initialize an instance.
 
HRESULT tfVertexSolverSurfaceHandle_fromString (struct tfVertexSolverSurfaceHandleHandle *handle, const char *s)
 Create an instance from a JSON string representation.
 
HRESULT tfVertexSolverSurfaceHandle_destroy (struct tfVertexSolverSurfaceHandleHandle *handle)
 Destroy an instance.
 
HRESULT tfVertexSolverSurfaceHandle_getId (struct tfVertexSolverSurfaceHandleHandle *handle, int *objId)
 Get the id.
 
HRESULT tfVertexSolverSurfaceHandle_definesBody (struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverBodyHandleHandle *b, bool *result)
 Test whether a surface defines a body.
 
HRESULT tfVertexSolverSurfaceHandle_definedByVertex (struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverVertexHandleHandle *v, bool *result)
 Test whether a surface is defined by a vertex.
 
HRESULT tfVertexSolverSurfaceHandle_objType (struct tfVertexSolverSurfaceHandleHandle *handle, unsigned int *label)
 Get the mesh object type.
 
HRESULT tfVertexSolverSurfaceHandle_destroySurface (struct tfVertexSolverSurfaceHandleHandle *handle)
 Destroy the surface.
 
HRESULT tfVertexSolverSurfaceHandle_destroySurfaces (struct tfVertexSolverSurfaceHandleHandle **handles, unsigned int numObjs)
 Destroy surfaces.
 
HRESULT tfVertexSolverSurfaceHandle_destroySurfaceC (struct tfVertexSolverSurfaceHandleHandle *handle)
 Destroy an instance.
 
HRESULT tfVertexSolverSurfaceHandle_validate (struct tfVertexSolverSurfaceHandleHandle *handle, bool *result)
 Validate the body.
 
HRESULT tfVertexSolverSurfaceHandle_positionChanged (struct tfVertexSolverSurfaceHandleHandle *handle)
 Update internal data due to a change in position.
 
HRESULT tfVertexSolverSurfaceHandle_str (struct tfVertexSolverSurfaceHandleHandle *handle, char **str, unsigned int *numChars)
 Get a summary string.
 
HRESULT tfVertexSolverSurfaceHandle_toString (struct tfVertexSolverSurfaceHandleHandle *handle, char **str, unsigned int *numChars)
 Get a JSON string representation.
 
HRESULT tfVertexSolverSurfaceHandle_addVertex (struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverVertexHandleHandle *v)
 Add a vertex.
 
HRESULT tfVertexSolverSurfaceHandle_insertVertexAt (struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverVertexHandleHandle *v, const int &idx)
 Insert a vertex at a location in the list of vertices.
 
HRESULT tfVertexSolverSurfaceHandle_insertVertexBefore (struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverVertexHandleHandle *v, struct tfVertexSolverVertexHandleHandle *before)
 Insert a vertex before another vertex.
 
HRESULT tfVertexSolverSurfaceHandle_insertVertexBetween (struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverVertexHandleHandle *toInsert, struct tfVertexSolverVertexHandleHandle *v1, struct tfVertexSolverVertexHandleHandle *v2)
 Insert a vertex between two vertices.
 
HRESULT tfVertexSolverSurfaceHandle_removeVertex (struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverVertexHandleHandle *v)
 Remove a vertex.
 
HRESULT tfVertexSolverSurfaceHandle_replaceVertexAt (struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverVertexHandleHandle *toInsert, const int &idx)
 Replace a vertex at a location in the list of vertices.
 
HRESULT tfVertexSolverSurfaceHandle_replaceVertexWith (struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverVertexHandleHandle *toInsert, struct tfVertexSolverVertexHandleHandle *toRemove)
 Replace a vertex with another vertex.
 
HRESULT tfVertexSolverSurfaceHandle_addBody (struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverBodyHandleHandle *b)
 Add a body.
 
HRESULT tfVertexSolverSurfaceHandle_removeBody (struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverBodyHandleHandle *b)
 Remove a body.
 
HRESULT tfVertexSolverSurfaceHandle_replaceBodyAt (struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverBodyHandleHandle *toInsert, const int &idx)
 Replace a body at a location in the list of bodies.
 
HRESULT tfVertexSolverSurfaceHandle_replaceBodyWith (struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverBodyHandleHandle *toInsert, struct tfVertexSolverBodyHandleHandle *toRemove)
 Replace a body with another body.
 
HRESULT tfVertexSolverSurfaceHandle_refreshBodies (struct tfVertexSolverSurfaceHandleHandle *handle)
 Refresh internal ordering of defined bodies.
 
HRESULT tfVertexSolverSurfaceHandle_getType (struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverSurfaceTypeHandle *stype)
 Get the surface type.
 
HRESULT tfVertexSolverSurfaceHandle_become (struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverSurfaceTypeHandle *stype)
 Become a different type.
 
HRESULT tfVertexSolverSurfaceHandle_getBodies (struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverBodyHandleHandle **objs, int *numObjs)
 Get the bodies defined by the surface.
 
HRESULT tfVertexSolverSurfaceHandle_getVertices (struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverVertexHandleHandle **objs, int *numObjs)
 Get the vertices that define the surface.
 
HRESULT tfVertexSolverSurfaceHandle_findVertex (struct tfVertexSolverSurfaceHandleHandle *handle, tfFloatP_t *dir, struct tfVertexSolverVertexHandleHandle *result)
 Find a vertex that defines this surface.
 
HRESULT tfVertexSolverSurfaceHandle_findBody (struct tfVertexSolverSurfaceHandleHandle *handle, tfFloatP_t *dir, struct tfVertexSolverBodyHandleHandle *result)
 Find a body that this surface defines.
 
HRESULT tfVertexSolverSurfaceHandle_neighborVertices (struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverVertexHandleHandle *v, struct tfVertexSolverVertexHandleHandle *v1, struct tfVertexSolverVertexHandleHandle *v2)
 Connected vertices on the same surface.
 
HRESULT tfVertexSolverSurfaceHandle_neighborSurfaces (struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverSurfaceHandleHandle **objs, int *numObjs)
 Connected surfaces on the same body.
 
HRESULT tfVertexSolverSurfaceHandle_connectedSurfacesS (struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverVertexHandleHandle **verts, unsigned int numVerts, struct tfVertexSolverSurfaceHandleHandle **objs, int *numObjs)
 Surfaces that share at least one vertex in a set of vertices.
 
HRESULT tfVertexSolverSurfaceHandle_connectedSurfaces (struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverSurfaceHandleHandle **objs, int *numObjs)
 Surfaces that share at least one vertex.
 
HRESULT tfVertexSolverSurfaceHandle_connectingVertices (struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverSurfaceHandleHandle *other, struct tfVertexSolverVertexHandleHandle **objs, int *numObjs)
 Vertices defining this and another surface.
 
HRESULT tfVertexSolverSurfaceHandle_contiguousVertexLabels (struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverSurfaceHandleHandle *other, unsigned int **labels, int *numLabels)
 Get the integer labels of the contiguous vertices that this surface shares with another surface.
 
HRESULT tfVertexSolverSurfaceHandle_sharedContiguousVertices (struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverSurfaceHandleHandle *other, unsigned int edgeLabel, struct tfVertexSolverVertexHandleHandle **objs, int *numObjs)
 Get the vertices of a contiguous shared edge with another surface.
 
HRESULT tfVertexSolverSurfaceHandle_getNormal (struct tfVertexSolverSurfaceHandleHandle *handle, tfFloatP_t **result)
 Get the surface normal.
 
HRESULT tfVertexSolverSurfaceHandle_getUnnormalizedNormal (struct tfVertexSolverSurfaceHandleHandle *handle, tfFloatP_t **result)
 Get the surface unnormalized normal.
 
HRESULT tfVertexSolverSurfaceHandle_getCentroid (struct tfVertexSolverSurfaceHandleHandle *handle, tfFloatP_t **result)
 Get the centroid.
 
HRESULT tfVertexSolverSurfaceHandle_getVelocity (struct tfVertexSolverSurfaceHandleHandle *handle, tfFloatP_t **result)
 Get the velocity, calculated as the velocity of the centroid.
 
HRESULT tfVertexSolverSurfaceHandle_getArea (struct tfVertexSolverSurfaceHandleHandle *handle, tfFloatP_t *result)
 Get the area.
 
HRESULT tfVertexSolverSurfaceHandle_getPerimeter (struct tfVertexSolverSurfaceHandleHandle *handle, tfFloatP_t *result)
 Get the perimeter.
 
HRESULT tfVertexSolverSurfaceHandle_getDensity (struct tfVertexSolverSurfaceHandleHandle *handle, tfFloatP_t *result)
 Get the mass density; only used in 2D simulation.
 
HRESULT tfVertexSolverSurfaceHandle_setDensity (struct tfVertexSolverSurfaceHandleHandle *handle, tfFloatP_t density)
 Set the mass density; only used in 2D simulation.
 
HRESULT tfVertexSolverSurfaceHandle_getMass (struct tfVertexSolverSurfaceHandleHandle *handle, tfFloatP_t *result)
 Get the mass; only used in 2D simulation.
 
HRESULT tfVertexSolverSurfaceHandle_volumeSense (struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverBodyHandleHandle *body, tfFloatP_t *result)
 Get the sign of the volume contribution to a body that this surface contributes.
 
HRESULT tfVertexSolverSurfaceHandle_getVolumeContr (struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverBodyHandleHandle *body, tfFloatP_t *result)
 Get the volume that this surface contributes to a body.
 
HRESULT tfVertexSolverSurfaceHandle_getOutwardNormal (struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverBodyHandleHandle *body, tfFloatP_t **result)
 Get the outward facing normal w.r.t. a body.
 
HRESULT tfVertexSolverSurfaceHandle_getVertexArea (struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverVertexHandleHandle *v, tfFloatP_t *result)
 Get the area that a vertex contributes to this surface.
 
HRESULT tfVertexSolverSurfaceHandle_getVertexMass (struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverVertexHandleHandle *v, tfFloatP_t *result)
 Get the mass contribution of a vertex to this surface; only used in 2D simulation.
 
HRESULT tfVertexSolverSurfaceHandle_hasStyle (struct tfVertexSolverSurfaceHandleHandle *handle, bool *result)
 Test whether the surface has a style.
 
HRESULT tfVertexSolverSurfaceHandle_getStyle (struct tfVertexSolverSurfaceHandleHandle *handle, struct tfRenderingStyleHandle *result)
 Get the surface style.
 
HRESULT tfVertexSolverSurfaceHandle_setStyle (struct tfVertexSolverSurfaceHandleHandle *handle, struct tfRenderingStyleHandle *s)
 Set the surface style.
 
HRESULT tfVertexSolverSurfaceHandle_normalDistance (struct tfVertexSolverSurfaceHandleHandle *handle, tfFloatP_t *pos, tfFloatP_t *result)
 Get the normal distance to a point; negative distance means that the point is on the inner side.
 
HRESULT tfVertexSolverSurfaceHandle_isOutside (struct tfVertexSolverSurfaceHandleHandle *handle, tfFloatP_t *pos, bool *result)
 Test whether a point is on the outer side.
 
HRESULT tfVertexSolverSurfaceHandle_contains (struct tfVertexSolverSurfaceHandleHandle *handle, tfFloatP_t *pos, bool *result, struct tfVertexSolverVertexHandleHandle *v0, struct tfVertexSolverVertexHandleHandle *v1)
 Test whether the surface contains a point.
 
HRESULT tfVertexSolverSurfaceHandle_merge (struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverSurfaceHandleHandle *toRemove, tfFloatP_t *lenCfs, unsigned int numLenCfs)
 Merge with a surface. The passed surface is destroyed.
 
HRESULT tfVertexSolverSurfaceHandle_extend (struct tfVertexSolverSurfaceHandleHandle *handle, unsigned int vertIdxStart, tfFloatP_t *pos, struct tfVertexSolverSurfaceHandleHandle *newObj)
 Create a surface from two vertices and a position.
 
HRESULT tfVertexSolverSurfaceHandle_extrude (struct tfVertexSolverSurfaceHandleHandle *handle, unsigned int vertIdxStart, tfFloatP_t normLen, struct tfVertexSolverSurfaceHandleHandle *newObj)
 Create a surface from two vertices of a surface in a mesh by extruding along the normal of the surface.
 
HRESULT tfVertexSolverSurfaceHandle_splitBy (struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverVertexHandleHandle *v1, struct tfVertexSolverVertexHandleHandle *v2, struct tfVertexSolverSurfaceHandleHandle *newObj)
 Split into two surfaces.
 
HRESULT tfVertexSolverSurfaceHandle_splitHow (struct tfVertexSolverSurfaceHandleHandle *handle, tfFloatP_t *cp_pos, tfFloatP_t *cp_norm, struct tfVertexSolverSurfaceHandleHandle *newObj)
 Split into two surfaces.
 
HRESULT tfVertexSolverSurfaceType_init (struct tfVertexSolverSurfaceTypeHandle *handle)
 Initialize a new instance.
 
HRESULT tfVertexSolverSurfaceType_initD (struct tfVertexSolverSurfaceTypeHandle *handle, struct tfVertexSolverSurfaceTypeSpec sdef)
 Initialize an instance from a definition.
 
HRESULT tfVertexSolverSurfaceType_fromString (struct tfVertexSolverSurfaceTypeHandle *handle, const char *str)
 Create from a JSON string representation.
 
HRESULT tfVertexSolverSurfaceType_objType (struct tfVertexSolverSurfaceTypeHandle *handle, unsigned int *label)
 Get the mesh object type.
 
HRESULT tfVertexSolverSurfaceType_str (struct tfVertexSolverSurfaceTypeHandle *handle, char **str, unsigned int *numChars)
 Get a summary string.
 
HRESULT tfVertexSolverSurfaceType_toString (struct tfVertexSolverSurfaceTypeHandle *handle, char **str, unsigned int *numChars)
 Get a JSON string representation.
 
HRESULT tfVertexSolverSurfaceType_registerType (struct tfVertexSolverSurfaceTypeHandle *handle)
 Registers a type with the engine.
 
HRESULT tfVertexSolverSurfaceType_isRegistered (struct tfVertexSolverSurfaceTypeHandle *handle, bool *result)
 Tests whether this type is registered.
 
HRESULT tfVertexSolverSurfaceType_getName (struct tfVertexSolverSurfaceTypeHandle *handle, char **str, unsigned int *numChars)
 Name of this surface type.
 
HRESULT tfVertexSolverSurfaceType_setName (struct tfVertexSolverSurfaceTypeHandle *handle, const char *str)
 Set the name of this surface type.
 
HRESULT tfVertexSolverSurfaceType_getStyle (struct tfVertexSolverSurfaceTypeHandle *handle, struct tfRenderingStyleHandle *style)
 Get the style of the surface type.
 
HRESULT tfVertexSolverSurfaceType_getDensity (struct tfVertexSolverSurfaceTypeHandle *handle, tfFloatP_t *result)
 Get the density of the surface type; only used in 2D simulation.
 
HRESULT tfVertexSolverSurfaceType_setDensity (struct tfVertexSolverSurfaceTypeHandle *handle, tfFloatP_t result)
 Set the density of the surface type; only used in 2D simulation.
 
HRESULT tfVertexSolverSurfaceType_getInstances (struct tfVertexSolverSurfaceTypeHandle *handle, struct tfVertexSolverSurfaceHandleHandle **objs, unsigned int *numObjs)
 Get the list of instances that belong to this type.
 
HRESULT tfVertexSolverSurfaceType_getInstanceIds (struct tfVertexSolverSurfaceTypeHandle *handle, int **ids, unsigned int *numObjs)
 Get the list of instances ids that belong to this type.
 
HRESULT tfVertexSolverSurfaceType_createSurfaceV (struct tfVertexSolverSurfaceTypeHandle *handle, struct tfVertexSolverVertexHandleHandle **vertices, unsigned int numVerts, struct tfVertexSolverSurfaceHandleHandle *newObj)
 Construct a surface of this type from a set of vertices.
 
HRESULT tfVertexSolverSurfaceType_createSurfaceP (struct tfVertexSolverSurfaceTypeHandle *handle, tfFloatP_t **positions, unsigned int numPositions, struct tfVertexSolverSurfaceHandleHandle *newObj)
 Construct a surface of this type from a set of positions.
 
HRESULT tfVertexSolverSurfaceType_createSurfaceIO (struct tfVertexSolverSurfaceTypeHandle *handle, struct tfIoThreeDFFaceDataHandle *face, struct tfVertexSolverSurfaceHandleHandle *newObj)
 Construct a surface of this type from a face.
 
HRESULT tfVertexSolverSurfaceType_createSurfaceVA (struct tfVertexSolverSurfaceTypeHandle *handle, struct tfVertexSolverVertexHandleHandle ***vertices, unsigned int numSurfaces, unsigned int *numVerts, struct tfVertexSolverSurfaceHandleHandle **newObjs)
 Construct a surface of this type from a set of vertices.
 
HRESULT tfVertexSolverSurfaceType_createSurfacePA (struct tfVertexSolverSurfaceTypeHandle *handle, tfFloatP_t ***spositions, unsigned int numSurfaces, unsigned int *numPositions, struct tfVertexSolverSurfaceHandleHandle **newObjs)
 Construct a surface of this type from a set of positions.
 
HRESULT tfVertexSolverSurfaceType_createSurfaceIOA (struct tfVertexSolverSurfaceTypeHandle *handle, struct tfIoThreeDFFaceDataHandle **faces, unsigned int numSurfaces, struct tfVertexSolverSurfaceHandleHandle **newObjs)
 Construct a surface of this type from a face.
 
HRESULT tfVertexSolverSurfaceType_nPolygon (struct tfVertexSolverSurfaceTypeHandle *handle, unsigned int n, tfFloatP_t *center, tfFloatP_t radius, tfFloatP_t *ax1, tfFloatP_t *ax2, struct tfVertexSolverSurfaceHandleHandle *newObj)
 Construct a polygon with n vertices circumscribed on a circle.
 
HRESULT tfVertexSolverSurfaceType_replace (struct tfVertexSolverSurfaceTypeHandle *handle, struct tfVertexSolverVertexHandleHandle *toReplace, tfFloatP_t *lenCfs, unsigned int numLenCfs, struct tfVertexSolverSurfaceHandleHandle *newObj)
 Replace a vertex with a surface. Vertices are created for the surface along every destroyed edge.
 
HRESULT tfVertexSolverCreateSurfaceByVertices (struct tfVertexSolverVertexHandleHandle **verts, unsigned int numVerts, struct tfVertexSolverSurfaceHandleHandle *newObj)
 Construct a surface from a set of vertices.
 
HRESULT tfVertexSolverCreateSurfaceByIOData (struct tfIoThreeDFFaceDataHandle *face, struct tfVertexSolverSurfaceHandleHandle *newObj)
 Construct a surface from a face.
 
HRESULT tfVertexSolverFindSurfaceTypeFromName (const char *name, struct tfVertexSolverSurfaceTypeHandle *result)
 Get a registered type by name.
 
HRESULT tfVertexSolverBindSurfaceTypeAdhesion (struct tfVertexSolverSurfaceTypeHandle **stypes, struct tfVertexSolverSurfaceTypeSpec *sdefs, unsigned int numTypes)
 Bind adhesion for all types with matching specification.
 

Function Documentation

◆ tfVertexSolverBindSurfaceTypeAdhesion()

HRESULT tfVertexSolverBindSurfaceTypeAdhesion ( struct tfVertexSolverSurfaceTypeHandle ** stypes,
struct tfVertexSolverSurfaceTypeSpec * sdefs,
unsigned int numTypes )

Bind adhesion for all types with matching specification.

Parameters
stypessurface types to bind
sdefssurface type definitions
numTypesnumber of types

◆ tfVertexSolverCreateSurfaceByIOData()

HRESULT tfVertexSolverCreateSurfaceByIOData ( struct tfIoThreeDFFaceDataHandle * face,
struct tfVertexSolverSurfaceHandleHandle * newObj )

Construct a surface from a face.

Parameters
faceface data
newObjnewly created object

◆ tfVertexSolverCreateSurfaceByVertices()

HRESULT tfVertexSolverCreateSurfaceByVertices ( struct tfVertexSolverVertexHandleHandle ** verts,
unsigned int numVerts,
struct tfVertexSolverSurfaceHandleHandle * newObj )

Construct a surface from a set of vertices.

Parameters
vertsset of vertices
numVertsnumber of vertices
newObjnewly created object

◆ tfVertexSolverFindSurfaceTypeFromName()

HRESULT tfVertexSolverFindSurfaceTypeFromName ( const char * name,
struct tfVertexSolverSurfaceTypeHandle * result )

Get a registered type by name.

Parameters
namename of type
resulttype

◆ tfVertexSolverSurfaceHandle_addBody()

HRESULT tfVertexSolverSurfaceHandle_addBody ( struct tfVertexSolverSurfaceHandleHandle * handle,
struct tfVertexSolverBodyHandleHandle * b )

Add a body.

Parameters
handlepopulated handle
bbody to add

◆ tfVertexSolverSurfaceHandle_addVertex()

HRESULT tfVertexSolverSurfaceHandle_addVertex ( struct tfVertexSolverSurfaceHandleHandle * handle,
struct tfVertexSolverVertexHandleHandle * v )

Add a vertex.

Parameters
handlepopulated handle
vvertex to add

◆ tfVertexSolverSurfaceHandle_become()

HRESULT tfVertexSolverSurfaceHandle_become ( struct tfVertexSolverSurfaceHandleHandle * handle,
struct tfVertexSolverSurfaceTypeHandle * stype )

Become a different type.

Parameters
handlepopulated handle
stypetype to become

◆ tfVertexSolverSurfaceHandle_connectedSurfaces()

HRESULT tfVertexSolverSurfaceHandle_connectedSurfaces ( struct tfVertexSolverSurfaceHandleHandle * handle,
struct tfVertexSolverSurfaceHandleHandle ** objs,
int * numObjs )

Surfaces that share at least one vertex.

Parameters
handlepopulated handle
objsobjects
numObjsnumber of objects

◆ tfVertexSolverSurfaceHandle_connectedSurfacesS()

HRESULT tfVertexSolverSurfaceHandle_connectedSurfacesS ( struct tfVertexSolverSurfaceHandleHandle * handle,
struct tfVertexSolverVertexHandleHandle ** verts,
unsigned int numVerts,
struct tfVertexSolverSurfaceHandleHandle ** objs,
int * numObjs )

Surfaces that share at least one vertex in a set of vertices.

Parameters
handlepopulated handle
vertsvertices
numVertsnumber of vertices
objsobjects
numObjsnumber of objects

◆ tfVertexSolverSurfaceHandle_connectingVertices()

HRESULT tfVertexSolverSurfaceHandle_connectingVertices ( struct tfVertexSolverSurfaceHandleHandle * handle,
struct tfVertexSolverSurfaceHandleHandle * other,
struct tfVertexSolverVertexHandleHandle ** objs,
int * numObjs )

Vertices defining this and another surface.

Parameters
handle
otheranother surface
objsobjects
numObjsnumber of objects

◆ tfVertexSolverSurfaceHandle_contains()

HRESULT tfVertexSolverSurfaceHandle_contains ( struct tfVertexSolverSurfaceHandleHandle * handle,
tfFloatP_t * pos,
bool * result,
struct tfVertexSolverVertexHandleHandle * v0,
struct tfVertexSolverVertexHandleHandle * v1 )

Test whether the surface contains a point.

Parameters
handlepopulated handle
posposition of the point
resultresult of the test
v0a vertex of the nearest edge
v1a vertex of the nearest edge

◆ tfVertexSolverSurfaceHandle_contiguousVertexLabels()

HRESULT tfVertexSolverSurfaceHandle_contiguousVertexLabels ( struct tfVertexSolverSurfaceHandleHandle * handle,
struct tfVertexSolverSurfaceHandleHandle * other,
unsigned int ** labels,
int * numLabels )

Get the integer labels of the contiguous vertices that this surface shares with another surface.

Parameters
handlepopulated handle
otheranother surface
labelsedge labels
numLabelsnumber of edge labels

◆ tfVertexSolverSurfaceHandle_definedByVertex()

HRESULT tfVertexSolverSurfaceHandle_definedByVertex ( struct tfVertexSolverSurfaceHandleHandle * handle,
struct tfVertexSolverVertexHandleHandle * v,
bool * result )

Test whether a surface is defined by a vertex.

Parameters
handlepopulated handle
vvertex
resultresult of test

◆ tfVertexSolverSurfaceHandle_definesBody()

HRESULT tfVertexSolverSurfaceHandle_definesBody ( struct tfVertexSolverSurfaceHandleHandle * handle,
struct tfVertexSolverBodyHandleHandle * b,
bool * result )

Test whether a surface defines a body.

Parameters
handlepopulated handle
bbody
resultresult of test

◆ tfVertexSolverSurfaceHandle_destroy()

HRESULT tfVertexSolverSurfaceHandle_destroy ( struct tfVertexSolverSurfaceHandleHandle * handle)

Destroy an instance.

Parameters
handlepopulated handle

◆ tfVertexSolverSurfaceHandle_destroySurface()

HRESULT tfVertexSolverSurfaceHandle_destroySurface ( struct tfVertexSolverSurfaceHandleHandle * handle)

Destroy the surface.

Parameters
handlepopulated handle

◆ tfVertexSolverSurfaceHandle_destroySurfaceC()

HRESULT tfVertexSolverSurfaceHandle_destroySurfaceC ( struct tfVertexSolverSurfaceHandleHandle * handle)

Destroy an instance.

Any resulting vertices without a surface are also destroyed.

Parameters
handlepopulated handle

◆ tfVertexSolverSurfaceHandle_destroySurfaces()

HRESULT tfVertexSolverSurfaceHandle_destroySurfaces ( struct tfVertexSolverSurfaceHandleHandle ** handles,
unsigned int numObjs )

Destroy surfaces.

Parameters
handlespopulated handles
numObjsnumber of objects to destroy

◆ tfVertexSolverSurfaceHandle_extend()

HRESULT tfVertexSolverSurfaceHandle_extend ( struct tfVertexSolverSurfaceHandleHandle * handle,
unsigned int vertIdxStart,
tfFloatP_t * pos,
struct tfVertexSolverSurfaceHandleHandle * newObj )

Create a surface from two vertices and a position.

Parameters
handlepopulated handle
vertIdxStartindex of first vertex
posposition of new vertex
newObjnewly created surface

◆ tfVertexSolverSurfaceHandle_extrude()

HRESULT tfVertexSolverSurfaceHandle_extrude ( struct tfVertexSolverSurfaceHandleHandle * handle,
unsigned int vertIdxStart,
tfFloatP_t normLen,
struct tfVertexSolverSurfaceHandleHandle * newObj )

Create a surface from two vertices of a surface in a mesh by extruding along the normal of the surface.

Parameters
handlepopulated handle
vertIdxStartindex of first vertex
normLenlength along surface normal by which to extrude
newObjnewly created surface

◆ tfVertexSolverSurfaceHandle_findBody()

HRESULT tfVertexSolverSurfaceHandle_findBody ( struct tfVertexSolverSurfaceHandleHandle * handle,
tfFloatP_t * dir,
struct tfVertexSolverBodyHandleHandle * result )

Find a body that this surface defines.

Parameters
handle
dirdirection to look with respect to the centroid
resultbody

◆ tfVertexSolverSurfaceHandle_findVertex()

HRESULT tfVertexSolverSurfaceHandle_findVertex ( struct tfVertexSolverSurfaceHandleHandle * handle,
tfFloatP_t * dir,
struct tfVertexSolverVertexHandleHandle * result )

Find a vertex that defines this surface.

Parameters
handlepopulated handle
dirdirection to look with respect to the centroid
resultvertex

◆ tfVertexSolverSurfaceHandle_fromString()

HRESULT tfVertexSolverSurfaceHandle_fromString ( struct tfVertexSolverSurfaceHandleHandle * handle,
const char * s )

Create an instance from a JSON string representation.

Parameters
handlehandle to populate
sJSON string

◆ tfVertexSolverSurfaceHandle_getArea()

HRESULT tfVertexSolverSurfaceHandle_getArea ( struct tfVertexSolverSurfaceHandleHandle * handle,
tfFloatP_t * result )

Get the area.

Parameters
handlepopulated handle
resultarea

◆ tfVertexSolverSurfaceHandle_getBodies()

HRESULT tfVertexSolverSurfaceHandle_getBodies ( struct tfVertexSolverSurfaceHandleHandle * handle,
struct tfVertexSolverBodyHandleHandle ** objs,
int * numObjs )

Get the bodies defined by the surface.

Parameters
handlepopulated handle
objsobjects
numObjsnumber of objects

◆ tfVertexSolverSurfaceHandle_getCentroid()

HRESULT tfVertexSolverSurfaceHandle_getCentroid ( struct tfVertexSolverSurfaceHandleHandle * handle,
tfFloatP_t ** result )

Get the centroid.

Parameters
handlepopulated handle
resultcentroid

◆ tfVertexSolverSurfaceHandle_getDensity()

HRESULT tfVertexSolverSurfaceHandle_getDensity ( struct tfVertexSolverSurfaceHandleHandle * handle,
tfFloatP_t * result )

Get the mass density; only used in 2D simulation.

Parameters
handlepopulated handle
resultmass density

◆ tfVertexSolverSurfaceHandle_getId()

HRESULT tfVertexSolverSurfaceHandle_getId ( struct tfVertexSolverSurfaceHandleHandle * handle,
int * objId )

Get the id.

Parameters
handlepopulated handle
objIdobject id

◆ tfVertexSolverSurfaceHandle_getMass()

HRESULT tfVertexSolverSurfaceHandle_getMass ( struct tfVertexSolverSurfaceHandleHandle * handle,
tfFloatP_t * result )

Get the mass; only used in 2D simulation.

Parameters
handlepopulated handle
resultmass

◆ tfVertexSolverSurfaceHandle_getNormal()

HRESULT tfVertexSolverSurfaceHandle_getNormal ( struct tfVertexSolverSurfaceHandleHandle * handle,
tfFloatP_t ** result )

Get the surface normal.

Parameters
handlepopulated handle
resultsurface normal

◆ tfVertexSolverSurfaceHandle_getOutwardNormal()

HRESULT tfVertexSolverSurfaceHandle_getOutwardNormal ( struct tfVertexSolverSurfaceHandleHandle * handle,
struct tfVertexSolverBodyHandleHandle * body,
tfFloatP_t ** result )

Get the outward facing normal w.r.t. a body.

Parameters
handlepopulated handle
bodya body
resultnormal

◆ tfVertexSolverSurfaceHandle_getPerimeter()

HRESULT tfVertexSolverSurfaceHandle_getPerimeter ( struct tfVertexSolverSurfaceHandleHandle * handle,
tfFloatP_t * result )

Get the perimeter.

Parameters
handlepopulated handle
resultperimeter

◆ tfVertexSolverSurfaceHandle_getStyle()

HRESULT tfVertexSolverSurfaceHandle_getStyle ( struct tfVertexSolverSurfaceHandleHandle * handle,
struct tfRenderingStyleHandle * result )

Get the surface style.

Parameters
handlepopulated handle
resultsurface style

◆ tfVertexSolverSurfaceHandle_getType()

HRESULT tfVertexSolverSurfaceHandle_getType ( struct tfVertexSolverSurfaceHandleHandle * handle,
struct tfVertexSolverSurfaceTypeHandle * stype )

Get the surface type.

Parameters
handlepopulated handle
stypesurface type

◆ tfVertexSolverSurfaceHandle_getUnnormalizedNormal()

HRESULT tfVertexSolverSurfaceHandle_getUnnormalizedNormal ( struct tfVertexSolverSurfaceHandleHandle * handle,
tfFloatP_t ** result )

Get the surface unnormalized normal.

Parameters
handlepopulated handle
resultsurface unnormalized normal

◆ tfVertexSolverSurfaceHandle_getVelocity()

HRESULT tfVertexSolverSurfaceHandle_getVelocity ( struct tfVertexSolverSurfaceHandleHandle * handle,
tfFloatP_t ** result )

Get the velocity, calculated as the velocity of the centroid.

Parameters
handlepopulated handle
resultvelocity

◆ tfVertexSolverSurfaceHandle_getVertexArea()

HRESULT tfVertexSolverSurfaceHandle_getVertexArea ( struct tfVertexSolverSurfaceHandleHandle * handle,
struct tfVertexSolverVertexHandleHandle * v,
tfFloatP_t * result )

Get the area that a vertex contributes to this surface.

Parameters
handlepopulated handle
va vertex
resultarea contribution

◆ tfVertexSolverSurfaceHandle_getVertexMass()

HRESULT tfVertexSolverSurfaceHandle_getVertexMass ( struct tfVertexSolverSurfaceHandleHandle * handle,
struct tfVertexSolverVertexHandleHandle * v,
tfFloatP_t * result )

Get the mass contribution of a vertex to this surface; only used in 2D simulation.

Parameters
populatedhandle
va vertex
resultmass contribution

◆ tfVertexSolverSurfaceHandle_getVertices()

HRESULT tfVertexSolverSurfaceHandle_getVertices ( struct tfVertexSolverSurfaceHandleHandle * handle,
struct tfVertexSolverVertexHandleHandle ** objs,
int * numObjs )

Get the vertices that define the surface.

Parameters
handlepopulated handle
objsobjects
numObjsnumber of objects

◆ tfVertexSolverSurfaceHandle_getVolumeContr()

HRESULT tfVertexSolverSurfaceHandle_getVolumeContr ( struct tfVertexSolverSurfaceHandleHandle * handle,
struct tfVertexSolverBodyHandleHandle * body,
tfFloatP_t * result )

Get the volume that this surface contributes to a body.

Parameters
handlepopulated handle
bodya body
resultvolume contribution

◆ tfVertexSolverSurfaceHandle_hasStyle()

HRESULT tfVertexSolverSurfaceHandle_hasStyle ( struct tfVertexSolverSurfaceHandleHandle * handle,
bool * result )

Test whether the surface has a style.

Parameters
handlepopulated handle
resultresult of test

◆ tfVertexSolverSurfaceHandle_init()

HRESULT tfVertexSolverSurfaceHandle_init ( struct tfVertexSolverSurfaceHandleHandle * handle,
int id )

Initialize an instance.

Parameters
handlehandle to populate
idobject id

◆ tfVertexSolverSurfaceHandle_insertVertexAt()

HRESULT tfVertexSolverSurfaceHandle_insertVertexAt ( struct tfVertexSolverSurfaceHandleHandle * handle,
struct tfVertexSolverVertexHandleHandle * v,
const int & idx )

Insert a vertex at a location in the list of vertices.

Parameters
handlepopulated handle
vvertex to insert
idxlocation for insertion

◆ tfVertexSolverSurfaceHandle_insertVertexBefore()

HRESULT tfVertexSolverSurfaceHandle_insertVertexBefore ( struct tfVertexSolverSurfaceHandleHandle * handle,
struct tfVertexSolverVertexHandleHandle * v,
struct tfVertexSolverVertexHandleHandle * before )

Insert a vertex before another vertex.

Parameters
handlepopulated handle
vvertex to insert
beforevertex to insert before

◆ tfVertexSolverSurfaceHandle_insertVertexBetween()

HRESULT tfVertexSolverSurfaceHandle_insertVertexBetween ( struct tfVertexSolverSurfaceHandleHandle * handle,
struct tfVertexSolverVertexHandleHandle * toInsert,
struct tfVertexSolverVertexHandleHandle * v1,
struct tfVertexSolverVertexHandleHandle * v2 )

Insert a vertex between two vertices.

Parameters
handlepopulated handle
toInsertvertex to insert
v1first vertex
v2second vertex

◆ tfVertexSolverSurfaceHandle_isOutside()

HRESULT tfVertexSolverSurfaceHandle_isOutside ( struct tfVertexSolverSurfaceHandleHandle * handle,
tfFloatP_t * pos,
bool * result )

Test whether a point is on the outer side.

Parameters
handlepopulated handle
posposition
resultresult of test

◆ tfVertexSolverSurfaceHandle_merge()

HRESULT tfVertexSolverSurfaceHandle_merge ( struct tfVertexSolverSurfaceHandleHandle * handle,
struct tfVertexSolverSurfaceHandleHandle * toRemove,
tfFloatP_t * lenCfs,
unsigned int numLenCfs )

Merge with a surface. The passed surface is destroyed.

Surfaces must have the same number of vertices. Vertices are paired by nearest distance.

Parameters
handlepopulated handle
toRemovesurface to remove
lenCfsdistance coefficients in [0, 1] for where to place the merged vertex, from each kept vertex to each removed vertex
numLenCfsnumber of distance coefficients

◆ tfVertexSolverSurfaceHandle_neighborSurfaces()

HRESULT tfVertexSolverSurfaceHandle_neighborSurfaces ( struct tfVertexSolverSurfaceHandleHandle * handle,
struct tfVertexSolverSurfaceHandleHandle ** objs,
int * numObjs )

Connected surfaces on the same body.

Parameters
handlepopulated handle
objssurfaces
numObjsnumber of surfaces

◆ tfVertexSolverSurfaceHandle_neighborVertices()

HRESULT tfVertexSolverSurfaceHandle_neighborVertices ( struct tfVertexSolverSurfaceHandleHandle * handle,
struct tfVertexSolverVertexHandleHandle * v,
struct tfVertexSolverVertexHandleHandle * v1,
struct tfVertexSolverVertexHandleHandle * v2 )

Connected vertices on the same surface.

Parameters
handlepopulated handle
vvertex of interest
v1first connected vertex
v2second connected vertex

◆ tfVertexSolverSurfaceHandle_normalDistance()

HRESULT tfVertexSolverSurfaceHandle_normalDistance ( struct tfVertexSolverSurfaceHandleHandle * handle,
tfFloatP_t * pos,
tfFloatP_t * result )

Get the normal distance to a point; negative distance means that the point is on the inner side.

Parameters
handlepopulated handle
posposition
resultnormal distance

◆ tfVertexSolverSurfaceHandle_objType()

HRESULT tfVertexSolverSurfaceHandle_objType ( struct tfVertexSolverSurfaceHandleHandle * handle,
unsigned int * label )

Get the mesh object type.

Parameters
handlepopulated handle
labeltype label

◆ tfVertexSolverSurfaceHandle_positionChanged()

HRESULT tfVertexSolverSurfaceHandle_positionChanged ( struct tfVertexSolverSurfaceHandleHandle * handle)

Update internal data due to a change in position.

Parameters
handlepopulated handle

◆ tfVertexSolverSurfaceHandle_refreshBodies()

HRESULT tfVertexSolverSurfaceHandle_refreshBodies ( struct tfVertexSolverSurfaceHandleHandle * handle)

Refresh internal ordering of defined bodies.

Parameters
handlepopulated handle

◆ tfVertexSolverSurfaceHandle_removeBody()

HRESULT tfVertexSolverSurfaceHandle_removeBody ( struct tfVertexSolverSurfaceHandleHandle * handle,
struct tfVertexSolverBodyHandleHandle * b )

Remove a body.

Parameters
handlepopulated handle
bbody to remove

◆ tfVertexSolverSurfaceHandle_removeVertex()

HRESULT tfVertexSolverSurfaceHandle_removeVertex ( struct tfVertexSolverSurfaceHandleHandle * handle,
struct tfVertexSolverVertexHandleHandle * v )

Remove a vertex.

Parameters
handlepopulated handle
vvertex to remove

◆ tfVertexSolverSurfaceHandle_replaceBodyAt()

HRESULT tfVertexSolverSurfaceHandle_replaceBodyAt ( struct tfVertexSolverSurfaceHandleHandle * handle,
struct tfVertexSolverBodyHandleHandle * toInsert,
const int & idx )

Replace a body at a location in the list of bodies.

Parameters
handlepopulated handle
toInsertbody to insert
idxlocation of body to replace

◆ tfVertexSolverSurfaceHandle_replaceBodyWith()

HRESULT tfVertexSolverSurfaceHandle_replaceBodyWith ( struct tfVertexSolverSurfaceHandleHandle * handle,
struct tfVertexSolverBodyHandleHandle * toInsert,
struct tfVertexSolverBodyHandleHandle * toRemove )

Replace a body with another body.

Parameters
handlepopulated handle
toInsertbody to insert
toRemovebody to replace

◆ tfVertexSolverSurfaceHandle_replaceVertexAt()

HRESULT tfVertexSolverSurfaceHandle_replaceVertexAt ( struct tfVertexSolverSurfaceHandleHandle * handle,
struct tfVertexSolverVertexHandleHandle * toInsert,
const int & idx )

Replace a vertex at a location in the list of vertices.

Parameters
handlepopulated handle
toInsertvertex to insert
idxlocation of vertex to replace

◆ tfVertexSolverSurfaceHandle_replaceVertexWith()

HRESULT tfVertexSolverSurfaceHandle_replaceVertexWith ( struct tfVertexSolverSurfaceHandleHandle * handle,
struct tfVertexSolverVertexHandleHandle * toInsert,
struct tfVertexSolverVertexHandleHandle * toRemove )

Replace a vertex with another vertex.

Parameters
handlepopulated handle
toInsertvertex to insert
toRemovevertex to replace

◆ tfVertexSolverSurfaceHandle_setDensity()

HRESULT tfVertexSolverSurfaceHandle_setDensity ( struct tfVertexSolverSurfaceHandleHandle * handle,
tfFloatP_t density )

Set the mass density; only used in 2D simulation.

Parameters
handlepopulated handle
densitydensity

◆ tfVertexSolverSurfaceHandle_setStyle()

HRESULT tfVertexSolverSurfaceHandle_setStyle ( struct tfVertexSolverSurfaceHandleHandle * handle,
struct tfRenderingStyleHandle * s )

Set the surface style.

Parameters
handlepopulated handle
ssurface style

◆ tfVertexSolverSurfaceHandle_sharedContiguousVertices()

HRESULT tfVertexSolverSurfaceHandle_sharedContiguousVertices ( struct tfVertexSolverSurfaceHandleHandle * handle,
struct tfVertexSolverSurfaceHandleHandle * other,
unsigned int edgeLabel,
struct tfVertexSolverVertexHandleHandle ** objs,
int * numObjs )

Get the vertices of a contiguous shared edge with another surface.

Edges are labeled in increasing order starting with "1". A requested edge that does not exist returns empty.

A requested edge with label "0" returns all vertices not shared with another surface

Parameters
handlepopulated handle
otheranother surface
edgeLabeledge label
objsobjects
numObjsnumber of objects

◆ tfVertexSolverSurfaceHandle_splitBy()

HRESULT tfVertexSolverSurfaceHandle_splitBy ( struct tfVertexSolverSurfaceHandleHandle * handle,
struct tfVertexSolverVertexHandleHandle * v1,
struct tfVertexSolverVertexHandleHandle * v2,
struct tfVertexSolverSurfaceHandleHandle * newObj )

Split into two surfaces.

Both vertices must already be in the surface and not adjacent

Vertices in the winding from from vertex to second go to newly created surface

Requires updated surface members (e.g., centroid)

Parameters
handlepopulated handle
v1fist vertex defining the split
v2second vertex defining the split
newObjnewly created surface

◆ tfVertexSolverSurfaceHandle_splitHow()

HRESULT tfVertexSolverSurfaceHandle_splitHow ( struct tfVertexSolverSurfaceHandleHandle * handle,
tfFloatP_t * cp_pos,
tfFloatP_t * cp_norm,
struct tfVertexSolverSurfaceHandleHandle * newObj )

Split into two surfaces.

Requires updated surface members (e.g., centroid)

Parameters
handlepopulated handle
cp_pospoint on the cut plane
cp_normnormal of the cut plane
newObjnewly created surface

◆ tfVertexSolverSurfaceHandle_str()

HRESULT tfVertexSolverSurfaceHandle_str ( struct tfVertexSolverSurfaceHandleHandle * handle,
char ** str,
unsigned int * numChars )

Get a summary string.

Parameters
handlepopulated handle
strsummary string
numCharsnumber of chars

◆ tfVertexSolverSurfaceHandle_toString()

HRESULT tfVertexSolverSurfaceHandle_toString ( struct tfVertexSolverSurfaceHandleHandle * handle,
char ** str,
unsigned int * numChars )

Get a JSON string representation.

Parameters
handlepopulated handle
strJSON string
numCharsnumber of chars

◆ tfVertexSolverSurfaceHandle_validate()

HRESULT tfVertexSolverSurfaceHandle_validate ( struct tfVertexSolverSurfaceHandleHandle * handle,
bool * result )

Validate the body.

Parameters
handlepopulated handle
resultresult of validation

◆ tfVertexSolverSurfaceHandle_volumeSense()

HRESULT tfVertexSolverSurfaceHandle_volumeSense ( struct tfVertexSolverSurfaceHandleHandle * handle,
struct tfVertexSolverBodyHandleHandle * body,
tfFloatP_t * result )

Get the sign of the volume contribution to a body that this surface contributes.

Parameters
handlepopulated handle
bodya body
resultsign of the volume contribution

◆ tfVertexSolverSurfaceType_createSurfaceIO()

HRESULT tfVertexSolverSurfaceType_createSurfaceIO ( struct tfVertexSolverSurfaceTypeHandle * handle,
struct tfIoThreeDFFaceDataHandle * face,
struct tfVertexSolverSurfaceHandleHandle * newObj )

Construct a surface of this type from a face.

Parameters
handlepopulated handle
faceface data
newObjnewly created objects

◆ tfVertexSolverSurfaceType_createSurfaceIOA()

HRESULT tfVertexSolverSurfaceType_createSurfaceIOA ( struct tfVertexSolverSurfaceTypeHandle * handle,
struct tfIoThreeDFFaceDataHandle ** faces,
unsigned int numSurfaces,
struct tfVertexSolverSurfaceHandleHandle ** newObjs )

Construct a surface of this type from a face.

Parameters
handlepopulated handle
facesface data
numSurfacesnumber of surfaces
newObjsnewly created objects

◆ tfVertexSolverSurfaceType_createSurfaceP()

HRESULT tfVertexSolverSurfaceType_createSurfaceP ( struct tfVertexSolverSurfaceTypeHandle * handle,
tfFloatP_t ** positions,
unsigned int numPositions,
struct tfVertexSolverSurfaceHandleHandle * newObj )

Construct a surface of this type from a set of positions.

Parameters
handlepopulated handle
positionsset of positions
numPositionsnumber of positions
newObjnewly created objects

◆ tfVertexSolverSurfaceType_createSurfacePA()

HRESULT tfVertexSolverSurfaceType_createSurfacePA ( struct tfVertexSolverSurfaceTypeHandle * handle,
tfFloatP_t *** spositions,
unsigned int numSurfaces,
unsigned int * numPositions,
struct tfVertexSolverSurfaceHandleHandle ** newObjs )

Construct a surface of this type from a set of positions.

Parameters
handlepopulated handle
positionssets of positions
numSurfacesnumber of surfaces
numPositionsnumber of positions
newObjsnewly created objects

◆ tfVertexSolverSurfaceType_createSurfaceV()

HRESULT tfVertexSolverSurfaceType_createSurfaceV ( struct tfVertexSolverSurfaceTypeHandle * handle,
struct tfVertexSolverVertexHandleHandle ** vertices,
unsigned int numVerts,
struct tfVertexSolverSurfaceHandleHandle * newObj )

Construct a surface of this type from a set of vertices.

Parameters
handlepopulated handle
verticesset of vertices
numVertsnumber of vertices
newObjnewly created object

◆ tfVertexSolverSurfaceType_createSurfaceVA()

HRESULT tfVertexSolverSurfaceType_createSurfaceVA ( struct tfVertexSolverSurfaceTypeHandle * handle,
struct tfVertexSolverVertexHandleHandle *** vertices,
unsigned int numSurfaces,
unsigned int * numVerts,
struct tfVertexSolverSurfaceHandleHandle ** newObjs )

Construct a surface of this type from a set of vertices.

Parameters
handlepopulated handle
verticessets of vertices
numSurfacesnumber of surfaces
numVertsnumber of vertices per surface
newObjsnewly created objects

◆ tfVertexSolverSurfaceType_fromString()

HRESULT tfVertexSolverSurfaceType_fromString ( struct tfVertexSolverSurfaceTypeHandle * handle,
const char * str )

Create from a JSON string representation.

The returned type is automatically registered with the solver.

Parameters
handle
stra string, as returned by toString

◆ tfVertexSolverSurfaceType_getDensity()

HRESULT tfVertexSolverSurfaceType_getDensity ( struct tfVertexSolverSurfaceTypeHandle * handle,
tfFloatP_t * result )

Get the density of the surface type; only used in 2D simulation.

Parameters
handlepopulated handle
resultdensity

◆ tfVertexSolverSurfaceType_getInstanceIds()

HRESULT tfVertexSolverSurfaceType_getInstanceIds ( struct tfVertexSolverSurfaceTypeHandle * handle,
int ** ids,
unsigned int * numObjs )

Get the list of instances ids that belong to this type.

Parameters
handlepopulated handle
idsinstance ids
numObjsnumber of instances

◆ tfVertexSolverSurfaceType_getInstances()

HRESULT tfVertexSolverSurfaceType_getInstances ( struct tfVertexSolverSurfaceTypeHandle * handle,
struct tfVertexSolverSurfaceHandleHandle ** objs,
unsigned int * numObjs )

Get the list of instances that belong to this type.

Parameters
handlepopulated handle
objsinstances
numObjsnumber of instances

◆ tfVertexSolverSurfaceType_getName()

HRESULT tfVertexSolverSurfaceType_getName ( struct tfVertexSolverSurfaceTypeHandle * handle,
char ** str,
unsigned int * numChars )

Name of this surface type.

Parameters
handlepopulated handle
strname
numCharsnumber of chars

◆ tfVertexSolverSurfaceType_getStyle()

HRESULT tfVertexSolverSurfaceType_getStyle ( struct tfVertexSolverSurfaceTypeHandle * handle,
struct tfRenderingStyleHandle * style )

Get the style of the surface type.

Parameters
handlepopulated handle
stylestyle of the surface type

◆ tfVertexSolverSurfaceType_init()

HRESULT tfVertexSolverSurfaceType_init ( struct tfVertexSolverSurfaceTypeHandle * handle)

Initialize a new instance.

Parameters
handlehandle to populate

◆ tfVertexSolverSurfaceType_initD()

HRESULT tfVertexSolverSurfaceType_initD ( struct tfVertexSolverSurfaceTypeHandle * handle,
struct tfVertexSolverSurfaceTypeSpec sdef )

Initialize an instance from a definition.

Parameters
handlehandle to populate
sdefdefinition

◆ tfVertexSolverSurfaceType_isRegistered()

HRESULT tfVertexSolverSurfaceType_isRegistered ( struct tfVertexSolverSurfaceTypeHandle * handle,
bool * result )

Tests whether this type is registered.

Parameters
handle
resultresult of test

◆ tfVertexSolverSurfaceType_nPolygon()

HRESULT tfVertexSolverSurfaceType_nPolygon ( struct tfVertexSolverSurfaceTypeHandle * handle,
unsigned int n,
tfFloatP_t * center,
tfFloatP_t radius,
tfFloatP_t * ax1,
tfFloatP_t * ax2,
struct tfVertexSolverSurfaceHandleHandle * newObj )

Construct a polygon with n vertices circumscribed on a circle.

Parameters
handlepopulated handle
nnumber of points
centercenter of the circle
radiusradius of the circle
ax1first axis defining the orientation of the circle
ax2second axis defining the orientation of the circle
newObjnewly created object

◆ tfVertexSolverSurfaceType_objType()

HRESULT tfVertexSolverSurfaceType_objType ( struct tfVertexSolverSurfaceTypeHandle * handle,
unsigned int * label )

Get the mesh object type.

Parameters
handlepopulated handle
labelmesh object type label

◆ tfVertexSolverSurfaceType_registerType()

HRESULT tfVertexSolverSurfaceType_registerType ( struct tfVertexSolverSurfaceTypeHandle * handle)

Registers a type with the engine.

Parameters
handlepopulated handle

◆ tfVertexSolverSurfaceType_replace()

HRESULT tfVertexSolverSurfaceType_replace ( struct tfVertexSolverSurfaceTypeHandle * handle,
struct tfVertexSolverVertexHandleHandle * toReplace,
tfFloatP_t * lenCfs,
unsigned int numLenCfs,
struct tfVertexSolverSurfaceHandleHandle * newObj )

Replace a vertex with a surface. Vertices are created for the surface along every destroyed edge.

Parameters
handlepopulated handle
toReplacevertex to replace
lenCfsdistance coefficients in [0, 1] defining where to create a new vertex along each edge
numLenCfsnumber of distance coefficients
newObjnewly created object

◆ tfVertexSolverSurfaceType_setDensity()

HRESULT tfVertexSolverSurfaceType_setDensity ( struct tfVertexSolverSurfaceTypeHandle * handle,
tfFloatP_t result )

Set the density of the surface type; only used in 2D simulation.

Parameters
handlepopulated handle
resultdensity

◆ tfVertexSolverSurfaceType_setName()

HRESULT tfVertexSolverSurfaceType_setName ( struct tfVertexSolverSurfaceTypeHandle * handle,
const char * str )

Set the name of this surface type.

Parameters
handlepopulated handle
strname

◆ tfVertexSolverSurfaceType_str()

HRESULT tfVertexSolverSurfaceType_str ( struct tfVertexSolverSurfaceTypeHandle * handle,
char ** str,
unsigned int * numChars )

Get a summary string.

Parameters
handlepopulated handle
strsummary string
numCharsnumber of chars

◆ tfVertexSolverSurfaceType_toString()

HRESULT tfVertexSolverSurfaceType_toString ( struct tfVertexSolverSurfaceTypeHandle * handle,
char ** str,
unsigned int * numChars )

Get a JSON string representation.

Parameters

param str summary string

Parameters
numCharsnumber of chars