Graphite
Version 3
An experimental 3D geometry processing program
|
Utilities for managing 3D periodic space. More...
#include <geogram/delaunay/periodic.h>
Public Member Functions | |
index_t | periodic_vertex_instance (index_t pv) const |
Gets the instance from a periodic vertex. More... | |
index_t | periodic_vertex_real (index_t pv) const |
Gets the real vertex from a periodic vertex. More... | |
signed_index_t | periodic_vertex_real (signed_index_t pv) const |
Gets the real vertex from a periodic vertex. More... | |
index_t | make_periodic_vertex (index_t real, index_t instance) const |
Makes a periodic vertex from a real vertex and instance. More... | |
void | periodic_vertex_get_T (index_t pv, int &Tx, int &Ty, int &Tz) const |
Gets the translation from a periodic vertex. More... | |
void | periodic_vertex_set_T (index_t &pv, int Tx, int Ty, int Tz) const |
Sets the translation in a periodic vertex. More... | |
std::string | periodic_vertex_to_string (index_t v) const |
std::string | binary_to_string (Numeric::uint32 m) const |
Static Public Member Functions | |
static index_t | T_to_instance (int Tx, int Ty, int Tz) |
Gets the instance from a translation. More... | |
Public Attributes | |
index_t | nb_vertices_non_periodic_ |
Number of real vertices. | |
Static Public Attributes | |
static int | translation [27][3] |
Gives for each instance the integer translation coordinates in {-1,0,1}. More... | |
static int | reorder_instances [27] |
Used to back-map an integer translation to an instance. More... | |
static bool | instance_is_positive [27] |
Tests whether all the coordinates of the translation vector associated with an instance are 0 or 1. | |
Utilities for managing 3D periodic space.
Definition at line 57 of file periodic.h.
Makes a periodic vertex from a real vertex and instance.
[in] | real | the real vertex, in 0..nb_vertices_non_periodic_-1 |
[in] | instance | the instance, in 0..26 |
Definition at line 95 of file periodic.h.
|
inline |
Gets the translation from a periodic vertex.
[in] | pv | the periodic vertex |
[out] | Tx,Ty,Tz | the translation coordinates, in {-1, 0, 1} |
Definition at line 120 of file periodic.h.
Gets the instance from a periodic vertex.
Definition at line 64 of file periodic.h.
Gets the real vertex from a periodic vertex.
Definition at line 73 of file periodic.h.
|
inline |
Gets the real vertex from a periodic vertex.
Definition at line 82 of file periodic.h.
|
inline |
Sets the translation in a periodic vertex.
[in,out] | pv | the periodic vertex |
[in] | Tx,Ty,Tz | the translation coordinates, in {-1, 0, 1} |
Definition at line 133 of file periodic.h.
|
inlinestatic |
Gets the instance from a translation.
[in] | Tx,Ty,Tz | the translation coordinates, in {-1, 0, 1} |
Definition at line 106 of file periodic.h.
|
static |
Used to back-map an integer translation to an instance.
This maps (Tx+1) + 3*(Ty+1) + 9*(Tz+1) to the associated instance id. This indirection is required because we wanted instance 0 to correspond to the 0 translation (rather than (-1,-1,-1) that would require no indirection).
Definition at line 171 of file periodic.h.
|
static |
Gives for each instance the integer translation coordinates in {-1,0,1}.
The zero translation is the first one (instance 0).
Definition at line 162 of file periodic.h.