Getting quad vertices.
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.
( 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.
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?
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 ?
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 ?
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement