2008-05-09 17:24:28 +00:00
|
|
|
/*
|
|
|
|
---------------------------------------------------------------------------
|
2008-05-22 10:20:31 +00:00
|
|
|
Open Asset Import Library (ASSIMP)
|
2008-05-09 17:24:28 +00:00
|
|
|
---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
Copyright (c) 2006-2008, ASSIMP Development Team
|
|
|
|
|
|
|
|
All rights reserved.
|
|
|
|
|
|
|
|
Redistribution and use of this software in source and binary forms,
|
|
|
|
with or without modification, are permitted provided that the following
|
|
|
|
conditions are met:
|
|
|
|
|
|
|
|
* Redistributions of source code must retain the above
|
|
|
|
copyright notice, this list of conditions and the
|
|
|
|
following disclaimer.
|
|
|
|
|
|
|
|
* Redistributions in binary form must reproduce the above
|
|
|
|
copyright notice, this list of conditions and the
|
|
|
|
following disclaimer in the documentation and/or other
|
|
|
|
materials provided with the distribution.
|
|
|
|
|
|
|
|
* Neither the name of the ASSIMP team, nor the names of its
|
|
|
|
contributors may be used to endorse or promote products
|
|
|
|
derived from this software without specific prior
|
|
|
|
written permission of the ASSIMP Development Team.
|
|
|
|
|
|
|
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
|
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
|
|
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
|
|
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
|
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
---------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
|
2008-10-31 19:32:00 +00:00
|
|
|
/** @file Defines the data structures in which the imported animations
|
|
|
|
are returned. */
|
2008-05-05 12:36:31 +00:00
|
|
|
#ifndef AI_ANIM_H_INC
|
|
|
|
#define AI_ANIM_H_INC
|
|
|
|
|
|
|
|
#include "aiTypes.h"
|
|
|
|
#include "aiQuaternion.h"
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
ASE: Added WIP support for *SMOOTHSKINMESH elements in ASE/ASC files. Fixes in the ASE loader. Fixed animation parsing. Temporary implementation of target lights and cameras, including animations.
3DS: Fixed transformation problems (Pivot points), added WIP animation support. No target animation yet (cameras, spot lights). Not yet fully tested, but static models that worked before should still work now, except all look correct now :-) (some problems with very large models remaining)
Further work on the IRR and IRRMESH loaders. IRR still WIP, IRRMESH more stable now.
Work on the LWo loader. Added support for the "one-layer-only" mode. Hierarchy bug still unfixed, UV coords bug still unfixed.
Further work on the FindInvalidDataprocess. Improved validation for normals, no false positives anymore.
Further work on the MDR loader, still WIP.
Moved DeterminePType-Step to ScenePreprocessor.
aiAnimation::mDuration is optional now, ScenePreprocessor computes it automatically if set to -1.
Fixes in the SMD loader. Still crashes on some files.
Updated animation documentation.
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@236 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
2008-11-09 23:17:19 +00:00
|
|
|
// ---------------------------------------------------------------------------
|
2008-05-05 12:36:31 +00:00
|
|
|
/** A time-value pair specifying a certain 3D vector for the given time. */
|
|
|
|
struct aiVectorKey
|
|
|
|
{
|
|
|
|
double mTime; ///< The time of this key
|
2008-05-09 17:24:28 +00:00
|
|
|
C_STRUCT aiVector3D mValue; ///< The value of this key
|
2008-10-31 19:32:00 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
|
|
|
// time is not compared
|
|
|
|
bool operator == (const aiVectorKey& o) const
|
|
|
|
{return o.mValue == this->mValue;}
|
|
|
|
|
|
|
|
bool operator != (const aiVectorKey& o) const
|
|
|
|
{return o.mValue != this->mValue;}
|
|
|
|
|
2008-11-02 16:58:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
// Only time is compared. This operator is defined
|
|
|
|
// for use with std::sort
|
|
|
|
bool operator < (const aiVectorKey& o) const
|
|
|
|
{return mTime < o.mTime;}
|
|
|
|
|
2008-11-30 22:27:20 +00:00
|
|
|
bool operator > (const aiVectorKey& o) const
|
|
|
|
{return mTime > o.mTime;}
|
|
|
|
|
2008-11-02 16:58:31 +00:00
|
|
|
|
2008-10-31 19:32:00 +00:00
|
|
|
#endif
|
2008-05-05 12:36:31 +00:00
|
|
|
};
|
|
|
|
|
ASE: Added WIP support for *SMOOTHSKINMESH elements in ASE/ASC files. Fixes in the ASE loader. Fixed animation parsing. Temporary implementation of target lights and cameras, including animations.
3DS: Fixed transformation problems (Pivot points), added WIP animation support. No target animation yet (cameras, spot lights). Not yet fully tested, but static models that worked before should still work now, except all look correct now :-) (some problems with very large models remaining)
Further work on the IRR and IRRMESH loaders. IRR still WIP, IRRMESH more stable now.
Work on the LWo loader. Added support for the "one-layer-only" mode. Hierarchy bug still unfixed, UV coords bug still unfixed.
Further work on the FindInvalidDataprocess. Improved validation for normals, no false positives anymore.
Further work on the MDR loader, still WIP.
Moved DeterminePType-Step to ScenePreprocessor.
aiAnimation::mDuration is optional now, ScenePreprocessor computes it automatically if set to -1.
Fixes in the SMD loader. Still crashes on some files.
Updated animation documentation.
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@236 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
2008-11-09 23:17:19 +00:00
|
|
|
|
|
|
|
// ---------------------------------------------------------------------------
|
2008-10-31 19:32:00 +00:00
|
|
|
/** A time-value pair specifying a rotation for the given time. For joint
|
|
|
|
* animations the rotation is usually expressed using a quaternion.
|
2008-05-05 12:36:31 +00:00
|
|
|
*/
|
|
|
|
struct aiQuatKey
|
|
|
|
{
|
|
|
|
double mTime; ///< The time of this key
|
2008-05-09 17:24:28 +00:00
|
|
|
C_STRUCT aiQuaternion mValue; ///< The value of this key
|
2008-10-31 19:32:00 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
|
|
|
// time is not compared
|
|
|
|
bool operator == (const aiQuatKey& o) const
|
|
|
|
{return o.mValue == this->mValue;}
|
|
|
|
|
|
|
|
bool operator != (const aiQuatKey& o) const
|
|
|
|
{return o.mValue != this->mValue;}
|
|
|
|
|
2008-11-02 16:58:31 +00:00
|
|
|
|
|
|
|
// Only time is compared. This operator is defined
|
|
|
|
// for use with std::sort
|
|
|
|
bool operator < (const aiQuatKey& o) const
|
|
|
|
{return mTime < o.mTime;}
|
|
|
|
|
2008-11-30 22:27:20 +00:00
|
|
|
bool operator > (const aiQuatKey& o) const
|
|
|
|
{return mTime < o.mTime;}
|
2008-11-02 16:58:31 +00:00
|
|
|
|
|
|
|
|
2008-10-31 19:32:00 +00:00
|
|
|
#endif
|
|
|
|
};
|
|
|
|
|
ASE: Added WIP support for *SMOOTHSKINMESH elements in ASE/ASC files. Fixes in the ASE loader. Fixed animation parsing. Temporary implementation of target lights and cameras, including animations.
3DS: Fixed transformation problems (Pivot points), added WIP animation support. No target animation yet (cameras, spot lights). Not yet fully tested, but static models that worked before should still work now, except all look correct now :-) (some problems with very large models remaining)
Further work on the IRR and IRRMESH loaders. IRR still WIP, IRRMESH more stable now.
Work on the LWo loader. Added support for the "one-layer-only" mode. Hierarchy bug still unfixed, UV coords bug still unfixed.
Further work on the FindInvalidDataprocess. Improved validation for normals, no false positives anymore.
Further work on the MDR loader, still WIP.
Moved DeterminePType-Step to ScenePreprocessor.
aiAnimation::mDuration is optional now, ScenePreprocessor computes it automatically if set to -1.
Fixes in the SMD loader. Still crashes on some files.
Updated animation documentation.
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@236 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
2008-11-09 23:17:19 +00:00
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
/** Defines how an animation channel behaves outside the defined time
|
|
|
|
* range. This corresponds to aiNodeAnim::mPreState and
|
|
|
|
* aiNodeAnim::mPostState.
|
|
|
|
*/
|
2008-10-31 19:32:00 +00:00
|
|
|
enum aiAnimBehaviour
|
|
|
|
{
|
ASE: Added WIP support for *SMOOTHSKINMESH elements in ASE/ASC files. Fixes in the ASE loader. Fixed animation parsing. Temporary implementation of target lights and cameras, including animations.
3DS: Fixed transformation problems (Pivot points), added WIP animation support. No target animation yet (cameras, spot lights). Not yet fully tested, but static models that worked before should still work now, except all look correct now :-) (some problems with very large models remaining)
Further work on the IRR and IRRMESH loaders. IRR still WIP, IRRMESH more stable now.
Work on the LWo loader. Added support for the "one-layer-only" mode. Hierarchy bug still unfixed, UV coords bug still unfixed.
Further work on the FindInvalidDataprocess. Improved validation for normals, no false positives anymore.
Further work on the MDR loader, still WIP.
Moved DeterminePType-Step to ScenePreprocessor.
aiAnimation::mDuration is optional now, ScenePreprocessor computes it automatically if set to -1.
Fixes in the SMD loader. Still crashes on some files.
Updated animation documentation.
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@236 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
2008-11-09 23:17:19 +00:00
|
|
|
/** The value from the default node transformation is taken
|
|
|
|
*/
|
2008-10-31 19:32:00 +00:00
|
|
|
aiAnimBehaviour_DEFAULT = 0x0,
|
|
|
|
|
2009-01-12 22:06:54 +00:00
|
|
|
/** The nearest key value is used without interpolation
|
ASE: Added WIP support for *SMOOTHSKINMESH elements in ASE/ASC files. Fixes in the ASE loader. Fixed animation parsing. Temporary implementation of target lights and cameras, including animations.
3DS: Fixed transformation problems (Pivot points), added WIP animation support. No target animation yet (cameras, spot lights). Not yet fully tested, but static models that worked before should still work now, except all look correct now :-) (some problems with very large models remaining)
Further work on the IRR and IRRMESH loaders. IRR still WIP, IRRMESH more stable now.
Work on the LWo loader. Added support for the "one-layer-only" mode. Hierarchy bug still unfixed, UV coords bug still unfixed.
Further work on the FindInvalidDataprocess. Improved validation for normals, no false positives anymore.
Further work on the MDR loader, still WIP.
Moved DeterminePType-Step to ScenePreprocessor.
aiAnimation::mDuration is optional now, ScenePreprocessor computes it automatically if set to -1.
Fixes in the SMD loader. Still crashes on some files.
Updated animation documentation.
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@236 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
2008-11-09 23:17:19 +00:00
|
|
|
*/
|
2008-10-31 19:32:00 +00:00
|
|
|
aiAnimBehaviour_CONSTANT = 0x1,
|
|
|
|
|
ASE: Added WIP support for *SMOOTHSKINMESH elements in ASE/ASC files. Fixes in the ASE loader. Fixed animation parsing. Temporary implementation of target lights and cameras, including animations.
3DS: Fixed transformation problems (Pivot points), added WIP animation support. No target animation yet (cameras, spot lights). Not yet fully tested, but static models that worked before should still work now, except all look correct now :-) (some problems with very large models remaining)
Further work on the IRR and IRRMESH loaders. IRR still WIP, IRRMESH more stable now.
Work on the LWo loader. Added support for the "one-layer-only" mode. Hierarchy bug still unfixed, UV coords bug still unfixed.
Further work on the FindInvalidDataprocess. Improved validation for normals, no false positives anymore.
Further work on the MDR loader, still WIP.
Moved DeterminePType-Step to ScenePreprocessor.
aiAnimation::mDuration is optional now, ScenePreprocessor computes it automatically if set to -1.
Fixes in the SMD loader. Still crashes on some files.
Updated animation documentation.
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@236 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
2008-11-09 23:17:19 +00:00
|
|
|
/** The value of the nearest two keys is linearly
|
|
|
|
* extrapolated for the current time value.
|
|
|
|
*/
|
2008-10-31 19:32:00 +00:00
|
|
|
aiAnimBehaviour_LINEAR = 0x2,
|
|
|
|
|
ASE: Added WIP support for *SMOOTHSKINMESH elements in ASE/ASC files. Fixes in the ASE loader. Fixed animation parsing. Temporary implementation of target lights and cameras, including animations.
3DS: Fixed transformation problems (Pivot points), added WIP animation support. No target animation yet (cameras, spot lights). Not yet fully tested, but static models that worked before should still work now, except all look correct now :-) (some problems with very large models remaining)
Further work on the IRR and IRRMESH loaders. IRR still WIP, IRRMESH more stable now.
Work on the LWo loader. Added support for the "one-layer-only" mode. Hierarchy bug still unfixed, UV coords bug still unfixed.
Further work on the FindInvalidDataprocess. Improved validation for normals, no false positives anymore.
Further work on the MDR loader, still WIP.
Moved DeterminePType-Step to ScenePreprocessor.
aiAnimation::mDuration is optional now, ScenePreprocessor computes it automatically if set to -1.
Fixes in the SMD loader. Still crashes on some files.
Updated animation documentation.
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@236 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
2008-11-09 23:17:19 +00:00
|
|
|
/** The animation is repeated.
|
|
|
|
*
|
|
|
|
* If the animation key go from n to m and the current
|
|
|
|
* time is t, use the value at (t-n) % (|m-n|).
|
|
|
|
*/
|
|
|
|
aiAnimBehaviour_REPEAT = 0x3,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** This value is not used, it is just here to force the
|
|
|
|
* the compiler to map this enum to a 32 Bit integer
|
|
|
|
*/
|
|
|
|
_aiAnimBehaviour_Force32Bit = 0x8fffffff
|
2008-05-05 12:36:31 +00:00
|
|
|
};
|
|
|
|
|
ASE: Added WIP support for *SMOOTHSKINMESH elements in ASE/ASC files. Fixes in the ASE loader. Fixed animation parsing. Temporary implementation of target lights and cameras, including animations.
3DS: Fixed transformation problems (Pivot points), added WIP animation support. No target animation yet (cameras, spot lights). Not yet fully tested, but static models that worked before should still work now, except all look correct now :-) (some problems with very large models remaining)
Further work on the IRR and IRRMESH loaders. IRR still WIP, IRRMESH more stable now.
Work on the LWo loader. Added support for the "one-layer-only" mode. Hierarchy bug still unfixed, UV coords bug still unfixed.
Further work on the FindInvalidDataprocess. Improved validation for normals, no false positives anymore.
Further work on the MDR loader, still WIP.
Moved DeterminePType-Step to ScenePreprocessor.
aiAnimation::mDuration is optional now, ScenePreprocessor computes it automatically if set to -1.
Fixes in the SMD loader. Still crashes on some files.
Updated animation documentation.
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@236 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
2008-11-09 23:17:19 +00:00
|
|
|
// ---------------------------------------------------------------------------
|
2008-10-31 19:32:00 +00:00
|
|
|
/** Describes the animation of a single node. The name specifies the
|
|
|
|
* bone/node which is affected by this animation channel. The keyframes
|
|
|
|
* are given in three separate series of values, one each for position,
|
|
|
|
* rotation and scaling. The transformation matrix computed from these
|
|
|
|
* values replaces the node's original transformation matrix at a
|
ASE: Added WIP support for *SMOOTHSKINMESH elements in ASE/ASC files. Fixes in the ASE loader. Fixed animation parsing. Temporary implementation of target lights and cameras, including animations.
3DS: Fixed transformation problems (Pivot points), added WIP animation support. No target animation yet (cameras, spot lights). Not yet fully tested, but static models that worked before should still work now, except all look correct now :-) (some problems with very large models remaining)
Further work on the IRR and IRRMESH loaders. IRR still WIP, IRRMESH more stable now.
Work on the LWo loader. Added support for the "one-layer-only" mode. Hierarchy bug still unfixed, UV coords bug still unfixed.
Further work on the FindInvalidDataprocess. Improved validation for normals, no false positives anymore.
Further work on the MDR loader, still WIP.
Moved DeterminePType-Step to ScenePreprocessor.
aiAnimation::mDuration is optional now, ScenePreprocessor computes it automatically if set to -1.
Fixes in the SMD loader. Still crashes on some files.
Updated animation documentation.
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@236 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
2008-11-09 23:17:19 +00:00
|
|
|
* spefific time. The order in which the transformations are applied is
|
|
|
|
* - as usual - scaling, rotation, translation.
|
|
|
|
*
|
|
|
|
* @note All keys are returned in their correct, chronological order.
|
|
|
|
* Duplicate keys don't pass the validation step. Most likely there
|
|
|
|
* will be no negative time keys, but they are not forbidden ...
|
2008-05-05 12:36:31 +00:00
|
|
|
*/
|
2008-09-30 13:05:48 +00:00
|
|
|
struct aiNodeAnim
|
2008-05-05 12:36:31 +00:00
|
|
|
{
|
2008-10-31 19:32:00 +00:00
|
|
|
/** The name of the node affected by this animation. The node
|
ASE: Added WIP support for *SMOOTHSKINMESH elements in ASE/ASC files. Fixes in the ASE loader. Fixed animation parsing. Temporary implementation of target lights and cameras, including animations.
3DS: Fixed transformation problems (Pivot points), added WIP animation support. No target animation yet (cameras, spot lights). Not yet fully tested, but static models that worked before should still work now, except all look correct now :-) (some problems with very large models remaining)
Further work on the IRR and IRRMESH loaders. IRR still WIP, IRRMESH more stable now.
Work on the LWo loader. Added support for the "one-layer-only" mode. Hierarchy bug still unfixed, UV coords bug still unfixed.
Further work on the FindInvalidDataprocess. Improved validation for normals, no false positives anymore.
Further work on the MDR loader, still WIP.
Moved DeterminePType-Step to ScenePreprocessor.
aiAnimation::mDuration is optional now, ScenePreprocessor computes it automatically if set to -1.
Fixes in the SMD loader. Still crashes on some files.
Updated animation documentation.
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@236 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
2008-11-09 23:17:19 +00:00
|
|
|
* must exist and it must be unique.
|
2008-10-31 19:32:00 +00:00
|
|
|
*/
|
2008-09-30 13:05:48 +00:00
|
|
|
C_STRUCT aiString mNodeName;
|
2008-05-05 12:36:31 +00:00
|
|
|
|
|
|
|
/** The number of position keys */
|
|
|
|
unsigned int mNumPositionKeys;
|
2008-10-31 19:32:00 +00:00
|
|
|
|
|
|
|
/** The position keys of this animation channel. Positions are
|
|
|
|
* specified as 3D vector. The array is mNumPositionKeys in size.
|
|
|
|
*
|
2008-11-02 16:58:31 +00:00
|
|
|
* If there are position keys, there will also be at least one
|
|
|
|
* scaling and one rotation key.
|
2008-10-31 19:32:00 +00:00
|
|
|
*/
|
2008-05-09 17:24:28 +00:00
|
|
|
C_STRUCT aiVectorKey* mPositionKeys;
|
2008-05-05 12:36:31 +00:00
|
|
|
|
|
|
|
/** The number of rotation keys */
|
|
|
|
unsigned int mNumRotationKeys;
|
2008-10-31 19:32:00 +00:00
|
|
|
|
|
|
|
/** The rotation keys of this animation channel. Rotations are
|
|
|
|
* given as quaternions, which are 4D vectors. The array is
|
|
|
|
* mNumRotationKeys in size.
|
|
|
|
*
|
2008-11-02 16:58:31 +00:00
|
|
|
* If there are rotation keys, there will also be at least one
|
|
|
|
* scaling and one position key.
|
2008-10-31 19:32:00 +00:00
|
|
|
*/
|
2008-05-09 17:24:28 +00:00
|
|
|
C_STRUCT aiQuatKey* mRotationKeys;
|
2008-05-05 12:36:31 +00:00
|
|
|
|
2008-10-31 19:32:00 +00:00
|
|
|
|
2008-05-05 12:36:31 +00:00
|
|
|
/** The number of scaling keys */
|
|
|
|
unsigned int mNumScalingKeys;
|
2008-10-31 19:32:00 +00:00
|
|
|
|
|
|
|
/** The scaling keys of this animation channel. Scalings are
|
|
|
|
* specified as 3D vector. The array is mNumScalingKeys in size.
|
|
|
|
*
|
2008-11-02 16:58:31 +00:00
|
|
|
* If there are scaling keys, there will also be at least one
|
|
|
|
* position and one rotation key.
|
2008-10-31 19:32:00 +00:00
|
|
|
*/
|
2008-05-09 17:24:28 +00:00
|
|
|
C_STRUCT aiVectorKey* mScalingKeys;
|
2008-05-05 12:36:31 +00:00
|
|
|
|
2008-10-31 19:32:00 +00:00
|
|
|
|
ASE: Added WIP support for *SMOOTHSKINMESH elements in ASE/ASC files. Fixes in the ASE loader. Fixed animation parsing. Temporary implementation of target lights and cameras, including animations.
3DS: Fixed transformation problems (Pivot points), added WIP animation support. No target animation yet (cameras, spot lights). Not yet fully tested, but static models that worked before should still work now, except all look correct now :-) (some problems with very large models remaining)
Further work on the IRR and IRRMESH loaders. IRR still WIP, IRRMESH more stable now.
Work on the LWo loader. Added support for the "one-layer-only" mode. Hierarchy bug still unfixed, UV coords bug still unfixed.
Further work on the FindInvalidDataprocess. Improved validation for normals, no false positives anymore.
Further work on the MDR loader, still WIP.
Moved DeterminePType-Step to ScenePreprocessor.
aiAnimation::mDuration is optional now, ScenePreprocessor computes it automatically if set to -1.
Fixes in the SMD loader. Still crashes on some files.
Updated animation documentation.
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@236 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
2008-11-09 23:17:19 +00:00
|
|
|
/** Defines how the animation behaves before the first
|
|
|
|
* key is encountered.
|
|
|
|
*
|
|
|
|
* The default value is aiAnimBehaviour_DEFAULT (the original
|
2009-01-12 22:06:54 +00:00
|
|
|
* transformation matrix of the affected node is used).
|
ASE: Added WIP support for *SMOOTHSKINMESH elements in ASE/ASC files. Fixes in the ASE loader. Fixed animation parsing. Temporary implementation of target lights and cameras, including animations.
3DS: Fixed transformation problems (Pivot points), added WIP animation support. No target animation yet (cameras, spot lights). Not yet fully tested, but static models that worked before should still work now, except all look correct now :-) (some problems with very large models remaining)
Further work on the IRR and IRRMESH loaders. IRR still WIP, IRRMESH more stable now.
Work on the LWo loader. Added support for the "one-layer-only" mode. Hierarchy bug still unfixed, UV coords bug still unfixed.
Further work on the FindInvalidDataprocess. Improved validation for normals, no false positives anymore.
Further work on the MDR loader, still WIP.
Moved DeterminePType-Step to ScenePreprocessor.
aiAnimation::mDuration is optional now, ScenePreprocessor computes it automatically if set to -1.
Fixes in the SMD loader. Still crashes on some files.
Updated animation documentation.
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@236 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
2008-11-09 23:17:19 +00:00
|
|
|
*/
|
2009-01-12 22:06:54 +00:00
|
|
|
C_ENUM aiAnimBehaviour mPreState;
|
ASE: Added WIP support for *SMOOTHSKINMESH elements in ASE/ASC files. Fixes in the ASE loader. Fixed animation parsing. Temporary implementation of target lights and cameras, including animations.
3DS: Fixed transformation problems (Pivot points), added WIP animation support. No target animation yet (cameras, spot lights). Not yet fully tested, but static models that worked before should still work now, except all look correct now :-) (some problems with very large models remaining)
Further work on the IRR and IRRMESH loaders. IRR still WIP, IRRMESH more stable now.
Work on the LWo loader. Added support for the "one-layer-only" mode. Hierarchy bug still unfixed, UV coords bug still unfixed.
Further work on the FindInvalidDataprocess. Improved validation for normals, no false positives anymore.
Further work on the MDR loader, still WIP.
Moved DeterminePType-Step to ScenePreprocessor.
aiAnimation::mDuration is optional now, ScenePreprocessor computes it automatically if set to -1.
Fixes in the SMD loader. Still crashes on some files.
Updated animation documentation.
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@236 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
2008-11-09 23:17:19 +00:00
|
|
|
|
|
|
|
/** Defines how the animation behaves after the last
|
2009-01-12 22:06:54 +00:00
|
|
|
* kway was processed.
|
ASE: Added WIP support for *SMOOTHSKINMESH elements in ASE/ASC files. Fixes in the ASE loader. Fixed animation parsing. Temporary implementation of target lights and cameras, including animations.
3DS: Fixed transformation problems (Pivot points), added WIP animation support. No target animation yet (cameras, spot lights). Not yet fully tested, but static models that worked before should still work now, except all look correct now :-) (some problems with very large models remaining)
Further work on the IRR and IRRMESH loaders. IRR still WIP, IRRMESH more stable now.
Work on the LWo loader. Added support for the "one-layer-only" mode. Hierarchy bug still unfixed, UV coords bug still unfixed.
Further work on the FindInvalidDataprocess. Improved validation for normals, no false positives anymore.
Further work on the MDR loader, still WIP.
Moved DeterminePType-Step to ScenePreprocessor.
aiAnimation::mDuration is optional now, ScenePreprocessor computes it automatically if set to -1.
Fixes in the SMD loader. Still crashes on some files.
Updated animation documentation.
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@236 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
2008-11-09 23:17:19 +00:00
|
|
|
*
|
|
|
|
* The default value is aiAnimBehaviour_DEFAULT (the original
|
2009-01-12 22:06:54 +00:00
|
|
|
* transformation matrix of the affected node is taken).
|
ASE: Added WIP support for *SMOOTHSKINMESH elements in ASE/ASC files. Fixes in the ASE loader. Fixed animation parsing. Temporary implementation of target lights and cameras, including animations.
3DS: Fixed transformation problems (Pivot points), added WIP animation support. No target animation yet (cameras, spot lights). Not yet fully tested, but static models that worked before should still work now, except all look correct now :-) (some problems with very large models remaining)
Further work on the IRR and IRRMESH loaders. IRR still WIP, IRRMESH more stable now.
Work on the LWo loader. Added support for the "one-layer-only" mode. Hierarchy bug still unfixed, UV coords bug still unfixed.
Further work on the FindInvalidDataprocess. Improved validation for normals, no false positives anymore.
Further work on the MDR loader, still WIP.
Moved DeterminePType-Step to ScenePreprocessor.
aiAnimation::mDuration is optional now, ScenePreprocessor computes it automatically if set to -1.
Fixes in the SMD loader. Still crashes on some files.
Updated animation documentation.
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@236 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
2008-11-09 23:17:19 +00:00
|
|
|
*/
|
2009-01-12 22:06:54 +00:00
|
|
|
C_ENUM aiAnimBehaviour mPostState;
|
2008-10-31 19:32:00 +00:00
|
|
|
|
2008-05-05 12:36:31 +00:00
|
|
|
#ifdef __cplusplus
|
2008-09-30 13:05:48 +00:00
|
|
|
aiNodeAnim()
|
2008-05-05 12:36:31 +00:00
|
|
|
{
|
|
|
|
mNumPositionKeys = 0; mPositionKeys = NULL;
|
|
|
|
mNumRotationKeys= 0; mRotationKeys = NULL;
|
|
|
|
mNumScalingKeys = 0; mScalingKeys = NULL;
|
ASE: Added WIP support for *SMOOTHSKINMESH elements in ASE/ASC files. Fixes in the ASE loader. Fixed animation parsing. Temporary implementation of target lights and cameras, including animations.
3DS: Fixed transformation problems (Pivot points), added WIP animation support. No target animation yet (cameras, spot lights). Not yet fully tested, but static models that worked before should still work now, except all look correct now :-) (some problems with very large models remaining)
Further work on the IRR and IRRMESH loaders. IRR still WIP, IRRMESH more stable now.
Work on the LWo loader. Added support for the "one-layer-only" mode. Hierarchy bug still unfixed, UV coords bug still unfixed.
Further work on the FindInvalidDataprocess. Improved validation for normals, no false positives anymore.
Further work on the MDR loader, still WIP.
Moved DeterminePType-Step to ScenePreprocessor.
aiAnimation::mDuration is optional now, ScenePreprocessor computes it automatically if set to -1.
Fixes in the SMD loader. Still crashes on some files.
Updated animation documentation.
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@236 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
2008-11-09 23:17:19 +00:00
|
|
|
|
|
|
|
mPreState = mPostState = aiAnimBehaviour_DEFAULT;
|
2008-05-05 12:36:31 +00:00
|
|
|
}
|
|
|
|
|
2008-09-30 13:05:48 +00:00
|
|
|
~aiNodeAnim()
|
2008-05-05 12:36:31 +00:00
|
|
|
{
|
2008-11-04 17:21:08 +00:00
|
|
|
delete [] mPositionKeys;
|
|
|
|
delete [] mRotationKeys;
|
|
|
|
delete [] mScalingKeys;
|
2008-05-05 12:36:31 +00:00
|
|
|
}
|
|
|
|
#endif // __cplusplus
|
|
|
|
};
|
|
|
|
|
ASE: Added WIP support for *SMOOTHSKINMESH elements in ASE/ASC files. Fixes in the ASE loader. Fixed animation parsing. Temporary implementation of target lights and cameras, including animations.
3DS: Fixed transformation problems (Pivot points), added WIP animation support. No target animation yet (cameras, spot lights). Not yet fully tested, but static models that worked before should still work now, except all look correct now :-) (some problems with very large models remaining)
Further work on the IRR and IRRMESH loaders. IRR still WIP, IRRMESH more stable now.
Work on the LWo loader. Added support for the "one-layer-only" mode. Hierarchy bug still unfixed, UV coords bug still unfixed.
Further work on the FindInvalidDataprocess. Improved validation for normals, no false positives anymore.
Further work on the MDR loader, still WIP.
Moved DeterminePType-Step to ScenePreprocessor.
aiAnimation::mDuration is optional now, ScenePreprocessor computes it automatically if set to -1.
Fixes in the SMD loader. Still crashes on some files.
Updated animation documentation.
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@236 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
2008-11-09 23:17:19 +00:00
|
|
|
// ---------------------------------------------------------------------------
|
2008-10-31 19:32:00 +00:00
|
|
|
/** An animation consists of keyframe data for a number of nodes. For
|
|
|
|
* each node affected by the animation a separate series of data is given.
|
2008-05-05 12:36:31 +00:00
|
|
|
*/
|
|
|
|
struct aiAnimation
|
|
|
|
{
|
2008-10-31 19:32:00 +00:00
|
|
|
/** The name of the animation. If the modelling package this data was
|
|
|
|
* exported from does support only a single animation channel, this
|
|
|
|
* name is usually empty (length is zero).
|
|
|
|
*/
|
2008-05-09 17:24:28 +00:00
|
|
|
C_STRUCT aiString mName;
|
2008-05-05 12:36:31 +00:00
|
|
|
|
2008-10-31 19:32:00 +00:00
|
|
|
/** Duration of the animation in ticks.
|
|
|
|
*/
|
2008-05-05 12:36:31 +00:00
|
|
|
double mDuration;
|
2008-10-31 19:32:00 +00:00
|
|
|
|
|
|
|
/** Ticks per second. 0 if not specified in the imported file
|
|
|
|
*/
|
2008-05-05 12:36:31 +00:00
|
|
|
double mTicksPerSecond;
|
|
|
|
|
2008-10-31 19:32:00 +00:00
|
|
|
/** The number of bone animation channels. Each channel affects
|
|
|
|
* a single node.
|
|
|
|
*/
|
2008-09-30 13:05:48 +00:00
|
|
|
unsigned int mNumChannels;
|
2008-10-31 19:32:00 +00:00
|
|
|
|
|
|
|
/** The node animation channels. Each channel affects a single node.
|
|
|
|
* The array is mNumChannels in size.
|
|
|
|
*/
|
2008-09-30 13:05:48 +00:00
|
|
|
C_STRUCT aiNodeAnim** mChannels;
|
2008-05-05 12:36:31 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
aiAnimation()
|
|
|
|
{
|
ASE: Added WIP support for *SMOOTHSKINMESH elements in ASE/ASC files. Fixes in the ASE loader. Fixed animation parsing. Temporary implementation of target lights and cameras, including animations.
3DS: Fixed transformation problems (Pivot points), added WIP animation support. No target animation yet (cameras, spot lights). Not yet fully tested, but static models that worked before should still work now, except all look correct now :-) (some problems with very large models remaining)
Further work on the IRR and IRRMESH loaders. IRR still WIP, IRRMESH more stable now.
Work on the LWo loader. Added support for the "one-layer-only" mode. Hierarchy bug still unfixed, UV coords bug still unfixed.
Further work on the FindInvalidDataprocess. Improved validation for normals, no false positives anymore.
Further work on the MDR loader, still WIP.
Moved DeterminePType-Step to ScenePreprocessor.
aiAnimation::mDuration is optional now, ScenePreprocessor computes it automatically if set to -1.
Fixes in the SMD loader. Still crashes on some files.
Updated animation documentation.
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@236 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
2008-11-09 23:17:19 +00:00
|
|
|
mDuration = -1.;
|
2008-05-05 12:36:31 +00:00
|
|
|
mTicksPerSecond = 0;
|
2008-09-30 13:05:48 +00:00
|
|
|
mNumChannels = 0; mChannels = NULL;
|
2008-05-05 12:36:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
~aiAnimation()
|
|
|
|
{
|
2008-11-16 14:39:54 +00:00
|
|
|
// DO NOT REMOVE THIS ADDITIONAL CHECK
|
|
|
|
if (mNumChannels && mChannels)
|
|
|
|
{
|
2008-09-30 13:05:48 +00:00
|
|
|
for( unsigned int a = 0; a < mNumChannels; a++)
|
|
|
|
delete mChannels[a];
|
2008-11-04 17:21:08 +00:00
|
|
|
|
|
|
|
delete [] mChannels;
|
2008-11-16 14:39:54 +00:00
|
|
|
}
|
2008-05-05 12:36:31 +00:00
|
|
|
}
|
|
|
|
#endif // __cplusplus
|
|
|
|
};
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif // AI_ANIM_H_INC
|