Sign in to follow this  
ryan20fun

Getting quad vertices.

Recommended Posts

ryan20fun    2635
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
Bacterius    13165
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
ryan20fun    2635
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
Brother Bob    10344
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this