2
Copyright (c) 2008-2009 NetAllied Systems GmbH
4
This file is part of COLLADAMax.
6
Portions of the code are:
7
Copyright (c) 2005-2007 Feeling Software Inc.
8
Copyright (c) 2005-2007 Sony Computer Entertainment America
10
Based on the 3dsMax COLLADASW Tools:
11
Copyright (c) 2005-2006 Autodesk Media Entertainment
13
Licensed under the MIT Open Source License,
14
for details please see LICENSE file or the website
15
http://www.opensource.org/licenses/mit-license.php
18
#include "COLLADAMaxStableHeaders.h"
19
#include "COLLADAMaxAnimationImporter.h"
21
#include "COLLADAFWAnimation.h"
27
//------------------------------
28
inline int frameWorkInterpolationToMaxInterpolation(COLLADAFW::AnimationCurve::InterpolationType interpolationType)
30
switch (interpolationType)
32
case COLLADAFW::AnimationCurve::INTERPOLATION_STEP:
34
case COLLADAFW::AnimationCurve::INTERPOLATION_LINEAR:
41
//------------------------------
42
AnimationImporter::AnimationImporter( DocumentImporter* documentImporter, const COLLADAFW::Animation* animation )
43
: AnimationCreator(documentImporter)
44
, mAnimation(animation)
45
, mUnitConversionFunctors(getUnitConversionFunctors())
49
//------------------------------
50
AnimationImporter::~AnimationImporter()
54
ConversionFunctor* AnimationImporter::getConversionFunctorByPhysicalDimension( COLLADAFW::PhysicalDimension physicalDimension )
56
switch ( physicalDimension )
58
case COLLADAFW::PHYSICAL_DIMENSION_LENGTH:
59
return mUnitConversionFunctors.lengthConversion;
60
case COLLADAFW::PHYSICAL_DIMENSION_ANGLE:
61
return mUnitConversionFunctors.angleConversion;
62
case COLLADAFW::PHYSICAL_DIMENSION_TIME:
63
return mUnitConversionFunctors.timeConversion;
68
//------------------------------
69
bool AnimationImporter::import()
71
// We only support curves
72
if ( mAnimation->getAnimationType() != COLLADAFW::Animation::ANIMATION_CURVE )
75
const COLLADAFW::UniqueId& animationUniqueId = mAnimation->getUniqueId();
77
COLLADAFW::AnimationCurve* animationCurve = (COLLADAFW::AnimationCurve*)mAnimation;
79
size_t dimensions = animationCurve->getOutDimension();
81
if ( dimensions == 16 )
83
//Special case of a matrix
84
if ( animationCurve->getInterpolationType() != COLLADAFW::AnimationCurve::INTERPOLATION_LINEAR )
86
// we only support linearly interpolated matrices
89
Control* maxController = createAndFillMaxTransformationController( animationCurve );
90
addMaxControllerToAnimationUniqueId( animationUniqueId, maxController);
94
for ( size_t i = 0; i < dimensions; ++i)
96
Control* maxController = createAndFillMaxFloatController( animationCurve, i);
97
addMaxControllerToAnimationUniqueId( animationUniqueId, maxController);
103
//------------------------------
104
Control* AnimationImporter::createAndFillMaxFloatController( COLLADAFW::AnimationCurve* animationCurve, size_t dimension )
106
COLLADAFW::AnimationCurve::InterpolationType interpolationType = animationCurve->getInterpolationType();
107
bool isLinear = (interpolationType == COLLADAFW::AnimationCurve::INTERPOLATION_LINEAR);
109
Control* maxController = createMaxFloatController( animationCurve, isLinear );
110
if ( !maxController )
113
IKeyControl* maxKeyController = GetKeyControlInterface( maxController );
115
fillMaxFloatController( maxKeyController, animationCurve, dimension, isLinear);
117
return maxController;
120
//------------------------------
121
bool AnimationImporter::fillMaxFloatController( IKeyControl* maxKeyController, COLLADAFW::AnimationCurve* animationCurve, size_t dimension, bool isLinear )
123
// Fill in the controller with the animation data from the curve
124
size_t keyCount = animationCurve->getKeyCount();
125
size_t dimensions = animationCurve->getOutDimension();
127
assert( dimension <= dimensions);
129
maxKeyController->SetNumKeys((int) keyCount);
131
const COLLADAFW::FloatOrDoubleArray& inputValues = animationCurve->getInputValues();
132
COLLADAFW::FloatOrDoubleArray::DataType inputValuesDataType = inputValues.getType();
134
const COLLADAFW::FloatOrDoubleArray& outputValues = animationCurve->getOutputValues();
135
COLLADAFW::FloatOrDoubleArray::DataType outputValuesDataType = outputValues.getType();
137
ConversionFunctor* inputConversionFunctor = getConversionFunctorByPhysicalDimension( animationCurve->getInPhysicalDimension() );
138
ConversionFunctor* outputConversionFunctor = getConversionFunctorByPhysicalDimension( animationCurve->getOutPhysicalDimensions()[dimension]);
142
if ( inputValuesDataType == COLLADAFW::FloatOrDoubleArray::DATA_TYPE_DOUBLE )
144
if ( outputValuesDataType == COLLADAFW::FloatOrDoubleArray::DATA_TYPE_DOUBLE )
146
fillLinearMaxFloatController( maxKeyController, keyCount, dimensions, dimension, *inputValues.getDoubleValues(), *outputValues.getDoubleValues(), inputConversionFunctor, outputConversionFunctor);
148
else if ( outputValuesDataType == COLLADAFW::FloatOrDoubleArray::DATA_TYPE_FLOAT)
150
fillLinearMaxFloatController( maxKeyController, keyCount, dimensions, dimension, *inputValues.getDoubleValues(), *outputValues.getFloatValues(), inputConversionFunctor, outputConversionFunctor);
153
else if ( inputValuesDataType == COLLADAFW::FloatOrDoubleArray::DATA_TYPE_FLOAT )
155
if ( outputValuesDataType == COLLADAFW::FloatOrDoubleArray::DATA_TYPE_DOUBLE )
157
fillLinearMaxFloatController( maxKeyController, keyCount, dimensions, dimension, *inputValues.getFloatValues(), *outputValues.getDoubleValues(), inputConversionFunctor, outputConversionFunctor);
159
else if ( outputValuesDataType == COLLADAFW::FloatOrDoubleArray::DATA_TYPE_FLOAT)
161
fillLinearMaxFloatController( maxKeyController, keyCount, dimensions, dimension, *inputValues.getFloatValues(), *outputValues.getFloatValues(), inputConversionFunctor, outputConversionFunctor);
167
const COLLADAFW::AnimationCurve::InterpolationTypeArray& interpolationTypes = animationCurve->getInterpolationTypes();
168
COLLADAFW::AnimationCurve::InterpolationType interpolationType = animationCurve->getInterpolationType();
170
const COLLADAFW::FloatOrDoubleArray& inTangentValues = animationCurve->getInTangentValues();
171
COLLADAFW::FloatOrDoubleArray::DataType inTangentValuesDataType = inTangentValues.getType();
173
const COLLADAFW::FloatOrDoubleArray& outTangentValues = animationCurve->getOutTangentValues();
174
COLLADAFW::FloatOrDoubleArray::DataType outTangentValuesDataType = outTangentValues.getType();
177
if ( inputValuesDataType == COLLADAFW::FloatOrDoubleArray::DATA_TYPE_DOUBLE )
179
if ( outputValuesDataType == COLLADAFW::FloatOrDoubleArray::DATA_TYPE_DOUBLE )
181
if ( inTangentValuesDataType == COLLADAFW::FloatOrDoubleArray::DATA_TYPE_DOUBLE )
183
if ( outTangentValuesDataType == COLLADAFW::FloatOrDoubleArray::DATA_TYPE_DOUBLE )
185
fillBezierMaxFloatController( maxKeyController, keyCount, dimensions, dimension, *inputValues.getDoubleValues(), *outputValues.getDoubleValues(), *inTangentValues.getDoubleValues(), *outTangentValues.getDoubleValues(), interpolationType, interpolationTypes, inputConversionFunctor, outputConversionFunctor);
187
else if ( outTangentValuesDataType == COLLADAFW::FloatOrDoubleArray::DATA_TYPE_FLOAT)
189
fillBezierMaxFloatController( maxKeyController, keyCount, dimensions, dimension, *inputValues.getDoubleValues(), *outputValues.getDoubleValues(), *inTangentValues.getDoubleValues(), *outTangentValues.getFloatValues(), interpolationType, interpolationTypes, inputConversionFunctor, outputConversionFunctor);
192
else if ( inTangentValuesDataType == COLLADAFW::FloatOrDoubleArray::DATA_TYPE_FLOAT)
194
if ( outTangentValuesDataType == COLLADAFW::FloatOrDoubleArray::DATA_TYPE_DOUBLE )
196
fillBezierMaxFloatController( maxKeyController, keyCount, dimensions, dimension, *inputValues.getDoubleValues(), *outputValues.getDoubleValues(), *inTangentValues.getFloatValues(), *outTangentValues.getDoubleValues(), interpolationType, interpolationTypes, inputConversionFunctor, outputConversionFunctor);
198
else if ( outTangentValuesDataType == COLLADAFW::FloatOrDoubleArray::DATA_TYPE_FLOAT)
200
fillBezierMaxFloatController( maxKeyController, keyCount, dimensions, dimension, *inputValues.getDoubleValues(), *outputValues.getDoubleValues(), *inTangentValues.getFloatValues(), *outTangentValues.getFloatValues(), interpolationType, interpolationTypes, inputConversionFunctor, outputConversionFunctor);
204
else if ( outputValuesDataType == COLLADAFW::FloatOrDoubleArray::DATA_TYPE_FLOAT)
206
if ( inTangentValuesDataType == COLLADAFW::FloatOrDoubleArray::DATA_TYPE_DOUBLE )
208
if ( outTangentValuesDataType == COLLADAFW::FloatOrDoubleArray::DATA_TYPE_DOUBLE )
210
fillBezierMaxFloatController( maxKeyController, keyCount, dimensions, dimension, *inputValues.getDoubleValues(), *outputValues.getFloatValues(), *inTangentValues.getDoubleValues(), *outTangentValues.getDoubleValues(), interpolationType, interpolationTypes, inputConversionFunctor, outputConversionFunctor);
212
else if ( outTangentValuesDataType == COLLADAFW::FloatOrDoubleArray::DATA_TYPE_FLOAT)
214
fillBezierMaxFloatController( maxKeyController, keyCount, dimensions, dimension, *inputValues.getDoubleValues(), *outputValues.getFloatValues(), *inTangentValues.getDoubleValues(), *outTangentValues.getFloatValues(), interpolationType, interpolationTypes, inputConversionFunctor, outputConversionFunctor);
217
else if ( inTangentValuesDataType == COLLADAFW::FloatOrDoubleArray::DATA_TYPE_FLOAT)
219
if ( outTangentValuesDataType == COLLADAFW::FloatOrDoubleArray::DATA_TYPE_DOUBLE )
221
fillBezierMaxFloatController( maxKeyController, keyCount, dimensions, dimension, *inputValues.getDoubleValues(), *outputValues.getFloatValues(), *inTangentValues.getFloatValues(), *outTangentValues.getDoubleValues(), interpolationType, interpolationTypes, inputConversionFunctor, outputConversionFunctor);
223
else if ( outTangentValuesDataType == COLLADAFW::FloatOrDoubleArray::DATA_TYPE_FLOAT)
225
fillBezierMaxFloatController( maxKeyController, keyCount, dimensions, dimension, *inputValues.getDoubleValues(), *outputValues.getFloatValues(), *inTangentValues.getFloatValues(), *outTangentValues.getFloatValues(), interpolationType, interpolationTypes, inputConversionFunctor, outputConversionFunctor);
230
else if ( inputValuesDataType == COLLADAFW::FloatOrDoubleArray::DATA_TYPE_FLOAT )
232
if ( outputValuesDataType == COLLADAFW::FloatOrDoubleArray::DATA_TYPE_DOUBLE )
234
if ( inTangentValuesDataType == COLLADAFW::FloatOrDoubleArray::DATA_TYPE_DOUBLE )
236
if ( outTangentValuesDataType == COLLADAFW::FloatOrDoubleArray::DATA_TYPE_DOUBLE )
238
fillBezierMaxFloatController( maxKeyController, keyCount, dimensions, dimension, *inputValues.getFloatValues(), *outputValues.getDoubleValues(), *inTangentValues.getDoubleValues(), *outTangentValues.getDoubleValues(), interpolationType, interpolationTypes, inputConversionFunctor, outputConversionFunctor);
240
else if ( outTangentValuesDataType == COLLADAFW::FloatOrDoubleArray::DATA_TYPE_FLOAT)
242
fillBezierMaxFloatController( maxKeyController, keyCount, dimensions, dimension, *inputValues.getFloatValues(), *outputValues.getDoubleValues(), *inTangentValues.getDoubleValues(), *outTangentValues.getFloatValues(), interpolationType, interpolationTypes, inputConversionFunctor, outputConversionFunctor);
245
else if ( inTangentValuesDataType == COLLADAFW::FloatOrDoubleArray::DATA_TYPE_FLOAT)
247
if ( outTangentValuesDataType == COLLADAFW::FloatOrDoubleArray::DATA_TYPE_DOUBLE )
249
fillBezierMaxFloatController( maxKeyController, keyCount, dimensions, dimension, *inputValues.getFloatValues(), *outputValues.getDoubleValues(), *inTangentValues.getFloatValues(), *outTangentValues.getDoubleValues(), interpolationType, interpolationTypes, inputConversionFunctor, outputConversionFunctor);
251
else if ( outTangentValuesDataType == COLLADAFW::FloatOrDoubleArray::DATA_TYPE_FLOAT)
253
fillBezierMaxFloatController( maxKeyController, keyCount, dimensions, dimension, *inputValues.getFloatValues(), *outputValues.getDoubleValues(), *inTangentValues.getFloatValues(), *outTangentValues.getFloatValues(), interpolationType, interpolationTypes, inputConversionFunctor, outputConversionFunctor);
257
else if ( outputValuesDataType == COLLADAFW::FloatOrDoubleArray::DATA_TYPE_FLOAT)
259
if ( inTangentValuesDataType == COLLADAFW::FloatOrDoubleArray::DATA_TYPE_DOUBLE )
261
if ( outTangentValuesDataType == COLLADAFW::FloatOrDoubleArray::DATA_TYPE_DOUBLE )
263
fillBezierMaxFloatController( maxKeyController, keyCount, dimensions, dimension, *inputValues.getFloatValues(), *outputValues.getFloatValues(), *inTangentValues.getDoubleValues(), *outTangentValues.getDoubleValues(), interpolationType, interpolationTypes, inputConversionFunctor, outputConversionFunctor);
265
else if ( outTangentValuesDataType == COLLADAFW::FloatOrDoubleArray::DATA_TYPE_FLOAT)
267
fillBezierMaxFloatController( maxKeyController, keyCount, dimensions, dimension, *inputValues.getFloatValues(), *outputValues.getFloatValues(), *inTangentValues.getDoubleValues(), *outTangentValues.getFloatValues(), interpolationType, interpolationTypes, inputConversionFunctor, outputConversionFunctor);
270
else if ( inTangentValuesDataType == COLLADAFW::FloatOrDoubleArray::DATA_TYPE_FLOAT)
272
if ( outTangentValuesDataType == COLLADAFW::FloatOrDoubleArray::DATA_TYPE_DOUBLE )
274
fillBezierMaxFloatController( maxKeyController, keyCount, dimensions, dimension, *inputValues.getFloatValues(), *outputValues.getFloatValues(), *inTangentValues.getFloatValues(), *outTangentValues.getDoubleValues(), interpolationType, interpolationTypes, inputConversionFunctor, outputConversionFunctor);
276
else if ( outTangentValuesDataType == COLLADAFW::FloatOrDoubleArray::DATA_TYPE_FLOAT)
278
fillBezierMaxFloatController( maxKeyController, keyCount, dimensions, dimension, *inputValues.getFloatValues(), *outputValues.getFloatValues(), *inTangentValues.getFloatValues(), *outTangentValues.getFloatValues(), interpolationType, interpolationTypes, inputConversionFunctor, outputConversionFunctor);
285
maxKeyController->SortKeys();
289
//------------------------------
290
template<class InputArrayType, class OutputArrayType>
291
bool AnimationImporter::fillLinearMaxFloatController( IKeyControl* maxKeyController,
295
const InputArrayType& inputValues,
296
const OutputArrayType& outputValues,
297
ConversionFunctorType inputConversionFunctor,
298
ConversionFunctorType outputConversionFunctor)
300
for ( size_t i = 0; i < keyCount; ++i)
302
// Create the linear keys
304
if ( inputConversionFunctor )
306
key.time = (TimeValue)((*inputConversionFunctor)((float)(inputValues[i])));
310
key.time = (TimeValue)(inputValues[i]);
313
if ( outputConversionFunctor )
315
key.val = (*outputConversionFunctor)((float)(outputValues[ i*dimensions + dimension ]));
319
key.val = (float)(outputValues[ i*dimensions + dimension ]);
322
maxKeyController->SetKey((int) i, &key);
328
//------------------------------
329
template<class InputArrayType, class OutputArrayType, class InTangentArrayType, class OutTangentArrayType>
330
bool AnimationImporter::fillBezierMaxFloatController( IKeyControl* maxKeyController,
334
const InputArrayType& inputValues,
335
const OutputArrayType& outputValues,
336
const InTangentArrayType& inTangentValues,
337
const OutTangentArrayType& outTangentValues,
338
const COLLADAFW::AnimationCurve::InterpolationType interpolationType,
339
const COLLADAFW::AnimationCurve::InterpolationTypeArray& interpolationTypes,
340
ConversionFunctorType inputConversionFunctor,
341
ConversionFunctorType outputConversionFunctor)
343
COLLADAFW::AnimationCurve::InterpolationType previousKeyInterpolationType;
344
COLLADAFW::AnimationCurve::InterpolationType currentKeyInterpolationType;
345
if ( interpolationType != COLLADAFW::AnimationCurve::INTERPOLATION_MIXED )
347
previousKeyInterpolationType = interpolationType;
348
currentKeyInterpolationType = interpolationType;
351
for ( size_t i = 0; i < keyCount; ++i)
354
if ( interpolationType == COLLADAFW::AnimationCurve::INTERPOLATION_MIXED )
356
previousKeyInterpolationType = interpolationTypes[i > 0 ? i-1 : i];
357
currentKeyInterpolationType = interpolationTypes[i];
361
float currentKeyInput = (float)(inputValues[i]);
362
// Create the linear keys
365
key.time = (TimeValue)convert( inputConversionFunctor, currentKeyInput );
367
key.val = convert( outputConversionFunctor, (float)(outputValues[ i*dimensions + dimension ]));
369
SetInTanType(key.flags, frameWorkInterpolationToMaxInterpolation( previousKeyInterpolationType ) );
370
SetOutTanType(key.flags, frameWorkInterpolationToMaxInterpolation( currentKeyInterpolationType ) );
372
size_t tangentIndex = 2*(dimensions * i + dimension);
375
if ( previousKeyInterpolationType == COLLADAFW::AnimationCurve::INTERPOLATION_BEZIER )
377
float previousSpan = (i > 0 ? currentKeyInput - (float)(inputValues[i-1]) : TOLERANCE);
379
// Calculate the in-tangent
380
float absoluteInTangentLength = currentKeyInput - (float)inTangentValues[tangentIndex];
381
key.inLength = absoluteInTangentLength / previousSpan;
382
if ( COLLADABU::Math::Utils::equalsZero( key.inLength ) )
384
key.inLength = COLLADABU::Math::Utils::sign(key.inLength) * TOLERANCE;
386
key.intan = ( convert( outputConversionFunctor, (float)inTangentValues[tangentIndex + 1]) - key.val) / ( convert(inputConversionFunctor, absoluteInTangentLength));
391
key.inLength = 0.333f;
396
if ( currentKeyInterpolationType == COLLADAFW::AnimationCurve::INTERPOLATION_BEZIER )
398
float nextSpan = (i < keyCount - 1 ? (float)(inputValues[i+1]) - currentKeyInput : TOLERANCE );
400
// Calculate the out-tangent
401
float absoluteOutTangentLength = (float)outTangentValues[tangentIndex] - currentKeyInput;
402
key.outLength = absoluteOutTangentLength / nextSpan;
403
if ( COLLADABU::Math::Utils::equalsZero(key.outLength) )
405
key.outLength = COLLADABU::Math::Utils::sign(key.outLength) * TOLERANCE;
407
key.outtan = (convert( outputConversionFunctor, (float)outTangentValues[tangentIndex + 1]) - key.val) / ( convert(inputConversionFunctor, absoluteOutTangentLength) );
412
key.outLength = 0.333f;
415
// In some rare cases, only half the key is set by the first call, so call the SetKey function twice.
416
maxKeyController->SetKey((int) i, &key);
417
maxKeyController->SetKey((int) i, &key);
424
//------------------------------
425
Control* AnimationImporter::createAndFillMaxTransformationController( COLLADAFW::AnimationCurve* animationCurve )
427
if ( animationCurve->getInterpolationType() != COLLADAFW::AnimationCurve::INTERPOLATION_LINEAR )
429
// we support only linear transformations
433
if ( animationCurve->getOutDimension() != 16 )
435
// we can only handle animations with 16 dimension as matrix controller
439
Control* maxController = createMaxTransformationController( animationCurve );
440
if ( !maxController )
445
IKeyControl* maxKeyController = GetKeyControlInterface( maxController );
447
fillMaxTransformationController( maxController, animationCurve);
449
return maxController;
452
//------------------------------
453
bool AnimationImporter::fillMaxTransformationController( Control* maxController, COLLADAFW::AnimationCurve* animationCurve )
455
// Fill in the controller with the animation data from the curve
456
size_t keyCount = animationCurve->getKeyCount();
458
assert( animationCurve->getOutDimension() == 16);
460
//maxController->SetNumKeys((int) keyCount);
462
const COLLADAFW::FloatOrDoubleArray& inputValues = animationCurve->getInputValues();
463
COLLADAFW::FloatOrDoubleArray::DataType inputValuesDataType = inputValues.getType();
465
const COLLADAFW::FloatOrDoubleArray& outputValues = animationCurve->getOutputValues();
466
COLLADAFW::FloatOrDoubleArray::DataType outputValuesDataType = outputValues.getType();
468
ConversionFunctor* inputConversionFunctor = getConversionFunctorByPhysicalDimension( animationCurve->getInPhysicalDimension() );
469
ConversionFunctor* outputConversionFunctors[16];
470
for ( size_t i = 0; i < 16; ++i)
472
outputConversionFunctors[i] = getConversionFunctorByPhysicalDimension( animationCurve->getOutPhysicalDimensions()[i]);
475
if ( inputValuesDataType == COLLADAFW::FloatOrDoubleArray::DATA_TYPE_DOUBLE )
477
if ( outputValuesDataType == COLLADAFW::FloatOrDoubleArray::DATA_TYPE_DOUBLE )
479
fillLinearMaxTransformationController( maxController, keyCount, *inputValues.getDoubleValues(), *outputValues.getDoubleValues(), inputConversionFunctor, outputConversionFunctors);
481
else if ( outputValuesDataType == COLLADAFW::FloatOrDoubleArray::DATA_TYPE_FLOAT)
483
fillLinearMaxTransformationController( maxController, keyCount, *inputValues.getDoubleValues(), *outputValues.getFloatValues(), inputConversionFunctor, outputConversionFunctors);
486
else if ( inputValuesDataType == COLLADAFW::FloatOrDoubleArray::DATA_TYPE_FLOAT )
488
if ( outputValuesDataType == COLLADAFW::FloatOrDoubleArray::DATA_TYPE_DOUBLE )
490
fillLinearMaxTransformationController( maxController, keyCount, *inputValues.getFloatValues(), *outputValues.getDoubleValues(), inputConversionFunctor, outputConversionFunctors);
492
else if ( outputValuesDataType == COLLADAFW::FloatOrDoubleArray::DATA_TYPE_FLOAT)
494
fillLinearMaxTransformationController( maxController, keyCount, *inputValues.getFloatValues(), *outputValues.getFloatValues(), inputConversionFunctor, outputConversionFunctors);
501
//------------------------------
502
template<class InputArrayType, class OutputArrayType>
503
bool AnimationImporter::fillLinearMaxTransformationController( Control* maxController,
505
const InputArrayType& inputValues,
506
const OutputArrayType& outputValues,
507
ConversionFunctorType inputConversionFunctor,
508
ConversionFunctor* outputConversionFunctors[])
514
for ( size_t i = 0; i < keyCount; ++i)
517
if ( inputConversionFunctor )
519
keyTime = (TimeValue)((*inputConversionFunctor)((float)(inputValues[i])));
523
keyTime = (TimeValue)(inputValues[i]);
528
size_t firstMatrixElement = 16*i;
531
column[ 0 ] = convert(outputConversionFunctors[0], (float)outputValues[firstMatrixElement + 0]);
532
column[ 1 ] = convert(outputConversionFunctors[1], (float)outputValues[firstMatrixElement + 1]);
533
column[ 2 ] = convert(outputConversionFunctors[2], (float)outputValues[firstMatrixElement + 2]);
534
column[ 3 ] = convert(outputConversionFunctors[3], (float)outputValues[firstMatrixElement + 3]);
535
matrixValue.SetColumn(0, column);
537
column[ 0 ] = convert(outputConversionFunctors[4], (float)outputValues[firstMatrixElement + 4]);
538
column[ 1 ] = convert(outputConversionFunctors[5], (float)outputValues[firstMatrixElement + 5]);
539
column[ 2 ] = convert(outputConversionFunctors[6], (float)outputValues[firstMatrixElement + 6]);
540
column[ 3 ] = convert(outputConversionFunctors[7], (float)outputValues[firstMatrixElement + 7]);
541
matrixValue.SetColumn(1, column);
543
column[ 0 ] = convert(outputConversionFunctors[8], (float)outputValues[firstMatrixElement + 8]);
544
column[ 1 ] = convert(outputConversionFunctors[9], (float)outputValues[firstMatrixElement + 9]);
545
column[ 2 ] = convert(outputConversionFunctors[10], (float)outputValues[firstMatrixElement + 10]);
546
column[ 3 ] = convert(outputConversionFunctors[11], (float)outputValues[firstMatrixElement + 11]);
547
matrixValue.SetColumn(2, column);
549
SetXFormPacket matrixValuePacket(matrixValue);
550
maxController->SetValue( keyTime, &matrixValuePacket, 1, CTRL_ABSOLUTE);
558
} // namespace COLLADAMax