Skip to main content
GameDev.net gamedev.net
🔒 Locked

Coordinates?

Started by OttoDisk Oct 31, 2000 at 6:55 AM 11 replies 850+ views
Original Post
OttoDisk
OttoDisk
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
wolfman8k
wolfman8k
I don''t think I understand the question
OttoDisk
OttoDisk
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
Webmaster di:"Motori 3D: Tecniche e progettazione"http://gpi.infomedia.it/motori3d
JonatanHedborg
JonatanHedborg
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
================<FONT COLOR="#850000
OttoDisk
OttoDisk

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
Ratheous
Ratheous
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

____________________________________________________

"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.
OttoDisk
OttoDisk
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
Webmaster di:"Motori 3D: Tecniche e progettazione"http://gpi.infomedia.it/motori3d
OttoDisk
OttoDisk
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
OttoDisk
OttoDisk
What you say is right, but if move the cube in the level editor, i lose it''s originary coordinates.
How i get the new coordinates?
I know that isn''t simple to explain but i''m trying to do my best
Bye

Webmaster di:
"Motori 3D:
Tecniche e progettazione"
http://gpi.infomedia.it/motori3d
Webmaster di:"Motori 3D: Tecniche e progettazione"http://gpi.infomedia.it/motori3d
Antknei
Antknei
Is this a level editor that you are making?

If you move the cube, don''t you know where it goes to? How is the location of the cube stored? Just as a position to center of cube? to one corner? If you know the dimensions of the cube, which you should in a level editor, and you know the location to either the center of the cube or one corner then it is easy to calculate it vertices. Are you missing the size? Or does your editor not store where a corner or the center of the cube is?
OttoDisk
OttoDisk
Yes, i''m trying to make a level editor (very difficult stuff for me )

What you are saying is right, but if i move the cube with the only mouse without entering a value for the translation, how i can know the new coordinate of the cube?
Someone tells me about the feedback buffer is this right?
Tnx

Webmaster di:
"Motori 3D:
Tecniche e progettazione"
http://gpi.infomedia.it/motori3d
Webmaster di:"Motori 3D: Tecniche e progettazione"http://gpi.infomedia.it/motori3d

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.