ylwdiogl

01-19-2014, 01:31 AM

There the question as the title i want to ask for answer, for help,ths

View Full Version : Vertex is the absolute coodinates or the relative coodinates defined after translatio

ylwdiogl

01-19-2014, 01:31 AM

There the question as the title i want to ask for answer, for help,ths

carsten neumann

01-19-2014, 05:13 AM

I don't think there is a way to answer your question without more details. Since OpenGL specifies a pipeline the coordinate system vertex data is in depends on the pipeline stage you are looking at, for example.

ylwdiogl

01-19-2014, 09:47 PM

I don't think there is a way to answer your question without more details. Since OpenGL specifies a pipeline the coordinate system vertex data is in depends on the pipeline stage you are looking at, for example.

Ok, i try to make it more clear ,just like that ,following:

code:

translation_matrix[16]={ 1,0,0,0,

0,1,0,0,

0,0,1,0,

12,13,14,1 }

glBegin(GL_LINE);

glVertex(12,13,14); //vertex_1

glVertex(0,13,14);

glEnd();

glPushMatrix();

glMultiMatrix(translation_matrix);

glBegin(GL_LINE);

glVertex(12,13,14); //vertex_2

glVertex(0,13,14);

glEnd();

glPopMatrix();

I want to know whether the "vertex_1" actually is the “vertex_2”

Ok, i try to make it more clear ,just like that ,following:

code:

translation_matrix[16]={ 1,0,0,0,

0,1,0,0,

0,0,1,0,

12,13,14,1 }

glBegin(GL_LINE);

glVertex(12,13,14); //vertex_1

glVertex(0,13,14);

glEnd();

glPushMatrix();

glMultiMatrix(translation_matrix);

glBegin(GL_LINE);

glVertex(12,13,14); //vertex_2

glVertex(0,13,14);

glEnd();

glPopMatrix();

I want to know whether the "vertex_1" actually is the “vertex_2”

thokra

01-20-2014, 01:50 AM

I want to know whether the "vertex_1" actually is the “vertex_2”

No, if you apply translation_matrix to vertex_2 you'll get (12 + 12, 13 + 13, 14 +14) == 2 * vertex_2 == (24, 26, 28) - assuming, of course, the top of the MODELVIEW stack is actually the identity, which is nothing one can deduce from your example.

No, if you apply translation_matrix to vertex_2 you'll get (12 + 12, 13 + 13, 14 +14) == 2 * vertex_2 == (24, 26, 28) - assuming, of course, the top of the MODELVIEW stack is actually the identity, which is nothing one can deduce from your example.

Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.