diff options
Diffstat (limited to '')
-rw-r--r-- | NW4RTools/ColladaExporter.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/NW4RTools/ColladaExporter.cs b/NW4RTools/ColladaExporter.cs index cd5aaf1..ccdc6b0 100644 --- a/NW4RTools/ColladaExporter.cs +++ b/NW4RTools/ColladaExporter.cs @@ -478,15 +478,15 @@ namespace NW4RTools { var posArray = new float_array(); posArray.id = name + "-lib-Position-array"; - posArray.count = (ulong)(posData.GetRealCount() * posData.EntryCount); + posArray.count = (ulong)(3 * posData.EntryCount); posArray.Values = new double[posArray.count]; dest = 0; for (int i = 0; i < posData.EntryCount; i++) { float[] data = posData.GetEntry(i); - for (int j = 0; j < data.Length; j++) { - posArray.Values[dest++] = data[j]; - } + posArray.Values[dest++] = data[0]; + posArray.Values[dest++] = data[1]; + posArray.Values[dest++] = (data.Length <= 2) ? 0 : data[2]; } posSource.Item = posArray; @@ -496,9 +496,9 @@ namespace NW4RTools { var posAcc = posSource.technique_common.accessor = new accessor(); posAcc.source = String.Format("#{0}-lib-Position-array", name); posAcc.count = posData.EntryCount; - posAcc.stride = (ulong)posData.GetRealCount(); + posAcc.stride = 3; - posAcc.param = new param[posData.GetRealCount()]; + posAcc.param = new param[3]; string[] posParamNames = new string[] { "X", "Y", "Z" }; for (int i = 0; i < posAcc.param.Length; i++) { |