Jump to content
  • Advertisement
Sign in to follow this  
ryan20fun

Getting quad vertices.

This topic is 2205 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

Hi All.
( i hope this is the right forum )

I'm trying to make a quad class that can generate two triangles from a position, normal and size parameter.
And i'm having trouble on how to place the vertices along the specified 'normal'.

Ive used a matrix and vector math to do something similar, but it seams to be a bit of overkill for this.

so is there another way of displacing those vertices without doing some matrix math on them ?

Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
You're having trouble because you are missing one crucial piece of information without which the quad isn't uniquely defined - how should the quad be rotated about the normal axis?

Share this post


Link to post
Share on other sites
i was thinking that i would use the normal as the direction the quad faces.

so the 'position' defines the point in world space, the 'normal' the direction the quad faces and the 'size' is its size.

is this a bad idea ?

Share this post


Link to post
Share on other sites
As Bacterius said, the normal is not enough to define the orientation of the quad. You need at least two directions; the normal is fine to face the quad in a certain direction, but you also need to disambiguate the rotation about the normal to uniquely define a quad.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!