/usr/include/opencollada/COLLADAStreamWriter/COLLADASWLibraryAnimationClips.h is in opencollada-dev 0.1.0~20160714.0ec5063+dfsg1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | /*
Copyright (c) 2008-2009 NetAllied Systems GmbH
This file is part of COLLADAStreamWriter.
Licensed under the MIT Open Source License,
for details please see LICENSE file or the website
http://www.opensource.org/licenses/mit-license.php
*/
#ifndef __COLLADASTREAMWRITER_LIBRARY_ANIMATION_CLIPS_H__
#define __COLLADASTREAMWRITER_LIBRARY_ANIMATION_CLIPS_H__
#include "COLLADASWPrerequisites.h"
#include "COLLADASWLibrary.h"
#include "COLLADASWExtraTechnique.h"
#include <vector>
namespace COLLADASW
{
/** The list of animation instances. */
typedef std::vector<String> AnimationInstances;
class ColladaAnimationClip: public BaseExtraTechnique
{
public:
ColladaAnimationClip(const String& animationClipId = ElementWriter::EMPTY_STRING, const String& animationClipSourceId = ElementWriter::EMPTY_STRING);
ColladaAnimationClip(const String& animationClipId, const String& animationClipSourceId, float& startTime, float& endTime);
ColladaAnimationClip ( float& startTime, float& endTime );
/** Returns a reference to then image id*/
const String& getAnimationClipId() const
{
return mAnimationClipId;
}
const String& getName() const
{
return mName;
}
const String& getAnimationClipSourceId() const
{
return mAnimationClipSourceId;
}
/** Retrieves the start time marker position for this animation clip.
When using the animation clip, all the animation curves will need
to be synchronized in order for the animation to start at the start time.
@return The start time marker position, in seconds. */
float getStartTime() const
{
return mStartTime;
}
/** Sets the start time marker position for this animation clip.
@param startTime The new start time marker position. */
void setStartTime ( float startTime )
{
mStartTime = startTime;
}
/** Retrieves the end time marker position for this animation clip.
When using the animation clip, all the animation curves will need
to be synchronized in order for the animation to complete at the end time.
@return The end time marker position, in seconds. */
float getEndTime() const
{
return mEndTime;
}
/** Sets the end time marker position for this animation clip.
@param endTime The end time marker position. */
void setEndTime ( float endTime )
{
mEndTime = endTime;
}
/** Adds an animation instance to the list of instantiated animations. */
void setInstancedAnimation ( const String& animationId )
{
mInstancedAnimations.push_back ( animationId );
}
/** Returns the list with the instanced animations. */
const AnimationInstances& getInstancedAnimations() const
{
return mInstancedAnimations;
}
bool isAnimationEvent() const
{
return mIsAnimationEvent;
}
void setAnimationEvent(bool val)
{
mIsAnimationEvent = val;
}
private:
/** The id of the current animation clip. */
String mAnimationClipId;
String mAnimationClipSourceId;
/** The name of the current clip, optional */
String mName;
/** The start time of the current clip. */
float mStartTime;
/** The end time of the current clip. */
float mEndTime;
/** The list of animations, which use this clip. */
AnimationInstances mInstancedAnimations;
/** Is this animation clip is used as EventAnimation*/
bool mIsAnimationEvent;
};
/** Class to simply the creation of @a \<library_images\> and @a \<images\>'s*/
class LibraryAnimationClips : public Library
{
public:
LibraryAnimationClips ( StreamWriter* streamWriter );
protected:
/** Adds @a \<animation_clip\> element. If not already opened, it opens @a \<library_animation_clips\>*/
void addAnimationClip ( const ColladaAnimationClip& animationClip );
};
} //namespace COLLADASW
#endif //__COLLADASTREAMWRITER_LIBRARY_ANIMATION_CLIPS_H__
|