Getting quad vertices.

Started by
3 comments, last by ryan20fun 11 years, 9 months ago
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.

Never say Never, Because Never comes too soon. - ryan20fun

Disclaimer: Each post of mine is intended as an attempt of helping and/or bringing some meaningfull insight to the topic at hand. Due to my nature, my good intentions will not always be plainly visible. I apologise in advance and assure you I mean no harm and do not intend to insult anyone.

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?

“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”

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 ?

Never say Never, Because Never comes too soon. - ryan20fun

Disclaimer: Each post of mine is intended as an attempt of helping and/or bringing some meaningfull insight to the topic at hand. Due to my nature, my good intentions will not always be plainly visible. I apologise in advance and assure you I mean no harm and do not intend to insult anyone.

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.
Found a solution to my problem( it came from this page ).

Thanks for the help.

Never say Never, Because Never comes too soon. - ryan20fun

Disclaimer: Each post of mine is intended as an attempt of helping and/or bringing some meaningfull insight to the topic at hand. Due to my nature, my good intentions will not always be plainly visible. I apologise in advance and assure you I mean no harm and do not intend to insult anyone.

This topic is closed to new replies.

Advertisement