Skip to content

Namespace uipc::geometry

Namespace List > uipc > geometry

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 AttributeCopy
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 Geometry
A base geometries class that contains the instance attributes and the meta attributes.
class GeometryAttributeError
class GeometryCollection
class GeometryFriend <typename T>
class GeometryIOError
class GeometrySlot
class GeometrySlotT <GeometryT>
class GeometrySlotT< ImplicitGeometry > <>
class GeometrySlotT< SimplicialComplex > <>
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 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

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_GEOMETRY_API S< AttributeSlot< Float > > compute_vertex_mass (SimplicialComplex & R, Float mass_density)
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.
UIPC_GEOMETRY_API S< AttributeSlot< IndexT > > label_connected_vertices (SimplicialComplex & complex)
Label the connected vertices of a simplicial complex (by edges).
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 (std::initializer_list< const SimplicialComplex * > && complexes)
void UIPC_GEOMETRY_API mesh_partition (SimplicialComplex & sc, SizeT part_max_size)
partition the simplicial complex
UIPC_GEOMETRY_API SimplicialComplex pointcloud (span< const Vector3 > Vs)
Create a simplicial complex from a point cloud.
UIPC_GEOMETRY_API SimplicialComplex tetmesh (span< const Vector3 > Vs, span< const Vector4i > Ts)
Create a simplicial complex from a tetrahedral mesh.
UIPC_GEOMETRY_API SimplicialComplex tetrahedralize (const SimplicialComplex & sc, const Json & options=Json::object())
Tetrahedralize a 2D simplicial complex (trimesh).
UIPC_GEOMETRY_API SimplicialComplex trimesh (span< const Vector3 > Vs, span< const Vector3i > Fs)
Create a simplicial complex from a triangle mesh.

Public Types Documentation

enum GeometrySlotState

enum uipc::geometry::GeometrySlotState {
    Normal,
    PendingCreate,
    PendingDestroy
};

typedef ImplicitGeometrySlot

using uipc::geometry::ImplicitGeometrySlot =  GeometrySlotT<ImplicitGeometry>;

typedef SimplicialComplexSlot

using uipc::geometry::SimplicialComplexSlot =  GeometrySlotT<SimplicialComplex>;

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 compute_vertex_mass

UIPC_GEOMETRY_API S< AttributeSlot < Float > > uipc::geometry::compute_vertex_mass (
    SimplicialComplex & R,
    Float mass_density
) 

function extract_surface

Extract the surface of a tetrahedral mesh.

UIPC_GEOMETRY_API SimplicialComplex uipc::geometry::extract_surface (
    const SimplicialComplex & src
) 

Parameters:

  • src The 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:

  • complexes The 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:

  • height The 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:

  • height The height of the ground plane

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 on vertices to tell which region a vertex is belong to.
  • Create a region_count <IndexT> attribute on meta to tell how many regions are there.

Returns:

S<AttributeSlot<IndexT>> The region attribute slot.


function label_region

Label the regions of a simplicial complex.

UIPC_GEOMETRY_API void uipc::geometry::label_region (
    SimplicialComplex & complex
) 
  • Create a region <IndexT> attribute on edges to tell which region an edge is belong to.
  • Create a region <IndexT> attribute on triangles to tell which region a triangle is belong to. (if exists)
  • Create a region <IndexT> attribute on tetrahedra to tell which region a tetrahedron is belong to. (if exists)
  • Create a region_count <IndexT> attribute on meta to tell how many regions are there.

Returns:

S<AttributeSlot<IndexT>> The region attribute slot.


function label_surface

Label the surface of a simplicial complex.

UIPC_GEOMETRY_API void uipc::geometry::label_surface (
    SimplicialComplex & R
) 

1) label 'is_surf':<IndexT> on vertices/edges/triangles/tetrahedra 2) set 'parent_id':<IndexT> on triangles, indicating the parent tetrahedron

Parameters:

  • R the 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:

  • Vs The vertex positions of the line mesh
  • Es The edges of the line mesh

Returns:

SimplicialComplex


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 (
    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:

  • sc simplicial complex
  • part_max_size the vertex number in each partition <= part_max_size

function pointcloud

Create a simplicial complex from a point cloud.

UIPC_GEOMETRY_API SimplicialComplex uipc::geometry::pointcloud (
    span< const Vector3 > Vs
) 

Parameters:

  • Vs The vertex positions of the point cloud

Returns:

SimplicialComplex


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:

  • Vs The vertex positions of the tetrahedral mesh
  • Ts The tetrahedra of the tetrahedral mesh

function tetrahedralize

Tetrahedralize a 2D simplicial complex (trimesh).

UIPC_GEOMETRY_API SimplicialComplex uipc::geometry::tetrahedralize (
    const SimplicialComplex & sc,
    const Json & options=Json::object()
) 

Returns:

SimplicialComplex The simplicial complexes by regions.


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:

  • Vs The vertex positions of the triangle mesh
  • Fs The triangles of the triangle mesh

Returns:

SimplicialComplex



The documentation for this class was generated from the following file include/uipc/backend/visitors/geometry_visitor.h