Main Page Modules Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages

# deAnimationControlller.h

Go to the documentation of this file.

    00001 ///////////////////////////////////////////////////////////////////////////////
    00002 /// @file deAnimationController.hpp
    00003 ///
    00004 /// @brief header for animation controller interfaces
    00005 ///
    00006 /// @author Paradoxnj
    00007 ///
    00008 /// This file is the intellectual property of Novus Delta, LLC.. Usage of the
    00009 /// contents of this file is subject to the Destiny3D Member License which
    00010 /// can be found at http://www.destiny3d.com.  Any other usage is prohibited.
    00011 ///
    00012 /// This file is distributed "AS IS" without warranty of any kind.  Novus
    00013 /// Delta, LLC. does not guarantee the fitness of the contents of this file
    00014 /// for any particular purpose.
    00015 ///
    00016 /// Copyright (C) 2001-2003 Novus Delta, LLC. All Rights Reserved.
    00017 ///
    00018 /// <hr>
    00019 ///                                 Change History
    00020 /// <hr>
    00021 ///
    00022 /// @date January 2004
    00023 /// @author Paradoxnj
    00024 /// @remarks Creation
    00025 ///
    00026 ///////////////////////////////////////////////////////////////////////////////
    00027 #ifndef DE_ANIMATION_CONTROLLER_H
    00028 #define DE_ANIMATION_CONTROLLER_H
    00029
    00030 #include "deGlobalTypes.h"
    00031
    00032 // Forward Declarations
    00033 class IdeAnimationController;
    00034
    00035 typedef struct DAMFileHeader            DAMFileHeader;
    00036
    00037 typedef struct deRotationKey            deRotationKey;
    00038 typedef struct deVertexKey              deVertexKey;
    00039 typedef struct deActorAnimation
    00040 /// Destiny Animation Module File Header
    00041 typedef struct DAMFileHeader
    00042 {
    00043     char                            Identifier[4];      //Should be DAM1
    00044     int                             version;
    00045
    00046     short                           controllerType;
    00047
    00048     short                           numBoneAnimations;
    00049 } DAMFileHeader;
    00050
    00051 /// A rotation key frame for skeletal animation
    00052 typedef struct deRotationKey
    00053 {
    00054     /// The time that the rotation occurs in the animation
    00055     float                       time;
    00056
    00057     /// The quaternion that represents the rotation of the bone
    00058     deQuaternion                quat;
    00059 } deRotationKey;
    00060
    00061 /// A vertex key frame for skeletal animation used for scaling and positioning
    00062 typedef struct deVertexKey
    00063 {
    00064     /// The time that the scale/positioning occurs in the animation
    00065     float                       time;
    00066
    00067     /// The position/scaling value used to scale/position the bone
    00068     deVertex                    value;
    00069 } deVertexKey;
    00070
    00071 /// The animation information for an actor
    00072 /// NOTE:  This struct represents one entire animation sequence for one bone
    00073 typedef struct deAnimation
    00074 {
    00075     /// The index of the bone that this animation is attached to
    00076     long                            BoneID;
    00077
    00078     /// The amount of rotation keys
    00079     UINT32                          NumRotationKeys;
    00080
    00081     /// The amount of position keys
    00082     UINT32                          NumPositionKeys;
    00083
    00084     /// The amount of scale keys
    00085     UINT32                          NumScaleKeys;
    00086
    00087     /// The rotation key frame array
    00088     deTArray<deRotationKey>         RotationKeys;
    00089
    00090     /// The positioning key frame array
    00091     deTArray<deVertexKey>           PositionKeys;
    00092
    00093     /// The scaling key frame array
    00094     deTArray<deVertexKey>           ScaleKeys;
    00095 } deAnimation;
    00096
    00097 /// A set of bone animations
    00098 typedef struct deAnimationSet
    00099 {
    00100     /// The name of the animation
    00101     char                        Name[MAX_ANIM_NAME];
    00102
    00103     /// The length of the animation
    00104     u32                         Length;
    00105
    00106     /// The bone animation array
    00107     deTArray<deAnimation>       BoneAnimations;
    00108 } deAnimationSet;