Namespace uipc::geometry
Namespace List > uipc > geometry
Namespaces
| Type | Name | 
|---|---|
| namespace | affine_body | 
Classes
| Type | Name | 
|---|---|
| class | AbstractSimplicialComplex Represents an abstract simplicial complex, containing vertices, edges, triangles, and tetrahedra. | 
| class | Attribute <typename T> Template class to represent a geometries attribute of type T. | 
| class | AttributeCollection A collection of geometries attributes. | 
| class | AttributeCollectionCommit | 
| class | AttributeCollectionError | 
| class | AttributeCollectionFactory | 
| class | AttributeCopy | 
| class | AttributeDebugInfo | 
| class | AttributeFactory | 
| class | AttributeFriend <typename T> | 
| class | AttributeIO | 
| class | AttributeIOError | 
| class | AttributeSlot <typename T> Template class to represent a geometries attribute slot of type T in a geometries attribute collection. | 
| class | BVH | 
| class | DeserialSharedAttributeContext | 
| class | Geometry A base geometries class that contains the instance attributes and the meta attributes. | 
| class | GeometryAtlas | 
| class | GeometryAtlasCommit | 
| class | GeometryCollection | 
| class | GeometryCollectionCommit | 
| class | GeometryCommit | 
| class | GeometryFactory | 
| class | GeometryFriend <typename T> | 
| class | GeometryIOError | 
| class | GeometrySlot | 
| class | GeometrySlotT <GeometryT> | 
| class | GeometrySlotT< Geometry > <> | 
| class | IAttribute An abstract class to represent a geometries attribute. | 
| class | IAttributeSlot An abstract class to represent a geometries attribute slot in a geometries attribute collection. | 
| class | IGeometry An abstract class for geometries. | 
| class | IGeometryCollection | 
| class | ImplicitGeometry | 
| class | Octree | 
| class | SerialSharedAttributeContext | 
| class | SimplexUtils | 
| class | SimplicialComplex A simplicial complex is a collection of simplices. | 
| class | SimplicialComplexAttributes <IsConst, N> | 
| class | SimplicialComplexIO A class for reading and writing simplicial complex. | 
| class | SpreadSheetIO A class for writing geometry spreadsheet. | 
Public Types
| Type | Name | 
|---|---|
| enum | GeometrySlotState | 
| typedef GeometrySlotT< ImplicitGeometry > | ImplicitGeometrySlot | 
| typedef GeometrySlotT< SimplicialComplex > | SimplicialComplexSlot | 
| typedef std::chrono::time_point< std::chrono::high_resolution_clock > | TimePoint | 
Public Functions
| Type | Name | 
|---|---|
| UIPC_GEOMETRY_API vector< SimplicialComplex > | apply_region (const SimplicialComplex & complex) Take apart the simplicial complex by regions. | 
| UIPC_GEOMETRY_API vector< SimplicialComplex > | apply_transform (const SimplicialComplex & complex) Apply the instance transform to the simplicial complex. | 
| UIPC_CORE_API void | check_view (const IAttributeSlot * slot) | 
| UIPC_GEOMETRY_API S< AttributeSlot< Float > > | compute_instance_volume (SimplicialComplex & R) Compute the volume of an instance in the simplicial complex. Attribute __ volume<Float> will be created in the instance vertices. | 
| UIPC_GEOMETRY_API S< AttributeSlot< Float > > | compute_mesh_d_hat (SimplicialComplex & R, Float max_d_hat=std::numeric_limits< Float >::max()) Suggest a proper d_hat for a mesh, create an attribute d_haton meta. | 
| UIPC_GEOMETRY_API S< AttributeSlot< Float > > | compute_vertex_volume (SimplicialComplex & R) | 
| UIPC_GEOMETRY_API std::string | constitution_type (const Geometry & geo) | 
| Float UIPC_GEOMETRY_API | edge_edge_squared_distance (const Vector3 & Ea0, const Vector3 & Ea1, const Vector3 & Eb0, const Vector3 & Eb1) | 
| UIPC_GEOMETRY_API SimplicialComplex | extract_surface (const SimplicialComplex & src) Extract the surface of a tetrahedral mesh. | 
| UIPC_GEOMETRY_API SimplicialComplex | extract_surface (span< const SimplicialComplex * > complexes) Extract the surface of a list of tetrahedral meshes and merge them into one. | 
| UIPC_GEOMETRY_API SimplicialComplex | facet_closure (const SimplicialComplex & complex) Generate the closure from a collection of facet simplices, who only have the top dimension simplices. | 
| UIPC_GEOMETRY_API SimplicialComplex | flip_inward_triangles (const SimplicialComplex & sc) Flip the orientation of the triangles in the simplicial complex. | 
| UIPC_GEOMETRY_API ImplicitGeometry | ground (Float height=0.0, const Vector3 & N=Vector3::UnitY()) Create a gound plane. | 
| UIPC_GEOMETRY_API ImplicitGeometry | halfplane (const Vector3 & P=Vector3::Zero(), const Vector3 & N=Vector3::UnitY()) Create a half-plane. | 
| Float UIPC_GEOMETRY_API | halfplane_vertex_signed_distance (const Vector3 & P, const Vector3 & N, const Vector3 & V, Float V_thickness=0.0) Compute the distance between a half-plane (P, N) and a vertex V (with thickness V_thickness). | 
| UIPC_GEOMETRY_API bool | is_point_in_tet (const Vector3 & T0, const Vector3 & T1, const Vector3 & T2, const Vector3 & T3, const Vector3 & P) Check if a point is in a tetrahedron. | 
| UIPC_GEOMETRY_API bool | is_trimesh_closed (const SimplicialComplex & R) Check if a trimesh is closed. | 
| UIPC_GEOMETRY_API S< AttributeSlot< IndexT > > | label_connected_vertices (SimplicialComplex & complex) Label the connected vertices of a simplicial complex (by edges). | 
| UIPC_GEOMETRY_API S< AttributeSlot< IndexT > > | label_graph_color (SimplicialComplex & sc) Label the vertex color of a simplicial complex by graph coloring algorithm. | 
| UIPC_GEOMETRY_API void | label_region (SimplicialComplex & complex) Label the regions of a simplicial complex. | 
| UIPC_GEOMETRY_API void | label_surface (SimplicialComplex & R) Label the surface of a simplicial complex. | 
| UIPC_GEOMETRY_API S< AttributeSlot< IndexT > > | label_triangle_orient (SimplicialComplex & sc) Label the orientation of the triangles in the simplicial complex. | 
| UIPC_GEOMETRY_API SimplicialComplex | linemesh (span< const Vector3 > Vs, span< const Vector2i > Es) Create a simplicial complex from a line mesh. | 
| UIPC_GEOMETRY_API SimplicialComplex | merge (span< const SimplicialComplex * > complexes) Merge a list of simplicial complexes into one simplicial complex. | 
| UIPC_GEOMETRY_API SimplicialComplex | merge (span< const SimplicialComplex > complexes) | 
| UIPC_GEOMETRY_API SimplicialComplex | merge (std::initializer_list< const SimplicialComplex * > && complexes) | 
| void UIPC_GEOMETRY_API | mesh_partition (SimplicialComplex & sc, SizeT part_max_size) partition the simplicial complex | 
| UIPC_CORE_API AttributeCollection & | operator+= (AttributeCollection & dst, const AttributeCollectionCommit & inc) | 
| UIPC_CORE_API GeometryCollection & | operator+= (GeometryCollection & dst, const GeometryCollectionCommit & inc) | 
| UIPC_CORE_API Geometry & | operator+= (Geometry & base, const GeometryCommit & inc) | 
| UIPC_CORE_API AttributeCollectionCommit | operator- (const AttributeCollection & dst, const AttributeCollection & src) | 
| UIPC_CORE_API GeometryCollectionCommit | operator- (const GeometryCollection & dst, const GeometryCollection & src) | 
| UIPC_CORE_API GeometryCommit | operator- (const Geometry & dst, const Geometry & src) | 
| UIPC_GEOMETRY_API Matrix4x4 | optimal_transform (span< const Vector3 > S, span< const Vector3 > D) Find out the optimal transformation matrix that maps the source points to the destination points. | 
| UIPC_GEOMETRY_API Matrix4x4 | optimal_transform (const SimplicialComplex & S, const SimplicialComplex & D) Find out the optimal transformation matrix that maps the source simplicial complex to the destination simplicial complex. | 
| Float UIPC_GEOMETRY_API | point_edge_squared_distance (const Vector3 & P, const Vector3 & E0, const Vector3 & E1) | 
| Float UIPC_GEOMETRY_API | point_point_squared_distance (const Vector3 & P0, const Vector3 & P1) | 
| Float UIPC_GEOMETRY_API | point_triangle_squared_distance (const Vector3 & P, const Vector3 & T0, const Vector3 & T1, const Vector3 & T2) | 
| UIPC_GEOMETRY_API SimplicialComplex | pointcloud (span< const Vector3 > Vs) Create a simplicial complex from a point cloud. | 
| UIPC_GEOMETRY_API SimplicialComplex | points_from_volume (const SimplicialComplex & sc, Float resolution=0.01) Construct a point cloud inside a volume represented by a simplicial complex. | 
| UIPC_GEOMETRY_API SimplicialComplex | tetmesh (span< const Vector3 > Vs, span< const Vector4i > Ts) Create a simplicial complex from a tetrahedral mesh. | 
| UIPC_GEOMETRY_API bool | tri_edge_intersect (const Vector3 & T0, const Vector3 & T1, const Vector3 & T2, const Vector3 & E0, const Vector3 & E1) Check if a triangle and an edge intersect. | 
| UIPC_GEOMETRY_API SimplicialComplex | trimesh (span< const Vector3 > Vs, span< const Vector3i > Fs) Create a simplicial complex from a triangle mesh. | 
| UIPC_GEOMETRY_API SimplicialComplex | trimesh (span< const Vector3 > Vs, span< const Vector4i > Fs) Create a 2D simplicial complex from a quad mesh (4-sided polygons). | 
Public Types Documentation
enum GeometrySlotState
typedef ImplicitGeometrySlot
typedef SimplicialComplexSlot
typedef TimePoint
Public Functions Documentation
function apply_region
Take apart the simplicial complex by regions.
UIPC_GEOMETRY_API vector< SimplicialComplex > uipc::geometry::apply_region (
    const SimplicialComplex & complex
) 
Returns:
vector<SimplicialComplex> The simplicial complexes by regions.
function apply_transform
Apply the instance transform to the simplicial complex.
UIPC_GEOMETRY_API vector< SimplicialComplex > uipc::geometry::apply_transform (
    const SimplicialComplex & complex
) 
1) Vertex position of the result simplicial complex will be transformed. 2) The rest meta/instance/vertex/edge/face/tetrahedron attributes will be kept.
Returns:
vector<SimplicialComplex> the transformed simplicial complexes.
function check_view
function compute_instance_volume
Compute the volume of an instance in the simplicial complex. Attribute __volume <Float> will be created in the instance vertices.
UIPC_GEOMETRY_API S< AttributeSlot < Float > > uipc::geometry::compute_instance_volume (
    SimplicialComplex & R
) 
Only tetmesh and closed trimesh are supported.
Parameters:
- RThe simplicial complex.
Returns:
The attribute slot of the instance volume.
function compute_mesh_d_hat
Suggest a proper d_hat for a mesh, create an attribute d_hat on meta.
UIPC_GEOMETRY_API S< AttributeSlot < Float > > uipc::geometry::compute_mesh_d_hat (
    SimplicialComplex & R,
    Float max_d_hat=std::numeric_limits< Float >::max()
) 
Parameters:
- RThe simplicial complex to compute d_hat for.
- max_d_hatThe maximum allowed d_hat, default to infinity.
function compute_vertex_volume
UIPC_GEOMETRY_API S< AttributeSlot < Float > > uipc::geometry::compute_vertex_volume (
    SimplicialComplex & R
) 
function constitution_type
function edge_edge_squared_distance
Float UIPC_GEOMETRY_API uipc::geometry::edge_edge_squared_distance (
    const Vector3 & Ea0,
    const Vector3 & Ea1,
    const Vector3 & Eb0,
    const Vector3 & Eb1
) 
function extract_surface
Extract the surface of a tetrahedral mesh.
UIPC_GEOMETRY_API SimplicialComplex uipc::geometry::extract_surface (
    const SimplicialComplex & src
) 
Parameters:
- srcThe tetrahedral mesh.
Returns:
SimplicialComplex The surface of the tetrahedral mesh.
function extract_surface
Extract the surface of a list of tetrahedral meshes and merge them into one.
UIPC_GEOMETRY_API SimplicialComplex uipc::geometry::extract_surface (
    span< const SimplicialComplex * > complexes
) 
All the instances of the input tetrahedral meshes will be applied to the output surface.
Parameters:
- complexesThe list of tetrahedral meshes.
Returns:
SimplicialComplex The surface of the tetrahedral meshes.
function facet_closure
Generate the closure from a collection of facet simplices, who only have the top dimension simplices.
UIPC_GEOMETRY_API SimplicialComplex uipc::geometry::facet_closure (
    const SimplicialComplex & complex
) 
E.g. 1) the input 3D tetmesh can only have tetrahedrons (no triangles, edges). 2) the input 2D trimesh can only have triangles (no edges). 3) the input 1D linemesh can only have edges. 4) the input 0D pointcloud can only have vertices.
function flip_inward_triangles
Flip the orientation of the triangles in the simplicial complex.
UIPC_GEOMETRY_API SimplicialComplex uipc::geometry::flip_inward_triangles (
    const SimplicialComplex & sc
) 
The input simplicial complex should have the attribute slot 'orient':<Index> for each triangle. After the operation, the orientation of the triangles will be flipped, and the orient attribute will be updated.
Returns:
SimplicialComplex the simplicial complex with the orientation of the triangles flipped.
function ground
Create a gound plane.
UIPC_GEOMETRY_API ImplicitGeometry uipc::geometry::ground (
    Float height=0.0,
    const Vector3 & N=Vector3::UnitY()
) 
Parameters:
- heightThe height of the ground plane
function halfplane
Create a half-plane.
UIPC_GEOMETRY_API ImplicitGeometry uipc::geometry::halfplane (
    const Vector3 & P=Vector3::Zero(),
    const Vector3 & N=Vector3::UnitY()
) 
Parameters:
- heightThe height of the ground plane
function halfplane_vertex_signed_distance
Compute the distance between a half-plane (P, N) and a vertex V (with thickness V_thickness).
Float UIPC_GEOMETRY_API uipc::geometry::halfplane_vertex_signed_distance (
    const Vector3 & P,
    const Vector3 & N,
    const Vector3 & V,
    Float V_thickness=0.0
) 
Parameters:
- PThe Origin point of the half-plane.
- NThe Normal vector of the half-plane.
- VThe Vertex point.
- V_thicknessThe thickness of the vertex.
function is_point_in_tet
Check if a point is in a tetrahedron.
UIPC_GEOMETRY_API bool uipc::geometry::is_point_in_tet (
    const Vector3 & T0,
    const Vector3 & T1,
    const Vector3 & T2,
    const Vector3 & T3,
    const Vector3 & P
) 
T0, T1, T2, T3 the vertices of the tetrahedron P is the point
Returns:
true if the point is in the tetrahedron
function is_trimesh_closed
Check if a trimesh is closed.
Only 2D SimplicialComplex is supported.
Parameters:
- Rthe simplicial complex to be checked.
Returns:
true if the trimesh is closed, false otherwise.
function label_connected_vertices
Label the connected vertices of a simplicial complex (by edges).
UIPC_GEOMETRY_API S< AttributeSlot < IndexT > > uipc::geometry::label_connected_vertices (
    SimplicialComplex & complex
) 
- Create a region<IndexT> attribute onverticesto tell which region a vertex is belong to.
- Create a region_count<IndexT> attribute onmetato tell how many regions are there.
Returns:
S<AttributeSlot<IndexT>> The region attribute slot. 
function label_graph_color
Label the vertex color of a simplicial complex by graph coloring algorithm.
UIPC_GEOMETRY_API S< AttributeSlot < IndexT > > uipc::geometry::label_graph_color (
    SimplicialComplex & sc
) 
The edges of the graph is from the edges of the simplicial complex.
* Create a graph/color <IndexT> attribute on vertices to tell the color of each vertex.
* Create a graph/color_count <IndexT> attribute on meta to tell how many colors are used.
Returns:
S<AttributeSlot<IndexT>> The graph/color attribute slot. 
function label_region
Label the regions of a simplicial complex.
- Create a region<IndexT> attribute onverticesto tell which region a vertex belongs to.
- Create a region<IndexT> attribute onedgesto tell which region an edge belongs to.
- Create a region<IndexT> attribute ontriangles(if exists) to tell which region a triangle belongs to.
- Create a region<IndexT> attribute ontetrahedra(if exists) to tell which region a tetrahedron belongs to.
- Create a region_count<IndexT> attribute onmetato tell how many regions are there.
function label_surface
Label the surface of a simplicial complex.
1) label 'is_surf':<IndexT> on vertices/edges/triangles/tetrahedra 2) set 'parent_id':<IndexT> on triangles, indicating the parent tetrahedron
Parameters:
- Rthe simplicial complex to be labeled.
function label_triangle_orient
Label the orientation of the triangles in the simplicial complex.
UIPC_GEOMETRY_API S< AttributeSlot < IndexT > > uipc::geometry::label_triangle_orient (
    SimplicialComplex & sc
) 
Set 'orient':<Index> for each triangle in the simplicial complex. 1) orient=1 means the triangle is oriented outward the tetrahedron. 2) orient=0 means the orientation is undetermined. 3) orient=-1 means the triangle is oriented inward the tetrahedron.
Returns:
P<AttributeSlot<IndexT>> the attribute slot of the triangle orientation.
function linemesh
Create a simplicial complex from a line mesh.
UIPC_GEOMETRY_API SimplicialComplex uipc::geometry::linemesh (
    span< const Vector3 > Vs,
    span< const Vector2i > Es
) 
Parameters:
- VsThe vertex positions of the line mesh
- EsThe edges of the line mesh
Returns:
function merge
Merge a list of simplicial complexes into one simplicial complex.
UIPC_GEOMETRY_API SimplicialComplex uipc::geometry::merge (
    span< const SimplicialComplex * > complexes
) 
All input simplicial complexes must have only one instance.
Returns:
SimplicialComplex the merged simplicial complex.
function merge
UIPC_GEOMETRY_API SimplicialComplex uipc::geometry::merge (
    span< const SimplicialComplex > complexes
) 
function merge
UIPC_GEOMETRY_API SimplicialComplex uipc::geometry::merge (
    std::initializer_list< const SimplicialComplex * > && complexes
) 
function mesh_partition
partition the simplicial complex
void UIPC_GEOMETRY_API uipc::geometry::mesh_partition (
    SimplicialComplex & sc,
    SizeT part_max_size
) 
create a mesh_part <IndexT> attribute on the simplicial complex' vertices
Parameters:
- scsimplicial complex
- part_max_sizethe vertex number in each partition <= part_max_size
function operator+=
UIPC_CORE_API AttributeCollection & uipc::geometry::operator+= (
    AttributeCollection & dst,
    const AttributeCollectionCommit & inc
) 
function operator+=
UIPC_CORE_API GeometryCollection & uipc::geometry::operator+= (
    GeometryCollection & dst,
    const GeometryCollectionCommit & inc
) 
function operator+=
function operator-
UIPC_CORE_API AttributeCollectionCommit uipc::geometry::operator- (
    const AttributeCollection & dst,
    const AttributeCollection & src
) 
function operator-
UIPC_CORE_API GeometryCollectionCommit uipc::geometry::operator- (
    const GeometryCollection & dst,
    const GeometryCollection & src
) 
function operator-
UIPC_CORE_API GeometryCommit uipc::geometry::operator- (
    const Geometry & dst,
    const Geometry & src
) 
function optimal_transform
Find out the optimal transformation matrix that maps the source points to the destination points.
UIPC_GEOMETRY_API Matrix4x4 uipc::geometry::optimal_transform (
    span< const Vector3 > S,
    span< const Vector3 > D
) 
Parameters:
- SThe source points.
- DThe destination points.
Returns:
function optimal_transform
Find out the optimal transformation matrix that maps the source simplicial complex to the destination simplicial complex.
UIPC_GEOMETRY_API Matrix4x4 uipc::geometry::optimal_transform (
    const SimplicialComplex & S,
    const SimplicialComplex & D
) 
Parameters:
- SThe source simplicial complex.
- DThe destination simplicial complex.
Returns:
function point_edge_squared_distance
Float UIPC_GEOMETRY_API uipc::geometry::point_edge_squared_distance (
    const Vector3 & P,
    const Vector3 & E0,
    const Vector3 & E1
) 
function point_point_squared_distance
Float UIPC_GEOMETRY_API uipc::geometry::point_point_squared_distance (
    const Vector3 & P0,
    const Vector3 & P1
) 
function point_triangle_squared_distance
Float UIPC_GEOMETRY_API uipc::geometry::point_triangle_squared_distance (
    const Vector3 & P,
    const Vector3 & T0,
    const Vector3 & T1,
    const Vector3 & T2
) 
function pointcloud
Create a simplicial complex from a point cloud.
Parameters:
- VsThe vertex positions of the point cloud
Returns:
function points_from_volume
Construct a point cloud inside a volume represented by a simplicial complex.
UIPC_GEOMETRY_API SimplicialComplex uipc::geometry::points_from_volume (
    const SimplicialComplex & sc,
    Float resolution=0.01
) 
Parameters:
- scThe input simplicial complex representing a volume (closed manifold).
- resolutionThe resolution of the point cloud.
Returns:
SimplicialComplex A point cloud represented as a simplicial complex with only vertices.
function tetmesh
Create a simplicial complex from a tetrahedral mesh.
UIPC_GEOMETRY_API SimplicialComplex uipc::geometry::tetmesh (
    span< const Vector3 > Vs,
    span< const Vector4i > Ts
) 
Parameters:
- VsThe vertex positions of the tetrahedral mesh
- TsThe tetrahedra of the tetrahedral mesh
function tri_edge_intersect
Check if a triangle and an edge intersect.
UIPC_GEOMETRY_API bool uipc::geometry::tri_edge_intersect (
    const Vector3 & T0,
    const Vector3 & T1,
    const Vector3 & T2,
    const Vector3 & E0,
    const Vector3 & E1
) 
T0, T1, T2 the vertices of the triangle E0, E1 the vertices of the edge
Returns:
true if the triangle and the edge intersect
function trimesh
Create a simplicial complex from a triangle mesh.
UIPC_GEOMETRY_API SimplicialComplex uipc::geometry::trimesh (
    span< const Vector3 > Vs,
    span< const Vector3i > Fs
) 
Parameters:
- VsThe vertex positions of the triangle mesh
- FsThe triangles of the triangle mesh
Returns:
function trimesh
Create a 2D simplicial complex from a quad mesh (4-sided polygons).
UIPC_GEOMETRY_API SimplicialComplex uipc::geometry::trimesh (
    span< const Vector3 > Vs,
    span< const Vector4i > Fs
) 
Parameters:
- VsThe vertex positions of the quad mesh
- FsThe quads of the quad mesh
Returns:
The documentation for this class was generated from the following file include/uipc/backend/visitors/geometry_visitor.h