Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

bigyellowtoe

what's difference between a vertex and vector?

This topic is 6496 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
to combine the already correct previous posts:
a "vertex" is what is commonly known as a point in space, though that is not the technical defn, i don''t think.
and a "vector" has magnitude and direction.

crazy166
some people think i'm crazy, some people know i am

Share this post


Link to post
Share on other sites
A vertex is just a point in space, (10, 3, -42) for example. A vector on the other hand has direction and length. So if we have (10, 3, -42) and treat it as a vector it has a direction, it points to the right, up and into the screen(in OpenGL's coordinate system). That vector also has a length of 43.278170 which tells you how long the vector is. When you normalize a vector you will get a unit vector, a vector whose length is 1. Hope this helps.

Nate Miller
http://nate.scuzzy.net


Edited by - Nate on October 4, 2000 3:36:19 PM

Share this post


Link to post
Share on other sites
A vertex is the point where two line meet, yes, and a vector is similar to a ray, with origin, direction, and magnitude.

-------------------------------
That's just my 200 bucks' worth!

..-=gLaDiAtOr=-..

Share this post


Link to post
Share on other sites
so you define them as the following?

the_vertex[2] floatx,floaty,floatz
the_vector vertex[0],vertex[1]

is this correct, i''m still confusing myself sorry.

Share this post


Link to post
Share on other sites
A vertex and a vector can use the same structure(float x, float y, float z). The distinction between vertex and vector depends on how you use the structure.

Nate Miller
http://nate.scuzzy.net

Share this post


Link to post
Share on other sites
A vertex is a point. Just a point nothing else.
Whereas a vector has a direction and length.
Think of a vector as a force.

But most of the time you can interchange the two and get the same results. But keeping them separated when thinking about them helps keep you sane

So when coding/implementing use tons of typedefs and don''t recycle your structures...
ie typedef point vector

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!