#include <tessellator.h>
|
| Vertex (const vec3 &xyz, int idx=0) |
| initialize with xyz coordinates and an optional index.
|
|
template<typename FT> |
| Vertex (const FT *data, std::size_t size, int idx=0) |
| initialize from a C-style array.
|
|
| Vertex (std::size_t size=0, int idx=0) |
| initialize with a known size but memory is allocated without data initialization.
|
|
| Vertex (const Vertex &v, int idx=0) |
| copy constructor.
|
|
template<typename Vec> |
void | append (const Vec &v) |
| append a property (e.g., color, texture coordinates) to this vertex.
|
|
A vertex carries both xyz coordinates and its attributes (e.g., color, texcoord).
- Examples
- Tutorial_308_TexturedMesh.
◆ Vertex() [1/4]
initialize with xyz coordinates and an optional index.
- Parameters
-
idx | The index of this vertex. Providing a non-negative index allows to map a resulting vertex to the original vertex. Any new vertex generated in the tessellation will have a negative index -1. |
◆ Vertex() [2/4]
template<typename FT>
Vertex |
( |
const FT * | data, |
|
|
std::size_t | size, |
|
|
int | idx = 0 ) |
|
inline |
initialize from a C-style array.
- Parameters
-
idx | The index of this vertex. Providing a non-negative index allows to map a resulting vertex to the original vertex. Any new vertex generated in the tessellation will have a negative index -1. |
- Attention
- The first 3 components must be the xyz coordinates.
◆ Vertex() [3/4]
Vertex |
( |
std::size_t | size = 0, |
|
|
int | idx = 0 ) |
|
inlineexplicit |
initialize with a known size but memory is allocated without data initialization.
- Parameters
-
idx | The index of this vertex. Providing a non-negative index allows to map a resulting vertex to the original vertex. Any new vertex generated in the tessellation will have a negative index -1. |
◆ Vertex() [4/4]
copy constructor.
- Parameters
-
idx | The index of this vertex. Providing a non-negative index allows to map a resulting vertex to the original vertex. Any new vertex generated in the tessellation will have a negative index -1. |
◆ append()
void append |
( |
const Vec & | v | ) |
|
|
inline |
append a property (e.g., color, texture coordinates) to this vertex.
- Template Parameters
-
Vec | The vector type of the vertex property, e.g., vec2, vec3. |
- Parameters
-
v | The value of the vertex property. |
- Note
- The order you retrieve the properties must be the same as they were appended.
- Examples
- Tutorial_308_TexturedMesh.
The documentation for this struct was generated from the following file: