often a vertex is used by models, for example a cube has vertexes (8), and you could move it around with vectors
vertexes often have more infos than just x,y,z, for example a color, or texture coordinates, or even a normal-vector "on it", for lighting-calculations
we wanna play, not watch the pictures
what's difference between a vertex and vector?
ohh. and vectors are mathematical defined things
vertexes are just things, programmers have defined themselfes
we wanna play, not watch the pictures
vertexes are just things, programmers have defined themselfes
we wanna play, not watch the pictures
though they mean mathmatically different things u normally use the same class for them in 3d grafixs, i normally call everything in me program VECTORS even though some are vertices if u wanna be a bit more correct u could go
struct VECTOR{
float x,y,z;
VECTOR (float xx, float yy, float zz) { x=xx; y=yy; z=zz; }
VECTOR operator+(VECTOR &pVec) { return VECTOR(x + pVec.x, y + pVec.y, z + pVec.z);}
};
typedef VECTOR VERTEX;
VERTEX point(0,0,0);
VECTOR velocity(0,10,10);
VERTEX newposition = point+velocity;
struct VECTOR{
float x,y,z;
VECTOR (float xx, float yy, float zz) { x=xx; y=yy; z=zz; }
VECTOR operator+(VECTOR &pVec) { return VECTOR(x + pVec.x, y + pVec.y, z + pVec.z);}
};
typedef VECTOR VERTEX;
VERTEX point(0,0,0);
VECTOR velocity(0,10,10);
VERTEX newposition = point+velocity;
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement