2008-05-09 17:24:28 +00:00
|
|
|
|
/*
|
|
|
|
|
---------------------------------------------------------------------------
|
2012-02-03 03:38:30 +00:00
|
|
|
|
Open Asset Import Library (assimp)
|
2008-05-09 17:24:28 +00:00
|
|
|
|
---------------------------------------------------------------------------
|
|
|
|
|
|
2012-02-03 03:38:30 +00:00
|
|
|
|
Copyright (c) 2006-2012, assimp team
|
2008-05-09 17:24:28 +00:00
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
2012-02-03 03:38:30 +00:00
|
|
|
|
* Neither the name of the assimp team, nor the names of its
|
2008-05-09 17:24:28 +00:00
|
|
|
|
contributors may be used to endorse or promote products
|
|
|
|
|
derived from this software without specific prior
|
2012-02-03 03:38:30 +00:00
|
|
|
|
written permission of the assimp team.
|
2008-05-09 17:24:28 +00:00
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
---------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
|
General
- Added format auto-detection to most loaders
- Simplified BaseImporter::CanRead() with some utility methods
- improved fast_atof -> no overruns anymore. Fuck you, irrlicht.
- added assimp_cmd tool to allow command line model processing. Mainly adebugging tool for internal purposes, but others might find it useful, too.
- vc8/vc9: revision number is now written to DLL version header
- mkutil: some batch scripts to simplify tagging & building of release versions
- some API cleanup
- fixing some doxygen markup (+now explicit use of @file <filename>)
- Icon for assimp_view and assimp_cmd
3DS
- Normal vectors are not anymore inverted in some cases
- Improved pivot handling
- Improved handling of x-flipped meshes
Collada
- fixed a minor bug (visual_scene element)
LWS
- WIP implementation. No animations yet, some bugs and crashes.
- Animation system remains disabled, WIP code
- many test files for LWS, but most of them test the anim support, which is, read above, currently disabled.
STL
- fixing a log warning which appears for every model
- added binary&ascii test spider, exported from truespace
MD3
- Cleaning up output tags for automatically joined player models.
IRR
- Fixing coordinate system issues.
- Instance handling improved.
- Some of the reported crashes not yet fixed.
PretransformVertices
- Numerous performance improvements.
- Added config option to preserve the hierarchy during the step.
RemoveRedundantMaterials
- Added config option to specify a list of materials which are kept in every case.
UNREAL
- Added support for the old unreal data format (*.a,*.d,*.uc)
- tested only with exports from Milkshape
- more Unreal stuff to come soon
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@356 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
2009-03-05 22:32:13 +00:00
|
|
|
|
/** @file ASEParser.cpp
|
|
|
|
|
* @brief Implementation of the ASE parser class
|
|
|
|
|
*/
|
2008-05-09 17:24:28 +00:00
|
|
|
|
|
2008-10-13 16:45:48 +00:00
|
|
|
|
#include "AssimpPCH.h"
|
2012-12-20 11:43:09 +00:00
|
|
|
|
#ifndef ASSIMP_BUILD_NO_ASE_IMPORTER
|
2008-10-13 16:45:48 +00:00
|
|
|
|
|
2008-07-10 16:49:01 +00:00
|
|
|
|
// internal headers
|
2008-06-01 12:46:17 +00:00
|
|
|
|
#include "TextureTransform.h"
|
2008-05-09 17:24:28 +00:00
|
|
|
|
#include "ASELoader.h"
|
|
|
|
|
#include "MaterialSystem.h"
|
|
|
|
|
#include "fast_atof.h"
|
|
|
|
|
|
|
|
|
|
using namespace Assimp;
|
|
|
|
|
using namespace Assimp::ASE;
|
|
|
|
|
|
|
|
|
|
|
2008-08-28 17:35:36 +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
|
|
|
|
// Begin an ASE parsing function
|
|
|
|
|
|
|
|
|
|
#define AI_ASE_PARSER_INIT() \
|
|
|
|
|
int iDepth = 0;
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
// Handle a "top-level" section in the file. EOF is no error in this case.
|
|
|
|
|
|
|
|
|
|
#define AI_ASE_HANDLE_TOP_LEVEL_SECTION() \
|
|
|
|
|
else if ('{' == *filePtr)iDepth++; \
|
|
|
|
|
else if ('}' == *filePtr) \
|
2008-07-18 20:29:46 +00:00
|
|
|
|
{ \
|
|
|
|
|
if (0 == --iDepth) \
|
|
|
|
|
{ \
|
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
|
|
|
|
++filePtr; \
|
2008-09-27 16:46:05 +00:00
|
|
|
|
SkipToNextToken(); \
|
2008-07-18 20:29:46 +00:00
|
|
|
|
return; \
|
|
|
|
|
} \
|
|
|
|
|
} \
|
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
|
|
|
|
else if ('\0' == *filePtr) \
|
2008-07-18 20:29:46 +00:00
|
|
|
|
{ \
|
|
|
|
|
return; \
|
|
|
|
|
} \
|
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
|
|
|
|
if(IsLineEnd(*filePtr) && !bLastWasEndLine) \
|
2008-07-30 23:00:25 +00:00
|
|
|
|
{ \
|
2008-09-27 16:46:05 +00:00
|
|
|
|
++iLineNumber; \
|
2008-07-30 23:00:25 +00:00
|
|
|
|
bLastWasEndLine = true; \
|
|
|
|
|
} else bLastWasEndLine = false; \
|
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
|
|
|
|
++filePtr;
|
2008-07-18 20:29:46 +00:00
|
|
|
|
|
2008-08-28 17:35:36 +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
|
|
|
|
// Handle a nested section in the file. EOF is an error in this case
|
|
|
|
|
// @param level "Depth" of the section
|
|
|
|
|
// @param msg Full name of the section (including the asterisk)
|
|
|
|
|
|
|
|
|
|
#define AI_ASE_HANDLE_SECTION(level, msg) \
|
|
|
|
|
if ('{' == *filePtr)iDepth++; \
|
|
|
|
|
else if ('}' == *filePtr) \
|
2008-07-18 20:29:46 +00:00
|
|
|
|
{ \
|
|
|
|
|
if (0 == --iDepth) \
|
|
|
|
|
{ \
|
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
|
|
|
|
++filePtr; \
|
2008-09-27 16:46:05 +00:00
|
|
|
|
SkipToNextToken(); \
|
2008-07-18 20:29:46 +00:00
|
|
|
|
return; \
|
|
|
|
|
} \
|
|
|
|
|
} \
|
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
|
|
|
|
else if ('\0' == *filePtr) \
|
2008-07-18 20:29:46 +00:00
|
|
|
|
{ \
|
2008-09-27 16:46:05 +00:00
|
|
|
|
LogError("Encountered unexpected EOL while parsing a " msg \
|
2008-07-18 20:29:46 +00:00
|
|
|
|
" chunk (Level " level ")"); \
|
|
|
|
|
} \
|
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
|
|
|
|
if(IsLineEnd(*filePtr) && !bLastWasEndLine) \
|
2008-07-30 23:00:25 +00:00
|
|
|
|
{ \
|
2008-09-27 16:46:05 +00:00
|
|
|
|
++iLineNumber; \
|
2008-07-30 23:00:25 +00:00
|
|
|
|
bLastWasEndLine = true; \
|
|
|
|
|
} else bLastWasEndLine = false; \
|
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
|
|
|
|
++filePtr;
|
2008-08-08 23:58:40 +00:00
|
|
|
|
|
2008-05-09 17:24:28 +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
|
|
|
|
Parser::Parser (const char* szFile, unsigned int fileFormatDefault)
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
|
|
|
|
ai_assert(NULL != szFile);
|
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
|
|
|
|
filePtr = szFile;
|
|
|
|
|
iFileFormat = fileFormatDefault;
|
2008-05-09 17:24:28 +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
|
|
|
|
// make sure that the color values are invalid
|
General
- Added format auto-detection to most loaders
- Simplified BaseImporter::CanRead() with some utility methods
- improved fast_atof -> no overruns anymore. Fuck you, irrlicht.
- added assimp_cmd tool to allow command line model processing. Mainly adebugging tool for internal purposes, but others might find it useful, too.
- vc8/vc9: revision number is now written to DLL version header
- mkutil: some batch scripts to simplify tagging & building of release versions
- some API cleanup
- fixing some doxygen markup (+now explicit use of @file <filename>)
- Icon for assimp_view and assimp_cmd
3DS
- Normal vectors are not anymore inverted in some cases
- Improved pivot handling
- Improved handling of x-flipped meshes
Collada
- fixed a minor bug (visual_scene element)
LWS
- WIP implementation. No animations yet, some bugs and crashes.
- Animation system remains disabled, WIP code
- many test files for LWS, but most of them test the anim support, which is, read above, currently disabled.
STL
- fixing a log warning which appears for every model
- added binary&ascii test spider, exported from truespace
MD3
- Cleaning up output tags for automatically joined player models.
IRR
- Fixing coordinate system issues.
- Instance handling improved.
- Some of the reported crashes not yet fixed.
PretransformVertices
- Numerous performance improvements.
- Added config option to preserve the hierarchy during the step.
RemoveRedundantMaterials
- Added config option to specify a list of materials which are kept in every case.
UNREAL
- Added support for the old unreal data format (*.a,*.d,*.uc)
- tested only with exports from Milkshape
- more Unreal stuff to come soon
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@356 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
2009-03-05 22:32:13 +00:00
|
|
|
|
m_clrBackground.r = get_qnan();
|
|
|
|
|
m_clrAmbient.r = get_qnan();
|
2008-09-27 16:46:05 +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
|
|
|
|
// setup some default values
|
2008-09-27 16:46:05 +00:00
|
|
|
|
iLineNumber = 0;
|
|
|
|
|
iFirstFrame = 0;
|
|
|
|
|
iLastFrame = 0;
|
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
|
|
|
|
iFrameSpeed = 30; // use 30 as default value for this property
|
|
|
|
|
iTicksPerFrame = 1; // use 1 as default value for this property
|
2008-09-27 16:46:05 +00:00
|
|
|
|
bLastWasEndLine = false; // need to handle \r\n seqs due to binary file mapping
|
2008-05-09 17:24:28 +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-05-09 17:24:28 +00:00
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void Parser::LogWarning(const char* szWarn)
|
|
|
|
|
{
|
|
|
|
|
ai_assert(NULL != szWarn);
|
|
|
|
|
|
|
|
|
|
char szTemp[1024];
|
2008-06-15 10:27:08 +00:00
|
|
|
|
#if _MSC_VER >= 1400
|
2008-09-27 16:46:05 +00:00
|
|
|
|
sprintf_s(szTemp,"Line %i: %s",iLineNumber,szWarn);
|
2008-06-15 10:27:08 +00:00
|
|
|
|
#else
|
2008-10-31 19:32:00 +00:00
|
|
|
|
snprintf(szTemp,1024,"Line %i: %s",iLineNumber,szWarn);
|
2008-06-15 10:27:08 +00:00
|
|
|
|
#endif
|
2008-05-09 17:24:28 +00:00
|
|
|
|
|
|
|
|
|
// output the warning to the logger ...
|
|
|
|
|
DefaultLogger::get()->warn(szTemp);
|
|
|
|
|
}
|
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-09 17:24:28 +00:00
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2008-06-01 12:46:17 +00:00
|
|
|
|
void Parser::LogInfo(const char* szWarn)
|
|
|
|
|
{
|
|
|
|
|
ai_assert(NULL != szWarn);
|
|
|
|
|
|
|
|
|
|
char szTemp[1024];
|
2008-06-15 10:27:08 +00:00
|
|
|
|
#if _MSC_VER >= 1400
|
2008-09-27 16:46:05 +00:00
|
|
|
|
sprintf_s(szTemp,"Line %i: %s",iLineNumber,szWarn);
|
2008-06-15 10:27:08 +00:00
|
|
|
|
#else
|
2008-10-31 19:32:00 +00:00
|
|
|
|
snprintf(szTemp,1024,"Line %i: %s",iLineNumber,szWarn);
|
2008-06-15 10:27:08 +00:00
|
|
|
|
#endif
|
2008-06-01 12:46:17 +00:00
|
|
|
|
|
|
|
|
|
// output the information to the logger ...
|
|
|
|
|
DefaultLogger::get()->info(szTemp);
|
|
|
|
|
}
|
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-06-01 12:46:17 +00:00
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2008-05-09 17:24:28 +00:00
|
|
|
|
void Parser::LogError(const char* szWarn)
|
|
|
|
|
{
|
|
|
|
|
ai_assert(NULL != szWarn);
|
|
|
|
|
|
|
|
|
|
char szTemp[1024];
|
2008-06-15 10:27:08 +00:00
|
|
|
|
#if _MSC_VER >= 1400
|
2008-09-27 16:46:05 +00:00
|
|
|
|
sprintf_s(szTemp,"Line %i: %s",iLineNumber,szWarn);
|
2008-06-15 10:27:08 +00:00
|
|
|
|
#else
|
2008-10-31 19:32:00 +00:00
|
|
|
|
snprintf(szTemp,1024,"Line %i: %s",iLineNumber,szWarn);
|
2008-06-15 10:27:08 +00:00
|
|
|
|
#endif
|
2008-05-09 17:24:28 +00:00
|
|
|
|
|
|
|
|
|
// throw an exception
|
2010-03-18 17:00:12 +00:00
|
|
|
|
throw DeadlyImportError(szTemp);
|
2008-05-09 17:24:28 +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-05-09 17:24:28 +00:00
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
bool Parser::SkipToNextToken()
|
|
|
|
|
{
|
|
|
|
|
while (true)
|
|
|
|
|
{
|
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
|
|
|
|
char me = *filePtr;
|
2008-06-15 10:27:08 +00:00
|
|
|
|
|
|
|
|
|
// increase the line number counter if necessary
|
2008-07-30 23:00:25 +00:00
|
|
|
|
if (IsLineEnd(me) && !bLastWasEndLine)
|
|
|
|
|
{
|
2008-09-27 16:46:05 +00:00
|
|
|
|
++iLineNumber;
|
2008-07-30 23:00:25 +00:00
|
|
|
|
bLastWasEndLine = true;
|
|
|
|
|
}
|
|
|
|
|
else bLastWasEndLine = false;
|
2008-07-10 16:49:01 +00:00
|
|
|
|
if ('*' == me || '}' == me || '{' == me)return true;
|
2008-08-08 18:25:55 +00:00
|
|
|
|
if ('\0' == me)return false;
|
2008-05-09 17:24:28 +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
|
|
|
|
++filePtr;
|
2008-05-09 17:24:28 +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-05-09 17:24:28 +00:00
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
bool Parser::SkipSection()
|
|
|
|
|
{
|
|
|
|
|
// must handle subsections ...
|
2008-05-23 22:38:35 +00:00
|
|
|
|
int iCnt = 0;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
while (true)
|
|
|
|
|
{
|
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
|
|
|
|
if ('}' == *filePtr)
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
|
|
|
|
--iCnt;
|
|
|
|
|
if (0 == iCnt)
|
|
|
|
|
{
|
|
|
|
|
// go to the next valid token ...
|
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
|
|
|
|
++filePtr;
|
2008-09-27 16:46:05 +00:00
|
|
|
|
SkipToNextToken();
|
2008-05-09 17:24:28 +00:00
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
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
|
|
|
|
else if ('{' == *filePtr)
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
|
|
|
|
++iCnt;
|
|
|
|
|
}
|
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
|
|
|
|
else if ('\0' == *filePtr)
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-09-27 16:46:05 +00:00
|
|
|
|
LogWarning("Unable to parse block: Unexpected EOF, closing bracket \'}\' was expected [#1]");
|
2008-05-09 17:24:28 +00:00
|
|
|
|
return false;
|
|
|
|
|
}
|
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
|
|
|
|
else if(IsLineEnd(*filePtr))++iLineNumber;
|
|
|
|
|
++filePtr;
|
2008-05-09 17:24:28 +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-05-09 17:24:28 +00:00
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void Parser::Parse()
|
|
|
|
|
{
|
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
|
|
|
|
AI_ASE_PARSER_INIT();
|
2008-05-09 17:24:28 +00:00
|
|
|
|
while (true)
|
|
|
|
|
{
|
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
|
|
|
|
if ('*' == *filePtr)
|
2008-05-09 17:24:28 +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
|
|
|
|
++filePtr;
|
2008-09-30 20:20:56 +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
|
|
|
|
// Version should be 200. Validate this ...
|
|
|
|
|
if (TokenMatch(filePtr,"3DSMAX_ASCIIEXPORT",18))
|
2008-05-09 17:24:28 +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
|
|
|
|
unsigned int fmt;
|
|
|
|
|
ParseLV4MeshLong(fmt);
|
2008-05-09 17:24:28 +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
|
|
|
|
if (fmt > 200)
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-09-27 16:46:05 +00:00
|
|
|
|
LogWarning("Unknown file format version: *3DSMAX_ASCIIEXPORT should \
|
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
|
|
|
|
be <= 200");
|
2008-05-09 17:24:28 +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
|
|
|
|
// *************************************************************
|
|
|
|
|
// - fmt will be 0 if we're unable to read the version number
|
|
|
|
|
// there are some faulty files without a version number ...
|
|
|
|
|
// in this case we'll guess the exact file format by looking
|
|
|
|
|
// at the file extension (ASE, ASK, ASC)
|
|
|
|
|
// *************************************************************
|
|
|
|
|
|
|
|
|
|
if (fmt)iFileFormat = fmt;
|
2008-05-30 23:01:25 +00:00
|
|
|
|
continue;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
// main scene information
|
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
|
|
|
|
if (TokenMatch(filePtr,"SCENE",5))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-09-27 16:46:05 +00:00
|
|
|
|
ParseLV1SceneBlock();
|
2008-05-30 23:01:25 +00:00
|
|
|
|
continue;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
2008-10-31 19:32:00 +00:00
|
|
|
|
// "group" - no implementation yet, in facte
|
|
|
|
|
// we're just ignoring them for the moment
|
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
|
|
|
|
if (TokenMatch(filePtr,"GROUP",5))
|
2008-10-27 00:36:26 +00:00
|
|
|
|
{
|
|
|
|
|
Parse();
|
|
|
|
|
continue;
|
|
|
|
|
}
|
2008-05-09 17:24:28 +00:00
|
|
|
|
// material list
|
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
|
|
|
|
if (TokenMatch(filePtr,"MATERIAL_LIST",13))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-09-27 16:46:05 +00:00
|
|
|
|
ParseLV1MaterialListBlock();
|
2008-05-30 23:01:25 +00:00
|
|
|
|
continue;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
// geometric object (mesh)
|
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
|
|
|
|
if (TokenMatch(filePtr,"GEOMOBJECT",10))
|
2008-10-22 20:06:16 +00:00
|
|
|
|
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-09-27 16:46:05 +00:00
|
|
|
|
m_vMeshes.push_back(Mesh());
|
2008-10-31 19:32:00 +00:00
|
|
|
|
ParseLV1ObjectBlock(m_vMeshes.back());
|
2008-05-30 23:01:25 +00:00
|
|
|
|
continue;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
2008-07-18 20:29:46 +00:00
|
|
|
|
// helper object = dummy in the hierarchy
|
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
|
|
|
|
if (TokenMatch(filePtr,"HELPEROBJECT",12))
|
2008-10-22 20:06:16 +00:00
|
|
|
|
|
2008-07-18 20:29:46 +00:00
|
|
|
|
{
|
2008-10-31 19:32:00 +00:00
|
|
|
|
m_vDummies.push_back(Dummy());
|
|
|
|
|
ParseLV1ObjectBlock(m_vDummies.back());
|
2008-07-18 20:29:46 +00:00
|
|
|
|
continue;
|
|
|
|
|
}
|
2008-10-22 20:06:16 +00:00
|
|
|
|
// light object
|
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
|
|
|
|
if (TokenMatch(filePtr,"LIGHTOBJECT",11))
|
2008-10-22 20:06:16 +00:00
|
|
|
|
|
2008-06-01 12:46:17 +00:00
|
|
|
|
{
|
2008-10-22 20:06:16 +00:00
|
|
|
|
m_vLights.push_back(Light());
|
2008-10-31 19:32:00 +00:00
|
|
|
|
ParseLV1ObjectBlock(m_vLights.back());
|
2008-06-01 12:46:17 +00:00
|
|
|
|
continue;
|
|
|
|
|
}
|
2008-10-22 20:06:16 +00:00
|
|
|
|
// camera object
|
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
|
|
|
|
if (TokenMatch(filePtr,"CAMERAOBJECT",12))
|
2008-06-01 12:46:17 +00:00
|
|
|
|
{
|
2008-10-22 20:06:16 +00:00
|
|
|
|
m_vCameras.push_back(Camera());
|
2008-10-31 19:32:00 +00:00
|
|
|
|
ParseLV1ObjectBlock(m_vCameras.back());
|
2008-06-01 12:46:17 +00:00
|
|
|
|
continue;
|
|
|
|
|
}
|
2008-10-22 20:06:16 +00:00
|
|
|
|
// comment - print it on the console
|
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
|
|
|
|
if (TokenMatch(filePtr,"COMMENT",7))
|
2008-06-01 12:46:17 +00:00
|
|
|
|
{
|
|
|
|
|
std::string out = "<unknown>";
|
2008-09-27 16:46:05 +00:00
|
|
|
|
ParseString(out,"*COMMENT");
|
|
|
|
|
LogInfo(("Comment: " + out).c_str());
|
2008-06-01 12:46:17 +00:00
|
|
|
|
continue;
|
|
|
|
|
}
|
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
|
|
|
|
// ASC bone weights
|
|
|
|
|
if (AI_ASE_IS_OLD_FILE_FORMAT() && TokenMatch(filePtr,"MESH_SOFTSKINVERTS",18))
|
|
|
|
|
{
|
|
|
|
|
ParseLV1SoftSkinBlock();
|
|
|
|
|
}
|
2008-05-09 17:24:28 +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
|
|
|
|
AI_ASE_HANDLE_TOP_LEVEL_SECTION();
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
}
|
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
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void Parser::ParseLV1SoftSkinBlock()
|
|
|
|
|
{
|
|
|
|
|
// TODO: fix line counting here
|
|
|
|
|
|
|
|
|
|
// **************************************************************
|
|
|
|
|
// The soft skin block is formatted differently. There are no
|
|
|
|
|
// nested sections supported and the single elements aren't
|
|
|
|
|
// marked by keywords starting with an asterisk.
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
FORMAT BEGIN
|
|
|
|
|
|
|
|
|
|
*MESH_SOFTSKINVERTS {
|
|
|
|
|
<nodename>
|
|
|
|
|
<number of vertices>
|
|
|
|
|
|
|
|
|
|
[for <number of vertices> times:]
|
|
|
|
|
<number of weights> [for <number of weights> times:] <bone name> <weight>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FORMAT END
|
|
|
|
|
*/
|
|
|
|
|
// **************************************************************
|
|
|
|
|
while (true)
|
|
|
|
|
{
|
|
|
|
|
if (*filePtr == '}' ) {++filePtr;return;}
|
|
|
|
|
else if (*filePtr == '\0') return;
|
|
|
|
|
else if (*filePtr == '{' ) ++filePtr;
|
|
|
|
|
|
|
|
|
|
else // if (!IsSpace(*filePtr) && !IsLineEnd(*filePtr))
|
|
|
|
|
{
|
|
|
|
|
ASE::Mesh* curMesh = NULL;
|
|
|
|
|
unsigned int numVerts = 0;
|
|
|
|
|
|
|
|
|
|
const char* sz = filePtr;
|
|
|
|
|
while (!IsSpaceOrNewLine(*filePtr))++filePtr;
|
|
|
|
|
|
|
|
|
|
const unsigned int diff = (unsigned int)(filePtr-sz);
|
|
|
|
|
if (diff)
|
|
|
|
|
{
|
|
|
|
|
std::string name = std::string(sz,diff);
|
|
|
|
|
for (std::vector<ASE::Mesh>::iterator it = m_vMeshes.begin();
|
|
|
|
|
it != m_vMeshes.end(); ++it)
|
|
|
|
|
{
|
|
|
|
|
if ((*it).mName == name)
|
|
|
|
|
{
|
|
|
|
|
curMesh = & (*it);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (!curMesh)
|
|
|
|
|
{
|
|
|
|
|
LogWarning("Encountered unknown mesh in *MESH_SOFTSKINVERTS section");
|
|
|
|
|
|
|
|
|
|
// Skip the mesh data - until we find a new mesh
|
|
|
|
|
// or the end of the *MESH_SOFTSKINVERTS section
|
|
|
|
|
while (true)
|
|
|
|
|
{
|
|
|
|
|
SkipSpacesAndLineEnd(&filePtr);
|
|
|
|
|
if (*filePtr == '}')
|
|
|
|
|
{++filePtr;return;}
|
|
|
|
|
else if (!IsNumeric(*filePtr))
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
SkipLine(&filePtr);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
SkipSpacesAndLineEnd(&filePtr);
|
|
|
|
|
ParseLV4MeshLong(numVerts);
|
|
|
|
|
|
|
|
|
|
// Reserve enough storage
|
|
|
|
|
curMesh->mBoneVertices.reserve(numVerts);
|
|
|
|
|
|
|
|
|
|
for (unsigned int i = 0; i < numVerts;++i)
|
|
|
|
|
{
|
|
|
|
|
SkipSpacesAndLineEnd(&filePtr);
|
|
|
|
|
unsigned int numWeights;
|
|
|
|
|
ParseLV4MeshLong(numWeights);
|
|
|
|
|
|
|
|
|
|
curMesh->mBoneVertices.push_back(ASE::BoneVertex());
|
|
|
|
|
ASE::BoneVertex& vert = curMesh->mBoneVertices.back();
|
|
|
|
|
|
|
|
|
|
// Reserve enough storage
|
|
|
|
|
vert.mBoneWeights.reserve(numWeights);
|
|
|
|
|
|
|
|
|
|
for (unsigned int w = 0; w < numWeights;++w)
|
|
|
|
|
{
|
|
|
|
|
std::string bone;
|
|
|
|
|
ParseString(bone,"*MESH_SOFTSKINVERTS.Bone");
|
|
|
|
|
|
|
|
|
|
// Find the bone in the mesh's list
|
|
|
|
|
std::pair<int,float> me;
|
|
|
|
|
me.first = -1;
|
|
|
|
|
|
|
|
|
|
for (unsigned int n = 0; n < curMesh->mBones.size();++n)
|
|
|
|
|
{
|
|
|
|
|
if (curMesh->mBones[n].mName == bone)
|
|
|
|
|
{
|
|
|
|
|
me.first = n;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (-1 == me.first)
|
|
|
|
|
{
|
|
|
|
|
// We don't have this bone yet, so add it to the list
|
|
|
|
|
me.first = (int)curMesh->mBones.size();
|
|
|
|
|
curMesh->mBones.push_back(ASE::Bone(bone));
|
|
|
|
|
}
|
|
|
|
|
ParseLV4MeshFloat( me.second );
|
|
|
|
|
|
|
|
|
|
// Add the new bone weight to list
|
|
|
|
|
vert.mBoneWeights.push_back(me);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
++filePtr;
|
|
|
|
|
SkipSpacesAndLineEnd(&filePtr);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2008-05-09 17:24:28 +00:00
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void Parser::ParseLV1SceneBlock()
|
|
|
|
|
{
|
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
|
|
|
|
AI_ASE_PARSER_INIT();
|
2008-05-09 17:24:28 +00:00
|
|
|
|
while (true)
|
|
|
|
|
{
|
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
|
|
|
|
if ('*' == *filePtr)
|
2008-05-09 17:24:28 +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
|
|
|
|
++filePtr;
|
|
|
|
|
if (TokenMatch(filePtr,"SCENE_BACKGROUND_STATIC",23))
|
2008-10-22 20:06:16 +00:00
|
|
|
|
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
|
|
|
|
// parse a color triple and assume it is really the bg color
|
2008-09-27 16:46:05 +00:00
|
|
|
|
ParseLV4MeshFloatTriple( &m_clrBackground.r );
|
2008-05-30 23:01:25 +00:00
|
|
|
|
continue;
|
2008-05-09 17:24:28 +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
|
|
|
|
if (TokenMatch(filePtr,"SCENE_AMBIENT_STATIC",20))
|
2008-10-22 20:06:16 +00:00
|
|
|
|
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
|
|
|
|
// parse a color triple and assume it is really the bg color
|
2008-09-27 16:46:05 +00:00
|
|
|
|
ParseLV4MeshFloatTriple( &m_clrAmbient.r );
|
2008-05-30 23:01:25 +00:00
|
|
|
|
continue;
|
2008-05-09 17:24:28 +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
|
|
|
|
if (TokenMatch(filePtr,"SCENE_FIRSTFRAME",16))
|
2008-07-18 20:29:46 +00:00
|
|
|
|
{
|
2008-09-27 16:46:05 +00:00
|
|
|
|
ParseLV4MeshLong(iFirstFrame);
|
2008-07-18 20:29:46 +00:00
|
|
|
|
continue;
|
|
|
|
|
}
|
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
|
|
|
|
if (TokenMatch(filePtr,"SCENE_LASTFRAME",15))
|
2008-07-18 20:29:46 +00:00
|
|
|
|
{
|
2008-09-27 16:46:05 +00:00
|
|
|
|
ParseLV4MeshLong(iLastFrame);
|
2008-07-18 20:29:46 +00:00
|
|
|
|
continue;
|
|
|
|
|
}
|
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
|
|
|
|
if (TokenMatch(filePtr,"SCENE_FRAMESPEED",16))
|
2008-07-18 20:29:46 +00:00
|
|
|
|
{
|
2008-09-27 16:46:05 +00:00
|
|
|
|
ParseLV4MeshLong(iFrameSpeed);
|
2008-07-18 20:29:46 +00:00
|
|
|
|
continue;
|
|
|
|
|
}
|
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
|
|
|
|
if (TokenMatch(filePtr,"SCENE_TICKSPERFRAME",19))
|
2008-07-18 20:29:46 +00:00
|
|
|
|
{
|
2008-09-27 16:46:05 +00:00
|
|
|
|
ParseLV4MeshLong(iTicksPerFrame);
|
2008-07-18 20:29:46 +00:00
|
|
|
|
continue;
|
|
|
|
|
}
|
2008-05-09 17:24:28 +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
|
|
|
|
AI_ASE_HANDLE_TOP_LEVEL_SECTION();
|
2008-05-09 17:24:28 +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-05-09 17:24:28 +00:00
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void Parser::ParseLV1MaterialListBlock()
|
|
|
|
|
{
|
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
|
|
|
|
AI_ASE_PARSER_INIT();
|
|
|
|
|
|
2008-05-09 17:24:28 +00:00
|
|
|
|
unsigned int iMaterialCount = 0;
|
2008-09-27 16:46:05 +00:00
|
|
|
|
unsigned int iOldMaterialCount = (unsigned int)m_vMaterials.size();
|
2008-05-09 17:24:28 +00:00
|
|
|
|
while (true)
|
|
|
|
|
{
|
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
|
|
|
|
if ('*' == *filePtr)
|
2008-05-09 17:24:28 +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
|
|
|
|
++filePtr;
|
|
|
|
|
if (TokenMatch(filePtr,"MATERIAL_COUNT",14))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-09-27 16:46:05 +00:00
|
|
|
|
ParseLV4MeshLong(iMaterialCount);
|
2008-05-09 17:24:28 +00:00
|
|
|
|
|
|
|
|
|
// now allocate enough storage to hold all materials
|
2008-09-27 16:46:05 +00:00
|
|
|
|
m_vMaterials.resize(iOldMaterialCount+iMaterialCount);
|
2008-05-30 23:01:25 +00:00
|
|
|
|
continue;
|
2008-05-09 17:24:28 +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
|
|
|
|
if (TokenMatch(filePtr,"MATERIAL",8))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
|
|
|
|
unsigned int iIndex = 0;
|
2008-09-27 16:46:05 +00:00
|
|
|
|
ParseLV4MeshLong(iIndex);
|
2008-05-09 17:24:28 +00:00
|
|
|
|
|
|
|
|
|
if (iIndex >= iMaterialCount)
|
|
|
|
|
{
|
2008-09-27 16:46:05 +00:00
|
|
|
|
LogWarning("Out of range: material index is too large");
|
2008-05-09 17:24:28 +00:00
|
|
|
|
iIndex = iMaterialCount-1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// get a reference to the material
|
2008-09-27 16:46:05 +00:00
|
|
|
|
Material& sMat = m_vMaterials[iIndex+iOldMaterialCount];
|
2008-05-09 17:24:28 +00:00
|
|
|
|
// parse the material block
|
2008-09-27 16:46:05 +00:00
|
|
|
|
ParseLV2MaterialBlock(sMat);
|
2008-05-30 23:01:25 +00:00
|
|
|
|
continue;
|
2008-05-09 17:24:28 +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
|
|
|
|
AI_ASE_HANDLE_TOP_LEVEL_SECTION();
|
2008-05-09 17:24:28 +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-05-09 17:24:28 +00:00
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void Parser::ParseLV2MaterialBlock(ASE::Material& mat)
|
|
|
|
|
{
|
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
|
|
|
|
AI_ASE_PARSER_INIT();
|
|
|
|
|
|
2008-05-09 17:24:28 +00:00
|
|
|
|
unsigned int iNumSubMaterials = 0;
|
|
|
|
|
while (true)
|
|
|
|
|
{
|
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
|
|
|
|
if ('*' == *filePtr)
|
2008-05-09 17:24:28 +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
|
|
|
|
++filePtr;
|
|
|
|
|
if (TokenMatch(filePtr,"MATERIAL_NAME",13))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-10-22 20:06:16 +00:00
|
|
|
|
if (!ParseString(mat.mName,"*MATERIAL_NAME"))
|
|
|
|
|
SkipToNextToken();
|
2008-05-30 23:01:25 +00:00
|
|
|
|
continue;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
// ambient material color
|
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
|
|
|
|
if (TokenMatch(filePtr,"MATERIAL_AMBIENT",16))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-10-22 20:06:16 +00:00
|
|
|
|
ParseLV4MeshFloatTriple(&mat.mAmbient.r);
|
|
|
|
|
continue;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
// diffuse material color
|
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
|
|
|
|
if (TokenMatch(filePtr,"MATERIAL_DIFFUSE",16) )
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-10-22 20:06:16 +00:00
|
|
|
|
ParseLV4MeshFloatTriple(&mat.mDiffuse.r);
|
|
|
|
|
continue;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
// specular material color
|
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
|
|
|
|
if (TokenMatch(filePtr,"MATERIAL_SPECULAR",17))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-10-22 20:06:16 +00:00
|
|
|
|
ParseLV4MeshFloatTriple(&mat.mSpecular.r);
|
|
|
|
|
continue;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
// material shading type
|
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
|
|
|
|
if (TokenMatch(filePtr,"MATERIAL_SHADING",16))
|
2008-05-09 17:24:28 +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
|
|
|
|
if (TokenMatch(filePtr,"Blinn",5))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-10-31 19:32:00 +00:00
|
|
|
|
mat.mShading = Discreet3DS::Blinn;
|
2008-05-09 17:24:28 +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
|
|
|
|
else if (TokenMatch(filePtr,"Phong",5))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-10-31 19:32:00 +00:00
|
|
|
|
mat.mShading = Discreet3DS::Phong;
|
2008-05-09 17:24:28 +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
|
|
|
|
else if (TokenMatch(filePtr,"Flat",4))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-10-31 19:32:00 +00:00
|
|
|
|
mat.mShading = Discreet3DS::Flat;
|
2008-05-09 17:24:28 +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
|
|
|
|
else if (TokenMatch(filePtr,"Wire",4))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-10-31 19:32:00 +00:00
|
|
|
|
mat.mShading = Discreet3DS::Wire;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
// assume gouraud shading
|
2008-10-31 19:32:00 +00:00
|
|
|
|
mat.mShading = Discreet3DS::Gouraud;
|
2008-09-27 16:46:05 +00:00
|
|
|
|
SkipToNextToken();
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
2008-05-30 23:01:25 +00:00
|
|
|
|
continue;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
// material transparency
|
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
|
|
|
|
if (TokenMatch(filePtr,"MATERIAL_TRANSPARENCY",21))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-09-27 16:46:05 +00:00
|
|
|
|
ParseLV4MeshFloat(mat.mTransparency);
|
2008-05-30 23:01:25 +00:00
|
|
|
|
mat.mTransparency = 1.0f - mat.mTransparency;continue;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
// material self illumination
|
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
|
|
|
|
if (TokenMatch(filePtr,"MATERIAL_SELFILLUM",18))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
|
|
|
|
float f = 0.0f;
|
2008-09-27 16:46:05 +00:00
|
|
|
|
ParseLV4MeshFloat(f);
|
2008-05-09 17:24:28 +00:00
|
|
|
|
|
|
|
|
|
mat.mEmissive.r = f;
|
|
|
|
|
mat.mEmissive.g = f;
|
|
|
|
|
mat.mEmissive.b = f;
|
2008-05-30 23:01:25 +00:00
|
|
|
|
continue;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
// material shininess
|
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
|
|
|
|
if (TokenMatch(filePtr,"MATERIAL_SHINE",14) )
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-09-27 16:46:05 +00:00
|
|
|
|
ParseLV4MeshFloat(mat.mSpecularExponent);
|
2008-10-22 20:06:16 +00:00
|
|
|
|
mat.mSpecularExponent *= 15;
|
|
|
|
|
continue;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
2008-11-16 21:56:45 +00:00
|
|
|
|
// two-sided material
|
|
|
|
|
if (TokenMatch(filePtr,"MATERIAL_TWOSIDED",17) )
|
|
|
|
|
{
|
|
|
|
|
mat.mTwoSided = true;
|
|
|
|
|
continue;
|
|
|
|
|
}
|
2008-05-28 21:05:05 +00:00
|
|
|
|
// material shininess strength
|
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
|
|
|
|
if (TokenMatch(filePtr,"MATERIAL_SHINESTRENGTH",22))
|
2008-05-28 21:05:05 +00:00
|
|
|
|
{
|
2008-10-22 20:06:16 +00:00
|
|
|
|
ParseLV4MeshFloat(mat.mShininessStrength);
|
|
|
|
|
continue;
|
2008-05-28 21:05:05 +00:00
|
|
|
|
}
|
2008-05-09 17:24:28 +00:00
|
|
|
|
// diffuse color map
|
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
|
|
|
|
if (TokenMatch(filePtr,"MAP_DIFFUSE",11))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
|
|
|
|
// parse the texture block
|
2008-10-22 20:06:16 +00:00
|
|
|
|
ParseLV3MapBlock(mat.sTexDiffuse);
|
|
|
|
|
continue;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
// ambient color map
|
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
|
|
|
|
if (TokenMatch(filePtr,"MAP_AMBIENT",11))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
|
|
|
|
// parse the texture block
|
2008-10-22 20:06:16 +00:00
|
|
|
|
ParseLV3MapBlock(mat.sTexAmbient);
|
|
|
|
|
continue;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
// specular color map
|
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
|
|
|
|
if (TokenMatch(filePtr,"MAP_SPECULAR",12))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
|
|
|
|
// parse the texture block
|
2008-10-22 20:06:16 +00:00
|
|
|
|
ParseLV3MapBlock(mat.sTexSpecular);
|
|
|
|
|
continue;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
// opacity map
|
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
|
|
|
|
if (TokenMatch(filePtr,"MAP_OPACITY",11))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
|
|
|
|
// parse the texture block
|
2008-10-22 20:06:16 +00:00
|
|
|
|
ParseLV3MapBlock(mat.sTexOpacity);
|
|
|
|
|
continue;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
// emissive map
|
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
|
|
|
|
if (TokenMatch(filePtr,"MAP_SELFILLUM",13))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
|
|
|
|
// parse the texture block
|
2008-10-22 20:06:16 +00:00
|
|
|
|
ParseLV3MapBlock(mat.sTexEmissive);
|
|
|
|
|
continue;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
// bump map
|
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
|
|
|
|
if (TokenMatch(filePtr,"MAP_BUMP",8))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
|
|
|
|
// parse the texture block
|
2008-09-27 16:46:05 +00:00
|
|
|
|
ParseLV3MapBlock(mat.sTexBump);
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
// specular/shininess map
|
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
|
|
|
|
if (TokenMatch(filePtr,"MAP_SHINESTRENGTH",17))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
|
|
|
|
// parse the texture block
|
2008-10-22 20:06:16 +00:00
|
|
|
|
ParseLV3MapBlock(mat.sTexShininess);
|
|
|
|
|
continue;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
// number of submaterials
|
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
|
|
|
|
if (TokenMatch(filePtr,"NUMSUBMTLS",10))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-09-27 16:46:05 +00:00
|
|
|
|
ParseLV4MeshLong(iNumSubMaterials);
|
2008-05-09 17:24:28 +00:00
|
|
|
|
|
|
|
|
|
// allocate enough storage
|
|
|
|
|
mat.avSubMaterials.resize(iNumSubMaterials);
|
|
|
|
|
}
|
|
|
|
|
// submaterial chunks
|
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
|
|
|
|
if (TokenMatch(filePtr,"SUBMATERIAL",11))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-10-22 20:06:16 +00:00
|
|
|
|
|
2008-05-09 17:24:28 +00:00
|
|
|
|
unsigned int iIndex = 0;
|
2008-09-27 16:46:05 +00:00
|
|
|
|
ParseLV4MeshLong(iIndex);
|
2008-05-09 17:24:28 +00:00
|
|
|
|
|
|
|
|
|
if (iIndex >= iNumSubMaterials)
|
|
|
|
|
{
|
2008-09-27 16:46:05 +00:00
|
|
|
|
LogWarning("Out of range: submaterial index is too large");
|
2008-05-09 17:24:28 +00:00
|
|
|
|
iIndex = iNumSubMaterials-1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// get a reference to the material
|
|
|
|
|
Material& sMat = mat.avSubMaterials[iIndex];
|
|
|
|
|
|
|
|
|
|
// parse the material block
|
2008-09-27 16:46:05 +00:00
|
|
|
|
ParseLV2MaterialBlock(sMat);
|
2008-05-30 23:01:25 +00:00
|
|
|
|
continue;
|
2008-05-09 17:24:28 +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
|
|
|
|
AI_ASE_HANDLE_SECTION("2","*MATERIAL");
|
2008-05-09 17:24:28 +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-05-09 17:24:28 +00:00
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void Parser::ParseLV3MapBlock(Texture& map)
|
|
|
|
|
{
|
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
|
|
|
|
AI_ASE_PARSER_INIT();
|
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
|
|
|
|
// ***********************************************************
|
2008-10-31 19:32:00 +00:00
|
|
|
|
// *BITMAP should not be there if *MAP_CLASS is not BITMAP,
|
|
|
|
|
// but we need to expect that case ... if the path is
|
|
|
|
|
// empty the texture won't be used later.
|
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
|
|
|
|
bool parsePath = true;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
while (true)
|
|
|
|
|
{
|
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
|
|
|
|
if ('*' == *filePtr)
|
2008-05-09 17:24:28 +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
|
|
|
|
++filePtr;
|
2008-10-31 19:32:00 +00:00
|
|
|
|
// type of map
|
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
|
|
|
|
if (TokenMatch(filePtr,"MAP_CLASS" ,9))
|
2008-10-31 19:32:00 +00:00
|
|
|
|
{
|
|
|
|
|
std::string temp;
|
|
|
|
|
if(!ParseString(temp,"*MAP_CLASS"))
|
|
|
|
|
SkipToNextToken();
|
2011-04-29 17:37:08 +00:00
|
|
|
|
if (temp != "Bitmap" && temp != "Normal Bump")
|
2008-11-02 22:30:37 +00:00
|
|
|
|
{
|
|
|
|
|
DefaultLogger::get()->warn("ASE: Skipping unknown map type: " + temp);
|
2008-10-31 19:32:00 +00:00
|
|
|
|
parsePath = false;
|
2008-11-02 22:30:37 +00:00
|
|
|
|
}
|
2008-10-31 19:32:00 +00:00
|
|
|
|
continue;
|
|
|
|
|
}
|
2008-05-09 17:24:28 +00:00
|
|
|
|
// path to the texture
|
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
|
|
|
|
if (parsePath && TokenMatch(filePtr,"BITMAP" ,6))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-10-22 20:06:16 +00:00
|
|
|
|
if(!ParseString(map.mMapName,"*BITMAP"))
|
|
|
|
|
SkipToNextToken();
|
2008-11-02 22:30:37 +00:00
|
|
|
|
|
|
|
|
|
if (map.mMapName == "None")
|
|
|
|
|
{
|
|
|
|
|
// Files with 'None' as map name are produced by
|
|
|
|
|
// an Maja to ASE exporter which name I forgot ..
|
|
|
|
|
DefaultLogger::get()->warn("ASE: Skipping invalid map entry");
|
|
|
|
|
map.mMapName = "";
|
|
|
|
|
}
|
|
|
|
|
|
2008-05-30 23:01:25 +00:00
|
|
|
|
continue;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
// offset on the u axis
|
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
|
|
|
|
if (TokenMatch(filePtr,"UVW_U_OFFSET" ,12))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-10-22 20:06:16 +00:00
|
|
|
|
ParseLV4MeshFloat(map.mOffsetU);
|
|
|
|
|
continue;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
// offset on the v axis
|
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
|
|
|
|
if (TokenMatch(filePtr,"UVW_V_OFFSET" ,12))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-10-22 20:06:16 +00:00
|
|
|
|
ParseLV4MeshFloat(map.mOffsetV);
|
|
|
|
|
continue;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
// tiling on the u axis
|
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
|
|
|
|
if (TokenMatch(filePtr,"UVW_U_TILING" ,12))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-10-22 20:06:16 +00:00
|
|
|
|
ParseLV4MeshFloat(map.mScaleU);
|
|
|
|
|
continue;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
// tiling on the v axis
|
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
|
|
|
|
if (TokenMatch(filePtr,"UVW_V_TILING" ,12))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-10-22 20:06:16 +00:00
|
|
|
|
ParseLV4MeshFloat(map.mScaleV);
|
|
|
|
|
continue;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
// rotation around the z-axis
|
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
|
|
|
|
if (TokenMatch(filePtr,"UVW_ANGLE" ,9))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-10-22 20:06:16 +00:00
|
|
|
|
ParseLV4MeshFloat(map.mRotation);
|
|
|
|
|
continue;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
// map blending factor
|
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
|
|
|
|
if (TokenMatch(filePtr,"MAP_AMOUNT" ,10))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-10-22 20:06:16 +00:00
|
|
|
|
ParseLV4MeshFloat(map.mTextureBlend);
|
|
|
|
|
continue;
|
2008-05-09 17:24:28 +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
|
|
|
|
AI_ASE_HANDLE_SECTION("3","*MAP_XXXXXX");
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
}
|
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-09 17:24:28 +00:00
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2008-05-28 21:05:05 +00:00
|
|
|
|
bool Parser::ParseString(std::string& out,const char* szName)
|
|
|
|
|
{
|
|
|
|
|
char szBuffer[1024];
|
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
|
|
|
|
if (!SkipSpaces(&filePtr))
|
2008-05-28 21:05:05 +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-05-28 21:05:05 +00:00
|
|
|
|
sprintf(szBuffer,"Unable to parse %s block: Unexpected EOL",szName);
|
2008-09-27 16:46:05 +00:00
|
|
|
|
LogWarning(szBuffer);
|
2008-05-28 21:05:05 +00:00
|
|
|
|
return false;
|
|
|
|
|
}
|
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
|
|
|
|
// there must be '"'
|
|
|
|
|
if ('\"' != *filePtr)
|
2008-05-28 21:05:05 +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-09-30 20:20:56 +00:00
|
|
|
|
sprintf(szBuffer,"Unable to parse %s block: Strings are expected "
|
2008-05-28 21:05:05 +00:00
|
|
|
|
"to be enclosed in double quotation marks",szName);
|
2008-09-27 16:46:05 +00:00
|
|
|
|
LogWarning(szBuffer);
|
2008-05-28 21:05:05 +00:00
|
|
|
|
return false;
|
|
|
|
|
}
|
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
|
|
|
|
++filePtr;
|
|
|
|
|
const char* sz = filePtr;
|
2008-05-28 21:05:05 +00:00
|
|
|
|
while (true)
|
|
|
|
|
{
|
|
|
|
|
if ('\"' == *sz)break;
|
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
|
|
|
|
else if ('\0' == *sz)
|
2008-08-08 23:58:40 +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
|
|
|
|
sprintf(szBuffer,"Unable to parse %s block: Strings are expected to "
|
|
|
|
|
"be enclosed in double quotation marks but EOF was reached before "
|
|
|
|
|
"a closing quotation mark was encountered",szName);
|
2008-09-27 16:46:05 +00:00
|
|
|
|
LogWarning(szBuffer);
|
2008-05-28 21:05:05 +00:00
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
sz++;
|
|
|
|
|
}
|
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
|
|
|
|
out = std::string(filePtr,(uintptr_t)sz-(uintptr_t)filePtr);
|
|
|
|
|
filePtr = sz+1;
|
2008-05-28 21:05:05 +00:00
|
|
|
|
return true;
|
|
|
|
|
}
|
2008-10-22 20:06:16 +00:00
|
|
|
|
|
2008-05-28 21:05:05 +00:00
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2008-10-31 19:32:00 +00:00
|
|
|
|
void Parser::ParseLV1ObjectBlock(ASE::BaseNode& node)
|
2008-10-22 20:06:16 +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
|
|
|
|
AI_ASE_PARSER_INIT();
|
2008-10-22 20:06:16 +00:00
|
|
|
|
while (true)
|
|
|
|
|
{
|
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
|
|
|
|
if ('*' == *filePtr)
|
2008-10-22 20:06:16 +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
|
|
|
|
++filePtr;
|
2008-10-31 19:32:00 +00:00
|
|
|
|
|
2008-10-22 20:06:16 +00:00
|
|
|
|
// first process common tokens such as node name and transform
|
2008-10-31 19:32:00 +00:00
|
|
|
|
// name of the mesh/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
|
|
|
|
if (TokenMatch(filePtr,"NODE_NAME" ,9))
|
2008-10-22 20:06:16 +00:00
|
|
|
|
{
|
2008-10-31 19:32:00 +00:00
|
|
|
|
if(!ParseString(node.mName,"*NODE_NAME"))
|
|
|
|
|
SkipToNextToken();
|
2008-10-22 20:06:16 +00:00
|
|
|
|
continue;
|
|
|
|
|
}
|
2008-10-31 19:32:00 +00:00
|
|
|
|
// name of the parent of 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
|
|
|
|
if (TokenMatch(filePtr,"NODE_PARENT" ,11) )
|
2008-10-22 20:06:16 +00:00
|
|
|
|
{
|
2008-10-31 19:32:00 +00:00
|
|
|
|
if(!ParseString(node.mParent,"*NODE_PARENT"))
|
|
|
|
|
SkipToNextToken();
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
// transformation matrix of 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
|
|
|
|
if (TokenMatch(filePtr,"NODE_TM" ,7))
|
2008-10-31 19:32:00 +00:00
|
|
|
|
{
|
|
|
|
|
ParseLV2NodeTransformBlock(node);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
// animation data of 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
|
|
|
|
if (TokenMatch(filePtr,"TM_ANIMATION" ,12))
|
2008-10-31 19:32:00 +00:00
|
|
|
|
{
|
|
|
|
|
ParseLV2AnimationBlock(node);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (node.mType == BaseNode::Light)
|
|
|
|
|
{
|
|
|
|
|
// light settings
|
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
|
|
|
|
if (TokenMatch(filePtr,"LIGHT_SETTINGS" ,14))
|
2008-10-22 20:06:16 +00:00
|
|
|
|
{
|
2008-10-31 19:32:00 +00:00
|
|
|
|
ParseLV2LightSettingsBlock((ASE::Light&)node);
|
|
|
|
|
continue;
|
2008-10-22 20:06:16 +00:00
|
|
|
|
}
|
2008-10-31 19:32:00 +00:00
|
|
|
|
// type of the light source
|
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
|
|
|
|
if (TokenMatch(filePtr,"LIGHT_TYPE" ,10))
|
2008-10-22 20:06:16 +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
|
|
|
|
if (!ASSIMP_strincmp("omni",filePtr,4))
|
2008-10-31 19:32:00 +00:00
|
|
|
|
{
|
|
|
|
|
((ASE::Light&)node).mLightType = ASE::Light::OMNI;
|
|
|
|
|
}
|
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
|
|
|
|
else if (!ASSIMP_strincmp("target",filePtr,6))
|
2008-10-31 19:32:00 +00:00
|
|
|
|
{
|
|
|
|
|
((ASE::Light&)node).mLightType = ASE::Light::TARGET;
|
|
|
|
|
}
|
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
|
|
|
|
else if (!ASSIMP_strincmp("free",filePtr,4))
|
2008-10-31 19:32:00 +00:00
|
|
|
|
{
|
|
|
|
|
((ASE::Light&)node).mLightType = ASE::Light::FREE;
|
|
|
|
|
}
|
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
|
|
|
|
else if (!ASSIMP_strincmp("directional",filePtr,11))
|
2008-10-31 19:32:00 +00:00
|
|
|
|
{
|
|
|
|
|
((ASE::Light&)node).mLightType = ASE::Light::DIRECTIONAL;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
LogWarning("Unknown kind of light source");
|
|
|
|
|
}
|
|
|
|
|
continue;
|
2008-10-22 20:06:16 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2008-10-31 19:32:00 +00:00
|
|
|
|
else if (node.mType == BaseNode::Camera)
|
2008-10-22 20:06:16 +00:00
|
|
|
|
{
|
2008-10-31 19:32:00 +00:00
|
|
|
|
// Camera settings
|
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
|
|
|
|
if (TokenMatch(filePtr,"CAMERA_SETTINGS" ,15))
|
2008-10-31 19:32:00 +00:00
|
|
|
|
{
|
|
|
|
|
ParseLV2CameraSettingsBlock((ASE::Camera&)node);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
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
|
|
|
|
else if (TokenMatch(filePtr,"CAMERA_TYPE" ,11))
|
|
|
|
|
{
|
|
|
|
|
if (!ASSIMP_strincmp("target",filePtr,6))
|
|
|
|
|
{
|
|
|
|
|
((ASE::Camera&)node).mCameraType = ASE::Camera::TARGET;
|
|
|
|
|
}
|
|
|
|
|
else if (!ASSIMP_strincmp("free",filePtr,4))
|
|
|
|
|
{
|
|
|
|
|
((ASE::Camera&)node).mCameraType = ASE::Camera::FREE;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
LogWarning("Unknown kind of camera");
|
|
|
|
|
}
|
|
|
|
|
continue;
|
|
|
|
|
}
|
2008-10-31 19:32:00 +00:00
|
|
|
|
}
|
|
|
|
|
else if (node.mType == BaseNode::Mesh)
|
|
|
|
|
{
|
|
|
|
|
// mesh data
|
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
|
|
|
|
// FIX: Older files use MESH_SOFTSKIN
|
|
|
|
|
if (TokenMatch(filePtr,"MESH" ,4) ||
|
|
|
|
|
TokenMatch(filePtr,"MESH_SOFTSKIN",13))
|
2008-10-31 19:32:00 +00:00
|
|
|
|
{
|
|
|
|
|
ParseLV2MeshBlock((ASE::Mesh&)node);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
// mesh material index
|
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
|
|
|
|
if (TokenMatch(filePtr,"MATERIAL_REF" ,12))
|
2008-10-31 19:32:00 +00:00
|
|
|
|
{
|
|
|
|
|
ParseLV4MeshLong(((ASE::Mesh&)node).iMaterialIndex);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
2008-10-22 20:06:16 +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
|
|
|
|
AI_ASE_HANDLE_TOP_LEVEL_SECTION();
|
2008-10-22 20:06:16 +00:00
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void Parser::ParseLV2CameraSettingsBlock(ASE::Camera& camera)
|
2008-05-09 17:24:28 +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
|
|
|
|
AI_ASE_PARSER_INIT();
|
2008-05-09 17:24:28 +00:00
|
|
|
|
while (true)
|
|
|
|
|
{
|
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
|
|
|
|
if ('*' == *filePtr)
|
2008-05-09 17:24:28 +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
|
|
|
|
++filePtr;
|
|
|
|
|
if (TokenMatch(filePtr,"CAMERA_NEAR" ,11))
|
2008-10-22 20:06:16 +00:00
|
|
|
|
{
|
|
|
|
|
ParseLV4MeshFloat(camera.mNear);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
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
|
|
|
|
if (TokenMatch(filePtr,"CAMERA_FAR" ,10))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-10-22 20:06:16 +00:00
|
|
|
|
ParseLV4MeshFloat(camera.mFar);
|
2008-05-30 23:01:25 +00:00
|
|
|
|
continue;
|
2008-05-28 21:05:05 +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
|
|
|
|
if (TokenMatch(filePtr,"CAMERA_FOV" ,10))
|
2008-10-22 20:06:16 +00:00
|
|
|
|
{
|
|
|
|
|
ParseLV4MeshFloat(camera.mFOV);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
}
|
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
|
|
|
|
AI_ASE_HANDLE_SECTION("2","CAMERA_SETTINGS");
|
2008-10-22 20:06:16 +00:00
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void Parser::ParseLV2LightSettingsBlock(ASE::Light& light)
|
|
|
|
|
{
|
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
|
|
|
|
AI_ASE_PARSER_INIT();
|
2008-10-22 20:06:16 +00:00
|
|
|
|
while (true)
|
|
|
|
|
{
|
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
|
|
|
|
if ('*' == *filePtr)
|
2008-10-22 20:06:16 +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
|
|
|
|
++filePtr;
|
|
|
|
|
if (TokenMatch(filePtr,"LIGHT_COLOR" ,11))
|
2008-05-28 21:05:05 +00:00
|
|
|
|
{
|
2008-10-22 20:06:16 +00:00
|
|
|
|
ParseLV4MeshFloatTriple(&light.mColor.r);
|
2008-05-30 23:01:25 +00:00
|
|
|
|
continue;
|
2008-05-09 17:24:28 +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
|
|
|
|
if (TokenMatch(filePtr,"LIGHT_INTENS" ,12))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-10-22 20:06:16 +00:00
|
|
|
|
ParseLV4MeshFloat(light.mIntensity);
|
|
|
|
|
continue;
|
2008-05-09 17:24:28 +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
|
|
|
|
if (TokenMatch(filePtr,"LIGHT_HOTSPOT" ,13))
|
2008-10-31 19:32:00 +00:00
|
|
|
|
{
|
|
|
|
|
ParseLV4MeshFloat(light.mAngle);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
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
|
|
|
|
if (TokenMatch(filePtr,"LIGHT_FALLOFF" ,13))
|
2008-10-31 19:32:00 +00:00
|
|
|
|
{
|
|
|
|
|
ParseLV4MeshFloat(light.mFalloff);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
2008-10-22 20:06:16 +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
|
|
|
|
AI_ASE_HANDLE_SECTION("2","LIGHT_SETTINGS");
|
2008-10-22 20:06:16 +00:00
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2008-10-31 19:32:00 +00:00
|
|
|
|
void Parser::ParseLV2AnimationBlock(ASE::BaseNode& mesh)
|
2008-10-22 20:06:16 +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
|
|
|
|
AI_ASE_PARSER_INIT();
|
2008-10-31 19:32:00 +00:00
|
|
|
|
|
|
|
|
|
ASE::Animation* anim = &mesh.mAnim;
|
2008-10-22 20:06:16 +00:00
|
|
|
|
while (true)
|
|
|
|
|
{
|
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
|
|
|
|
if ('*' == *filePtr)
|
2008-10-22 20:06:16 +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
|
|
|
|
++filePtr;
|
|
|
|
|
if (TokenMatch(filePtr,"NODE_NAME" ,9))
|
2008-10-31 19:32:00 +00:00
|
|
|
|
{
|
|
|
|
|
std::string temp;
|
|
|
|
|
if(!ParseString(temp,"*NODE_NAME"))
|
|
|
|
|
SkipToNextToken();
|
2008-10-22 20:06:16 +00:00
|
|
|
|
|
2008-10-31 19:32:00 +00:00
|
|
|
|
// If the name of the node contains .target it
|
|
|
|
|
// represents an animated camera or spot light
|
|
|
|
|
// target.
|
|
|
|
|
if (std::string::npos != temp.find(".Target"))
|
|
|
|
|
{
|
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
|
|
|
|
if ((mesh.mType != BaseNode::Camera || ((ASE::Camera&)mesh).mCameraType != ASE::Camera::TARGET) &&
|
|
|
|
|
( mesh.mType != BaseNode::Light || ((ASE::Light&)mesh).mLightType != ASE::Light::TARGET))
|
|
|
|
|
{
|
2008-10-31 19:32:00 +00:00
|
|
|
|
|
|
|
|
|
DefaultLogger::get()->error("ASE: Found target animation channel "
|
|
|
|
|
"but the node is neither a camera nor a spot light");
|
|
|
|
|
anim = NULL;
|
|
|
|
|
}
|
|
|
|
|
else anim = &mesh.mTargetAnim;
|
|
|
|
|
}
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// position keyframes
|
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
|
|
|
|
if (TokenMatch(filePtr,"CONTROL_POS_TRACK" ,17) ||
|
|
|
|
|
TokenMatch(filePtr,"CONTROL_POS_BEZIER" ,18) ||
|
|
|
|
|
TokenMatch(filePtr,"CONTROL_POS_TCB" ,15))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-10-31 19:32:00 +00:00
|
|
|
|
if (!anim)SkipSection();
|
|
|
|
|
else ParseLV3PosAnimationBlock(*anim);
|
2008-10-22 20:06:16 +00:00
|
|
|
|
continue;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
2008-10-31 19:32:00 +00:00
|
|
|
|
// scaling keyframes
|
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
|
|
|
|
if (TokenMatch(filePtr,"CONTROL_SCALE_TRACK" ,19) ||
|
|
|
|
|
TokenMatch(filePtr,"CONTROL_SCALE_BEZIER" ,20) ||
|
|
|
|
|
TokenMatch(filePtr,"CONTROL_SCALE_TCB" ,17))
|
2008-05-28 21:05:05 +00:00
|
|
|
|
{
|
2008-10-31 19:32:00 +00:00
|
|
|
|
if (!anim || anim == &mesh.mTargetAnim)
|
|
|
|
|
{
|
|
|
|
|
// Target animation channels may have no rotation channels
|
|
|
|
|
DefaultLogger::get()->error("ASE: Ignoring scaling channel in target animation");
|
|
|
|
|
SkipSection();
|
|
|
|
|
}
|
|
|
|
|
else ParseLV3ScaleAnimationBlock(*anim);
|
2008-10-22 20:06:16 +00:00
|
|
|
|
continue;
|
2008-05-28 21:05:05 +00:00
|
|
|
|
}
|
2008-10-31 19:32:00 +00:00
|
|
|
|
// rotation keyframes
|
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
|
|
|
|
if (TokenMatch(filePtr,"CONTROL_ROT_TRACK" ,17) ||
|
|
|
|
|
TokenMatch(filePtr,"CONTROL_ROT_BEZIER" ,18) ||
|
|
|
|
|
TokenMatch(filePtr,"CONTROL_ROT_TCB" ,15))
|
2008-07-18 20:29:46 +00:00
|
|
|
|
{
|
2008-10-31 19:32:00 +00:00
|
|
|
|
if (!anim || anim == &mesh.mTargetAnim)
|
|
|
|
|
{
|
|
|
|
|
// Target animation channels may have no rotation channels
|
|
|
|
|
DefaultLogger::get()->error("ASE: Ignoring rotation channel in target animation");
|
|
|
|
|
SkipSection();
|
|
|
|
|
}
|
|
|
|
|
else ParseLV3RotAnimationBlock(*anim);
|
2008-10-22 20:06:16 +00:00
|
|
|
|
continue;
|
2008-07-18 20:29:46 +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
|
|
|
|
AI_ASE_HANDLE_SECTION("2","TM_ANIMATION");
|
2008-07-18 20:29:46 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2008-10-31 19:32:00 +00:00
|
|
|
|
void Parser::ParseLV3ScaleAnimationBlock(ASE::Animation& anim)
|
2008-07-18 20:29:46 +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
|
|
|
|
AI_ASE_PARSER_INIT();
|
2008-10-31 19:32:00 +00:00
|
|
|
|
unsigned int iIndex;
|
|
|
|
|
|
2008-07-18 20:29:46 +00:00
|
|
|
|
while (true)
|
|
|
|
|
{
|
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
|
|
|
|
if ('*' == *filePtr)
|
2008-07-18 20:29:46 +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
|
|
|
|
++filePtr;
|
2008-10-31 19:32:00 +00:00
|
|
|
|
|
|
|
|
|
bool b = false;
|
|
|
|
|
|
|
|
|
|
// For the moment we're just reading the three floats -
|
|
|
|
|
// we ignore the <20>dditional information for bezier's and TCBs
|
|
|
|
|
|
|
|
|
|
// simple scaling keyframe
|
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
|
|
|
|
if (TokenMatch(filePtr,"CONTROL_SCALE_SAMPLE" ,20))
|
2008-07-18 20:29:46 +00:00
|
|
|
|
{
|
2008-10-31 19:32:00 +00:00
|
|
|
|
b = true;
|
|
|
|
|
anim.mScalingType = ASE::Animation::TRACK;
|
2008-07-18 20:29:46 +00:00
|
|
|
|
}
|
2008-10-31 19:32:00 +00:00
|
|
|
|
|
|
|
|
|
// Bezier scaling keyframe
|
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
|
|
|
|
if (TokenMatch(filePtr,"CONTROL_BEZIER_SCALE_KEY" ,24))
|
2008-07-18 20:29:46 +00:00
|
|
|
|
{
|
2008-10-31 19:32:00 +00:00
|
|
|
|
b = true;
|
|
|
|
|
anim.mScalingType = ASE::Animation::BEZIER;
|
|
|
|
|
}
|
|
|
|
|
// TCB scaling keyframe
|
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
|
|
|
|
if (TokenMatch(filePtr,"CONTROL_TCB_SCALE_KEY" ,21))
|
2008-10-31 19:32:00 +00:00
|
|
|
|
{
|
|
|
|
|
b = true;
|
|
|
|
|
anim.mScalingType = ASE::Animation::TCB;
|
|
|
|
|
}
|
|
|
|
|
if (b)
|
|
|
|
|
{
|
|
|
|
|
anim.akeyScaling.push_back(aiVectorKey());
|
|
|
|
|
aiVectorKey& key = anim.akeyScaling.back();
|
|
|
|
|
ParseLV4MeshFloatTriple(&key.mValue.x,iIndex);
|
|
|
|
|
key.mTime = (double)iIndex;
|
2008-07-18 20:29:46 +00:00
|
|
|
|
}
|
2008-05-09 17:24:28 +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
|
|
|
|
AI_ASE_HANDLE_SECTION("3","*CONTROL_POS_TRACK");
|
2008-07-18 20:29:46 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2008-10-31 19:32:00 +00:00
|
|
|
|
void Parser::ParseLV3PosAnimationBlock(ASE::Animation& anim)
|
2008-07-18 20:29:46 +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
|
|
|
|
AI_ASE_PARSER_INIT();
|
2008-10-31 19:32:00 +00:00
|
|
|
|
unsigned int iIndex;
|
2008-07-18 20:29:46 +00:00
|
|
|
|
while (true)
|
|
|
|
|
{
|
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
|
|
|
|
if ('*' == *filePtr)
|
2008-05-09 17:24:28 +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
|
|
|
|
++filePtr;
|
2008-10-31 19:32:00 +00:00
|
|
|
|
|
|
|
|
|
bool b = false;
|
|
|
|
|
|
|
|
|
|
// For the moment we're just reading the three floats -
|
|
|
|
|
// we ignore the <20>dditional information for bezier's and TCBs
|
|
|
|
|
|
|
|
|
|
// simple scaling keyframe
|
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
|
|
|
|
if (TokenMatch(filePtr,"CONTROL_POS_SAMPLE" ,18))
|
2008-07-18 20:29:46 +00:00
|
|
|
|
{
|
2008-10-31 19:32:00 +00:00
|
|
|
|
b = true;
|
|
|
|
|
anim.mPositionType = ASE::Animation::TRACK;
|
|
|
|
|
}
|
2008-07-18 20:29:46 +00:00
|
|
|
|
|
2008-10-31 19:32:00 +00:00
|
|
|
|
// Bezier scaling keyframe
|
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
|
|
|
|
if (TokenMatch(filePtr,"CONTROL_BEZIER_POS_KEY" ,22))
|
2008-10-31 19:32:00 +00:00
|
|
|
|
{
|
|
|
|
|
b = true;
|
|
|
|
|
anim.mPositionType = ASE::Animation::BEZIER;
|
|
|
|
|
}
|
|
|
|
|
// TCB scaling keyframe
|
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
|
|
|
|
if (TokenMatch(filePtr,"CONTROL_TCB_POS_KEY" ,19))
|
2008-10-31 19:32:00 +00:00
|
|
|
|
{
|
|
|
|
|
b = true;
|
|
|
|
|
anim.mPositionType = ASE::Animation::TCB;
|
|
|
|
|
}
|
|
|
|
|
if (b)
|
|
|
|
|
{
|
|
|
|
|
anim.akeyPositions.push_back(aiVectorKey());
|
|
|
|
|
aiVectorKey& key = anim.akeyPositions.back();
|
2008-09-27 16:46:05 +00:00
|
|
|
|
ParseLV4MeshFloatTriple(&key.mValue.x,iIndex);
|
2008-07-18 20:29:46 +00:00
|
|
|
|
key.mTime = (double)iIndex;
|
|
|
|
|
}
|
2008-05-09 17:24:28 +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
|
|
|
|
AI_ASE_HANDLE_SECTION("3","*CONTROL_POS_TRACK");
|
2008-07-18 20:29:46 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2008-10-31 19:32:00 +00:00
|
|
|
|
void Parser::ParseLV3RotAnimationBlock(ASE::Animation& anim)
|
2008-07-18 20:29:46 +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
|
|
|
|
AI_ASE_PARSER_INIT();
|
2008-10-31 19:32:00 +00:00
|
|
|
|
unsigned int iIndex;
|
2008-07-18 20:29:46 +00:00
|
|
|
|
while (true)
|
|
|
|
|
{
|
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
|
|
|
|
if ('*' == *filePtr)
|
2008-05-09 17:24:28 +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
|
|
|
|
++filePtr;
|
2008-10-31 19:32:00 +00:00
|
|
|
|
|
|
|
|
|
bool b = false;
|
|
|
|
|
|
|
|
|
|
// For the moment we're just reading the floats -
|
|
|
|
|
// we ignore the <20>dditional information for bezier's and TCBs
|
|
|
|
|
|
|
|
|
|
// simple scaling keyframe
|
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
|
|
|
|
if (TokenMatch(filePtr,"CONTROL_ROT_SAMPLE" ,18))
|
2008-07-18 20:29:46 +00:00
|
|
|
|
{
|
2008-10-31 19:32:00 +00:00
|
|
|
|
b = true;
|
|
|
|
|
anim.mRotationType = ASE::Animation::TRACK;
|
|
|
|
|
}
|
2008-07-18 20:29:46 +00:00
|
|
|
|
|
2008-10-31 19:32:00 +00:00
|
|
|
|
// Bezier scaling keyframe
|
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
|
|
|
|
if (TokenMatch(filePtr,"CONTROL_BEZIER_ROT_KEY" ,22))
|
2008-10-31 19:32:00 +00:00
|
|
|
|
{
|
|
|
|
|
b = true;
|
|
|
|
|
anim.mRotationType = ASE::Animation::BEZIER;
|
|
|
|
|
}
|
|
|
|
|
// TCB scaling keyframe
|
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
|
|
|
|
if (TokenMatch(filePtr,"CONTROL_TCB_ROT_KEY" ,19))
|
2008-10-31 19:32:00 +00:00
|
|
|
|
{
|
|
|
|
|
b = true;
|
|
|
|
|
anim.mRotationType = ASE::Animation::TCB;
|
|
|
|
|
}
|
|
|
|
|
if (b)
|
|
|
|
|
{
|
|
|
|
|
anim.akeyRotations.push_back(aiQuatKey());
|
|
|
|
|
aiQuatKey& key = anim.akeyRotations.back();
|
2008-07-18 20:29:46 +00:00
|
|
|
|
aiVector3D v;float f;
|
2008-09-27 16:46:05 +00:00
|
|
|
|
ParseLV4MeshFloatTriple(&v.x,iIndex);
|
|
|
|
|
ParseLV4MeshFloat(f);
|
2008-07-18 20:29:46 +00:00
|
|
|
|
key.mTime = (double)iIndex;
|
|
|
|
|
key.mValue = aiQuaternion(v,f);
|
|
|
|
|
}
|
2008-05-09 17:24:28 +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
|
|
|
|
AI_ASE_HANDLE_SECTION("3","*CONTROL_ROT_TRACK");
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2008-10-22 20:06:16 +00:00
|
|
|
|
void Parser::ParseLV2NodeTransformBlock(ASE::BaseNode& mesh)
|
2008-05-09 17:24:28 +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
|
|
|
|
AI_ASE_PARSER_INIT();
|
2008-10-31 19:32:00 +00:00
|
|
|
|
int mode = 0;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
while (true)
|
|
|
|
|
{
|
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
|
|
|
|
if ('*' == *filePtr)
|
2008-05-09 17:24:28 +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
|
|
|
|
++filePtr;
|
2008-10-31 19:32:00 +00:00
|
|
|
|
// name of 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
|
|
|
|
if (TokenMatch(filePtr,"NODE_NAME" ,9))
|
2008-07-18 20:29:46 +00:00
|
|
|
|
{
|
2008-10-31 19:32:00 +00:00
|
|
|
|
std::string temp;
|
|
|
|
|
if(!ParseString(temp,"*NODE_NAME"))
|
|
|
|
|
SkipToNextToken();
|
|
|
|
|
|
|
|
|
|
std::string::size_type s;
|
|
|
|
|
if (temp == mesh.mName)
|
|
|
|
|
{
|
|
|
|
|
mode = 1;
|
|
|
|
|
}
|
|
|
|
|
else if (std::string::npos != (s = temp.find(".Target")) &&
|
|
|
|
|
mesh.mName == temp.substr(0,s))
|
|
|
|
|
{
|
|
|
|
|
// This should be either a target light or a target camera
|
2010-02-06 23:52:41 +00:00
|
|
|
|
if ( (mesh.mType == BaseNode::Light && ((ASE::Light&)mesh) .mLightType == ASE::Light::TARGET) ||
|
|
|
|
|
(mesh.mType == BaseNode::Camera && ((ASE::Camera&)mesh).mCameraType == ASE::Camera::TARGET))
|
2008-10-31 19:32:00 +00:00
|
|
|
|
{
|
|
|
|
|
mode = 2;
|
|
|
|
|
}
|
|
|
|
|
else DefaultLogger::get()->error("ASE: Ignoring target transform, "
|
|
|
|
|
"this is no spot light or target camera");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
DefaultLogger::get()->error("ASE: Unknown node transformation: " + temp);
|
|
|
|
|
// mode = 0
|
|
|
|
|
}
|
2008-07-18 20:29:46 +00:00
|
|
|
|
continue;
|
|
|
|
|
}
|
2008-10-31 19:32:00 +00:00
|
|
|
|
if (mode)
|
2008-07-18 20:29:46 +00:00
|
|
|
|
{
|
2008-10-31 19:32:00 +00:00
|
|
|
|
// fourth row of the transformation matrix - and also the
|
|
|
|
|
// only information here that is interesting for targets
|
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
|
|
|
|
if (TokenMatch(filePtr,"TM_ROW3" ,7))
|
2008-10-31 19:32:00 +00:00
|
|
|
|
{
|
|
|
|
|
ParseLV4MeshFloatTriple((mode == 1 ? mesh.mTransform[3] : &mesh.mTargetPosition.x));
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
if (mode == 1)
|
|
|
|
|
{
|
|
|
|
|
// first row of the transformation matrix
|
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
|
|
|
|
if (TokenMatch(filePtr,"TM_ROW0" ,7))
|
2008-10-31 19:32:00 +00:00
|
|
|
|
{
|
|
|
|
|
ParseLV4MeshFloatTriple(mesh.mTransform[0]);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
// second row of the transformation matrix
|
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
|
|
|
|
if (TokenMatch(filePtr,"TM_ROW1" ,7))
|
2008-10-31 19:32:00 +00:00
|
|
|
|
{
|
|
|
|
|
ParseLV4MeshFloatTriple(mesh.mTransform[1]);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
// third row of the transformation matrix
|
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
|
|
|
|
if (TokenMatch(filePtr,"TM_ROW2" ,7))
|
2008-10-31 19:32:00 +00:00
|
|
|
|
{
|
|
|
|
|
ParseLV4MeshFloatTriple(mesh.mTransform[2]);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
// inherited position axes
|
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
|
|
|
|
if (TokenMatch(filePtr,"INHERIT_POS" ,11))
|
2008-10-31 19:32:00 +00:00
|
|
|
|
{
|
|
|
|
|
unsigned int aiVal[3];
|
|
|
|
|
ParseLV4MeshLongTriple(aiVal);
|
|
|
|
|
|
|
|
|
|
for (unsigned int i = 0; i < 3;++i)
|
|
|
|
|
mesh.inherit.abInheritPosition[i] = aiVal[i] != 0;
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
// inherited rotation axes
|
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
|
|
|
|
if (TokenMatch(filePtr,"INHERIT_ROT" ,11))
|
2008-10-31 19:32:00 +00:00
|
|
|
|
{
|
|
|
|
|
unsigned int aiVal[3];
|
|
|
|
|
ParseLV4MeshLongTriple(aiVal);
|
|
|
|
|
|
|
|
|
|
for (unsigned int i = 0; i < 3;++i)
|
|
|
|
|
mesh.inherit.abInheritRotation[i] = aiVal[i] != 0;
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
// inherited scaling axes
|
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
|
|
|
|
if (TokenMatch(filePtr,"INHERIT_SCL" ,11))
|
2008-10-31 19:32:00 +00:00
|
|
|
|
{
|
|
|
|
|
unsigned int aiVal[3];
|
|
|
|
|
ParseLV4MeshLongTriple(aiVal);
|
|
|
|
|
|
|
|
|
|
for (unsigned int i = 0; i < 3;++i)
|
|
|
|
|
mesh.inherit.abInheritScaling[i] = aiVal[i] != 0;
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
}
|
2008-07-18 20:29:46 +00:00
|
|
|
|
}
|
2008-05-09 17:24:28 +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
|
|
|
|
AI_ASE_HANDLE_SECTION("2","*NODE_TM");
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void Parser::ParseLV2MeshBlock(ASE::Mesh& mesh)
|
|
|
|
|
{
|
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
|
|
|
|
AI_ASE_PARSER_INIT();
|
|
|
|
|
|
2008-05-09 17:24:28 +00:00
|
|
|
|
unsigned int iNumVertices = 0;
|
|
|
|
|
unsigned int iNumFaces = 0;
|
|
|
|
|
unsigned int iNumTVertices = 0;
|
|
|
|
|
unsigned int iNumTFaces = 0;
|
|
|
|
|
unsigned int iNumCVertices = 0;
|
|
|
|
|
unsigned int iNumCFaces = 0;
|
|
|
|
|
while (true)
|
|
|
|
|
{
|
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
|
|
|
|
if ('*' == *filePtr)
|
2008-05-09 17:24:28 +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
|
|
|
|
++filePtr;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
// Number of vertices in the mesh
|
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
|
|
|
|
if (TokenMatch(filePtr,"MESH_NUMVERTEX" ,14))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-10-22 20:06:16 +00:00
|
|
|
|
ParseLV4MeshLong(iNumVertices);
|
|
|
|
|
continue;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
// Number of texture coordinates in the mesh
|
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
|
|
|
|
if (TokenMatch(filePtr,"MESH_NUMTVERTEX" ,15))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-10-22 20:06:16 +00:00
|
|
|
|
ParseLV4MeshLong(iNumTVertices);
|
|
|
|
|
continue;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
// Number of vertex colors in the mesh
|
2008-11-16 21:56:45 +00:00
|
|
|
|
if (TokenMatch(filePtr,"MESH_NUMCVERTEX" ,15))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-10-22 20:06:16 +00:00
|
|
|
|
ParseLV4MeshLong(iNumCVertices);
|
|
|
|
|
continue;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
// Number of regular faces in the mesh
|
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
|
|
|
|
if (TokenMatch(filePtr,"MESH_NUMFACES" ,13))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-10-22 20:06:16 +00:00
|
|
|
|
ParseLV4MeshLong(iNumFaces);
|
|
|
|
|
continue;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
// Number of UVWed faces in the mesh
|
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
|
|
|
|
if (TokenMatch(filePtr,"MESH_NUMTVFACES" ,15))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-10-22 20:06:16 +00:00
|
|
|
|
ParseLV4MeshLong(iNumTFaces);
|
|
|
|
|
continue;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
// Number of colored faces in the mesh
|
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
|
|
|
|
if (TokenMatch(filePtr,"MESH_NUMCVFACES" ,15))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-10-22 20:06:16 +00:00
|
|
|
|
ParseLV4MeshLong(iNumCFaces);
|
|
|
|
|
continue;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
// mesh vertex list block
|
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
|
|
|
|
if (TokenMatch(filePtr,"MESH_VERTEX_LIST" ,16))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-09-27 16:46:05 +00:00
|
|
|
|
ParseLV3MeshVertexListBlock(iNumVertices,mesh);
|
2008-05-30 23:01:25 +00:00
|
|
|
|
continue;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
// mesh face list block
|
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
|
|
|
|
if (TokenMatch(filePtr,"MESH_FACE_LIST" ,14))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-10-22 20:06:16 +00:00
|
|
|
|
ParseLV3MeshFaceListBlock(iNumFaces,mesh);
|
|
|
|
|
continue;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
// mesh texture vertex list block
|
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
|
|
|
|
if (TokenMatch(filePtr,"MESH_TVERTLIST" ,14))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-10-22 20:06:16 +00:00
|
|
|
|
ParseLV3MeshTListBlock(iNumTVertices,mesh);
|
|
|
|
|
continue;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
// mesh texture face block
|
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
|
|
|
|
if (TokenMatch(filePtr,"MESH_TFACELIST" ,14))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-10-22 20:06:16 +00:00
|
|
|
|
ParseLV3MeshTFaceListBlock(iNumTFaces,mesh);
|
|
|
|
|
continue;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
// mesh color vertex list block
|
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
|
|
|
|
if (TokenMatch(filePtr,"MESH_CVERTLIST" ,14))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-10-22 20:06:16 +00:00
|
|
|
|
ParseLV3MeshCListBlock(iNumCVertices,mesh);
|
|
|
|
|
continue;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
// mesh color face block
|
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
|
|
|
|
if (TokenMatch(filePtr,"MESH_CFACELIST" ,14))
|
2008-09-27 16:46:05 +00:00
|
|
|
|
{
|
2008-10-22 20:06:16 +00:00
|
|
|
|
ParseLV3MeshCFaceListBlock(iNumCFaces,mesh);
|
|
|
|
|
continue;
|
2008-09-27 16:46:05 +00:00
|
|
|
|
}
|
|
|
|
|
// mesh normals
|
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
|
|
|
|
if (TokenMatch(filePtr,"MESH_NORMALS" ,12))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-10-22 20:06:16 +00:00
|
|
|
|
ParseLV3MeshNormalListBlock(mesh);
|
|
|
|
|
continue;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
// another mesh UV channel ...
|
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
|
|
|
|
if (TokenMatch(filePtr,"MESH_MAPPINGCHANNEL" ,19))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
unsigned int iIndex = 0;
|
2008-09-27 16:46:05 +00:00
|
|
|
|
ParseLV4MeshLong(iIndex);
|
2008-05-09 17:24:28 +00:00
|
|
|
|
|
|
|
|
|
if (iIndex < 2)
|
|
|
|
|
{
|
2008-09-27 16:46:05 +00:00
|
|
|
|
LogWarning("Mapping channel has an invalid index. Skipping UV channel");
|
2008-05-09 17:24:28 +00:00
|
|
|
|
// skip it ...
|
2008-09-27 16:46:05 +00:00
|
|
|
|
SkipSection();
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
if (iIndex > AI_MAX_NUMBER_OF_TEXTURECOORDS)
|
|
|
|
|
{
|
2008-09-27 16:46:05 +00:00
|
|
|
|
LogWarning("Too many UV channels specified. Skipping channel ..");
|
2008-05-09 17:24:28 +00:00
|
|
|
|
// skip it ...
|
2008-09-27 16:46:05 +00:00
|
|
|
|
SkipSection();
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
// parse the mapping channel
|
2008-09-27 16:46:05 +00:00
|
|
|
|
ParseLV3MappingChannel(iIndex-1,mesh);
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
2008-05-30 23:01:25 +00:00
|
|
|
|
continue;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
2008-05-28 21:05:05 +00:00
|
|
|
|
// mesh animation keyframe. Not supported
|
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
|
|
|
|
if (TokenMatch(filePtr,"MESH_ANIMATION" ,14))
|
2008-05-28 21:05:05 +00:00
|
|
|
|
{
|
|
|
|
|
|
2008-09-27 16:46:05 +00:00
|
|
|
|
LogWarning("Found *MESH_ANIMATION element in ASE/ASK file. "
|
2008-05-28 21:05:05 +00:00
|
|
|
|
"Keyframe animation is not supported by Assimp, this element "
|
|
|
|
|
"will be ignored");
|
2008-09-27 16:46:05 +00:00
|
|
|
|
//SkipSection();
|
2008-05-30 23:01:25 +00:00
|
|
|
|
continue;
|
2008-05-28 21:05:05 +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
|
|
|
|
if (TokenMatch(filePtr,"MESH_WEIGHTS" ,12))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-09-27 16:46:05 +00:00
|
|
|
|
ParseLV3MeshWeightsBlock(mesh);continue;
|
2008-05-09 17:24:28 +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
|
|
|
|
AI_ASE_HANDLE_SECTION("2","*MESH");
|
2008-05-28 21:05:05 +00:00
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void Parser::ParseLV3MeshWeightsBlock(ASE::Mesh& mesh)
|
|
|
|
|
{
|
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
|
|
|
|
AI_ASE_PARSER_INIT();
|
|
|
|
|
|
|
|
|
|
unsigned int iNumVertices = 0, iNumBones = 0;
|
2008-05-28 21:05:05 +00:00
|
|
|
|
while (true)
|
|
|
|
|
{
|
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
|
|
|
|
if ('*' == *filePtr)
|
2008-05-28 21:05:05 +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
|
|
|
|
++filePtr;
|
2008-09-30 20:20:56 +00:00
|
|
|
|
|
2008-05-28 21:05:05 +00:00
|
|
|
|
// Number of bone vertices ...
|
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
|
|
|
|
if (TokenMatch(filePtr,"MESH_NUMVERTEX" ,14))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-10-22 20:06:16 +00:00
|
|
|
|
ParseLV4MeshLong(iNumVertices);
|
|
|
|
|
continue;
|
2008-05-28 21:05:05 +00:00
|
|
|
|
}
|
|
|
|
|
// Number of bones
|
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
|
|
|
|
if (TokenMatch(filePtr,"MESH_NUMBONE" ,11))
|
2008-05-28 21:05:05 +00:00
|
|
|
|
{
|
2008-10-22 20:06:16 +00:00
|
|
|
|
ParseLV4MeshLong(iNumBones);
|
|
|
|
|
continue;
|
2008-05-28 21:05:05 +00:00
|
|
|
|
}
|
|
|
|
|
// parse the list of bones
|
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
|
|
|
|
if (TokenMatch(filePtr,"MESH_BONE_LIST" ,14))
|
2008-05-28 21:05:05 +00:00
|
|
|
|
{
|
2008-10-22 20:06:16 +00:00
|
|
|
|
ParseLV4MeshBones(iNumBones,mesh);
|
|
|
|
|
continue;
|
2008-05-28 21:05:05 +00:00
|
|
|
|
}
|
|
|
|
|
// parse the list of bones vertices
|
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
|
|
|
|
if (TokenMatch(filePtr,"MESH_BONE_VERTEX_LIST" ,21) )
|
2008-05-28 21:05:05 +00:00
|
|
|
|
{
|
2008-09-27 16:46:05 +00:00
|
|
|
|
ParseLV4MeshBonesVertices(iNumVertices,mesh);
|
2008-05-30 23:01:25 +00:00
|
|
|
|
continue;
|
2008-05-09 17:24:28 +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
|
|
|
|
AI_ASE_HANDLE_SECTION("3","*MESH_WEIGHTS");
|
2008-05-28 21:05:05 +00:00
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void Parser::ParseLV4MeshBones(unsigned int iNumBones,ASE::Mesh& mesh)
|
|
|
|
|
{
|
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
|
|
|
|
AI_ASE_PARSER_INIT();
|
2008-05-28 21:05:05 +00:00
|
|
|
|
mesh.mBones.resize(iNumBones);
|
|
|
|
|
while (true)
|
|
|
|
|
{
|
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
|
|
|
|
if ('*' == *filePtr)
|
2008-05-28 21:05:05 +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
|
|
|
|
++filePtr;
|
2008-09-30 20:20:56 +00:00
|
|
|
|
|
2008-05-28 21:05:05 +00:00
|
|
|
|
// Mesh bone with name ...
|
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
|
|
|
|
if (TokenMatch(filePtr,"MESH_BONE_NAME" ,16))
|
2008-05-28 21:05:05 +00:00
|
|
|
|
{
|
|
|
|
|
// parse an index ...
|
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
|
|
|
|
if(SkipSpaces(&filePtr))
|
2008-05-28 21:05:05 +00:00
|
|
|
|
{
|
2011-03-23 14:26:19 +00:00
|
|
|
|
unsigned int iIndex = strtoul10(filePtr,&filePtr);
|
2008-05-28 21:05:05 +00:00
|
|
|
|
if (iIndex >= iNumBones)
|
|
|
|
|
{
|
2008-09-30 20:20:56 +00:00
|
|
|
|
LogWarning("Bone index is out of bounds");
|
2013-06-12 13:01:05 +00:00
|
|
|
|
continue;
|
2008-05-28 21:05:05 +00:00
|
|
|
|
}
|
2008-09-27 16:46:05 +00:00
|
|
|
|
if (!ParseString(mesh.mBones[iIndex].mName,"*MESH_BONE_NAME"))
|
|
|
|
|
SkipToNextToken();
|
2008-05-30 23:01:25 +00:00
|
|
|
|
continue;
|
2008-05-28 21:05:05 +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
|
|
|
|
AI_ASE_HANDLE_SECTION("3","*MESH_BONE_LIST");
|
2008-05-28 21:05:05 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void Parser::ParseLV4MeshBonesVertices(unsigned int iNumVertices,ASE::Mesh& mesh)
|
|
|
|
|
{
|
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
|
|
|
|
AI_ASE_PARSER_INIT();
|
2008-05-28 21:05:05 +00:00
|
|
|
|
mesh.mBoneVertices.resize(iNumVertices);
|
|
|
|
|
while (true)
|
|
|
|
|
{
|
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
|
|
|
|
if ('*' == *filePtr)
|
2008-05-28 21:05:05 +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
|
|
|
|
++filePtr;
|
2008-09-30 20:20:56 +00:00
|
|
|
|
|
2008-05-28 21:05:05 +00:00
|
|
|
|
// Mesh bone vertex
|
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
|
|
|
|
if (TokenMatch(filePtr,"MESH_BONE_VERTEX" ,16))
|
2008-05-28 21:05:05 +00:00
|
|
|
|
{
|
|
|
|
|
// read the vertex index
|
2011-03-23 14:26:19 +00:00
|
|
|
|
unsigned int iIndex = strtoul10(filePtr,&filePtr);
|
2008-05-28 21:05:05 +00:00
|
|
|
|
if (iIndex >= mesh.mPositions.size())
|
|
|
|
|
{
|
2008-06-01 12:46:17 +00:00
|
|
|
|
iIndex = (unsigned int)mesh.mPositions.size()-1;
|
2008-09-27 16:46:05 +00:00
|
|
|
|
LogWarning("Bone vertex index is out of bounds. Using the largest valid "
|
2008-05-28 21:05:05 +00:00
|
|
|
|
"bone vertex index instead");
|
|
|
|
|
}
|
|
|
|
|
|
2008-09-30 20:20:56 +00:00
|
|
|
|
// --- ignored
|
2008-05-28 21:05:05 +00:00
|
|
|
|
float afVert[3];
|
2008-09-27 16:46:05 +00:00
|
|
|
|
ParseLV4MeshFloatTriple(afVert);
|
2008-05-28 21:05:05 +00:00
|
|
|
|
|
|
|
|
|
std::pair<int,float> pairOut;
|
|
|
|
|
while (true)
|
|
|
|
|
{
|
|
|
|
|
// first parse the bone index ...
|
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
|
|
|
|
if (!SkipSpaces(&filePtr))break;
|
2011-03-23 14:26:19 +00:00
|
|
|
|
pairOut.first = strtoul10(filePtr,&filePtr);
|
2008-05-28 21:05:05 +00:00
|
|
|
|
|
|
|
|
|
// then parse the vertex weight
|
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
|
|
|
|
if (!SkipSpaces(&filePtr))break;
|
2012-01-31 16:18:32 +00:00
|
|
|
|
filePtr = fast_atoreal_move<float>(filePtr,pairOut.second);
|
2008-05-28 21:05:05 +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
|
|
|
|
// -1 marks unused entries
|
2008-05-28 21:05:05 +00:00
|
|
|
|
if (-1 != pairOut.first)
|
|
|
|
|
{
|
|
|
|
|
mesh.mBoneVertices[iIndex].mBoneWeights.push_back(pairOut);
|
|
|
|
|
}
|
|
|
|
|
}
|
2008-05-30 23:01:25 +00:00
|
|
|
|
continue;
|
2008-05-28 21:05:05 +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
|
|
|
|
AI_ASE_HANDLE_SECTION("4","*MESH_BONE_VERTEX");
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void Parser::ParseLV3MeshVertexListBlock(
|
|
|
|
|
unsigned int iNumVertices, ASE::Mesh& mesh)
|
|
|
|
|
{
|
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
|
|
|
|
AI_ASE_PARSER_INIT();
|
|
|
|
|
|
2008-05-09 17:24:28 +00:00
|
|
|
|
// allocate enough storage in the array
|
|
|
|
|
mesh.mPositions.resize(iNumVertices);
|
|
|
|
|
while (true)
|
|
|
|
|
{
|
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
|
|
|
|
if ('*' == *filePtr)
|
2008-05-09 17:24:28 +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
|
|
|
|
++filePtr;
|
2008-09-30 20:20:56 +00:00
|
|
|
|
|
2008-05-09 17:24:28 +00:00
|
|
|
|
// Vertex entry
|
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
|
|
|
|
if (TokenMatch(filePtr,"MESH_VERTEX" ,11))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-10-22 20:06:16 +00:00
|
|
|
|
|
2008-05-09 17:24:28 +00:00
|
|
|
|
aiVector3D vTemp;
|
|
|
|
|
unsigned int iIndex;
|
2008-09-27 16:46:05 +00:00
|
|
|
|
ParseLV4MeshFloatTriple(&vTemp.x,iIndex);
|
2008-05-09 17:24:28 +00:00
|
|
|
|
|
|
|
|
|
if (iIndex >= iNumVertices)
|
|
|
|
|
{
|
2008-09-30 20:20:56 +00:00
|
|
|
|
LogWarning("Invalid vertex index. It will be ignored");
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
else mesh.mPositions[iIndex] = vTemp;
|
2008-05-30 23:01:25 +00:00
|
|
|
|
continue;
|
2008-05-09 17:24:28 +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
|
|
|
|
AI_ASE_HANDLE_SECTION("3","*MESH_VERTEX_LIST");
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void Parser::ParseLV3MeshFaceListBlock(unsigned int iNumFaces, ASE::Mesh& mesh)
|
|
|
|
|
{
|
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
|
|
|
|
AI_ASE_PARSER_INIT();
|
|
|
|
|
|
2008-05-09 17:24:28 +00:00
|
|
|
|
// allocate enough storage in the face array
|
|
|
|
|
mesh.mFaces.resize(iNumFaces);
|
|
|
|
|
while (true)
|
|
|
|
|
{
|
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
|
|
|
|
if ('*' == *filePtr)
|
2008-05-09 17:24:28 +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
|
|
|
|
++filePtr;
|
2008-09-30 20:20:56 +00:00
|
|
|
|
|
2008-05-09 17:24:28 +00:00
|
|
|
|
// Face entry
|
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
|
|
|
|
if (TokenMatch(filePtr,"MESH_FACE" ,9))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
ASE::Face mFace;
|
2008-09-27 16:46:05 +00:00
|
|
|
|
ParseLV4MeshFace(mFace);
|
2008-05-09 17:24:28 +00:00
|
|
|
|
|
|
|
|
|
if (mFace.iFace >= iNumFaces)
|
|
|
|
|
{
|
2008-09-27 16:46:05 +00:00
|
|
|
|
LogWarning("Face has an invalid index. It will be ignored");
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
else mesh.mFaces[mFace.iFace] = mFace;
|
2008-05-30 23:01:25 +00:00
|
|
|
|
continue;
|
2008-05-09 17:24:28 +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
|
|
|
|
AI_ASE_HANDLE_SECTION("3","*MESH_FACE_LIST");
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void Parser::ParseLV3MeshTListBlock(unsigned int iNumVertices,
|
|
|
|
|
ASE::Mesh& mesh, unsigned int iChannel)
|
|
|
|
|
{
|
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
|
|
|
|
AI_ASE_PARSER_INIT();
|
|
|
|
|
|
2008-05-09 17:24:28 +00:00
|
|
|
|
// allocate enough storage in the array
|
|
|
|
|
mesh.amTexCoords[iChannel].resize(iNumVertices);
|
|
|
|
|
while (true)
|
|
|
|
|
{
|
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
|
|
|
|
if ('*' == *filePtr)
|
2008-05-09 17:24:28 +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
|
|
|
|
++filePtr;
|
2008-09-30 20:20:56 +00:00
|
|
|
|
|
2008-05-09 17:24:28 +00:00
|
|
|
|
// Vertex entry
|
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
|
|
|
|
if (TokenMatch(filePtr,"MESH_TVERT" ,10))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
|
|
|
|
aiVector3D vTemp;
|
|
|
|
|
unsigned int iIndex;
|
2008-09-27 16:46:05 +00:00
|
|
|
|
ParseLV4MeshFloatTriple(&vTemp.x,iIndex);
|
2008-05-09 17:24:28 +00:00
|
|
|
|
|
|
|
|
|
if (iIndex >= iNumVertices)
|
|
|
|
|
{
|
2008-09-27 16:46:05 +00:00
|
|
|
|
LogWarning("Tvertex has an invalid index. It will be ignored");
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
else mesh.amTexCoords[iChannel][iIndex] = vTemp;
|
|
|
|
|
|
|
|
|
|
if (0.0f != vTemp.z)
|
|
|
|
|
{
|
|
|
|
|
// we need 3 coordinate channels
|
|
|
|
|
mesh.mNumUVComponents[iChannel] = 3;
|
|
|
|
|
}
|
2008-05-30 23:01:25 +00:00
|
|
|
|
continue;
|
2008-05-09 17:24:28 +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
|
|
|
|
AI_ASE_HANDLE_SECTION("3","*MESH_TVERT_LIST");
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void Parser::ParseLV3MeshTFaceListBlock(unsigned int iNumFaces,
|
|
|
|
|
ASE::Mesh& mesh, unsigned int iChannel)
|
|
|
|
|
{
|
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
|
|
|
|
AI_ASE_PARSER_INIT();
|
2008-05-09 17:24:28 +00:00
|
|
|
|
while (true)
|
|
|
|
|
{
|
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
|
|
|
|
if ('*' == *filePtr)
|
2008-05-09 17:24:28 +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
|
|
|
|
++filePtr;
|
2008-09-30 20:20:56 +00:00
|
|
|
|
|
2008-05-09 17:24:28 +00:00
|
|
|
|
// Face entry
|
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
|
|
|
|
if (TokenMatch(filePtr,"MESH_TFACE" ,10))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
|
|
|
|
unsigned int aiValues[3];
|
|
|
|
|
unsigned int iIndex = 0;
|
|
|
|
|
|
2008-09-27 16:46:05 +00:00
|
|
|
|
ParseLV4MeshLongTriple(aiValues,iIndex);
|
2008-05-09 17:24:28 +00:00
|
|
|
|
if (iIndex >= iNumFaces || iIndex >= mesh.mFaces.size())
|
|
|
|
|
{
|
2008-09-27 16:46:05 +00:00
|
|
|
|
LogWarning("UV-Face has an invalid index. It will be ignored");
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
// copy UV indices
|
|
|
|
|
mesh.mFaces[iIndex].amUVIndices[iChannel][0] = aiValues[0];
|
|
|
|
|
mesh.mFaces[iIndex].amUVIndices[iChannel][1] = aiValues[1];
|
|
|
|
|
mesh.mFaces[iIndex].amUVIndices[iChannel][2] = aiValues[2];
|
|
|
|
|
}
|
2008-05-30 23:01:25 +00:00
|
|
|
|
continue;
|
2008-05-09 17:24:28 +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
|
|
|
|
AI_ASE_HANDLE_SECTION("3","*MESH_TFACE_LIST");
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void Parser::ParseLV3MappingChannel(unsigned int iChannel, ASE::Mesh& mesh)
|
|
|
|
|
{
|
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
|
|
|
|
AI_ASE_PARSER_INIT();
|
|
|
|
|
|
2008-05-09 17:24:28 +00:00
|
|
|
|
unsigned int iNumTVertices = 0;
|
|
|
|
|
unsigned int iNumTFaces = 0;
|
|
|
|
|
while (true)
|
|
|
|
|
{
|
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
|
|
|
|
if ('*' == *filePtr)
|
2008-05-09 17:24:28 +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
|
|
|
|
++filePtr;
|
2008-09-30 20:20:56 +00:00
|
|
|
|
|
2008-05-09 17:24:28 +00:00
|
|
|
|
// Number of texture coordinates in the mesh
|
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
|
|
|
|
if (TokenMatch(filePtr,"MESH_NUMTVERTEX" ,15))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-10-22 20:06:16 +00:00
|
|
|
|
ParseLV4MeshLong(iNumTVertices);
|
|
|
|
|
continue;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
// Number of UVWed faces in the mesh
|
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
|
|
|
|
if (TokenMatch(filePtr,"MESH_NUMTVFACES" ,15))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-10-22 20:06:16 +00:00
|
|
|
|
ParseLV4MeshLong(iNumTFaces);
|
|
|
|
|
continue;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
// mesh texture vertex list block
|
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
|
|
|
|
if (TokenMatch(filePtr,"MESH_TVERTLIST" ,14))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-09-27 16:46:05 +00:00
|
|
|
|
ParseLV3MeshTListBlock(iNumTVertices,mesh,iChannel);
|
2008-05-30 23:01:25 +00:00
|
|
|
|
continue;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
// mesh texture face block
|
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
|
|
|
|
if (TokenMatch(filePtr,"MESH_TFACELIST" ,14))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-09-27 16:46:05 +00:00
|
|
|
|
ParseLV3MeshTFaceListBlock(iNumTFaces,mesh, iChannel);
|
2008-05-30 23:01:25 +00:00
|
|
|
|
continue;
|
2008-05-09 17:24:28 +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
|
|
|
|
AI_ASE_HANDLE_SECTION("3","*MESH_MAPPING_CHANNEL");
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void Parser::ParseLV3MeshCListBlock(unsigned int iNumVertices, ASE::Mesh& mesh)
|
|
|
|
|
{
|
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
|
|
|
|
AI_ASE_PARSER_INIT();
|
|
|
|
|
|
2008-05-09 17:24:28 +00:00
|
|
|
|
// allocate enough storage in the array
|
|
|
|
|
mesh.mVertexColors.resize(iNumVertices);
|
|
|
|
|
while (true)
|
|
|
|
|
{
|
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
|
|
|
|
if ('*' == *filePtr)
|
2008-05-09 17:24:28 +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
|
|
|
|
++filePtr;
|
2008-09-30 20:20:56 +00:00
|
|
|
|
|
2008-05-09 17:24:28 +00:00
|
|
|
|
// Vertex entry
|
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
|
|
|
|
if (TokenMatch(filePtr,"MESH_VERTCOL" ,12))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
|
|
|
|
aiColor4D vTemp;
|
|
|
|
|
vTemp.a = 1.0f;
|
|
|
|
|
unsigned int iIndex;
|
2008-09-27 16:46:05 +00:00
|
|
|
|
ParseLV4MeshFloatTriple(&vTemp.r,iIndex);
|
2008-05-09 17:24:28 +00:00
|
|
|
|
|
|
|
|
|
if (iIndex >= iNumVertices)
|
|
|
|
|
{
|
2008-09-27 16:46:05 +00:00
|
|
|
|
LogWarning("Vertex color has an invalid index. It will be ignored");
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
else mesh.mVertexColors[iIndex] = vTemp;
|
2008-05-30 23:01:25 +00:00
|
|
|
|
continue;
|
2008-05-09 17:24:28 +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
|
|
|
|
AI_ASE_HANDLE_SECTION("3","*MESH_CVERTEX_LIST");
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void Parser::ParseLV3MeshCFaceListBlock(unsigned int iNumFaces, ASE::Mesh& mesh)
|
|
|
|
|
{
|
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
|
|
|
|
AI_ASE_PARSER_INIT();
|
2008-05-09 17:24:28 +00:00
|
|
|
|
while (true)
|
|
|
|
|
{
|
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
|
|
|
|
if ('*' == *filePtr)
|
2008-05-09 17:24:28 +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
|
|
|
|
++filePtr;
|
2008-09-30 20:20:56 +00:00
|
|
|
|
|
2008-05-09 17:24:28 +00:00
|
|
|
|
// Face entry
|
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
|
|
|
|
if (TokenMatch(filePtr,"MESH_CFACE" ,11))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
|
|
|
|
unsigned int aiValues[3];
|
|
|
|
|
unsigned int iIndex = 0;
|
|
|
|
|
|
2008-09-27 16:46:05 +00:00
|
|
|
|
ParseLV4MeshLongTriple(aiValues,iIndex);
|
2008-05-09 17:24:28 +00:00
|
|
|
|
if (iIndex >= iNumFaces || iIndex >= mesh.mFaces.size())
|
|
|
|
|
{
|
2008-09-27 16:46:05 +00:00
|
|
|
|
LogWarning("UV-Face has an invalid index. It will be ignored");
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
// copy color indices
|
|
|
|
|
mesh.mFaces[iIndex].mColorIndices[0] = aiValues[0];
|
|
|
|
|
mesh.mFaces[iIndex].mColorIndices[1] = aiValues[1];
|
|
|
|
|
mesh.mFaces[iIndex].mColorIndices[2] = aiValues[2];
|
|
|
|
|
}
|
2008-05-30 23:01:25 +00:00
|
|
|
|
continue;
|
2008-05-09 17:24:28 +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
|
|
|
|
AI_ASE_HANDLE_SECTION("3","*MESH_CFACE_LIST");
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void Parser::ParseLV3MeshNormalListBlock(ASE::Mesh& sMesh)
|
|
|
|
|
{
|
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
|
|
|
|
AI_ASE_PARSER_INIT();
|
|
|
|
|
|
2008-11-16 21:56:45 +00:00
|
|
|
|
// Allocate enough storage for the normals
|
2008-10-31 19:32:00 +00:00
|
|
|
|
sMesh.mNormals.resize(sMesh.mFaces.size()*3,aiVector3D( 0.f, 0.f, 0.f ));
|
2011-04-22 21:29:18 +00:00
|
|
|
|
unsigned int index, faceIdx = UINT_MAX;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
|
2009-03-15 00:40:30 +00:00
|
|
|
|
// FIXME: rewrite this and find out how to interpret the normals
|
|
|
|
|
// correctly. This is crap.
|
|
|
|
|
|
2008-11-16 21:56:45 +00:00
|
|
|
|
// Smooth the vertex and face normals together. The result
|
|
|
|
|
// will be edgy then, but otherwise everything would be soft ...
|
2009-03-15 00:40:30 +00:00
|
|
|
|
while (true) {
|
|
|
|
|
if ('*' == *filePtr) {
|
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
|
|
|
|
++filePtr;
|
2011-04-22 21:29:18 +00:00
|
|
|
|
if (faceIdx != UINT_MAX && TokenMatch(filePtr,"MESH_VERTEXNORMAL",17)) {
|
2008-05-09 17:24:28 +00:00
|
|
|
|
aiVector3D vNormal;
|
2008-11-16 21:56:45 +00:00
|
|
|
|
ParseLV4MeshFloatTriple(&vNormal.x,index);
|
2009-03-15 00:40:30 +00:00
|
|
|
|
if (faceIdx >= sMesh.mFaces.size())
|
|
|
|
|
continue;
|
|
|
|
|
|
2008-11-16 21:56:45 +00:00
|
|
|
|
// Make sure we assign it to the correct face
|
|
|
|
|
const ASE::Face& face = sMesh.mFaces[faceIdx];
|
|
|
|
|
if (index == face.mIndices[0])
|
|
|
|
|
index = 0;
|
|
|
|
|
else if (index == face.mIndices[1])
|
|
|
|
|
index = 1;
|
|
|
|
|
else if (index == face.mIndices[2])
|
|
|
|
|
index = 2;
|
2009-03-15 00:40:30 +00:00
|
|
|
|
else {
|
2008-11-16 21:56:45 +00:00
|
|
|
|
DefaultLogger::get()->error("ASE: Invalid vertex index in MESH_VERTEXNORMAL section");
|
2008-09-27 16:46:05 +00:00
|
|
|
|
continue;
|
2008-05-09 17:24:28 +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
|
|
|
|
// We'll renormalize later
|
2008-11-16 21:56:45 +00:00
|
|
|
|
sMesh.mNormals[faceIdx*3+index] += vNormal;
|
2008-09-27 16:46:05 +00:00
|
|
|
|
continue;
|
|
|
|
|
}
|
2009-03-15 00:40:30 +00:00
|
|
|
|
if (TokenMatch(filePtr,"MESH_FACENORMAL",15)) {
|
2008-09-27 16:46:05 +00:00
|
|
|
|
aiVector3D vNormal;
|
2008-10-31 19:32:00 +00:00
|
|
|
|
ParseLV4MeshFloatTriple(&vNormal.x,faceIdx);
|
2008-05-09 17:24:28 +00:00
|
|
|
|
|
2009-03-15 00:40:30 +00:00
|
|
|
|
if (faceIdx >= sMesh.mFaces.size()) {
|
2008-11-16 21:56:45 +00:00
|
|
|
|
DefaultLogger::get()->error("ASE: Invalid vertex index in MESH_FACENORMAL section");
|
2008-09-27 16:46:05 +00:00
|
|
|
|
continue;
|
|
|
|
|
}
|
2008-11-16 21:56:45 +00:00
|
|
|
|
|
|
|
|
|
// We'll renormalize later
|
|
|
|
|
sMesh.mNormals[faceIdx*3] += vNormal;
|
2009-03-15 00:40:30 +00:00
|
|
|
|
sMesh.mNormals[faceIdx*3+1] += vNormal;
|
|
|
|
|
sMesh.mNormals[faceIdx*3+2] += vNormal;
|
2008-05-30 23:01:25 +00:00
|
|
|
|
continue;
|
2008-05-09 17:24:28 +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
|
|
|
|
AI_ASE_HANDLE_SECTION("3","*MESH_NORMALS");
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void Parser::ParseLV4MeshFace(ASE::Face& out)
|
2008-06-03 21:50:53 +00:00
|
|
|
|
{
|
2008-05-09 17:24:28 +00:00
|
|
|
|
// skip spaces and tabs
|
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
|
|
|
|
if(!SkipSpaces(&filePtr))
|
2008-06-03 21:50:53 +00:00
|
|
|
|
{
|
2008-09-27 16:46:05 +00:00
|
|
|
|
LogWarning("Unable to parse *MESH_FACE Element: Unexpected EOL [#1]");
|
|
|
|
|
SkipToNextToken();
|
2008-06-03 21:50:53 +00:00
|
|
|
|
return;
|
|
|
|
|
}
|
2008-05-09 17:24:28 +00:00
|
|
|
|
|
|
|
|
|
// parse the face index
|
2011-03-23 14:26:19 +00:00
|
|
|
|
out.iFace = strtoul10(filePtr,&filePtr);
|
2008-05-09 17:24:28 +00:00
|
|
|
|
|
|
|
|
|
// next character should be ':'
|
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
|
|
|
|
if(!SkipSpaces(&filePtr))
|
2008-06-03 21:50:53 +00:00
|
|
|
|
{
|
|
|
|
|
// FIX: there are some ASE files which haven't got : here ....
|
2008-09-27 16:46:05 +00:00
|
|
|
|
LogWarning("Unable to parse *MESH_FACE Element: Unexpected EOL. \':\' expected [#2]");
|
|
|
|
|
SkipToNextToken();
|
2008-06-03 21:50:53 +00:00
|
|
|
|
return;
|
|
|
|
|
}
|
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
|
|
|
|
// FIX: There are some ASE files which haven't got ':' here
|
|
|
|
|
if(':' == *filePtr)++filePtr;
|
2008-05-09 17:24:28 +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
|
|
|
|
// Parse all mesh indices
|
2008-05-09 17:24:28 +00:00
|
|
|
|
for (unsigned int i = 0; i < 3;++i)
|
|
|
|
|
{
|
|
|
|
|
unsigned int iIndex = 0;
|
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
|
|
|
|
if(!SkipSpaces(&filePtr))
|
2008-05-09 17:24:28 +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
|
|
|
|
LogWarning("Unable to parse *MESH_FACE Element: Unexpected EOL");
|
2008-09-27 16:46:05 +00:00
|
|
|
|
SkipToNextToken();
|
2008-06-03 21:50:53 +00:00
|
|
|
|
return;
|
2008-05-09 17:24:28 +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
|
|
|
|
switch (*filePtr)
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
|
|
|
|
case 'A':
|
|
|
|
|
case 'a':
|
|
|
|
|
break;
|
|
|
|
|
case 'B':
|
|
|
|
|
case 'b':
|
|
|
|
|
iIndex = 1;
|
|
|
|
|
break;
|
|
|
|
|
case 'C':
|
|
|
|
|
case 'c':
|
|
|
|
|
iIndex = 2;
|
|
|
|
|
break;
|
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
|
|
|
|
default:
|
|
|
|
|
LogWarning("Unable to parse *MESH_FACE Element: Unexpected EOL. "
|
|
|
|
|
"A,B or C expected [#3]");
|
|
|
|
|
SkipToNextToken();
|
|
|
|
|
return;
|
2008-05-09 17:24:28 +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
|
|
|
|
++filePtr;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
|
|
|
|
|
// next character should be ':'
|
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
|
|
|
|
if(!SkipSpaces(&filePtr) || ':' != *filePtr)
|
2008-06-03 21:50:53 +00:00
|
|
|
|
{
|
2008-09-27 16:46:05 +00:00
|
|
|
|
LogWarning("Unable to parse *MESH_FACE Element: "
|
2008-06-03 21:50:53 +00:00
|
|
|
|
"Unexpected EOL. \':\' expected [#2]");
|
2008-09-27 16:46:05 +00:00
|
|
|
|
SkipToNextToken();
|
2008-06-03 21:50:53 +00:00
|
|
|
|
return;
|
|
|
|
|
}
|
2008-05-09 17:24:28 +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
|
|
|
|
++filePtr;
|
|
|
|
|
if(!SkipSpaces(&filePtr))
|
2008-06-03 21:50:53 +00:00
|
|
|
|
{
|
2008-09-27 16:46:05 +00:00
|
|
|
|
LogWarning("Unable to parse *MESH_FACE Element: Unexpected EOL. "
|
2008-06-03 21:50:53 +00:00
|
|
|
|
"Vertex index ecpected [#4]");
|
2008-09-27 16:46:05 +00:00
|
|
|
|
SkipToNextToken();
|
2008-06-03 21:50:53 +00:00
|
|
|
|
return;
|
|
|
|
|
}
|
2011-03-23 14:26:19 +00:00
|
|
|
|
out.mIndices[iIndex] = strtoul10(filePtr,&filePtr);
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// now we need to skip the AB, BC, CA blocks.
|
|
|
|
|
while (true)
|
|
|
|
|
{
|
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
|
|
|
|
if ('*' == *filePtr)break;
|
|
|
|
|
if (IsLineEnd(*filePtr))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
2008-09-27 16:46:05 +00:00
|
|
|
|
//iLineNumber++;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
return;
|
|
|
|
|
}
|
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
|
|
|
|
filePtr++;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// parse the smoothing group of the face
|
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
|
|
|
|
if (TokenMatch(filePtr,"*MESH_SMOOTHING",15))
|
2008-05-09 17:24:28 +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
|
|
|
|
if(!SkipSpaces(&filePtr))
|
2008-06-03 21:50:53 +00:00
|
|
|
|
{
|
2008-09-27 16:46:05 +00:00
|
|
|
|
LogWarning("Unable to parse *MESH_SMOOTHING Element: "
|
2008-06-03 21:50:53 +00:00
|
|
|
|
"Unexpected EOL. Smoothing group(s) expected [#5]");
|
2008-09-27 16:46:05 +00:00
|
|
|
|
SkipToNextToken();
|
2008-06-03 21:50:53 +00:00
|
|
|
|
return;
|
|
|
|
|
}
|
2008-05-09 17:24:28 +00:00
|
|
|
|
|
2008-11-16 21:56:45 +00:00
|
|
|
|
// Parse smoothing groups until we don't anymore see commas
|
2008-05-28 21:05:05 +00:00
|
|
|
|
// FIX: There needn't always be a value, sad but true
|
2008-05-09 17:24:28 +00:00
|
|
|
|
while (true)
|
|
|
|
|
{
|
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
|
|
|
|
if (*filePtr < '9' && *filePtr >= '0')
|
2008-05-28 21:05:05 +00:00
|
|
|
|
{
|
2011-03-23 14:26:19 +00:00
|
|
|
|
out.iSmoothGroup |= (1 << strtoul10(filePtr,&filePtr));
|
2008-05-28 21:05:05 +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
|
|
|
|
SkipSpaces(&filePtr);
|
|
|
|
|
if (',' != *filePtr)
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
|
|
|
|
break;
|
|
|
|
|
}
|
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
|
|
|
|
++filePtr;
|
|
|
|
|
SkipSpaces(&filePtr);
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// *MESH_MTLID is optional, too
|
|
|
|
|
while (true)
|
|
|
|
|
{
|
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
|
|
|
|
if ('*' == *filePtr)break;
|
|
|
|
|
if (IsLineEnd(*filePtr))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
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
|
|
|
|
filePtr++;
|
2008-05-09 17:24:28 +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
|
|
|
|
if (TokenMatch(filePtr,"*MESH_MTLID",11))
|
2008-05-09 17:24:28 +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
|
|
|
|
if(!SkipSpaces(&filePtr))
|
2008-06-03 21:50:53 +00:00
|
|
|
|
{
|
2008-09-27 16:46:05 +00:00
|
|
|
|
LogWarning("Unable to parse *MESH_MTLID Element: Unexpected EOL. "
|
2008-06-03 21:50:53 +00:00
|
|
|
|
"Material index expected [#6]");
|
2008-09-27 16:46:05 +00:00
|
|
|
|
SkipToNextToken();
|
2008-06-03 21:50:53 +00:00
|
|
|
|
return;
|
|
|
|
|
}
|
2011-03-23 14:26:19 +00:00
|
|
|
|
out.iMaterial = strtoul10(filePtr,&filePtr);
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void Parser::ParseLV4MeshLongTriple(unsigned int* apOut)
|
|
|
|
|
{
|
|
|
|
|
ai_assert(NULL != apOut);
|
|
|
|
|
|
2008-07-18 20:29:46 +00:00
|
|
|
|
for (unsigned int i = 0; i < 3;++i)
|
2008-08-28 17:35:36 +00:00
|
|
|
|
ParseLV4MeshLong(apOut[i]);
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void Parser::ParseLV4MeshLongTriple(unsigned int* apOut, unsigned int& rIndexOut)
|
|
|
|
|
{
|
|
|
|
|
ai_assert(NULL != apOut);
|
|
|
|
|
|
|
|
|
|
// parse the index
|
2008-08-28 17:35:36 +00:00
|
|
|
|
ParseLV4MeshLong(rIndexOut);
|
2008-05-09 17:24:28 +00:00
|
|
|
|
|
|
|
|
|
// parse the three others
|
2008-09-27 16:46:05 +00:00
|
|
|
|
ParseLV4MeshLongTriple(apOut);
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void Parser::ParseLV4MeshFloatTriple(float* apOut, unsigned int& rIndexOut)
|
|
|
|
|
{
|
|
|
|
|
ai_assert(NULL != apOut);
|
|
|
|
|
|
|
|
|
|
// parse the index
|
2008-08-28 17:35:36 +00:00
|
|
|
|
ParseLV4MeshLong(rIndexOut);
|
2008-05-09 17:24:28 +00:00
|
|
|
|
|
|
|
|
|
// parse the three others
|
2008-09-27 16:46:05 +00:00
|
|
|
|
ParseLV4MeshFloatTriple(apOut);
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void Parser::ParseLV4MeshFloatTriple(float* apOut)
|
|
|
|
|
{
|
|
|
|
|
ai_assert(NULL != apOut);
|
2008-07-18 20:29:46 +00:00
|
|
|
|
|
|
|
|
|
for (unsigned int i = 0; i < 3;++i)
|
2008-08-28 17:35:36 +00:00
|
|
|
|
ParseLV4MeshFloat(apOut[i]);
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void Parser::ParseLV4MeshFloat(float& fOut)
|
|
|
|
|
{
|
|
|
|
|
// skip spaces and tabs
|
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
|
|
|
|
if(!SkipSpaces(&filePtr))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
|
|
|
|
// LOG
|
2008-09-27 16:46:05 +00:00
|
|
|
|
LogWarning("Unable to parse float: unexpected EOL [#1]");
|
2008-05-09 17:24:28 +00:00
|
|
|
|
fOut = 0.0f;
|
2008-09-27 16:46:05 +00:00
|
|
|
|
++iLineNumber;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
// parse the first float
|
2012-01-31 16:18:32 +00:00
|
|
|
|
filePtr = fast_atoreal_move<float>(filePtr,fOut);
|
2008-05-09 17:24:28 +00:00
|
|
|
|
}
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
|
void Parser::ParseLV4MeshLong(unsigned int& iOut)
|
|
|
|
|
{
|
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
|
|
|
|
// Skip spaces and tabs
|
|
|
|
|
if(!SkipSpaces(&filePtr))
|
2008-05-09 17:24:28 +00:00
|
|
|
|
{
|
|
|
|
|
// LOG
|
2008-09-27 16:46:05 +00:00
|
|
|
|
LogWarning("Unable to parse long: unexpected EOL [#1]");
|
2008-05-09 17:24:28 +00:00
|
|
|
|
iOut = 0;
|
2008-09-27 16:46:05 +00:00
|
|
|
|
++iLineNumber;
|
2008-05-09 17:24:28 +00:00
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
// parse the value
|
2011-03-23 14:26:19 +00:00
|
|
|
|
iOut = strtoul10(filePtr,&filePtr);
|
2008-09-12 20:25:11 +00:00
|
|
|
|
}
|
2012-12-20 11:43:09 +00:00
|
|
|
|
|
|
|
|
|
#endif // !! ASSIMP_BUILD_NO_BASE_IMPORTER
|