Omnidome
Fulldome Mapping Software Toolkit
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Private Attributes
omni::geometry::Vertex Struct Reference

A vertex is a geometry entity with a position, normal and texture. More...

#include <Vertex.h>

Public Member Functions

 Vertex ()
 Default constructor. More...
 
 Vertex (const QVector3D &_pos, const QVector3D &_normal, const QVector3D &_texCoord=QVector3D())
 Construct from given position, normal and optional texture coordinates. More...
 
void setPos (QVector3D const &_pos)
 Set new position. More...
 
QVector3D & pos ()
 Return reference to position. More...
 
QVector3D const & pos () const
 Return const reference to position. More...
 
void setNormal (QVector3D const &_normal)
 Sets new normal (is not normalized!) More...
 
QVector3D & normal ()
 Return reference to normal. More...
 
QVector3D const & normal () const
 Return const reference to normal. More...
 
void setTexCoord (QVector3D const &_texCoord)
 Set new texture coordinates. More...
 
QVector3D & texCoord ()
 Return reference to texture coordinates. More...
 
QVector3D const & texCoord () const
 Return const reference to texture coordinates. More...
 

Static Public Member Functions

static constexpr size_t texCoordOffset ()
 
static constexpr size_t normalOffset ()
 
static constexpr size_t posOffset ()
 

Private Attributes

QVector3D texCoord_
 
QVector3D normal_
 
QVector3D pos_
 

Detailed Description

A vertex is a geometry entity with a position, normal and texture.

Constructor & Destructor Documentation

omni::geometry::Vertex::Vertex ( )

Default constructor.

25  {}
omni::geometry::Vertex::Vertex ( const QVector3D &  _pos,
const QVector3D &  _normal,
const QVector3D &  _texCoord = QVector3D() 
)

Construct from given position, normal and optional texture coordinates.

30  :
31  texCoord_(_texCoord),
32  normal_(_normal),
33  pos_(_pos)
34  {}
QVector3D normal_
Definition: Vertex.h:86
QVector3D pos_
Definition: Vertex.h:87
QVector3D texCoord_
Definition: Vertex.h:85

Member Function Documentation

QVector3D & omni::geometry::Vertex::normal ( )

Return reference to normal.

57  {
58  return normal_;
59  }
QVector3D normal_
Definition: Vertex.h:86
QVector3D const & omni::geometry::Vertex::normal ( ) const

Return const reference to normal.

62  {
63  return normal_;
64  }
QVector3D normal_
Definition: Vertex.h:86
static constexpr size_t omni::geometry::Vertex::normalOffset ( )
inlinestatic
75  {
76  return sizeof(QVector3D);
77  }
QVector3D & omni::geometry::Vertex::pos ( )

Return reference to position.

42  {
43  return pos_;
44  }
QVector3D pos_
Definition: Vertex.h:87
QVector3D const & omni::geometry::Vertex::pos ( ) const

Return const reference to position.

47  {
48  return pos_;
49  }
QVector3D pos_
Definition: Vertex.h:87
static constexpr size_t omni::geometry::Vertex::posOffset ( )
inlinestatic
80  {
81  return sizeof(QVector3D) + sizeof(QVector3D);
82  }
void omni::geometry::Vertex::setNormal ( QVector3D const &  _normal)

Sets new normal (is not normalized!)

52  {
53  normal_ = _normal;
54  }
QVector3D normal_
Definition: Vertex.h:86
void omni::geometry::Vertex::setPos ( QVector3D const &  _pos)

Set new position.

37  {
38  pos_ = _pos;
39  }
QVector3D pos_
Definition: Vertex.h:87
void omni::geometry::Vertex::setTexCoord ( QVector3D const &  _texCoord)

Set new texture coordinates.

67  {
68  texCoord_ = _texCoord;
69  }
QVector3D texCoord_
Definition: Vertex.h:85
QVector3D & omni::geometry::Vertex::texCoord ( )

Return reference to texture coordinates.

72  {
73  return texCoord_;
74  }
QVector3D texCoord_
Definition: Vertex.h:85
QVector3D const & omni::geometry::Vertex::texCoord ( ) const

Return const reference to texture coordinates.

77  {
78  return texCoord_;
79  }
QVector3D texCoord_
Definition: Vertex.h:85
static constexpr size_t omni::geometry::Vertex::texCoordOffset ( )
inlinestatic
70  {
71  return 0;
72  }

Field Documentation

QVector3D omni::geometry::Vertex::normal_
private
QVector3D omni::geometry::Vertex::pos_
private
QVector3D omni::geometry::Vertex::texCoord_
private

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