未验证 提交 6031fa95 编写于 作者: R Rémi Arnaud 提交者: GitHub

Merge pull request #596 from lasalvavida/animation-clip-parsing

Added animation clip parsing and writer callbacks
......@@ -12,6 +12,7 @@ set(INST_SRC
include/COLLADAFWAnimatable.h
include/COLLADAFWAnimatableFloat.h
include/COLLADAFWAnimation.h
include/COLLADAFWAnimationClip.h
include/COLLADAFWAnimationCurve.h
include/COLLADAFWAnimationList.h
include/COLLADAFWAnnotate.h
......@@ -125,6 +126,7 @@ set(INST_SRC
set(SRC
src/COLLADAFWAnimationClip.cpp
src/COLLADAFWLight.cpp
src/COLLADAFWEffectCommon.cpp
src/COLLADAFWInstanceKinematicsScene.cpp
......
......@@ -15,6 +15,7 @@
#include "COLLADAFWAnimatable.h"
#include "COLLADAFWAnimatableFloat.h"
#include "COLLADAFWAnimation.h"
#include "COLLADAFWAnimationClip.h"
#include "COLLADAFWAnimationCurve.h"
#include "COLLADAFWAnimationList.h"
#include "COLLADAFWAnnotate.h"
......
#ifndef __COLLADAFW_ANIMATIONCLIP_H__
#define __COLLADAFW_ANIMATIONCLIP_H__
#include "COLLADAFWPrerequisites.h"
#include "COLLADAFWObject.h"
#include "COLLADAFWUniqueId.h"
namespace COLLADAFW
{
class AnimationClip : public ObjectTemplate<COLLADA_TYPE::ANIMATION_CLIP>
{
private:
/**
* The original object id, if it in the original file format exist.
*/
String mOriginalId;
/** The list of unique animation ids of the instance animations in this clip. */
UniqueIdArray mInstanceAnimationUniqueIds;
/** The text string name of this element. Optional. */
String mName;
public:
/** Constructor. */
AnimationClip ( const UniqueId& uniqueId );
/** Destructor. */
virtual ~AnimationClip();
/**
* The original object id, if it in the original file format exist.
*/
const String& getOriginalId () const { return mOriginalId; }
/**
* The original object id, if it in the original file format exist.
*/
void setOriginalId ( const String& val ) { mOriginalId = val; }
/** The text string name of this element. Optional. */
const String& getName () const { return mName; }
/** The text string name of this element. Optional. */
void setName ( const String& Name ) { mName = Name; }
/** List of the unique ids of the instance animations in this clip. */
const UniqueIdArray& getInstanceAnimationUniqueIds() const { return mInstanceAnimationUniqueIds; }
/** List of the unique ids of the instance animations in this clip. */
UniqueIdArray& getInstanceAnimationUniqueIds() { return mInstanceAnimationUniqueIds; }
};
}
#endif // __COLLADAFW_ANIMATIONCLIP_H__
......@@ -28,6 +28,7 @@ namespace COLLADAFW
class Light;
class Animation;
class AnimationList;
class AnimationClip;
class SkinControllerData;
class Controller;
class Formulas;
......@@ -109,6 +110,10 @@ namespace COLLADAFW
@return The writer should return true, if writing succeeded, false otherwise.*/
virtual bool writeAnimationList( const AnimationList* animationList ) = 0;
/** When this method is called, the writer must write the AnimationClip.
@return The writer should return true, of writing succeeded, false otherwise.*/
virtual bool writeAnimationClip( const AnimationClip* animationClip ) = 0;
/** When this method is called, the writer must write the skin controller data.
@return The writer should return true, if writing succeeded, false otherwise.*/
virtual bool writeSkinControllerData( const SkinControllerData* skinControllerData ) = 0;
......
......@@ -1200,6 +1200,7 @@
</Lib>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\src\COLLADAFWAnimationClip.cpp" />
<ClCompile Include="..\src\COLLADAFWAxisInfo.cpp" />
<ClCompile Include="..\src\COLLADAFWCamera.cpp" />
<ClCompile Include="..\src\COLLADAFWColor.cpp" />
......@@ -1278,6 +1279,7 @@
<ClInclude Include="..\include\COLLADAFWAnimatable.h" />
<ClInclude Include="..\include\COLLADAFWAnimatableFloat.h" />
<ClInclude Include="..\include\COLLADAFWAnimation.h" />
<ClInclude Include="..\include\COLLADAFWAnimationClip.h" />
<ClInclude Include="..\include\COLLADAFWAnimationCurve.h" />
<ClInclude Include="..\include\COLLADAFWAnimationList.h" />
<ClInclude Include="..\include\COLLADAFWAnnotate.h" />
......
......@@ -17,6 +17,9 @@
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\src\COLLADAFWAnimationClip.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\COLLADAFWCamera.cpp">
<Filter>Source Files</Filter>
</ClCompile>
......@@ -148,6 +151,9 @@
<ClInclude Include="..\include\COLLADAFWAnimation.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\COLLADAFWAnimationClip.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\COLLADAFWAnimationCurve.h">
<Filter>Header Files</Filter>
</ClInclude>
......
#include "COLLADAFWStableHeaders.h"
#include "COLLADAFWAnimationClip.h"
namespace COLLADAFW
{
//------------------------------
AnimationClip::AnimationClip ( const UniqueId& uniqueId )
: ObjectTemplate<COLLADA_TYPE::ANIMATION_CLIP> ( uniqueId )
{
}
//------------------------------
AnimationClip::~AnimationClip()
{
}
} // namespace COLLADAFW
......@@ -416,6 +416,10 @@ namespace COLLADAMax
@return True on succeeded, false otherwise.*/
virtual bool writeAnimationList( const COLLADAFW::AnimationList* animationList );
/** Writes the animation clip.
@return True on succeeded, flase otherwise.*/
virtual bool writeAnimationClip( const COLLADAFW::AnimationClip* animationClip ) { return true; }
/** When this method is called, the writer must write the skin controller data.
@return The writer should return true, if writing succeeded, false otherwise.*/
virtual bool writeSkinControllerData( const COLLADAFW::SkinControllerData* skinControllerData );
......
......@@ -790,6 +790,14 @@
CE8D7C580F98C055007F8DF9 /* GeneratedSaxParserRawUnknownElementHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CE8D7C550F98C055007F8DF9 /* GeneratedSaxParserRawUnknownElementHandler.cpp */; };
CE8D7C7E0F98C0A1007F8DF9 /* GeneratedSaxParserIUnknownElementHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = CE8D7C7B0F98C0A1007F8DF9 /* GeneratedSaxParserIUnknownElementHandler.h */; };
CE8D7C7F0F98C0A1007F8DF9 /* GeneratedSaxParserRawUnknownElementHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = CE8D7C7C0F98C0A1007F8DF9 /* GeneratedSaxParserRawUnknownElementHandler.h */; };
D4E84DF021A47A9D003AAB34 /* COLLADAFWAnimationClip.h in Headers */ = {isa = PBXBuildFile; fileRef = D4E84DEF21A47A9C003AAB34 /* COLLADAFWAnimationClip.h */; };
D4E84DF321A47AC7003AAB34 /* COLLADAFWAnimationClip.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D4E84DF121A47AAA003AAB34 /* COLLADAFWAnimationClip.cpp */; };
D4E84DF721A47AFC003AAB34 /* COLLADASaxFWLLibraryAnimationClipsLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D4E84DF621A47AFB003AAB34 /* COLLADASaxFWLLibraryAnimationClipsLoader.cpp */; };
D4E84DF821A47B3A003AAB34 /* COLLADASaxFWLLibraryAnimationClipsLoader14.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D4E84DF421A47AE5003AAB34 /* COLLADASaxFWLLibraryAnimationClipsLoader14.cpp */; };
D4E84DFA21A47B54003AAB34 /* COLLADASaxFWLLibraryAnimationClipsLoader15.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D4E84DF921A47B53003AAB34 /* COLLADASaxFWLLibraryAnimationClipsLoader15.cpp */; };
D4E84DFC21A47B78003AAB34 /* COLLADASaxFWLLibraryAnimationClipsLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = D4E84DFB21A47B78003AAB34 /* COLLADASaxFWLLibraryAnimationClipsLoader.h */; };
D4E84DFE21A47B8E003AAB34 /* COLLADASaxFWLLibraryAnimationClipsLoader15.h in Headers */ = {isa = PBXBuildFile; fileRef = D4E84DFD21A47B8E003AAB34 /* COLLADASaxFWLLibraryAnimationClipsLoader15.h */; };
D4E84E0021A47B9A003AAB34 /* COLLADASaxFWLLibraryAnimationClipsLoader14.h in Headers */ = {isa = PBXBuildFile; fileRef = D4E84DFF21A47B9A003AAB34 /* COLLADASaxFWLLibraryAnimationClipsLoader14.h */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
......@@ -1746,6 +1754,14 @@
CE8D7DAA0F98D435007F8DF9 /* COLLADASaxFWLTypes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = COLLADASaxFWLTypes.cpp; path = ../COLLADASaxFrameworkLoader/src/COLLADASaxFWLTypes.cpp; sourceTree = SOURCE_ROOT; };
CE8D7DAB0F98D435007F8DF9 /* COLLADASaxFWLVisualSceneLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = COLLADASaxFWLVisualSceneLoader.cpp; path = ../COLLADASaxFrameworkLoader/src/COLLADASaxFWLVisualSceneLoader.cpp; sourceTree = SOURCE_ROOT; };
D2AAC09D05546B4700DB518D /* COLLADAMaya.bundle */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = COLLADAMaya.bundle; sourceTree = BUILT_PRODUCTS_DIR; };
D4E84DEF21A47A9C003AAB34 /* COLLADAFWAnimationClip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = COLLADAFWAnimationClip.h; path = ../COLLADAFramework/include/COLLADAFWAnimationClip.h; sourceTree = "<group>"; };
D4E84DF121A47AAA003AAB34 /* COLLADAFWAnimationClip.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = COLLADAFWAnimationClip.cpp; path = ../COLLADAFramework/src/COLLADAFWAnimationClip.cpp; sourceTree = "<group>"; };
D4E84DF421A47AE5003AAB34 /* COLLADASaxFWLLibraryAnimationClipsLoader14.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = COLLADASaxFWLLibraryAnimationClipsLoader14.cpp; path = ../COLLADASaxFrameworkLoader/src/generated14/COLLADASaxFWLLibraryAnimationClipsLoader14.cpp; sourceTree = "<group>"; };
D4E84DF621A47AFB003AAB34 /* COLLADASaxFWLLibraryAnimationClipsLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = COLLADASaxFWLLibraryAnimationClipsLoader.cpp; path = ../COLLADASaxFrameworkLoader/src/COLLADASaxFWLLibraryAnimationClipsLoader.cpp; sourceTree = "<group>"; };
D4E84DF921A47B53003AAB34 /* COLLADASaxFWLLibraryAnimationClipsLoader15.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = COLLADASaxFWLLibraryAnimationClipsLoader15.cpp; path = ../COLLADASaxFrameworkLoader/src/generated15/COLLADASaxFWLLibraryAnimationClipsLoader15.cpp; sourceTree = "<group>"; };
D4E84DFB21A47B78003AAB34 /* COLLADASaxFWLLibraryAnimationClipsLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = COLLADASaxFWLLibraryAnimationClipsLoader.h; path = ../COLLADASaxFrameworkLoader/include/COLLADASaxFWLLibraryAnimationClipsLoader.h; sourceTree = "<group>"; };
D4E84DFD21A47B8E003AAB34 /* COLLADASaxFWLLibraryAnimationClipsLoader15.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = COLLADASaxFWLLibraryAnimationClipsLoader15.h; sourceTree = "<group>"; };
D4E84DFF21A47B9A003AAB34 /* COLLADASaxFWLLibraryAnimationClipsLoader14.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = COLLADASaxFWLLibraryAnimationClipsLoader14.h; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
......@@ -1907,6 +1923,7 @@
CE2272E4104D1DD100C4F29B /* generated15 */ = {
isa = PBXGroup;
children = (
D4E84DFD21A47B8E003AAB34 /* COLLADASaxFWLLibraryAnimationClipsLoader15.h */,
CE27BA6816D5132900C109C3 /* COLLADASaxFWLAssetLoader15.h */,
CE27BA6916D5132900C109C3 /* COLLADASaxFWLColladaParserAutoGen15.h */,
CE27BA6A16D5132900C109C3 /* COLLADASaxFWLColladaParserAutoGen15Attributes.h */,
......@@ -1942,6 +1959,7 @@
CE227319104D1DF800C4F29B /* generated14 */ = {
isa = PBXGroup;
children = (
D4E84DFF21A47B9A003AAB34 /* COLLADASaxFWLLibraryAnimationClipsLoader14.h */,
CE7820A70FF112A800A767EA /* COLLADASaxFWLAssetLoader14.h */,
CE22731B104D1DF800C4F29B /* COLLADASaxFWLColladaParserAutoGen14.h */,
CE22731C104D1DF900C4F29B /* COLLADASaxFWLColladaParserAutoGen14Attributes.h */,
......@@ -2135,6 +2153,7 @@
CE7290AE10AC751300AE5662 /* include */ = {
isa = PBXGroup;
children = (
D4E84DFB21A47B78003AAB34 /* COLLADASaxFWLLibraryAnimationClipsLoader.h */,
CE27BA9E16D513B100C109C3 /* COLLADASaxFWLAccessor.h */,
CE27BA9F16D513B100C109C3 /* COLLADASaxFWLArrayElement.h */,
CE27BAA016D513B200C109C3 /* COLLADASaxFWLAssetLoader.h */,
......@@ -2217,8 +2236,8 @@
CE7290AF10AC751900AE5662 /* source */ = {
isa = PBXGroup;
children = (
D4E84DF621A47AFB003AAB34 /* COLLADASaxFWLLibraryAnimationClipsLoader.cpp */,
CE27BA4416D4F7D400C109C3 /* COLLADASaxFWLSplineLoader.cpp */,
24FFE6C814A525E000D718C2 /* COLLADASaxFWLLibraryKinematicsScenesLoader15.cpp */,
24FFE6BF14A525CC00D718C2 /* COLLADASaxFWLInstanceArticulatedSystemLoader.cpp */,
24FFE6C014A525CC00D718C2 /* COLLADASaxFWLInstanceKinematicsModelLoader.cpp */,
24FFE6C114A525CC00D718C2 /* COLLADASaxFWLLibraryKinematicsScenesLoader.cpp */,
......@@ -2336,6 +2355,7 @@
CE72910210AC7FD300AE5662 /* source */ = {
isa = PBXGroup;
children = (
D4E84DF121A47AAA003AAB34 /* COLLADAFWAnimationClip.cpp */,
24FFE6CB14A5269600D718C2 /* COLLADAFWInstanceKinematicsScene.cpp */,
CE787CB20F58400C0019C2D7 /* COLLADAFWMaterial.cpp */,
CE787CB30F58400C0019C2D7 /* COLLADAFWMatrix.cpp */,
......@@ -2498,6 +2518,7 @@
CE72910910AC805600AE5662 /* generated14 */ = {
isa = PBXGroup;
children = (
D4E84DF421A47AE5003AAB34 /* COLLADASaxFWLLibraryAnimationClipsLoader14.cpp */,
CE27BA4216D4F7A200C109C3 /* COLLADASaxFWLSplineLoader14.cpp */,
CE7821560FF1137C00A767EA /* COLLADASaxFWLLibraryAnimationsLoader14.cpp */,
CE7821550FF1137C00A767EA /* COLLADASaxFWLGeometryLoader14.cpp */,
......@@ -2530,6 +2551,8 @@
CE72910A10AC806D00AE5662 /* generated15 */ = {
isa = PBXGroup;
children = (
D4E84DF921A47B53003AAB34 /* COLLADASaxFWLLibraryAnimationClipsLoader15.cpp */,
24FFE6C814A525E000D718C2 /* COLLADASaxFWLLibraryKinematicsScenesLoader15.cpp */,
CE78218B0FF1139E00A767EA /* COLLADASaxFWLSourceArrayLoader15.cpp */,
CE7821800FF1139E00A767EA /* COLLADASaxFWLLibraryAnimationsLoader15.cpp */,
CE71CDD4104D183800368D98 /* COLLADASaxFWLLibraryArticulatedSystemsLoader15.cpp */,
......@@ -2817,6 +2840,7 @@
CE72911810AC82DE00AE5662 /* include */ = {
isa = PBXGroup;
children = (
D4E84DEF21A47A9C003AAB34 /* COLLADAFWAnimationClip.h */,
CE71CD10104D0A1500368D98 /* COLLADAFW.h */,
CE8D7C350F98BFED007F8DF9 /* COLLADAFWAnimatable.h */,
CE79CF051020B7E900A3A027 /* COLLADAFWAnimatableFloat.h */,
......@@ -3467,6 +3491,7 @@
95AF1A811CCFC236009B9B7D /* COLLADAMayaLODExporter.h in Headers */,
CE0B3ED50F56AFD8004F8570 /* COLLADAMayaAnimationClipExporter.h in Headers */,
CE0B3ED60F56AFD8004F8570 /* COLLADAMayaAnimationCurves.h in Headers */,
D4E84E0021A47B9A003AAB34 /* COLLADASaxFWLLibraryAnimationClipsLoader14.h in Headers */,
CE0B3ED70F56AFD8004F8570 /* COLLADAMayaAnimationElement.h in Headers */,
CE0B3ED80F56AFD8004F8570 /* COLLADAMayaAnimationExporter.h in Headers */,
CE0B3ED90F56AFD8004F8570 /* COLLADAMayaAnimationHelper.h in Headers */,
......@@ -3495,6 +3520,7 @@
CE0B3EF40F56AFD8004F8570 /* COLLADAMayaImportOptions.h in Headers */,
CE0B3EF50F56AFD8004F8570 /* COLLADAMayaLightExporter.h in Headers */,
95133F5B1AA8BA37003AC4E2 /* COLLADASWInstancePhysicsModel.h in Headers */,
D4E84DFE21A47B8E003AAB34 /* COLLADASaxFWLLibraryAnimationClipsLoader15.h in Headers */,
87D7EAFB1B0E979B000436DA /* COLLADAMayaLightProbeExporter.h in Headers */,
CE0B3EF70F56AFD8004F8570 /* COLLADAMayaMaterialExporter.h in Headers */,
CE0B3EFA0F56AFD8004F8570 /* COLLADAMayaMorphController.h in Headers */,
......@@ -3514,7 +3540,9 @@
CE0B3F0A0F56AFD8004F8570 /* COLLADAMayaSyntax.h in Headers */,
871C5B3A1BCEC138008B84FF /* COLLADAMayaPhysXExporter.h in Headers */,
CE0B3F0B0F56AFD8004F8570 /* COLLADAMayaTangentPoint.h in Headers */,
D4E84DF021A47A9D003AAB34 /* COLLADAFWAnimationClip.h in Headers */,
CE0B3F0C0F56AFD8004F8570 /* COLLADAMayaVisualSceneExporter.h in Headers */,
D4E84DFC21A47B78003AAB34 /* COLLADASaxFWLLibraryAnimationClipsLoader.h in Headers */,
879D18E01AE8070F005C246C /* COLLADAMayaAttributeParser.h in Headers */,
95133F5D1AA8BA37003AC4E2 /* COLLADASWLibraryPhysicsModels.h in Headers */,
CE7D40150FF1308D00849CFA /* COLLADAMayaBaseAnimation.h in Headers */,
......@@ -3961,6 +3989,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
D4E84DF321A47AC7003AAB34 /* COLLADAFWAnimationClip.cpp in Sources */,
CE3E66B60FD54FA7003D1AD2 /* COLLADAFWSkinController.cpp in Sources */,
CE787CC30F58400C0019C2D7 /* COLLADAFWCamera.cpp in Sources */,
CE787CC40F58400C0019C2D7 /* COLLADAFWColor.cpp in Sources */,
......@@ -4099,6 +4128,7 @@
CE71CEA7104D1A0B00368D98 /* COLLADASaxFWLSourceArrayLoader15.cpp in Sources */,
CE71CEA8104D1A0B00368D98 /* COLLADASaxFWLTransformationLoader.cpp in Sources */,
CE71CEA9104D1A0B00368D98 /* COLLADASaxFWLTypes.cpp in Sources */,
D4E84DF821A47B3A003AAB34 /* COLLADASaxFWLLibraryAnimationClipsLoader14.cpp in Sources */,
CE71CEAA104D1A0B00368D98 /* COLLADASaxFWLVersionParser.cpp in Sources */,
CE71CEAB104D1A0B00368D98 /* COLLADASaxFWLVisualSceneLoader.cpp in Sources */,
CE71CEAC104D1A0B00368D98 /* COLLADASaxFWLVisualSceneLoader14.cpp in Sources */,
......@@ -4122,6 +4152,7 @@
buildActionMask = 2147483647;
files = (
CE72916810ACA1F800AE5662 /* COLLADAMayaAnimationClipExporter.cpp in Sources */,
D4E84DFA21A47B54003AAB34 /* COLLADASaxFWLLibraryAnimationClipsLoader15.cpp in Sources */,
95AF1A831CCFC257009B9B7D /* COLLADAMayaLODExporter.cpp in Sources */,
CE72916910ACA1F800AE5662 /* COLLADAMayaAnimationCurves.cpp in Sources */,
CE72916A10ACA1F800AE5662 /* COLLADAMayaAnimationElement.cpp in Sources */,
......@@ -4146,6 +4177,7 @@
871C5B3C1BCEC149008B84FF /* COLLADAMayaPhysXExporter.cpp in Sources */,
CE72917A10ACA1F800AE5662 /* COLLADAMayaGeometryExporter.cpp in Sources */,
CE72917B10ACA1F800AE5662 /* COLLADAMayaGeometryPolygonExporter.cpp in Sources */,
D4E84DF721A47AFC003AAB34 /* COLLADASaxFWLLibraryAnimationClipsLoader.cpp in Sources */,
CE72917C10ACA1F800AE5662 /* COLLADAMayaHwShaderExporter.cpp in Sources */,
CE72917D10ACA1F800AE5662 /* COLLADAMayaImageExporter.cpp in Sources */,
CE72917E10ACA1F800AE5662 /* COLLADAMayaImportOptions.cpp in Sources */,
......
......@@ -41,6 +41,7 @@ set(INST_SRC
include/COLLADASaxFWLJointsLoader.h
include/COLLADASaxFWLKinematicsIntermediateData.h
include/COLLADASaxFWLKinematicsSceneCreator.h
include/COLLADASaxFWLLibraryAnimationClipsLoader.h
include/COLLADASaxFWLLibraryAnimationsLoader.h
include/COLLADASaxFWLLibraryArticulatedSystemsLoader.h
include/COLLADASaxFWLLibraryCamerasLoader.h
......@@ -94,6 +95,7 @@ set(INST_GEN14_SRC
include/generated14/COLLADASaxFWLColladaParserAutoGen14Private.h
include/generated14/COLLADASaxFWLColladaParserAutoGen14ValidationData.h
include/generated14/COLLADASaxFWLGeometryLoader14.h
include/generated14/COLLADASaxFWLLibraryAnimationClipsLoader14.h
include/generated14/COLLADASaxFWLLibraryAnimationsLoader14.h
include/generated14/COLLADASaxFWLLibraryCamerasLoader14.h
include/generated14/COLLADASaxFWLLibraryControllersLoader14.h
......@@ -120,6 +122,7 @@ set(INST_GEN15_SRC
include/generated15/COLLADASaxFWLColladaParserAutoGen15ValidationData.h
include/generated15/COLLADASaxFWLFormulasLoader15.h
include/generated15/COLLADASaxFWLGeometryLoader15.h
include/generated15/COLLADASaxFWLLibraryAnimationClipsLoader15.h
include/generated15/COLLADASaxFWLLibraryAnimationsLoader15.h
include/generated15/COLLADASaxFWLLibraryArticulatedSystemsLoader15.h
include/generated15/COLLADASaxFWLLibraryCamerasLoader15.h
......@@ -143,6 +146,7 @@ set(INST_GEN15_SRC
set(SRC
src/COLLADASaxFWLLibraryArticulatedSystemsLoader.cpp
src/COLLADASaxFWLCOLLADACsymbol.cpp
src/COLLADASaxFWLLibraryAnimationClipsLoader.cpp
src/COLLADASaxFWLLibraryAnimationsLoader.cpp
src/COLLADASaxFWLIParserImpl14.cpp
src/COLLADASaxFWLTransformationLoader.cpp
......@@ -208,6 +212,7 @@ set(SRC
src/generated14/COLLADASaxFWLColladaParserAutoGen14PrivateFunctionMap.cpp
src/generated14/COLLADASaxFWLLibraryMaterialsLoader14.cpp
src/generated14/COLLADASaxFWLColladaParserAutoGen14PrivateFindElementHash.cpp
src/generated14/COLLADASaxFWLLibraryAnimationClipsLoader14.cpp
src/generated14/COLLADASaxFWLLibraryAnimationsLoader14.cpp
src/generated14/COLLADASaxFWLSceneLoader14.cpp
src/generated14/COLLADASaxFWLAssetLoader14.cpp
......@@ -230,6 +235,7 @@ set(SRC
src/generated15/COLLADASaxFWLLibraryArticulatedSystemsLoader15.cpp
src/generated15/COLLADASaxFWLColladaParserAutoGen15PrivateFindElementHash.cpp
src/generated15/COLLADASaxFWLColladaParserAutoGen15PrivateFunctionMapFactory.cpp
src/generated15/COLLADASaxFWLLibraryAnimationClipsLoader15.cpp
src/generated15/COLLADASaxFWLLibraryAnimationsLoader15.cpp
src/generated15/COLLADASaxFWLLibraryJointsLoader15.cpp
src/generated15/COLLADASaxFWLLibraryNodesLoader15.cpp
......
#ifndef __COLLADASAXFWL_LIBRARYANIMATIONCLIPSLOADER_H__
#define __COLLADASAXFWL_LIBRARYANIMATIONCLIPSLOADER_H__
#include "COLLADASaxFWLPrerequisites.h"
#include "COLLADASaxFWLFilePartLoader.h"
#include "COLLADASaxFWLXmlTypes.h"
#include "COLLADAFWHashFunctions.h"
#include "COLLADABUhash_map.h"
namespace COLLADAFW
{
class AnimationClip;
}
namespace COLLADASaxFWL
{
/** Loads all animation clips in a library animation clips. */
class LibraryAnimationClipsLoader : public FilePartLoader
{
private:
typedef COLLADABU::hash_set<COLLADAFW::UniqueId> UniqueIdSet;
/** The instance animation ids for the current animation clip. */
UniqueIdSet mInstanceAnimationIds;
/** The current animation clip being parsed. */
COLLADAFW::AnimationClip* mAnimationClip;
public:
/** Constructor. */
LibraryAnimationClipsLoader( IFilePartLoader* callingFilePartLoader );
/** Destructor. */
virtual ~LibraryAnimationClipsLoader();
/** Returns the unique id of the current parsed object. */
virtual const COLLADAFW::UniqueId& getUniqueId();
/** Finishes loading a library animation clips. */
virtual bool end__library_animation_clips();
/** Creates a new animation clip. */
virtual bool begin__animation_clip( const animation_clip__AttributeData& attributeData );
/** Sends the animation clip to the writer. */
virtual bool end__animation_clip();
/** Add the referenced animation to the current animation clip. */
virtual bool begin__instance_animation( const instance_animation__AttributeData& attributeData );
/** We don't need to do anything here. */
virtual bool end__instance_animation();
private:
/** Disable defult copy ctor. */
LibraryAnimationClipsLoader( const LibraryAnimationClipsLoader& pre );
/** Disable default assignment operator. */
const LibraryAnimationClipsLoader& operator= ( const LibraryAnimationClipsLoader& pre );
};
} // namespace COLLADASAXFWL
#endif // __COLLADASAXFWL_LIBRARYANIMATIONCLIPSLOADER_H__
......@@ -88,8 +88,9 @@ namespace COLLADASaxFWL
CONTROLLER_FLAG = 1<<13,
FORMULA_FLAG = 1<<14,
KINEMATICS_FLAG = 1<<15,
ANIMATION_CLIP_FLAG = 1<<16,
ALL_OBJECTS_MASK = (1<<16) - 1,
ALL_OBJECTS_MASK = (1<<17) - 1,
};
public:
......
......@@ -71,6 +71,9 @@ namespace COLLADASaxFWL
/** Starts loading a library images.*/
virtual bool begin__library_images( const COLLADASaxFWL14::library_images__AttributeData& attributeData );
/** Starts loading a library animation clips. */
virtual bool begin__library_animation_clips( const COLLADASaxFWL14::library_animation_clips__AttributeData& attributeData );
/** Starts loading a library animations.*/
virtual bool begin__library_animations( const COLLADASaxFWL14::library_animations__AttributeData& attributeData );
......
......@@ -71,6 +71,9 @@ namespace COLLADASaxFWL
/** Starts loading a library images.*/
virtual bool begin__library_images( const COLLADASaxFWL15::library_images__AttributeData& attributeData );
/** Starts loading a library animation clips. */
virtual bool begin__library_animation_clips( const COLLADASaxFWL15::library_animation_clips__AttributeData& attributeData );
/** Starts loading a library animations.*/
virtual bool begin__library_animations( const COLLADASaxFWL15::library_animations__AttributeData& attributeData );
......
......@@ -381,6 +381,21 @@ namespace COLLADASaxFWL
uint64 count;
const ParserChar* material;
};
struct animation_clip__AttributeData
{
const ParserChar* id;
const ParserChar* name;
};
struct instance_animation__AttributeData
{
static const uint32 ATTRIBUTE_URL_PRESENT = 0x1;
uint32 present_attributes;
COLLADABU::URI url;
const ParserChar* sid;
const ParserChar* name;
};
struct animation__AttributeData
{
const ParserChar* id;
......
#ifndef __COLLADASAXFWL_LIBRARYANIMATIONCLIPSLOADER14_H__
#define __COLLADASAXFWL_LIBRARYANIMATIONCLIPSLOADER14_H__
#include "COLLADASaxFWLPrerequisites.h"
#include "COLLADASaxFWLLibraryAnimationClipsLoader.h"
#include "COLLADASaxFWLIParserImpl14.h"
namespace COLLADASaxFWL
{
class IFilePartLoader;
class LibraryAnimationClipsLoader14 : public IParserImpl14
{
private:
LibraryAnimationClipsLoader* mLoader;
public:
LibraryAnimationClipsLoader14(LibraryAnimationClipsLoader* loader)
: mLoader(loader)
{}
virtual bool end__library_animation_clips();
virtual bool begin__animation_clip( const COLLADASaxFWL14::animation_clip__AttributeData& attributeData );
virtual bool end__animation_clip();
virtual bool begin__instance_animation( const COLLADASaxFWL14::instance_animation__AttributeData& attributeData );
virtual bool end__instance_animation();
private:
/** Disable default copy ctor. */
LibraryAnimationClipsLoader14(const LibraryAnimationClipsLoader14&);
/** Disable default assignment operator. */
const LibraryAnimationClipsLoader14& operator=(const LibraryAnimationClipsLoader14&);
};
}
#endif // __COLLADASAXFWL_LIBRARYANIMATIONCLIPSLOADER14_H__
#ifndef __COLLADASAXFWL_LIBRARYANIMATIONCLIPSLOADER15_H__
#define __COLLADASAXFWL_LIBRARYANIMATIONCLIPSLOADER15_H__
#include "COLLADASaxFWLPrerequisites.h"
#include "COLLADASaxFWLLibraryAnimationClipsLoader.h"
#include "COLLADASaxFWLIParserImpl15.h"
namespace COLLADASaxFWL
{
class IFilePartLoader;
class LibraryAnimationClipsLoader15 : public IParserImpl15
{
private:
LibraryAnimationClipsLoader* mLoader;
public:
LibraryAnimationClipsLoader15(LibraryAnimationClipsLoader* loader)
: mLoader(loader)
{}
virtual bool end__library_animation_clips();
virtual bool begin__animation_clip( const COLLADASaxFWL15::animation_clip__AttributeData& attributeData );
virtual bool end__animation_clip();
virtual bool begin__instance_animation( const COLLADASaxFWL15::instance_animation__AttributeData& attributeData );
virtual bool end__instance_animation();
private:
/** Disable default copy ctor. */
LibraryAnimationClipsLoader15(const LibraryAnimationClipsLoader15&);
/** Disable default assignment operator. */
const LibraryAnimationClipsLoader15& operator=(const LibraryAnimationClipsLoader15&);
};
}
#endif // __COLLADASAXFWL_LIBRARYANIMATIONCLIPSLOADER15_H__
\ No newline at end of file
......@@ -2473,6 +2473,7 @@
<ClCompile Include="..\src\COLLADASaxFWLJointsLoader.cpp" />
<ClCompile Include="..\src\COLLADASaxFWLKinematicsIntermediateData.cpp" />
<ClCompile Include="..\src\COLLADASaxFWLKinematicsSceneCreator.cpp" />
<ClCompile Include="..\src\COLLADASaxFWLLibraryAnimationClipsLoader.cpp" />
<ClCompile Include="..\src\COLLADASaxFWLLibraryAnimationsLoader.cpp" />
<ClCompile Include="..\src\COLLADASaxFWLLibraryArticulatedSystemsLoader.cpp" />
<ClCompile Include="..\src\COLLADASaxFWLLibraryCamerasLoader.cpp" />
......@@ -2617,6 +2618,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_LibXML_NoValidation|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\src\generated14\COLLADASaxFWLGeometryLoader14.cpp" />
<ClCompile Include="..\src\generated14\COLLADASaxFWLLibraryAnimationClipsLoader14.cpp" />
<ClCompile Include="..\src\generated14\COLLADASaxFWLLibraryAnimationsLoader14.cpp" />
<ClCompile Include="..\src\generated14\COLLADASaxFWLLibraryCamerasLoader14.cpp" />
<ClCompile Include="..\src\generated14\COLLADASaxFWLLibraryControllersLoader14.cpp" />
......@@ -2676,6 +2678,7 @@
</ClCompile>
<ClCompile Include="..\src\generated15\COLLADASaxFWLFormulasLoader15.cpp" />
<ClCompile Include="..\src\generated15\COLLADASaxFWLGeometryLoader15.cpp" />
<ClCompile Include="..\src\generated15\COLLADASaxFWLLibraryAnimationClipsLoader15.cpp" />
<ClCompile Include="..\src\generated15\COLLADASaxFWLLibraryAnimationsLoader15.cpp" />
<ClCompile Include="..\src\generated15\COLLADASaxFWLLibraryArticulatedSystemsLoader15.cpp" />
<ClCompile Include="..\src\generated15\COLLADASaxFWLLibraryCamerasLoader15.cpp" />
......@@ -2727,6 +2730,7 @@
<ClInclude Include="..\include\COLLADASaxFWLJointsLoader.h" />
<ClInclude Include="..\include\COLLADASaxFWLKinematicsIntermediateData.h" />
<ClInclude Include="..\include\COLLADASaxFWLKinematicsSceneCreator.h" />
<ClInclude Include="..\include\COLLADASaxFWLLibraryAnimationClipsLoader.h" />
<ClInclude Include="..\include\COLLADASaxFWLLibraryAnimationsLoader.h" />
<ClInclude Include="..\include\COLLADASaxFWLLibraryArticulatedSystemsLoader.h" />
<ClInclude Include="..\include\COLLADASaxFWLLibraryCamerasLoader.h" />
......@@ -2776,6 +2780,7 @@
<ClInclude Include="..\include\generated14\COLLADASaxFWLColladaParserAutoGen14Private.h" />
<CustomBuild Include="..\include\generated14\COLLADASaxFWLColladaParserAutoGen14ValidationData.h" />
<ClInclude Include="..\include\generated14\COLLADASaxFWLGeometryLoader14.h" />
<ClInclude Include="..\include\generated14\COLLADASaxFWLLibraryAnimationClipsLoader14.h" />
</