replace opengexparser by using openddl-parser.

Signed-off-by: Kim Kulling <kim.kulling@googlemail.com>
This commit is contained in:
Kim Kulling
2015-02-07 12:47:53 +01:00
parent e9dcad4181
commit 20b3ce6a40
13 changed files with 190 additions and 670 deletions
+34 -3
View File
@@ -41,9 +41,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "AssimpPCH.h"
#include "OpenGEXImporter.h"
#include "OpenGEXParser.h"
#include "DefaultIOSystem.h"
#include <openddlparser/OpenDDLParser.h>
#include <vector>
static const aiImporterDesc desc = {
@@ -62,6 +63,8 @@ static const aiImporterDesc desc = {
namespace Assimp {
namespace OpenGEX {
USE_ODDLPARSER_NS
//------------------------------------------------------------------------------------------------
OpenGEXImporter::OpenGEXImporter() {
@@ -95,8 +98,14 @@ void OpenGEXImporter::InternReadFile( const std::string &filename, aiScene *pSce
std::vector<char> buffer;
TextFileToBuffer( file, buffer );
OpenGEXParser myParser( buffer );
myParser.parse();
OpenDDLParser myParser;
myParser.setBuffer( &buffer[ 0 ], buffer.size() );
bool success( myParser.parse() );
if( success ) {
Context *ctx = myParser.getContext();
importMetric( ctx );
}
}
//------------------------------------------------------------------------------------------------
@@ -109,6 +118,28 @@ void OpenGEXImporter::SetupProperties( const Importer *pImp ) {
}
//------------------------------------------------------------------------------------------------
void OpenGEXImporter::importMetric( Context *ctx ) {
if( NULL == ctx || NULL == ctx->getProperties() ) {
return;
}
Property *prop = ctx->getProperties();
while( NULL != prop ) {
prop = prop->m_next;
}
}
//------------------------------------------------------------------------------------------------
void OpenGEXImporter::ParseGeoObject() {
}
//------------------------------------------------------------------------------------------------
void OpenGEXImporter::ParseMaterial() {
}
//------------------------------------------------------------------------------------------------
} // Namespace OpenGEX