25#ifndef _WRAPS_C_VERTEX_SOLVER_TFCSURFACE_H_
26#define _WRAPS_C_VERTEX_SOLVER_TFCSURFACE_H_
48 tfFloatP_t *edgeTensionLam;
49 unsigned int edgeTensionOrder;
50 tfFloatP_t *normalStressMag;
51 tfFloatP_t *surfaceAreaLam;
52 tfFloatP_t *surfaceAreaVal;
53 tfFloatP_t **surfaceTractionComps;
57 tfFloatP_t *adhesionValues;
58 unsigned int numAdhesionValues;
224 unsigned int *numChars
237 unsigned int *numChars
480 unsigned int numVerts,
524 unsigned int **labels,
544 unsigned int edgeLabel,
767 unsigned int numLenCfs
780 unsigned int vertIdxStart,
795 unsigned int vertIdxStart,
887 unsigned int *numChars
900 unsigned int *numChars
928 unsigned int *numChars
973 unsigned int *numObjs
986 unsigned int *numObjs
1000 unsigned int numVerts,
1014 tfFloatP_t **positions,
1015 unsigned int numPositions,
1044 unsigned int numSurfaces,
1045 unsigned int *numVerts,
1060 tfFloatP_t ***spositions,
1061 unsigned int numSurfaces,
1062 unsigned int *numPositions,
1077 unsigned int numSurfaces,
1115 unsigned int numLenCfs,
1134 unsigned int numVerts,
1167 unsigned int numTypes
Handle to a io::ThreeDFFaceData instance.
Definition tfC_io.h:86
Handle to a rendering::Style instance.
Definition tfCStyle.h:38
Handle to a models::vertex::BodyHandle instance.
Definition tfCBody.h:57
Handle to a models::vertex::SurfaceHandle instance.
Definition tfCSurface.h:68
Handle to a models::vertex::SurfaceType instance.
Definition tfCSurface.h:76
Surface type definition in Tissue Forge C.
Definition tfCSurface.h:47
Surface type style definition in Tissue Forge C.
Definition tfCSurface.h:38
Handle to a models::vertex::VertexHandle instance.
Definition tfCVertex.h:39
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_getOutwardNormal(struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverBodyHandleHandle *body, tfFloatP_t **result)
Get the outward facing normal w.r.t. a body.
HRESULT tfVertexSolverSurfaceType_registerType(struct tfVertexSolverSurfaceTypeHandle *handle)
Registers a type with the engine.
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 tfVertexSolverSurfaceType_createSurfaceIOA(struct tfVertexSolverSurfaceTypeHandle *handle, struct tfIoThreeDFFaceDataHandle **faces, unsigned int numSurfaces, struct tfVertexSolverSurfaceHandleHandle **newObjs)
Construct a surface of this type from a face.
HRESULT tfVertexSolverSurfaceHandle_destroy(struct tfVertexSolverSurfaceHandleHandle *handle)
Destroy an instance.
HRESULT tfVertexSolverSurfaceType_toString(struct tfVertexSolverSurfaceTypeHandle *handle, char **str, unsigned int *numChars)
Get a JSON string representation.
HRESULT tfVertexSolverSurfaceHandle_hasStyle(struct tfVertexSolverSurfaceHandleHandle *handle, bool *result)
Test whether the surface has a style.
HRESULT tfVertexSolverSurfaceHandle_removeBody(struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverBodyHandleHandle *b)
Remove a body.
HRESULT tfVertexSolverSurfaceHandle_getId(struct tfVertexSolverSurfaceHandleHandle *handle, int *objId)
Get the id.
HRESULT tfVertexSolverSurfaceHandle_replaceBodyWith(struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverBodyHandleHandle *toInsert, struct tfVertexSolverBodyHandleHandle *toRemove)
Replace a body with another body.
HRESULT tfVertexSolverSurfaceHandle_getStyle(struct tfVertexSolverSurfaceHandleHandle *handle, struct tfRenderingStyleHandle *result)
Get the surface style.
HRESULT tfVertexSolverSurfaceHandle_getMass(struct tfVertexSolverSurfaceHandleHandle *handle, tfFloatP_t *result)
Get the mass; only used in 2D simulation.
HRESULT tfVertexSolverSurfaceHandle_connectingVertices(struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverSurfaceHandleHandle *other, struct tfVertexSolverVertexHandleHandle **objs, int *numObjs)
Vertices defining this and another surface.
HRESULT tfVertexSolverSurfaceHandle_become(struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverSurfaceTypeHandle *stype)
Become a different type.
HRESULT tfVertexSolverSurfaceHandle_getCentroid(struct tfVertexSolverSurfaceHandleHandle *handle, tfFloatP_t **result)
Get the centroid.
HRESULT tfVertexSolverSurfaceType_getName(struct tfVertexSolverSurfaceTypeHandle *handle, char **str, unsigned int *numChars)
Name of this surface type.
HRESULT tfVertexSolverSurfaceHandle_definedByVertex(struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverVertexHandleHandle *v, bool *result)
Test whether a surface is defined by a vertex.
struct tfVertexSolverSurfaceTypeStyleSpec tfVertexSolverSurfaceTypeStyleSpec_init()
Get a default definition.
HRESULT tfVertexSolverSurfaceHandle_getType(struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverSurfaceTypeHandle *stype)
Get the surface type.
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 tfVertexSolverSurfaceHandle_positionChanged(struct tfVertexSolverSurfaceHandleHandle *handle)
Update internal data due to a change in position.
HRESULT tfVertexSolverSurfaceHandle_getBodies(struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverBodyHandleHandle **objs, int *numObjs)
Get the bodies defined by the surface.
HRESULT tfVertexSolverSurfaceHandle_splitHow(struct tfVertexSolverSurfaceHandleHandle *handle, tfFloatP_t *cp_pos, tfFloatP_t *cp_norm, struct tfVertexSolverSurfaceHandleHandle *newObj)
Split into two surfaces.
HRESULT tfVertexSolverSurfaceHandle_getVertexArea(struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverVertexHandleHandle *v, tfFloatP_t *result)
Get the area that a vertex contributes to this surface.
HRESULT tfVertexSolverSurfaceType_fromString(struct tfVertexSolverSurfaceTypeHandle *handle, const char *str)
Create from a JSON string representation.
HRESULT tfVertexSolverSurfaceType_getStyle(struct tfVertexSolverSurfaceTypeHandle *handle, struct tfRenderingStyleHandle *style)
Get the style of the surface type.
HRESULT tfVertexSolverSurfaceType_setDensity(struct tfVertexSolverSurfaceTypeHandle *handle, tfFloatP_t result)
Set the density of the surface type; only used in 2D simulation.
HRESULT tfVertexSolverSurfaceHandle_definesBody(struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverBodyHandleHandle *b, bool *result)
Test whether a surface defines a body.
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_toString(struct tfVertexSolverSurfaceHandleHandle *handle, char **str, unsigned int *numChars)
Get a JSON string representation.
HRESULT tfVertexSolverCreateSurfaceByVertices(struct tfVertexSolverVertexHandleHandle **verts, unsigned int numVerts, struct tfVertexSolverSurfaceHandleHandle *newObj)
Construct a surface from a set of vertices.
HRESULT tfVertexSolverSurfaceType_getInstanceIds(struct tfVertexSolverSurfaceTypeHandle *handle, int **ids, unsigned int *numObjs)
Get the list of instances ids that belong to this type.
HRESULT tfVertexSolverSurfaceHandle_removeVertex(struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverVertexHandleHandle *v)
Remove a vertex.
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 tfVertexSolverSurfaceType_setName(struct tfVertexSolverSurfaceTypeHandle *handle, const char *str)
Set the name of this surface type.
HRESULT tfVertexSolverSurfaceHandle_isOutside(struct tfVertexSolverSurfaceHandleHandle *handle, tfFloatP_t *pos, bool *result)
Test whether a point is on the outer side.
HRESULT tfVertexSolverSurfaceHandle_getArea(struct tfVertexSolverSurfaceHandleHandle *handle, tfFloatP_t *result)
Get the area.
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_neighborVertices(struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverVertexHandleHandle *v, struct tfVertexSolverVertexHandleHandle *v1, struct tfVertexSolverVertexHandleHandle *v2)
Connected vertices on the same surface.
HRESULT tfVertexSolverSurfaceHandle_destroySurface(struct tfVertexSolverSurfaceHandleHandle *handle)
Destroy the surface.
HRESULT tfVertexSolverSurfaceHandle_destroySurfaceC(struct tfVertexSolverSurfaceHandleHandle *handle)
Destroy an instance.
HRESULT tfVertexSolverSurfaceType_init(struct tfVertexSolverSurfaceTypeHandle *handle)
Initialize a new instance.
HRESULT tfVertexSolverSurfaceType_isRegistered(struct tfVertexSolverSurfaceTypeHandle *handle, bool *result)
Tests whether this type is registered.
HRESULT tfVertexSolverSurfaceHandle_splitBy(struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverVertexHandleHandle *v1, struct tfVertexSolverVertexHandleHandle *v2, struct tfVertexSolverSurfaceHandleHandle *newObj)
Split into two surfaces.
HRESULT tfVertexSolverSurfaceHandle_str(struct tfVertexSolverSurfaceHandleHandle *handle, char **str, unsigned int *numChars)
Get a summary string.
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 tfVertexSolverSurfaceHandle_insertVertexAt(struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverVertexHandleHandle *v, const int &idx)
Insert a vertex at a location in the list of vertices.
HRESULT tfVertexSolverSurfaceHandle_getVolumeContr(struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverBodyHandleHandle *body, tfFloatP_t *result)
Get the volume that this surface contributes to a body.
HRESULT tfVertexSolverSurfaceHandle_getUnnormalizedNormal(struct tfVertexSolverSurfaceHandleHandle *handle, tfFloatP_t **result)
Get the surface unnormalized normal.
HRESULT tfVertexSolverSurfaceHandle_connectedSurfaces(struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverSurfaceHandleHandle **objs, int *numObjs)
Surfaces that share at least one vertex.
HRESULT tfVertexSolverSurfaceHandle_fromString(struct tfVertexSolverSurfaceHandleHandle *handle, const char *s)
Create an instance from a JSON string representation.
HRESULT tfVertexSolverSurfaceHandle_findVertex(struct tfVertexSolverSurfaceHandleHandle *handle, tfFloatP_t *dir, struct tfVertexSolverVertexHandleHandle *result)
Find a vertex that defines this surface.
HRESULT tfVertexSolverSurfaceType_getInstances(struct tfVertexSolverSurfaceTypeHandle *handle, struct tfVertexSolverSurfaceHandleHandle **objs, unsigned int *numObjs)
Get the list of instances that belong to this type.
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 tfVertexSolverSurfaceType_initD(struct tfVertexSolverSurfaceTypeHandle *handle, struct tfVertexSolverSurfaceTypeSpec sdef)
Initialize an instance from a definition.
HRESULT tfVertexSolverSurfaceHandle_replaceVertexAt(struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverVertexHandleHandle *toInsert, const int &idx)
Replace a vertex at a location in the list of vertices.
HRESULT tfVertexSolverBindSurfaceTypeAdhesion(struct tfVertexSolverSurfaceTypeHandle **stypes, struct tfVertexSolverSurfaceTypeSpec *sdefs, unsigned int numTypes)
Bind adhesion for all types with matching specification.
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 surfac...
HRESULT tfVertexSolverSurfaceHandle_replaceBodyAt(struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverBodyHandleHandle *toInsert, const int &idx)
Replace a body at a location in the list of bodies.
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 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_getNormal(struct tfVertexSolverSurfaceHandleHandle *handle, tfFloatP_t **result)
Get the surface normal.
HRESULT tfVertexSolverSurfaceHandle_insertVertexBetween(struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverVertexHandleHandle *toInsert, struct tfVertexSolverVertexHandleHandle *v1, struct tfVertexSolverVertexHandleHandle *v2)
Insert a vertex between two vertices.
HRESULT tfVertexSolverSurfaceHandle_addBody(struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverBodyHandleHandle *b)
Add a body.
HRESULT tfVertexSolverSurfaceHandle_insertVertexBefore(struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverVertexHandleHandle *v, struct tfVertexSolverVertexHandleHandle *before)
Insert a vertex before another vertex.
HRESULT tfVertexSolverSurfaceType_objType(struct tfVertexSolverSurfaceTypeHandle *handle, unsigned int *label)
Get the mesh object type.
HRESULT tfVertexSolverSurfaceHandle_init(struct tfVertexSolverSurfaceHandleHandle *handle, int id)
Initialize an instance.
HRESULT tfVertexSolverSurfaceHandle_objType(struct tfVertexSolverSurfaceHandleHandle *handle, unsigned int *label)
Get the mesh object type.
HRESULT tfVertexSolverFindSurfaceTypeFromName(const char *name, struct tfVertexSolverSurfaceTypeHandle *result)
Get a registered type by name.
HRESULT tfVertexSolverSurfaceType_createSurfaceIO(struct tfVertexSolverSurfaceTypeHandle *handle, struct tfIoThreeDFFaceDataHandle *face, struct tfVertexSolverSurfaceHandleHandle *newObj)
Construct a surface of this type from a face.
HRESULT tfVertexSolverSurfaceHandle_getVelocity(struct tfVertexSolverSurfaceHandleHandle *handle, tfFloatP_t **result)
Get the velocity, calculated as the velocity of the centroid.
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 tfVertexSolverSurfaceType_getDensity(struct tfVertexSolverSurfaceTypeHandle *handle, tfFloatP_t *result)
Get the density of the surface type; only used in 2D simulation.
HRESULT tfVertexSolverSurfaceHandle_refreshBodies(struct tfVertexSolverSurfaceHandleHandle *handle)
Refresh internal ordering of defined bodies.
struct tfVertexSolverSurfaceTypeSpec tfVertexSolverSurfaceTypeSpec_init()
Get a default definition.
HRESULT tfVertexSolverSurfaceType_str(struct tfVertexSolverSurfaceTypeHandle *handle, char **str, unsigned int *numChars)
Get a summary string.
HRESULT tfVertexSolverSurfaceHandle_validate(struct tfVertexSolverSurfaceHandleHandle *handle, bool *result)
Validate the body.
HRESULT tfVertexSolverSurfaceHandle_findBody(struct tfVertexSolverSurfaceHandleHandle *handle, tfFloatP_t *dir, struct tfVertexSolverBodyHandleHandle *result)
Find a body that this surface defines.
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 tfVertexSolverSurfaceHandle_destroySurfaces(struct tfVertexSolverSurfaceHandleHandle **handles, unsigned int numObjs)
Destroy surfaces.
HRESULT tfVertexSolverCreateSurfaceByIOData(struct tfIoThreeDFFaceDataHandle *face, struct tfVertexSolverSurfaceHandleHandle *newObj)
Construct a surface from a face.
HRESULT tfVertexSolverSurfaceHandle_neighborSurfaces(struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverSurfaceHandleHandle **objs, int *numObjs)
Connected surfaces on the same body.
HRESULT tfVertexSolverSurfaceHandle_getVertices(struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverVertexHandleHandle **objs, int *numObjs)
Get the vertices that define the surface.
HRESULT tfVertexSolverSurfaceHandle_setStyle(struct tfVertexSolverSurfaceHandleHandle *handle, struct tfRenderingStyleHandle *s)
Set the surface style.
HRESULT tfVertexSolverSurfaceHandle_addVertex(struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverVertexHandleHandle *v)
Add a vertex.
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 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_getPerimeter(struct tfVertexSolverSurfaceHandleHandle *handle, tfFloatP_t *result)
Get the perimeter.
HRESULT tfVertexSolverSurfaceHandle_replaceVertexWith(struct tfVertexSolverSurfaceHandleHandle *handle, struct tfVertexSolverVertexHandleHandle *toInsert, struct tfVertexSolverVertexHandleHandle *toRemove)
Replace a vertex with another vertex.
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.