Graphite
Version 3
An experimental 3D geometry processing program
|
Class to compute the intersection of a set of half-spaces in 3D. More...
#include <geogram/basic/common.h>
#include <geogram/basic/memory.h>
#include <geogram/basic/numeric.h>
#include <geogram/basic/geometry.h>
#include <geogram/basic/attributes.h>
#include <string>
#include <vector>
#include <iostream>
#include <cmath>
#include <cassert>
Go to the source code of this file.
Classes | |
struct | VBW::Triangle |
A triangle with the local indices of its three vertices. More... | |
struct | VBW::TriangleWithFlags |
A triangle with flags. More... | |
class | VBW::ConvexCell |
Computes the intersection between a set of halfplanes using Bowyer-Watson algorithm. More... | |
Namespaces | |
GEO | |
Global Vorpaline namespace. | |
Macros | |
#define | vbw_assert(x) geo_debug_assert(x) |
Typedefs | |
typedef unsigned int | VBW::index_t |
typedef GEO::index_t | VBW::global_index_t |
typedef unsigned char | VBW::uchar |
Type for flags. | |
typedef unsigned short | VBW::ushort |
Type for local indices. More... | |
typedef index_t | VBW::ConvexCellFlags |
Enumerations | |
enum | { VBW::CONFLICT_MASK = 32768 , VBW::MARKED_MASK = 16384 , VBW::END_OF_LIST = 16383 , VBW::VERTEX_AT_INFINITY = 0 } |
Some constants for the flags in TriangleWithFlags. More... | |
enum | VBW::ConvexCellFlag { VBW::None = 0 , VBW::WithVGlobal = 1 , VBW::WithTFlags = 2 } |
Functions | |
vec2 | VBW::make_vec2 (double x, double y) |
Creates a vec2 from its components. More... | |
vec3 | VBW::make_vec3 (double x, double y, double z) |
Creates a vec3 from its components. More... | |
vec3 | VBW::cross (vec3 v1, vec3 v2) |
Computes the cross product between two vectors. More... | |
double | VBW::dot (vec3 v1, vec3 v2) |
Computes the dot product between two vectors. More... | |
double | VBW::squared_length (vec3 v) |
Computes the squared length of a vector. More... | |
double | VBW::squared_distance (vec3 v, vec3 w) |
Computes the squared distance between two points. More... | |
double | VBW::length (vec3 v) |
Computes the length of a vector. More... | |
vec3 | VBW::normalize (vec3 v) |
Computes a normalized vector. More... | |
vec4 | VBW::make_vec4 (double x, double y, double z, double w) |
Creates a vec4 from its components. More... | |
double | VBW::dot (vec4 v1, vec4 v2) |
Computes the dot product between two vectors. More... | |
double | VBW::squared_length (vec4 v) |
Computes the squared length of a vector. More... | |
double | VBW::length (vec4 v) |
Computes the length of a vector. More... | |
double | VBW::squared_point_plane_distance (VBW::vec3 p, VBW::vec4 P) |
Computes the squared distance between a point and a plane. More... | |
Triangle | VBW::make_triangle (ushort i, ushort j, ushort k) |
Creates a triangle from its three vertices. More... | |
TriangleWithFlags | VBW::make_triangle_with_flags (ushort i, ushort j, ushort k, ushort f) |
double | VBW::det2x2 (double a11, double a12, double a21, double a22) |
double | VBW::det3x3 (double a11, double a12, double a13, double a21, double a22, double a23, double a31, double a32, double a33) |
double | VBW::det4x4 (double a11, double a12, double a13, double a14, double a21, double a22, double a23, double a24, double a31, double a32, double a33, double a34, double a41, double a42, double a43, double a44) |
Class to compute the intersection of a set of half-spaces in 3D.
Has its own types for points and vectors because it can be used independently from Geogram. In that case, define STANDALONE_CONVEX_CELL
Definition in file convex_cell.h.
typedef unsigned short VBW::ushort |
Type for local indices.
Valid values are between 0 and 32766. Full range is not used due to bookkeeping reasons,
Definition at line 303 of file convex_cell.h.
anonymous enum |
Some constants for the flags in TriangleWithFlags.
Enumerator | |
---|---|
CONFLICT_MASK | The mask for conflict triangles. |
MARKED_MASK | The mask for marked triangles. |
END_OF_LIST | Constant to indicate end of list. |
VERTEX_AT_INFINITY | Vertex at infinity. |
Definition at line 284 of file convex_cell.h.
enum VBW::ConvexCellFlag |
Enumerator | |
---|---|
None | default |
WithVGlobal | store global vertex indices |
WithTFlags | store user triange flags |
Definition at line 406 of file convex_cell.h.
|
inline |
Computes the cross product between two vectors.
[in] | v1,v2 | the two vectors. |
v1
and v2
. Definition at line 151 of file convex_cell.h.
|
inline |
Computes the dot product between two vectors.
[in] | v1,v2 | the two vectors. |
v1
and v2
. Definition at line 166 of file convex_cell.h.
|
inline |
Computes the dot product between two vectors.
[in] | v1,v2 | the two vectors. |
v1
and v2
. Definition at line 239 of file convex_cell.h.
|
inline |
Computes the length of a vector.
[in] | v | the vector. |
v
. Definition at line 198 of file convex_cell.h.
|
inline |
Computes the length of a vector.
[in] | v | the vector. |
v
. Definition at line 263 of file convex_cell.h.
Creates a triangle from its three vertices.
[in] | i,j,k | the local indices of the three vertices. |
Definition at line 329 of file convex_cell.h.
|
inline |
Creates a vec2 from its components.
[in] | x,y | the components of the vector. |
Definition at line 117 of file convex_cell.h.
|
inline |
Creates a vec3 from its components.
[in] | x,y,z | the components of the vector. |
Definition at line 133 of file convex_cell.h.
|
inline |
Creates a vec4 from its components.
[in] | x,y,z,w | the components of the vector. |
Definition at line 221 of file convex_cell.h.
|
inline |
Computes a normalized vector.
[in] | v | the vector. |
Definition at line 208 of file convex_cell.h.
|
inline |
Computes the squared distance between two points.
[in] | v,w | the two points. |
v
and w
. Definition at line 186 of file convex_cell.h.
|
inline |
Computes the squared length of a vector.
[in] | v | the vector. |
v
. Definition at line 177 of file convex_cell.h.
|
inline |
Computes the squared length of a vector.
[in] | v | the vector. |
v
. Definition at line 251 of file convex_cell.h.
|
inline |
Computes the squared distance between a point and a plane.
[in] | p | the point |
[in] | P | the plane equation |
Definition at line 273 of file convex_cell.h.