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 (const Vertex &v)
 
Vertex copy ()
 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
 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)
 

Friends

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

Detailed Description

Class representing a vertex.

Member Function Documentation

◆ copy()

Vertex Vertex::copy ( )

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

Member Data Documentation

◆ color

Color4f Vertex::color

Vertex color (RGBA)

See also
Color4f

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