Helios++
Helios software for LiDAR simulations
Vertex Class Reference

Class representing a vertex. More...

#include <Vertex.h>

Collaboration diagram for Vertex:

Public Member Functions

 Vertex ()=default
 Default vertex constructor.
 
 Vertex (double const x, double const y, double const z)
 Build a vertex with given position coordinates. More...
 
 Vertex (const Vertex &v)
 
Vertex copy () const
 Copy the vertex. More...
 
double getX () const
 Get the X coordinate of vertex position. More...
 
double getY () const
 Get the Y coordinate of vertex position. More...
 
double getZ () const
 Get the Z coordinate of vertex position. More...
 
bool operator== (const Vertex &v) const
 Compare if two vertex are equal. More...
 

Static Public Member Functions

static double * matxvec (double **mat, double *vec)
 Matrix x Vector multiplication. More...
 
static Vertex rotateVertex (Vertex v, double **rotationMatrix)
 Build a vertes result of rotating another vertex (v) More...
 

Public Attributes

glm::dvec3 pos
 Vertex 3D position.
 
glm::dvec3 normal = glm::dvec3(0, 0, 0)
 Vertex normal vector.
 
glm::dvec2 texcoords
 Vertex texture coordinates.
 
Color4f color
 Vertex color (RGBA) More...
 

Private Member Functions

template<typename Archive >
void serialize (Archive &ar, const unsigned int version)
 Serialize a Vertex to a stream of bytes. More...
 

Friends

class boost::serialization::access
 
std::ostream & operator<< (std::ostream &out, Vertex *v)
 

Detailed Description

Class representing a vertex.

Constructor & Destructor Documentation

◆ Vertex()

Vertex::Vertex ( double const  x,
double const  y,
double const  z 
)
inline

Build a vertex with given position coordinates.

Parameters
x\(x\) position coordinate
y\(y\) position coordinate
z\(z\) position coordinate

Member Function Documentation

◆ copy()

Vertex Vertex::copy ( ) const
inline

Copy the vertex.

Returns
Copy of vertex

◆ getX()

double Vertex::getX ( ) const
inline

Get the X coordinate of vertex position.

Returns
X coordinate of vertex position
See also
Vertex::pos

◆ getY()

double Vertex::getY ( ) const
inline

Get the Y coordinate of vertex position.

Returns
Y coortainte of vertex position
See also
Vertex::pos

◆ getZ()

double Vertex::getZ ( ) const
inline

Get the Z coordinate of vertex position.

Returns
Z coordinate of vertex position
See also
Vertex::pos

◆ matxvec()

double * Vertex::matxvec ( double **  mat,
double *  vec 
)
static

Matrix x Vector multiplication.

Parameters
matMatrix to multiply
vecVector to multiply
Returns
Multiplication result (3 double components)

◆ operator==()

bool Vertex::operator== ( const Vertex v) const
inline

Compare if two vertex are equal.

Two vertex are considered to be equal when their positions are exactly the same

Parameters
vVertex to compare with
Returns
True if vertex are equla, false otherwise
See also
Vertex::pos

◆ rotateVertex()

Vertex Vertex::rotateVertex ( Vertex  v,
double **  rotationMatrix 
)
static

Build a vertes result of rotating another vertex (v)

Parameters
vVertex to rotate
rotationMatrixMatrix defining rotation to be applied
Returns
Rotated vertex

◆ serialize()

template<typename Archive >
void Vertex::serialize ( Archive &  ar,
const unsigned int  version 
)
inlineprivate

Serialize a Vertex to a stream of bytes.

Template Parameters
ArchiveType of rendering
Parameters
arSpecific rendering for the stream of bytes
versionVersion number of the Vertex

Member Data Documentation

◆ color

Color4f Vertex::color

Vertex color (RGBA)

See also
Color4f

The documentation for this class was generated from the following files: