diff options
author | Jeff Ames | 2008-05-16 01:22:11 +0000 |
---|---|---|
committer | Jeff Ames | 2008-05-16 01:22:11 +0000 |
commit | 65c5efe43b68700bad94076d4cd421160203c5de (patch) | |
tree | 589b56649ed02f4942671fd6e51c6dc43f682e0d /OpenSim/Region/Physics/Meshing/HelperTypes.cs | |
parent | Thank you very much, mjm for : (diff) | |
download | opensim-SC_OLD-65c5efe43b68700bad94076d4cd421160203c5de.zip opensim-SC_OLD-65c5efe43b68700bad94076d4cd421160203c5de.tar.gz opensim-SC_OLD-65c5efe43b68700bad94076d4cd421160203c5de.tar.bz2 opensim-SC_OLD-65c5efe43b68700bad94076d4cd421160203c5de.tar.xz |
Formatting cleanup.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Physics/Meshing/HelperTypes.cs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/OpenSim/Region/Physics/Meshing/HelperTypes.cs b/OpenSim/Region/Physics/Meshing/HelperTypes.cs index efc5968..584133c 100644 --- a/OpenSim/Region/Physics/Meshing/HelperTypes.cs +++ b/OpenSim/Region/Physics/Meshing/HelperTypes.cs | |||
@@ -49,7 +49,7 @@ public class Quaternion | |||
49 | } | 49 | } |
50 | public Quaternion(Vertex axis, float angle) | 50 | public Quaternion(Vertex axis, float angle) |
51 | { | 51 | { |
52 | // using (* 0.5) instead of (/2) | 52 | // using (* 0.5) instead of (/2) |
53 | w = (float)Math.Cos(angle * 0.5f); | 53 | w = (float)Math.Cos(angle * 0.5f); |
54 | x = axis.X * (float)Math.Sin(angle * 0.5f); | 54 | x = axis.X * (float)Math.Sin(angle * 0.5f); |
55 | y = axis.Y * (float)Math.Sin(angle * 0.5f); | 55 | y = axis.Y * (float)Math.Sin(angle * 0.5f); |
@@ -65,8 +65,8 @@ public class Quaternion | |||
65 | c.w = a.w * b.w - a.x * b.x - a.y * b.y - a.z * b.z; | 65 | c.w = a.w * b.w - a.x * b.x - a.y * b.y - a.z * b.z; |
66 | return c; | 66 | return c; |
67 | } | 67 | } |
68 | 68 | ||
69 | 69 | ||
70 | public Matrix4 computeMatrix() | 70 | public Matrix4 computeMatrix() |
71 | { | 71 | { |
72 | return new Matrix4(this); | 72 | return new Matrix4(this); |
@@ -74,7 +74,7 @@ public class Quaternion | |||
74 | public void normalize() | 74 | public void normalize() |
75 | { | 75 | { |
76 | float mag = length(); | 76 | float mag = length(); |
77 | 77 | ||
78 | w /= mag; | 78 | w /= mag; |
79 | x /= mag; | 79 | x /= mag; |
80 | y /= mag; | 80 | y /= mag; |
@@ -367,7 +367,7 @@ public class Triangle | |||
367 | // It is assumed, that the triangles vertices are already set correctly | 367 | // It is assumed, that the triangles vertices are already set correctly |
368 | double p1x, p2x, p1y, p2y, p3x, p3y; | 368 | double p1x, p2x, p1y, p2y, p3x, p3y; |
369 | 369 | ||
370 | // Deviation of this routine: | 370 | // Deviation of this routine: |
371 | // A circle has the general equation (M-p)^2=r^2, where M and p are vectors | 371 | // A circle has the general equation (M-p)^2=r^2, where M and p are vectors |
372 | // this gives us three equations f(p)=r^2, each for one point p1, p2, p3 | 372 | // this gives us three equations f(p)=r^2, each for one point p1, p2, p3 |
373 | // putting respectively two equations together gives two equations | 373 | // putting respectively two equations together gives two equations |
@@ -378,7 +378,7 @@ public class Triangle | |||
378 | // Now using the equations that are formed by the components of the vectors | 378 | // Now using the equations that are formed by the components of the vectors |
379 | // and isolate Mx lets you make one equation that only holds My | 379 | // and isolate Mx lets you make one equation that only holds My |
380 | // The rest is straight forward and eaasy :-) | 380 | // The rest is straight forward and eaasy :-) |
381 | // | 381 | // |
382 | 382 | ||
383 | /* helping variables for temporary results */ | 383 | /* helping variables for temporary results */ |
384 | double c1, c2; | 384 | double c1, c2; |
@@ -496,7 +496,7 @@ public class Triangle | |||
496 | v2 = vt; | 496 | v2 = vt; |
497 | } | 497 | } |
498 | 498 | ||
499 | // Dumps a triangle in the "raw faces" format, blender can import. This is for visualisation and | 499 | // Dumps a triangle in the "raw faces" format, blender can import. This is for visualisation and |
500 | // debugging purposes | 500 | // debugging purposes |
501 | public String ToStringRaw() | 501 | public String ToStringRaw() |
502 | { | 502 | { |