Easy3D 2.5.3
Tessellator::Vertex Struct Reference

#include <tessellator.h>

Inheritance diagram for Tessellator::Vertex:

Public Member Functions

 Vertex (const vec3 &xyz, int idx=0)
 initialize with xyz coordinates and an optional index. More...
 
template<typename FT >
 Vertex (const FT *data, std::size_t size, int idx=0)
 initialize from a C-style array. More...
 
 Vertex (std::size_t size=0, int idx=0)
 initialize with a known size but memory is allocated without data initialization. More...
 
 Vertex (const Vertex &v, int idx=0)
 copy constructor. More...
 
template<typename Vec >
void append (const Vec &v)
 append a property (e.g., color, texture coordinates) to this vertex. More...
 

Public Attributes

int index
 

Detailed Description

A vertex carries both xyz coordinates and its attributes (e.g., color, texcoord).

Constructor & Destructor Documentation

◆ Vertex() [1/4]

Vertex ( const vec3 xyz,
int  idx = 0 
)
inlineexplicit

initialize with xyz coordinates and an optional index.

Parameters
idxThe 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]

Vertex ( const FT *  data,
std::size_t  size,
int  idx = 0 
)
inline

initialize from a C-style array.

Parameters
idxThe 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
idxThe 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]

Vertex ( const Vertex v,
int  idx = 0 
)
inline

copy constructor.

Parameters
idxThe 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.

Member Function Documentation

◆ append()

void append ( const Vec v)
inline

append a property (e.g., color, texture coordinates) to this vertex.

Template Parameters
VecThe vector type of the vertex property, e.g., vec2, vec3.
Parameters
vThe value of the vertex property.
Note
The order you retrieve the properties must be the same as they were appended.

The documentation for this struct was generated from the following file: