  | | | getting a polygon 's "transformation matrix " | getting a polygon 's "transformation matrix " 2004-02-16 - By Jaco
Back Hello there, I'm rewriting some snap tools, and I sort of feel I'm doing something just wrong.
insofar to simplify my life on rotating objects according to a polygon's orientation I've been using normalized vectors gotten as follows:
-get the normal -create a vector from the polygon's averaged center to the first point -create the third axis with a crossproduct of the other 2 vectors -populate a matrix
and I then use that matrix to perform transformations. I only use it for rotations and it assumes the poly is planar.
it's served its purpose insofar, but it doesn't look like the most elegant anybody has any suggestions for smarte ways to crate a transform matrix out of a poly's orientation ? any bits of the SDK I missed ?
thanks in advance.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"> <META NAME="Generator" CONTENT="MS Exchange Server version 6.0.4630.0"> <TITLE>getting a polygon's "transformation matrix"</TITLE> </HEAD> <BODY> <!-- Converted from text/rtf format -->
<P><FONT SIZE=2 FACE="Arial">Hello there, I'm rewriting some snap tools, and I sort of feel I'm doing something just wrong.</FONT> </P>
<P><FONT SIZE=2 FACE="Arial">insofar to simplify my life on rotating objects according to a polygon's orientation I've been using normalized vectors gotten as follows:</FONT></P>
<P><FONT SIZE=2 FACE="Arial">-get the normal</FONT>
<BR><FONT SIZE=2 FACE="Arial">-create a vector from the polygon's averaged center to the first point</FONT>
<BR><FONT SIZE=2 FACE="Arial">-create the third axis with a crossproduct of the other 2 vectors</FONT>
<BR><FONT SIZE=2 FACE="Arial">-populate a matrix</FONT> </P>
<P><FONT SIZE=2 FACE="Arial">and I then use that matrix to perform transformations.</FONT>
<BR><FONT SIZE=2 FACE="Arial">I only use it for rotations and it assumes the poly is planar.</FONT> </P>
<P><FONT SIZE=2 FACE="Arial">it's served its purpose insofar, but it doesn't look like the most elegant</FONT>
<BR><FONT SIZE=2 FACE="Arial">anybody has any suggestions for smarte ways to crate a transform matrix out of a poly's orientation ?</FONT>
<BR><FONT SIZE=2 FACE="Arial">any bits of the SDK I missed ?</FONT> </P>
<P><FONT SIZE=2 FACE="Arial">thanks in advance.</FONT> </P>
</BODY> </HTML>
|
|
 |