DGtal 2.1.0
|
Functions | |
template<size_t I> | |
std::vector< std::array< size_t, I > > | makeIndices (size_t N) |
Create a list of indices for a vertex array with independent elements. | |
template<typename T > | |
std::array< T, 8 > | getCubeVertices (T center, double size) |
Return the vertices of a cube. | |
template<typename T , typename U > | |
void | insertCubeVertices (U &dest, T center, double scale) |
Insert cube vertices into an array. | |
template<typename T > | |
std::array< T, 4 > | getAASquareVertices (T center, int orientation, double size) |
Return the vertices of an axis aligned square. | |
template<typename U , typename T > | |
void | insertAASquare (U &dest, T center, int orientation, double size) |
Insert vertices of a square into a container. | |
template<typename T > | |
std::array< T, 8 > | getPrism (T center, int orientation, double size1, double size2, double shift1, double shift2) |
Return the vertices of a prism. | |
template<typename T , typename U > | |
void | insertPrism (U &dest, T center, int orientation, double size1, double size2, double shift1, double shift2) |
Insert the vertices of a prism into a container. | |
glm::vec3 | toglm (const DGtal::Color &col) |
std::vector< glm::vec3 > | toglm (const std::vector< DGtal::Color > &col) |
glm::mat4 | toglm (const Eigen::Affine3d &transform) |
std::array< T, 4 > DGtal::drawutils::getAASquareVertices | ( | T | center, |
int | orientation, | ||
double | size | ||
) |
Return the vertices of an axis aligned square.
T | The type of vertex |
center | The center of the quad |
orientation | 0 means normal in x direction, 1 in y-direction, 2 in z-direction |
size | The size of the square |
std::array< T, 8 > DGtal::drawutils::getCubeVertices | ( | T | center, |
double | size | ||
) |
Return the vertices of a cube.
T | The type of vertex |
center | The center of the cube |
size | The size of the cube |
std::array< T, 8 > DGtal::drawutils::getPrism | ( | T | center, |
int | orientation, | ||
double | size1, | ||
double | size2, | ||
double | shift1, | ||
double | shift2 | ||
) |
Return the vertices of a prism.
Here, a prism is meant to display a signed Khalimsky cell. It is draw as two square, one of which is smaller than the other, connected by 4 other rectular shapes.
T | The vertex type |
center | The center of the cell on which the prism should be drawn |
orientation | The orientation of the cell (x, y, z) |
size1 | Size of the first square |
size2 | Size of the second square |
shift1 | Shift (relative to center) of the first square |
shift2 | Shift (relative to center) of the second square |
void DGtal::drawutils::insertAASquare | ( | U & | dest, |
T | center, | ||
int | orientation, | ||
double | size | ||
) |
Insert vertices of a square into a container.
U | The container |
T | The type of vertex |
dest | The container where the vertices shoudl be inserted |
center | The center of the square |
orientation | 0 means normal in x direction, 1 in y-direction, 2 in z-direction |
size | The size of the square |
void DGtal::drawutils::insertCubeVertices | ( | U & | dest, |
T | center, | ||
double | scale | ||
) |
Insert cube vertices into an array.
T | The type of vertex |
U | The container to insert vertices into |
dest | The container where the vertices shoudl be inserted |
center | The center of the cube |
scale | The size of the cube |
void DGtal::drawutils::insertPrism | ( | U & | dest, |
T | center, | ||
int | orientation, | ||
double | size1, | ||
double | size2, | ||
double | shift1, | ||
double | shift2 | ||
) |
Insert the vertices of a prism into a container.
U | The container type |
T | The vertex type |
dest | The container where the vertices shoudl be inserted |
center | The center of the cell on which the prism should be drawn |
orientation | The orientation of the cell (x, y, z) |
size1 | Size of the first square |
size2 | Size of the second square |
shift1 | Shift (relative to center) of the first square |
shift2 | Shift (relative to center) of the second square |
std::vector< std::array< size_t, I > > DGtal::drawutils::makeIndices | ( | size_t | N | ) |
Create a list of indices for a vertex array with independent elements.
I | The size of individual elements |
N | The number of elements |
glm::vec3 DGtal::drawutils::toglm | ( | const DGtal::Color & | col | ) |
glm::mat4 DGtal::drawutils::toglm | ( | const Eigen::Affine3d & | transform | ) |
std::vector< glm::vec3 > DGtal::drawutils::toglm | ( | const std::vector< DGtal::Color > & | col | ) |