summaryrefslogtreecommitdiff
path: root/NW4RTools/ColladaWriter.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--NW4RTools/ColladaWriter.cs30
1 files changed, 15 insertions, 15 deletions
diff --git a/NW4RTools/ColladaWriter.cs b/NW4RTools/ColladaWriter.cs
index a292ba0..b2fc5a2 100644
--- a/NW4RTools/ColladaWriter.cs
+++ b/NW4RTools/ColladaWriter.cs
@@ -79,26 +79,26 @@ namespace NW4RTools {
//cNode.type = NodeType.JOINT;
cNode.node1 = new node[0];
- float cosX = Math.Cos(origNode.Rotation.x / 180 * Math.PI);
- float cosY = Math.Cos(origNode.Rotation.y / 180 * Math.PI);
- float cosZ = Math.Cos(origNode.Rotation.z / 180 * Math.PI);
- float sinX = Math.Sin(origNode.Rotation.x / 180 * Math.PI);
- float sinY = Math.Sin(origNode.Rotation.y / 180 * Math.PI);
- float sinZ = Math.Sin(origNode.Rotation.z / 180 * Math.PI);
+ double cosX = Math.Cos(origNode.Rotation.x / 180 * Math.PI);
+ double cosY = Math.Cos(origNode.Rotation.y / 180 * Math.PI);
+ double cosZ = Math.Cos(origNode.Rotation.z / 180 * Math.PI);
+ double sinX = Math.Sin(origNode.Rotation.x / 180 * Math.PI);
+ double sinY = Math.Sin(origNode.Rotation.y / 180 * Math.PI);
+ double sinZ = Math.Sin(origNode.Rotation.z / 180 * Math.PI);
var nodeMatrix = new matrix();
nodeMatrix.Values = new double[] {
- origNode.Scale.X * cosY * cosZ,
- origNode.Scale.Y * (sinX * cosZ * sinY - cosX * sinZ),
- origNode.Scale.Z * (sinX * sinZ + cosX * cosZ * sinY),
+ origNode.Scale.x * cosY * cosZ,
+ origNode.Scale.y * (sinX * cosZ * sinY - cosX * sinZ),
+ origNode.Scale.z * (sinX * sinZ + cosX * cosZ * sinY),
origNode.Translation.x,
- origNode.Scale.X * sinZ * cosY,
- origNode.Scale.Y * (sinX * sinZ * sinY + cosZ * cosX),
- origNode.Scale.Z * (cosX * sinZ * sinY - sinX * cosZ),
+ origNode.Scale.x * sinZ * cosY,
+ origNode.Scale.y * (sinX * sinZ * sinY + cosZ * cosX),
+ origNode.Scale.z * (cosX * sinZ * sinY - sinX * cosZ),
origNode.Translation.y,
- -origNode.Scale.X * sinY,
- origNode.Scale.Y * sinX * cosY,
- origNode.Scale.Z * cosX * cosY,
+ -origNode.Scale.x * sinY,
+ origNode.Scale.y * sinX * cosY,
+ origNode.Scale.z * cosX * cosY,
origNode.Translation.z,
0, 0, 0, 1
};