2
Copyright (c) 2008-2009 NetAllied Systems GmbH
4
This file is part of COLLADAStreamWriter.
6
Licensed under the MIT Open Source License,
7
for details please see LICENSE file or the website
8
http://www.opensource.org/licenses/mit-license.php
11
#ifndef __COLLADASTREAMWRITER_LIBRARY_ANIMATION_CLIPS_H__
12
#define __COLLADASTREAMWRITER_LIBRARY_ANIMATION_CLIPS_H__
14
#include "COLLADASWPrerequisites.h"
15
#include "COLLADASWLibrary.h"
20
/** The list of animation instances. */
21
typedef std::vector<String> AnimationInstances;
24
class ColladaAnimationClip
28
ColladaAnimationClip ( const String& animationClipId = ElementWriter::EMPTY_STRING );
29
ColladaAnimationClip ( const String& animationClipId, float& startTime, float& endTime );
30
ColladaAnimationClip ( float& startTime, float& endTime );
32
/** Returns a reference to then image id*/
33
const String& getAnimationClipId() const
35
return mAnimationClipId;
38
/** Retrieves the start time marker position for this animation clip.
39
When using the animation clip, all the animation curves will need
40
to be synchronized in order for the animation to start at the start time.
41
@return The start time marker position, in seconds. */
42
float getStartTime() const
47
/** Sets the start time marker position for this animation clip.
48
@param startTime The new start time marker position. */
49
void setStartTime ( float startTime )
51
mStartTime = startTime;
54
/** Retrieves the end time marker position for this animation clip.
55
When using the animation clip, all the animation curves will need
56
to be synchronized in order for the animation to complete at the end time.
57
@return The end time marker position, in seconds. */
58
float getEndTime() const
63
/** Sets the end time marker position for this animation clip.
64
@param endTime The end time marker position. */
65
void setEndTime ( float endTime )
70
/** Adds an animation instance to the list of instantiated animations. */
71
void setInstancedAnimation ( const String& animationId )
73
mInstancedAnimations.push_back ( animationId );
76
/** Returns the list with the instanced animations. */
77
const AnimationInstances& getInstancedAnimations() const
79
return mInstancedAnimations;
84
/** The id of the current animation clip. */
85
String mAnimationClipId;
87
/** The start time of the current clip. */
90
/** The end time of the current clip. */
93
/** The list of animations, which use this clip. */
94
AnimationInstances mInstancedAnimations;
98
/** Class to simply the creation of @a \<library_images\> and @a \<images\>'s*/
100
class LibraryAnimationClips : public Library
104
LibraryAnimationClips ( StreamWriter* streamWriter );
108
/** Adds @a \<animation_clip\> element. If not already opened, it opens @a \<library_animation_clips\>*/
109
void addAnimationClip ( const ColladaAnimationClip& animationClip );
113
} //namespace COLLADASW
115
#endif //__COLLADASTREAMWRITER_LIBRARY_ANIMATION_CLIPS_H__