Coordinates?
How i can get the coordinates of a vertex in a 3d solid? (ex: a cube).
I need to know if i can get the coordinates for *all* the vertices that form a complex figure.
Tnx to all
Webmaster di:
"Motori 3D:
Tecniche e progettazione"
http://gpi.infomedia.it/motori3d
Webmaster di:"Motori 3D: Tecniche e progettazione"http://gpi.infomedia.it/motori3d
First i apologize for my poor english but i''m italian
I''ll try to explain what i mean.
Imagine that you have a cube at the middle of the screen, you don''t kown his vertices coordinates, how you can get the coordinate of every vertices?
Tnx to all
Webmaster di:
"Motori 3D:
Tecniche e progettazione"
http://gpi.infomedia.it/motori3d
I''ll try to explain what i mean.
Imagine that you have a cube at the middle of the screen, you don''t kown his vertices coordinates, how you can get the coordinate of every vertices?
Tnx to all
Webmaster di:
"Motori 3D:
Tecniche e progettazione"
http://gpi.infomedia.it/motori3d
Webmaster di:"Motori 3D: Tecniche e progettazione"http://gpi.infomedia.it/motori3d
That would be hard. I think.
But if you are looking for a way to "generate" coord''s for a square for example, thats quite possible.
=======================
Game project(s):
www.fiend.cjb.net
But if you are looking for a way to "generate" coord''s for a square for example, thats quite possible.
=======================
Game project(s):
www.fiend.cjb.net
=======================Game project(s):www.fiend.cjb.net
So there isn''t a function that return the coordinate of a vertex
Tnx to all
Webmaster di:
"Motori 3D:
Tecniche e progettazione"
http://gpi.infomedia.it/motori3d
Webmaster di:"Motori 3D: Tecniche e progettazione"http://gpi.infomedia.it/motori3d
November 01, 2000 10:43 AM
Do you mean: How do I get the screen-coordinates of a 3d-vertex?
If that is what you mean, then just push the vertex through your transformation code.
Or, do you mean: How do I generate a 3d-object from a 2d-image, if so then thats impossible, AFAIK.
If that is what you mean, then just push the vertex through your transformation code.
Or, do you mean: How do I generate a 3d-object from a 2d-image, if so then thats impossible, AFAIK.
I''m confused
To have a cube in the middle of the screen you would have to already know the coordinates of each of its vertices. If you have a program drawing a cube in 3D (OpenGL, Direct3D, Sofware renderer) the coords of the cube HAVE to be in there somewhere, in some form.
So it follows that you could obtain access to that data. What''s the situation?
Stop me if I''ve totally missed the point
To have a cube in the middle of the screen you would have to already know the coordinates of each of its vertices. If you have a program drawing a cube in 3D (OpenGL, Direct3D, Sofware renderer) the coords of the cube HAVE to be in there somewhere, in some form.
So it follows that you could obtain access to that data. What''s the situation?
Stop me if I''ve totally missed the point
____________________________________________________
"Two wrongs do not make a right; it usually takes 3 or more."
____________________________________________________
"Two wrongs do not make a right; it usually takes 3 or more."
Some mistakes are too much fun to only make once.
Never anger a dragon, for you are crunchy and you go well with brie.
eheheheh it''s hard to explain when you have a poor english I''ll try again
For example if you have a level editor, you begin with a empty level, then you create a cube, now for saving the coordinates of the cube, what i have to do?
Tnx to all for the patience that have with me
Byez
Webmaster di:
"Motori 3D:
Tecniche e progettazione"
http://gpi.infomedia.it/motori3d
For example if you have a level editor, you begin with a empty level, then you create a cube, now for saving the coordinates of the cube, what i have to do?
Tnx to all for the patience that have with me
Byez
Webmaster di:
"Motori 3D:
Tecniche e progettazione"
http://gpi.infomedia.it/motori3d
Webmaster di:"Motori 3D: Tecniche e progettazione"http://gpi.infomedia.it/motori3d
For anonymous: Yes i mean screen coordinates
Webmaster di:
"Motori 3D:
Tecniche e progettazione"
http://gpi.infomedia.it/motori3d
Webmaster di:
"Motori 3D:
Tecniche e progettazione"
http://gpi.infomedia.it/motori3d
Webmaster di:"Motori 3D: Tecniche e progettazione"http://gpi.infomedia.it/motori3d
November 01, 2000 11:37 AM
quote:
For example if you have a level editor, you begin with a empty level, then you create a cube, now for saving the coordinates of the cube, what i have to do?
[\quote]
When creating the cube you decide what the coordinates should be. If you don''t, there is no cube.
(assuming you are writing the level editor, if you are using a pre-existing one, then save the level-file to disk and then figure out how to read the level-format)
e.g.
say you want a cube that has sides of length 10 units, and is centered around the origin (0,0,0).
Then the coordinates of the cube''s vertices are:(-5,5,5) (5,5,5) +---------------+ /| /| / | / | / | / | / | / | (-5,5,-5) / | (5,5,-5)/ | +---------------+ | | +---------|-----+ (5,-5,5) | /(-5,-5,5) | / | / | / | / | / | / | / |/ |/(-5,-5,-5)+---------------+ (5,-5,-5)
the positive x-axis points to the right, the positive y-axis points up and the positive z-axis points "into" the screen.
(I might have made some small mistake, but you get the general idea, I hope)
If this has nothing to do with what you were asking (I don''t quite understand the question), then please just ignore this post)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement