Geogram
Version 1.9.1
A programming library of geometric algorithms
|
Computes the intersection between a set of halfplanes using Bowyer-Watson algorithm. More...
#include <geogram/voronoi/convex_cell.h>
Public Member Functions | |
ConvexCell (ConvexCellFlags flags=None) | |
ConvexCell constructor. More... | |
void | use_exact_predicates (bool x) |
Specifies whether exact predicates should be used. More... | |
bool | has_vglobal () const |
Tests whether global vertex indices are stored. More... | |
bool | has_tflags () const |
Tests whether triangle flags are stored. More... | |
void | create_vglobal () |
Creates vertex global indices if they are not present. | |
void | clear () |
Removes all vertices and triangles from this ConvexCell. More... | |
void | init_with_box (double xmin, double ymin, double zmin, double xmax, double ymax, double zmax) |
Initializes this ConvexCell to an axis-aligned box. More... | |
void | init_with_tet (vec4 P0, vec4 P1, vec4 P2, vec4 P3) |
Initializes this ConvexCell to a tetrahedron. More... | |
void | init_with_tet (vec4 P0, vec4 P1, vec4 P2, vec4 P3, global_index_t P0_global_index, global_index_t P1_global_index, global_index_t P2_global_index, global_index_t P3_global_index) |
Initializes this ConvexCell to a tetrahedron. More... | |
void | save (const std::string &filename, double shrink=0.0) const |
Saves the computed cell in alias wavefront file format. More... | |
index_t | save (std::ostream &out, global_index_t v_offset=1, double shrink=0.0, bool borders_only=false) const |
Saves the computed cell in alias wavefront file format. More... | |
void | append_to_mesh (GEO::Mesh *mesh, double shrink=0.0, bool borders_only=false, GEO::Attribute< GEO::index_t > *facet_attr=nullptr) const |
Appends the computed cell to a GEO::Mesh. More... | |
void | for_each_Voronoi_vertex (index_t v, std::function< void(index_t)> vertex) |
Calls a user-defined function for each vertex of a Voronoi facet. More... | |
void | clip_by_plane (vec4 P) |
Clips this convex cell by a new plane. More... | |
void | clip_by_plane (vec4 P, global_index_t j) |
Clips this convex cell by a new plane and stores the corresponding global index in the newly created vertex. More... | |
void | clip_by_plane (vec4 P, global_index_t P_global_index, std::function< bool(ushort, ushort)> triangle_conflict_predicate) |
Clips this convex cell by a new plane, using a user-defined geometric predicate. More... | |
void | clip_by_plane_fast (vec4 P) |
Clips this convex cell by a new plane and stores the corresponding global index in the newly created vertex. More... | |
void | clip_by_plane_fast (vec4 P, global_index_t j) |
Clips this convex cell by a new plane and stores the corresponding global index in the newly created vertex. More... | |
index_t | nb_t () const |
Gets the number of triangles. More... | |
index_t | nb_v () const |
Gets the number of vertices. More... | |
index_t | create_vertex (vec4 P) |
Directly creates a new vertex. More... | |
index_t | create_vertex (vec4 P, global_index_t v) |
Directly creates a new vertex. More... | |
index_t | create_triangle (index_t i, index_t j, index_t k) |
Directly creates a new triangle. More... | |
void | kill_vertex (index_t v) |
Replaces a vertex with the vertex at infinity in all facets. More... | |
bool | vertex_is_contributing (index_t v) const |
Tests whether a vertex has a corresponding facet in the cell. More... | |
index_t | vertex_triangle (index_t v) const |
Gets a triangle incident to a vertex. More... | |
void | compute_geometry () |
Computes the geometry and some cached information. More... | |
double | facet_area (index_t v) const |
Gets the dual facet area of a given vertex. More... | |
double | volume () const |
Computes the volume of this convex cell. More... | |
vec3 | barycenter () const |
Computes the barycenter of this convex cell. More... | |
void | compute_mg (double &m, vec3 &mg) const |
Computes volume and barycenter. More... | |
double | squared_radius (vec3 center) const |
Computes the squared radius of the smallest sphere containing the cell and centered on a point. More... | |
double | squared_inner_radius (vec3 center) const |
Computes the squared radius of the largest sphere contained in the cell and centered on a point. More... | |
bool | empty () const |
Tests whether this ConvexCell is empty. More... | |
global_index_t | v_global_index (index_t lv) const |
Gets the global vertex index from a local vertex index. More... | |
void | set_v_global_index (index_t lv, global_index_t v) |
Sets the global vertex index associated with a local vertex index. More... | |
bool | has_v_global_index (global_index_t v) const |
Tests whether a vertex with a given global index exists in this ConvexCell. More... | |
ushort | first_triangle () const |
Gets the first triangle. More... | |
ushort | next_triangle (ushort t) const |
Gets the successor of a triangle. More... | |
vec3 | triangle_point (ushort t) const |
Gets the point that corresponds to a triangle. More... | |
global_index_t | triangle_v_global_index (ushort t, index_t llv) const |
Gets the global index of a triangle vertex. More... | |
index_t | triangle_v_local_index (ushort t, index_t llv) const |
Gets the local index of a triangle vertex. More... | |
bool | triangle_is_user_marked (ushort t) |
Tests whether a triangle is marked by the user. More... | |
void | triangle_user_mark (ushort t) |
Sets the user mark on a triangle. More... | |
void | triangle_user_unmark (ushort t) |
Resets the user mark on a triangle. More... | |
bool | cell_has_conflict (const vec4 &P) |
Tests whether a cell has at least one vertex in conflict with a halfspace. More... | |
bool | cell_is_totally_in_conflict (const vec4 &P) |
Tests whether a cell has all its vertices in conflict with a plane. More... | |
index_t | triangle_adjacent (index_t t, index_t le) const |
Gets a triangle adjacent to another triangle by edge local index. More... | |
void | set_triangle_adjacent (index_t t1, index_t le, index_t t2) |
Sets triangle to triangle adjacency. More... | |
index_t | triangle_vertex (index_t t, index_t lv) const |
Gets a triangle vertex. More... | |
index_t | triangle_find_vertex (index_t t, index_t v) const |
Gets the local index of a vertex in a triangle. More... | |
index_t | triangle_find_adjacent (index_t t1, index_t t2) const |
Gets the edge on witch a triangle is adjacent to another one. More... | |
bool | triangle_is_infinite (index_t t) const |
Tests whether a triangle is infinite. More... | |
vec4 | vertex_plane (index_t v) const |
Gets the equation of a plane associated with a vertex. More... | |
vec3 | vertex_plane_normal (index_t v) const |
Gets the normal to the plane associated with a vertex. More... | |
bool | triangle_is_marked_as_conflict (index_t t) const |
Tests whether a triangle is marked as conflict. More... | |
bool | triangle_is_in_conflict (TriangleWithFlags T, const vec4 &eqn) const |
Tests whether a triangle is in conflict with a plane. More... | |
index_t | new_triangle (index_t i, index_t j, index_t k) |
Creates a new triangle. More... | |
index_t | new_triangle (index_t i, index_t j, index_t k, index_t adj0, index_t adj1, index_t adj2) |
Creates a new triangle. More... | |
vec4 | compute_triangle_point (index_t t) const |
Computes the coordinates of the point associated with a triangle. More... | |
Triangle | get_triangle (index_t t) const |
Gets the three vertices of a triangle. More... | |
ushort | get_triangle_flags (index_t t) const |
Gets the flags associated with a triangle. More... | |
void | set_triangle_flags (index_t t, ushort flags) |
Sets the flags of a triangle. More... | |
TriangleWithFlags | get_triangle_and_flags (index_t t) const |
Gets the three vertices of a triangle and its flags. More... | |
bool | triangle_is_marked_as_conflict (index_t t) |
Tests whether a given triangle is in the conflict zone. | |
index_t | max_t () const |
Gets the maximum valid index for a triangle. More... | |
index_t | max_v () const |
Gets the maximum valid index for a vertex. More... | |
void | grow_t () |
Allocates more space for triangles. More... | |
void | grow_v () |
Allocates more space for vertices. More... | |
void | swap (ConvexCell &other) |
Swaps two ConvexCells. More... | |
vec3 & | stored_triangle_point (ushort t) |
Gets a modifiable reference to a triangle point. More... | |
Protected Member Functions | |
void | connect_triangles () |
finds all triangle-triangle adjacency relations. More... | |
void | triangulate_conflict_zone (index_t lv, index_t conflict_head, index_t conflict_tail) |
Triangulates the conflict zone. More... | |
void | set_vertex_plane (index_t v, vec4 P) |
Changes a vertex plane equation. More... | |
Friends | |
class | GEO::PeriodicDelaunay3d |
Computes the intersection between a set of halfplanes using Bowyer-Watson algorithm.
Do not use with a large number of planes.
Definition at line 419 of file convex_cell.h.
VBW::ConvexCell::ConvexCell | ( | ConvexCellFlags | flags = None | ) |
ConvexCell constructor.
[in] | flags | a combination of WithVGlobal, WithTFlags |
void VBW::ConvexCell::append_to_mesh | ( | GEO::Mesh * | mesh, |
double | shrink = 0.0 , |
||
bool | borders_only = false , |
||
GEO::Attribute< GEO::index_t > * | facet_attr = nullptr |
||
) | const |
Appends the computed cell to a GEO::Mesh.
[out] | mesh | a pointer to the mesh. |
[in] | shrink | shrinking factor to ease visualization. |
[in] | borders_only | if set, only facets that correspond to vertex global index -1 are saved. |
[in] | facet_attr | optional facet attribute that stores global facet (dual vertex) ids. |
vec3 VBW::ConvexCell::barycenter | ( | ) | const |
Computes the barycenter of this convex cell.
compute_geometry() needs to be called before.
|
inline |
Tests whether a cell has at least one vertex in conflict with a halfspace.
[in] | P | the equation of the halfspace. |
true | if there exists a triangle t such that triangle_is_in_conflict(P) |
false | otherwise. |
Definition at line 966 of file convex_cell.h.
|
inline |
Tests whether a cell has all its vertices in conflict with a plane.
[in] | P | the equation of the halfspace. |
true | if all the triangles are in conflict with P. |
false | otherwise. |
Definition at line 986 of file convex_cell.h.
void VBW::ConvexCell::clear | ( | ) |
Removes all vertices and triangles from this ConvexCell.
Keeps allocated memory for future use.
void VBW::ConvexCell::clip_by_plane | ( | vec4 | P | ) |
Clips this convex cell by a new plane.
The positive side of the plane equation corresponds to what is kept. In other words, the normal vector P.x, P.y, P.z points towards the interior of this ConvexCell.
[in] | P | the plane equation. |
void VBW::ConvexCell::clip_by_plane | ( | vec4 | P, |
global_index_t | j | ||
) |
Clips this convex cell by a new plane and stores the corresponding global index in the newly created vertex.
The positive side of the plane equation corresponds to what is kept. In other words, the normal vector P.x, P.y, P.z points towards the interior of this ConvexCell. This function can only be called if global indices are stored.
[in] | P | the plane equation. |
[in] | j | the global index of the plane. |
void VBW::ConvexCell::clip_by_plane | ( | vec4 | P, |
global_index_t | P_global_index, | ||
std::function< bool(ushort, ushort)> | triangle_conflict_predicate | ||
) |
Clips this convex cell by a new plane, using a user-defined geometric predicate.
It is useful to be able to have a user-defined geometric predicates when the vertices have a symbolic representation, stored in the global indices associated with the plane. It is used by the robust mesh boolean operations. The positive side of the plane equation corresponds to what is kept. In other words, the normal vector P.x, P.y, P.z points towards the interior of this ConvexCell. If global indices are stored, then j is stored as the global index of the plane equation.
[in] | P | the plane equation. |
[in] | P_global_index | the global index of the plane. |
[in] | triangle_conflict_predicate | a function that takes as arguments a local triangle index and local vertex (plane eqn) index, and that returns true if the triangle is in conflict with the vertex. |
void VBW::ConvexCell::clip_by_plane_fast | ( | vec4 | P | ) |
Clips this convex cell by a new plane and stores the corresponding global index in the newly created vertex.
For a ConvexCell with a large number of facets, this version is faster than clip_by_plane(). However, it cannot be used with a ConvexCell that has infinite faces.
[in] | P | the plane equation. |
void VBW::ConvexCell::clip_by_plane_fast | ( | vec4 | P, |
global_index_t | j | ||
) |
Clips this convex cell by a new plane and stores the corresponding global index in the newly created vertex.
For a ConvexCell with a large number of facets, this version is faster than clip_by_plane(). However, it cannot be used with a ConvexCell that has infinite faces.
[in] | P | the plane equation. |
[in] | j | the global index of the plane. |
void VBW::ConvexCell::compute_geometry | ( | ) |
Computes the geometry and some cached information.
Needs to be called before volume(), facet_area() and barycenter().
void VBW::ConvexCell::compute_mg | ( | double & | m, |
vec3 & | mg | ||
) | const |
Computes volume and barycenter.
[out] | m | the computed volume |
[out] | mg | the computed volume times the barycenter |
compute_geometry() needs to be called before.
vec4 VBW::ConvexCell::compute_triangle_point | ( | index_t | t | ) | const |
Computes the coordinates of the point associated with a triangle.
[in] | t | the triangle. |
|
protected |
finds all triangle-triangle adjacency relations.
Client code should not need to call this function. It is used by PeriodicDelaunay3d::copy_Laguerre_cell_from_Delaunay().
|
inline |
Directly creates a new triangle.
[in] | i,j,k | the three vertices of the triangle. |
The triangle is inserted into the list of valid triangles.
Definition at line 708 of file convex_cell.h.
|
inline |
Directly creates a new vertex.
[in] | P | the plane equation attached to the vertex. |
Definition at line 677 of file convex_cell.h.
|
inline |
Directly creates a new vertex.
[in] | P | the plane equation attached to the vertex. |
[in] | v | the global index associated with the vertex. |
Definition at line 694 of file convex_cell.h.
|
inline |
Tests whether this ConvexCell is empty.
ConvexCell can be empty if everything was clipped out.
true | if this ConvexCell is empty. |
false | otherwise. |
Definition at line 817 of file convex_cell.h.
double VBW::ConvexCell::facet_area | ( | index_t | v | ) | const |
Gets the dual facet area of a given vertex.
compute_geometry() needs to be called before.
[in] | v | the vertex. |
terminate() needs to be called before calling this function.
|
inline |
Gets the first triangle.
Definition at line 866 of file convex_cell.h.
void VBW::ConvexCell::for_each_Voronoi_vertex | ( | index_t | v, |
std::function< void(index_t)> | vertex | ||
) |
Calls a user-defined function for each vertex of a Voronoi facet.
One needs to call compute_geometry() before calling this function.
[in] | v | the index of the (dual) Voronoi Facet, that is a (primal) vertex, in [0..nb_v()-1] |
[in] | vertex | a function that takes an index_t as an argument, with the index of the triangle that corresponds to the current Voronoi vertex. |
|
inline |
Gets the three vertices of a triangle.
[in] | t | the triangle. |
Definition at line 1202 of file convex_cell.h.
|
inline |
Gets the three vertices of a triangle and its flags.
[in] | t | the triangle. |
Definition at line 1235 of file convex_cell.h.
|
inline |
Gets the flags associated with a triangle.
Contains both the conflict flag and the chaining.
[in] | t | the triangle. |
t
. Definition at line 1214 of file convex_cell.h.
void VBW::ConvexCell::grow_t | ( | ) |
Allocates more space for triangles.
Makes max_t_ twice bigger.
void VBW::ConvexCell::grow_v | ( | ) |
Allocates more space for vertices.
Makes max_v_ twice bigger.
|
inline |
Tests whether triangle flags are stored.
true | if triangle flags are stored. |
false | otherwise. |
Definition at line 454 of file convex_cell.h.
bool VBW::ConvexCell::has_v_global_index | ( | global_index_t | v | ) | const |
Tests whether a vertex with a given global index exists in this ConvexCell.
[in] | v | the global index. |
true | if there exists in this ConvexCell a vertex with global index v . |
false | otherwise. |
|
inline |
Tests whether global vertex indices are stored.
true | if global vertex indices are stored. |
false | otherwise. |
Definition at line 445 of file convex_cell.h.
void VBW::ConvexCell::init_with_box | ( | double | xmin, |
double | ymin, | ||
double | zmin, | ||
double | xmax, | ||
double | ymax, | ||
double | zmax | ||
) |
Initializes this ConvexCell to an axis-aligned box.
Previous contents of this ConvexCell are discarded. Vertex 0 is vertex at infinity.
[in] | xmin,ymin,zmin,xmax,ymax,zmax | the coordinates of the box. |
void VBW::ConvexCell::init_with_tet | ( | vec4 | P0, |
vec4 | P1, | ||
vec4 | P2, | ||
vec4 | P3 | ||
) |
Initializes this ConvexCell to a tetrahedron.
Previous contents of this ConvexCell are discarded. Vertex 0 is vertex at infinity.
[in] | P0,P1,P2,P3 | the plane equations of the four faces of the tetrahedron. |
void VBW::ConvexCell::init_with_tet | ( | vec4 | P0, |
vec4 | P1, | ||
vec4 | P2, | ||
vec4 | P3, | ||
global_index_t | P0_global_index, | ||
global_index_t | P1_global_index, | ||
global_index_t | P2_global_index, | ||
global_index_t | P3_global_index | ||
) |
Initializes this ConvexCell to a tetrahedron.
Previous contents of this ConvexCell are discarded. Vertex 0 is vertex at infinity.
[in] | P0,P1,P2,P3 | the plane equations of the four faces of the tetrahedron. |
[in] | P0_global_index,P1_global_index,P1_global_index,P2_global_index | the global indices associated with the plane equations. |
void VBW::ConvexCell::kill_vertex | ( | index_t | v | ) |
Replaces a vertex with the vertex at infinity in all facets.
[in] | v | the vertex to be killed. |
|
inline |
Gets the maximum valid index for a triangle.
Definition at line 1253 of file convex_cell.h.
|
inline |
Gets the maximum valid index for a vertex.
Definition at line 1261 of file convex_cell.h.
|
inline |
Gets the number of triangles.
The created triangles are not necessarily valid ones. To get the valid triangles, one needs to traverse the list from first_valid_.
Definition at line 657 of file convex_cell.h.
|
inline |
Gets the number of vertices.
Some vertices can be incident to no triangle. The first six vertices correspond to the facets of the initial axis aligned box passed to the constructor.
Definition at line 668 of file convex_cell.h.
|
inline |
Creates a new triangle.
[in] | i,j,k | the three vertices of the triangle. |
Definition at line 1143 of file convex_cell.h.
|
inline |
Creates a new triangle.
Adjacency information is not used (kept for reference).
[in] | i,j,k | the three vertices of the triangle. |
[in] | adj0,adj1,adj2 | the three adjacent triangles (unused in this version). |
Definition at line 1175 of file convex_cell.h.
Gets the successor of a triangle.
[in] | t | the index of a valid triangle. |
t
, or END_OF_LIST if t
is the last triangle. Definition at line 876 of file convex_cell.h.
void VBW::ConvexCell::save | ( | const std::string & | filename, |
double | shrink = 0.0 |
||
) | const |
Saves the computed cell in alias wavefront file format.
[in] | filename | the name of the file where to save the cell. |
[in] | shrink | shrinking factor to ease visualization. |
index_t VBW::ConvexCell::save | ( | std::ostream & | out, |
global_index_t | v_offset = 1 , |
||
double | shrink = 0.0 , |
||
bool | borders_only = false |
||
) | const |
Saves the computed cell in alias wavefront file format.
[out] | out | a stream where to save the output. |
[in] | v_offset | offset applied to vertex indices. |
[in] | shrink | shrinking factor to ease visualization. |
[in] | borders_only | if set, only facets that correspond to vertex global index -1 are saved. |
|
inline |
Sets triangle to triangle adjacency.
[in] | t1 | a triangle. |
[in] | le | local index of an edge of t (in 0..2). |
[in] | t2 | triangle to be made adjacent to t1 along edge le . |
Definition at line 1019 of file convex_cell.h.
|
inline |
Sets the flags of a triangle.
[in] | t | the triangle. |
[in] | flags | the flags to be set. |
Definition at line 1224 of file convex_cell.h.
|
inline |
Sets the global vertex index associated with a local vertex index.
Vertex indices correspond to planes (remember, we are in dual form).
[in] | lv | the local vertex index |
[in] | v | the global vertex index that corresponds to lv. |
Definition at line 845 of file convex_cell.h.
|
inlineprotected |
Changes a vertex plane equation.
[in] | v | the vertex. |
[in] | P | the plane equation. |
Does not update combinatorics.
Definition at line 1343 of file convex_cell.h.
double VBW::ConvexCell::squared_inner_radius | ( | vec3 | center | ) | const |
Computes the squared radius of the largest sphere contained in the cell and centered on a point.
double VBW::ConvexCell::squared_radius | ( | vec3 | center | ) | const |
Computes the squared radius of the smallest sphere containing the cell and centered on a point.
|
inline |
Gets a modifiable reference to a triangle point.
[in] | t | the index |
Definition at line 1311 of file convex_cell.h.
|
inline |
Swaps two ConvexCells.
[in] | other | the ConvexCell to be exchanged with this ConvexCell. |
Definition at line 1283 of file convex_cell.h.
|
inline |
Gets a triangle adjacent to another triangle by edge local index.
[in] | t | a triangle. |
[in] | le | local index of an edge of t (in 0..2). |
t
along \ p e. Definition at line 1006 of file convex_cell.h.
|
inline |
Gets the edge on witch a triangle is adjacent to another one.
[in] | t1 | a triangle. |
[in] | t2 | a triangle adjacent to t1 |
Definition at line 1061 of file convex_cell.h.
|
inline |
Gets the local index of a vertex in a triangle.
[in] | t | a triangle. |
[in] | v | a vertex index. |
v
in t
(in 0..2). Definition at line 1047 of file convex_cell.h.
bool VBW::ConvexCell::triangle_is_in_conflict | ( | TriangleWithFlags | T, |
const vec4 & | eqn | ||
) | const |
Tests whether a triangle is in conflict with a plane.
A triangle is in conflict with a plane if feeding the point associated with the triangle in the equation of the plane yields a negative number.
[in] | T | a triangle. |
[in] | eqn | the four coefficients of the equation of the plane. |
true | if t is in conflict with eqn . |
false | otherwise. |
|
inline |
Tests whether a triangle is infinite.
[in] | t | the triangle |
true | if t is incident to the vertex at infinity. |
false | otherwise. |
Definition at line 1077 of file convex_cell.h.
|
inline |
Tests whether a triangle is marked as conflict.
[in] | t | a triangle. |
true | if t is marked as conflict. |
false | otherwise. |
Definition at line 1120 of file convex_cell.h.
|
inline |
Tests whether a triangle is marked by the user.
[in] | t | the triangle. |
true | if the triangle is marked. |
false | otherwise. |
Definition at line 930 of file convex_cell.h.
|
inline |
Gets the point that corresponds to a triangle.
If compute_geometry() was called, this gets the previously computed point, else it is computed and returned.
[in] | t | the index of the triangle. |
t
. Definition at line 888 of file convex_cell.h.
|
inline |
Sets the user mark on a triangle.
[in] | t | the triangle. |
Definition at line 941 of file convex_cell.h.
|
inline |
Resets the user mark on a triangle.
[in] | t | the triangle. |
Definition at line 952 of file convex_cell.h.
|
inline |
Gets the global index of a triangle vertex.
[in] | t | the triangle. |
[in] | llv | one of 0,1,2. |
Definition at line 906 of file convex_cell.h.
|
inline |
Gets the local index of a triangle vertex.
[in] | t | the triangle. |
[in] | llv | one of 0,1,2. |
Definition at line 918 of file convex_cell.h.
|
inline |
Gets a triangle vertex.
[in] | t | a triangle. |
[in] | lv | local index of a vertex of t (in 0..2). |
Definition at line 1034 of file convex_cell.h.
|
protected |
Triangulates the conflict zone.
[in] | lv | the local index of the new vertex |
[in] | conflict_head,conflict | tail the first and last triangle of the conflict zone stored as a linked list. |
|
inline |
Specifies whether exact predicates should be used.
[in] | x | true if exact predicates should be used. |
Not supported if ConvexCell distributed as standalone file.
Definition at line 435 of file convex_cell.h.
|
inline |
Gets the global vertex index from a local vertex index.
Vertex indices correspond to planes (remember, we are in dual form).
[in] | lv | the local vertex index |
Definition at line 830 of file convex_cell.h.
|
inline |
Tests whether a vertex has a corresponding facet in the cell.
Calling compute_geometry() before makes this function faster.
Definition at line 728 of file convex_cell.h.
|
inline |
Gets the equation of a plane associated with a vertex.
The first six equations correspond to the six facets of a cube.
[in] | v | the local index of the vertex. |
Definition at line 1093 of file convex_cell.h.
|
inline |
Gets the normal to the plane associated with a vertex.
The first six equations correspond to the six facets of a cube.
[in] | v | the local index of the vertex. |
Definition at line 1104 of file convex_cell.h.
|
inline |
Gets a triangle incident to a vertex.
[in] | v | vertex index. |
Definition at line 748 of file convex_cell.h.
double VBW::ConvexCell::volume | ( | ) | const |
Computes the volume of this convex cell.
compute_geometry() needs to be called before.