33 lines
657 B
C++

//
// Created by Epagris on 2020. 03. 14..
//
#include "Vertex.h"
eg3d::Vertex::Vertex() : x(0.0f), y(0.0f), z(0.0f) {}
eg3d::Vertex::Vertex(const DirectX::XMFLOAT3 xmf3) : x(xmf3.x), y(xmf3.y), z(xmf3.z) {}
eg3d::Vertex::Vertex(std::initializer_list<float> initList) {
if (initList.size() >= 3) {
const float *pParams = initList.begin();
// paraméterek elkérése
x = pParams[0];
y = pParams[1];
z = pParams[2];
}
}
eg3d::Vertex::Vertex (const Vertex& other)
{
// koordináták másolása
x = other.x;
y = other.y;
z = other.z;
// normálvektor másolása
nx = other.nx;
ny = other.ny;
nz = other.nz;
}