00001 #include "Vertex.h"
00002
00003 namespace rcrt
00004 {
00005
00006
00007 Vertex::Vertex():p(0,0,0),n(0,0,0),tex(0,0)
00008 {
00009 }
00010
00011
00012 Vertex::Vertex(const Point3D& p):p(p),n(0,0,0),tex(0,0)
00013 {
00014 }
00015
00016
00017 Vertex::Vertex(const Point3D& p, const Vec3D n):p(p),n(n),tex(0,0)
00018 {
00019 }
00020
00021
00022 Vertex::Vertex(const Point3D& p, const Vec3D n, const Point2D tex):p(p),n(n),tex(tex)
00023 {
00024 }
00025
00026
00027 Vertex::~Vertex()
00028 {
00029 }
00030
00031
00032 void Vertex::setPos(const Point3D& pos)
00033 {
00034 p = pos;
00035 }
00036
00037
00038 void Vertex::setNormal(const Vec3D no)
00039 {
00040 n = no;
00041 }
00042
00043
00044 void Vertex::setUV(const Point2D te)
00045 {
00046 tex = te;
00047 }
00048
00049
00050 const Point3D& Vertex::pos()
00051 {
00052 return p;
00053 }
00054
00055
00056 const Vec3D& Vertex::normal()
00057 {
00058 return n;
00059 }
00060
00061
00062 const Point2D& Vertex::uv()
00063 {
00064 return tex;
00065 }
00066
00067 }