3D City v-1.0
Computer Graphics Project
Vertex Struct Reference

#include <core.h>

Public Member Functions

 Vertex (const vec4 &pos, const vec3 &nor=vec3(0), const vec2 &texcoord=vec2(0))
 
 Vertex ()
 
Vertex operator* (const float &f) const
 
Vertex operator+ (const Vertex &f) const
 
Vertex operator- (const Vertex &f) const
 
Vertex perspectiveMul (const mat4f &per)
 
void operator*= (const float &f)
 
void operator/= (const float &f)
 

Static Public Member Functions

static Vertex perspectiveMul (Vertex in, const mat4f &per)
 

Public Attributes

vec4 position = vec4(0)
 
vec3 normal = vec3(0)
 
vec2 texCoord = vec2(0)
 

Detailed Description

Definition at line 108 of file core.h.

Constructor & Destructor Documentation

◆ Vertex() [1/2]

Vertex::Vertex ( const vec4 &  pos,
const vec3 &  nor = vec3(0),
const vec2 &  texcoord = vec2(0) 
)
inline

Definition at line 113 of file core.h.

◆ Vertex() [2/2]

Vertex::Vertex ( )
inline

Definition at line 114 of file core.h.

Member Function Documentation

◆ operator*()

Vertex Vertex::operator* ( const float &  f) const
inline

Definition at line 116 of file core.h.

◆ operator*=()

void Vertex::operator*= ( const float &  f)
inline

Definition at line 149 of file core.h.

◆ operator+()

Vertex Vertex::operator+ ( const Vertex &  f) const
inline

Definition at line 123 of file core.h.

◆ operator-()

Vertex Vertex::operator- ( const Vertex &  f) const
inline

Definition at line 130 of file core.h.

◆ operator/=()

void Vertex::operator/= ( const float &  f)
inline

Definition at line 155 of file core.h.

◆ perspectiveMul() [1/2]

Vertex Vertex::perspectiveMul ( const mat4f &  per)
inline

Definition at line 137 of file core.h.

◆ perspectiveMul() [2/2]

static Vertex Vertex::perspectiveMul ( Vertex  in,
const mat4f &  per 
)
inlinestatic

Definition at line 145 of file core.h.

Member Data Documentation

◆ normal

vec3 Vertex::normal = vec3(0)

Definition at line 110 of file core.h.

◆ position

vec4 Vertex::position = vec4(0)

Definition at line 109 of file core.h.

◆ texCoord

vec2 Vertex::texCoord = vec2(0)

Definition at line 111 of file core.h.