123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974 |
- /*
- Open Asset Import Library (assimp)
- ----------------------------------------------------------------------
- Copyright (c) 2006-2016, assimp team
- 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.
- * Neither the name of the assimp team, nor the names of its
- contributors may be used to endorse or promote products
- derived from this software without specific prior
- written permission of the assimp team.
- 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.
- ----------------------------------------------------------------------
- */
- /// \file X3DImporter_Rendering.cpp
- /// \brief Parsing data from nodes of "Rendering" set of X3D.
- /// \date 2015-2016
- /// \author [email protected]
- #ifndef ASSIMP_BUILD_NO_X3D_IMPORTER
- #include "X3DImporter.hpp"
- #include "X3DImporter_Macro.hpp"
- namespace Assimp
- {
- // <Color
- // DEF="" ID
- // USE="" IDREF
- // color="" MFColor [inputOutput]
- // />
- void X3DImporter::ParseNode_Rendering_Color()
- {
- std::string use, def;
- std::list<aiColor3D> color;
- CX3DImporter_NodeElement* ne( nullptr );
- MACRO_ATTRREAD_LOOPBEG;
- MACRO_ATTRREAD_CHECKUSEDEF_RET(def, use);
- MACRO_ATTRREAD_CHECK_REF("color", color, XML_ReadNode_GetAttrVal_AsListCol3f);
- MACRO_ATTRREAD_LOOPEND;
- // if "USE" defined then find already defined element.
- if(!use.empty())
- {
- MACRO_USE_CHECKANDAPPLY(def, use, ENET_Color, ne);
- }
- else
- {
- // create and if needed - define new geometry object.
- ne = new CX3DImporter_NodeElement_Color(NodeElement_Cur);
- if(!def.empty()) ne->ID = def;
- ((CX3DImporter_NodeElement_Color*)ne)->Value = color;
- // check for X3DMetadataObject childs.
- if(!mReader->isEmptyElement())
- ParseNode_Metadata(ne, "Color");
- else
- NodeElement_Cur->Child.push_back(ne);// add made object as child to current element
- NodeElement_List.push_back(ne);// add element to node element list because its a new object in graph
- }// if(!use.empty()) else
- }
- // <ColorRGBA
- // DEF="" ID
- // USE="" IDREF
- // color="" MFColorRGBA [inputOutput]
- // />
- void X3DImporter::ParseNode_Rendering_ColorRGBA()
- {
- std::string use, def;
- std::list<aiColor4D> color;
- CX3DImporter_NodeElement* ne( nullptr );
- MACRO_ATTRREAD_LOOPBEG;
- MACRO_ATTRREAD_CHECKUSEDEF_RET(def, use);
- MACRO_ATTRREAD_CHECK_REF("color", color, XML_ReadNode_GetAttrVal_AsListCol4f);
- MACRO_ATTRREAD_LOOPEND;
- // if "USE" defined then find already defined element.
- if(!use.empty())
- {
- MACRO_USE_CHECKANDAPPLY(def, use, ENET_ColorRGBA, ne);
- }
- else
- {
- // create and if needed - define new geometry object.
- ne = new CX3DImporter_NodeElement_ColorRGBA(NodeElement_Cur);
- if(!def.empty()) ne->ID = def;
- ((CX3DImporter_NodeElement_ColorRGBA*)ne)->Value = color;
- // check for X3DMetadataObject childs.
- if(!mReader->isEmptyElement())
- ParseNode_Metadata(ne, "ColorRGBA");
- else
- NodeElement_Cur->Child.push_back(ne);// add made object as child to current element
- NodeElement_List.push_back(ne);// add element to node element list because its a new object in graph
- }// if(!use.empty()) else
- }
- // <Coordinate
- // DEF="" ID
- // USE="" IDREF
- // point="" MFVec3f [inputOutput]
- // />
- void X3DImporter::ParseNode_Rendering_Coordinate()
- {
- std::string use, def;
- std::list<aiVector3D> point;
- CX3DImporter_NodeElement* ne( nullptr );
- MACRO_ATTRREAD_LOOPBEG;
- MACRO_ATTRREAD_CHECKUSEDEF_RET(def, use);
- MACRO_ATTRREAD_CHECK_REF("point", point, XML_ReadNode_GetAttrVal_AsListVec3f);
- MACRO_ATTRREAD_LOOPEND;
- // if "USE" defined then find already defined element.
- if(!use.empty())
- {
- MACRO_USE_CHECKANDAPPLY(def, use, ENET_Coordinate, ne);
- }
- else
- {
- // create and if needed - define new geometry object.
- ne = new CX3DImporter_NodeElement_Coordinate(NodeElement_Cur);
- if(!def.empty()) ne->ID = def;
- ((CX3DImporter_NodeElement_Coordinate*)ne)->Value = point;
- // check for X3DMetadataObject childs.
- if(!mReader->isEmptyElement())
- ParseNode_Metadata(ne, "Coordinate");
- else
- NodeElement_Cur->Child.push_back(ne);// add made object as child to current element
- NodeElement_List.push_back(ne);// add element to node element list because its a new object in graph
- }// if(!use.empty()) else
- }
- // <IndexedLineSet
- // DEF="" ID
- // USE="" IDREF
- // colorIndex="" MFInt32 [initializeOnly]
- // colorPerVertex="true" SFBool [initializeOnly]
- // coordIndex="" MFInt32 [initializeOnly]
- // >
- // <!-- ColorCoordinateContentModel -->
- // ColorCoordinateContentModel is the child-node content model corresponding to IndexedLineSet, LineSet and PointSet. ColorCoordinateContentModel can
- // contain any-order Coordinate node with Color (or ColorRGBA) node. No more than one instance of any single node type is allowed.
- // A ProtoInstance node (with the proper node type) can be substituted for any node in this content model.
- // </IndexedLineSet>
- void X3DImporter::ParseNode_Rendering_IndexedLineSet()
- {
- std::string use, def;
- std::list<int32_t> colorIndex;
- bool colorPerVertex = true;
- std::list<int32_t> coordIndex;
- CX3DImporter_NodeElement* ne( nullptr );
- MACRO_ATTRREAD_LOOPBEG;
- MACRO_ATTRREAD_CHECKUSEDEF_RET(def, use);
- MACRO_ATTRREAD_CHECK_REF("colorIndex", colorIndex, XML_ReadNode_GetAttrVal_AsListI32);
- MACRO_ATTRREAD_CHECK_RET("colorPerVertex", colorPerVertex, XML_ReadNode_GetAttrVal_AsBool);
- MACRO_ATTRREAD_CHECK_REF("coordIndex", coordIndex, XML_ReadNode_GetAttrVal_AsListI32);
- MACRO_ATTRREAD_LOOPEND;
- // if "USE" defined then find already defined element.
- if(!use.empty())
- {
- MACRO_USE_CHECKANDAPPLY(def, use, ENET_IndexedLineSet, ne);
- }
- else
- {
- // check data
- if((coordIndex.size() < 2) || ((coordIndex.back() == (-1)) && (coordIndex.size() < 3)))
- throw DeadlyImportError("IndexedLineSet must contain not empty \"coordIndex\" attribute.");
- // create and if needed - define new geometry object.
- ne = new CX3DImporter_NodeElement_IndexedSet(CX3DImporter_NodeElement::ENET_IndexedLineSet, NodeElement_Cur);
- if(!def.empty()) ne->ID = def;
- CX3DImporter_NodeElement_IndexedSet& ne_alias = *((CX3DImporter_NodeElement_IndexedSet*)ne);
- ne_alias.ColorIndex = colorIndex;
- ne_alias.ColorPerVertex = colorPerVertex;
- ne_alias.CoordIndex = coordIndex;
- // check for child nodes
- if(!mReader->isEmptyElement())
- {
- ParseHelper_Node_Enter(ne);
- MACRO_NODECHECK_LOOPBEGIN("IndexedLineSet");
- // check for Color and Coordinate nodes
- if(XML_CheckNode_NameEqual("Color")) { ParseNode_Rendering_Color(); continue; }
- if(XML_CheckNode_NameEqual("ColorRGBA")) { ParseNode_Rendering_ColorRGBA(); continue; }
- if(XML_CheckNode_NameEqual("Coordinate")) { ParseNode_Rendering_Coordinate(); continue; }
- // check for X3DMetadataObject
- if(!ParseHelper_CheckRead_X3DMetadataObject()) XML_CheckNode_SkipUnsupported("IndexedLineSet");
- MACRO_NODECHECK_LOOPEND("IndexedLineSet");
- ParseHelper_Node_Exit();
- }// if(!mReader->isEmptyElement())
- else
- {
- NodeElement_Cur->Child.push_back(ne);// add made object as child to current element
- }
- NodeElement_List.push_back(ne);// add element to node element list because its a new object in graph
- }// if(!use.empty()) else
- }
- // <IndexedTriangleFanSet
- // DEF="" ID
- // USE="" IDREF
- // ccw="true" SFBool [initializeOnly]
- // colorPerVertex="true" SFBool [initializeOnly]
- // index="" MFInt32 [initializeOnly]
- // normalPerVertex="true" SFBool [initializeOnly]
- // solid="true" SFBool [initializeOnly]
- // >
- // <!-- ComposedGeometryContentModel -->
- // ComposedGeometryContentModel is the child-node content model corresponding to X3DComposedGeometryNodes. It can contain Color (or ColorRGBA), Coordinate,
- // Normal and TextureCoordinate, in any order. No more than one instance of these nodes is allowed. Multiple VertexAttribute (FloatVertexAttribute,
- // Matrix3VertexAttribute, Matrix4VertexAttribute) nodes can also be contained.
- // A ProtoInstance node (with the proper node type) can be substituted for any node in this content model.
- // </IndexedTriangleFanSet>
- void X3DImporter::ParseNode_Rendering_IndexedTriangleFanSet()
- {
- std::string use, def;
- bool ccw = true;
- bool colorPerVertex = true;
- std::list<int32_t> index;
- bool normalPerVertex = true;
- bool solid = true;
- CX3DImporter_NodeElement* ne( nullptr );
- MACRO_ATTRREAD_LOOPBEG;
- MACRO_ATTRREAD_CHECKUSEDEF_RET(def, use);
- MACRO_ATTRREAD_CHECK_RET("ccw", ccw, XML_ReadNode_GetAttrVal_AsBool);
- MACRO_ATTRREAD_CHECK_RET("colorPerVertex", colorPerVertex, XML_ReadNode_GetAttrVal_AsBool);
- MACRO_ATTRREAD_CHECK_REF("index", index, XML_ReadNode_GetAttrVal_AsListI32);
- MACRO_ATTRREAD_CHECK_RET("normalPerVertex", normalPerVertex, XML_ReadNode_GetAttrVal_AsBool);
- MACRO_ATTRREAD_CHECK_RET("solid", solid, XML_ReadNode_GetAttrVal_AsBool);
- MACRO_ATTRREAD_LOOPEND;
- // if "USE" defined then find already defined element.
- if(!use.empty())
- {
- MACRO_USE_CHECKANDAPPLY(def, use, ENET_IndexedTriangleFanSet, ne);
- }
- else
- {
- // check data
- if(index.size() == 0) throw DeadlyImportError("IndexedTriangleFanSet must contain not empty \"index\" attribute.");
- // create and if needed - define new geometry object.
- ne = new CX3DImporter_NodeElement_IndexedSet(CX3DImporter_NodeElement::ENET_IndexedTriangleFanSet, NodeElement_Cur);
- if(!def.empty()) ne->ID = def;
- CX3DImporter_NodeElement_IndexedSet& ne_alias = *((CX3DImporter_NodeElement_IndexedSet*)ne);
- ne_alias.CCW = ccw;
- ne_alias.ColorPerVertex = colorPerVertex;
- ne_alias.CoordIndex = index;
- ne_alias.NormalPerVertex = normalPerVertex;
- ne_alias.Solid = solid;
- // check for child nodes
- if(!mReader->isEmptyElement())
- {
- ParseHelper_Node_Enter(ne);
- MACRO_NODECHECK_LOOPBEGIN("IndexedTriangleFanSet");
- // check for X3DComposedGeometryNodes
- if(XML_CheckNode_NameEqual("Color")) { ParseNode_Rendering_Color(); continue; }
- if(XML_CheckNode_NameEqual("ColorRGBA")) { ParseNode_Rendering_ColorRGBA(); continue; }
- if(XML_CheckNode_NameEqual("Coordinate")) { ParseNode_Rendering_Coordinate(); continue; }
- if(XML_CheckNode_NameEqual("Normal")) { ParseNode_Rendering_Normal(); continue; }
- if(XML_CheckNode_NameEqual("TextureCoordinate")) { ParseNode_Texturing_TextureCoordinate(); continue; }
- // check for X3DMetadataObject
- if(!ParseHelper_CheckRead_X3DMetadataObject()) XML_CheckNode_SkipUnsupported("IndexedTriangleFanSet");
- MACRO_NODECHECK_LOOPEND("IndexedTriangleFanSet");
- ParseHelper_Node_Exit();
- }// if(!mReader->isEmptyElement())
- else
- {
- NodeElement_Cur->Child.push_back(ne);// add made object as child to current element
- }
- NodeElement_List.push_back(ne);// add element to node element list because its a new object in graph
- }// if(!use.empty()) else
- }
- // <IndexedTriangleSet
- // DEF="" ID
- // USE="" IDREF
- // ccw="true" SFBool [initializeOnly]
- // colorPerVertex="true" SFBool [initializeOnly]
- // index="" MFInt32 [initializeOnly]
- // normalPerVertex="true" SFBool [initializeOnly]
- // solid="true" SFBool [initializeOnly]
- // >
- // <!-- ComposedGeometryContentModel -->
- // ComposedGeometryContentModel is the child-node content model corresponding to X3DComposedGeometryNodes. It can contain Color (or ColorRGBA), Coordinate,
- // Normal and TextureCoordinate, in any order. No more than one instance of these nodes is allowed. Multiple VertexAttribute (FloatVertexAttribute,
- // Matrix3VertexAttribute, Matrix4VertexAttribute) nodes can also be contained.
- // A ProtoInstance node (with the proper node type) can be substituted for any node in this content model.
- // </IndexedTriangleSet>
- void X3DImporter::ParseNode_Rendering_IndexedTriangleSet()
- {
- std::string use, def;
- bool ccw = true;
- bool colorPerVertex = true;
- std::list<int32_t> index;
- bool normalPerVertex = true;
- bool solid = true;
- CX3DImporter_NodeElement* ne( nullptr );
- MACRO_ATTRREAD_LOOPBEG;
- MACRO_ATTRREAD_CHECKUSEDEF_RET(def, use);
- MACRO_ATTRREAD_CHECK_RET("ccw", ccw, XML_ReadNode_GetAttrVal_AsBool);
- MACRO_ATTRREAD_CHECK_RET("colorPerVertex", colorPerVertex, XML_ReadNode_GetAttrVal_AsBool);
- MACRO_ATTRREAD_CHECK_REF("index", index, XML_ReadNode_GetAttrVal_AsListI32);
- MACRO_ATTRREAD_CHECK_RET("normalPerVertex", normalPerVertex, XML_ReadNode_GetAttrVal_AsBool);
- MACRO_ATTRREAD_CHECK_RET("solid", solid, XML_ReadNode_GetAttrVal_AsBool);
- MACRO_ATTRREAD_LOOPEND;
- // if "USE" defined then find already defined element.
- if(!use.empty())
- {
- MACRO_USE_CHECKANDAPPLY(def, use, ENET_IndexedTriangleSet, ne);
- }
- else
- {
- // check data
- if(index.size() == 0) throw DeadlyImportError("IndexedTriangleSet must contain not empty \"index\" attribute.");
- // create and if needed - define new geometry object.
- ne = new CX3DImporter_NodeElement_IndexedSet(CX3DImporter_NodeElement::ENET_IndexedTriangleSet, NodeElement_Cur);
- if(!def.empty()) ne->ID = def;
- CX3DImporter_NodeElement_IndexedSet& ne_alias = *((CX3DImporter_NodeElement_IndexedSet*)ne);
- ne_alias.CCW = ccw;
- ne_alias.ColorPerVertex = colorPerVertex;
- ne_alias.CoordIndex = index;
- ne_alias.NormalPerVertex = normalPerVertex;
- ne_alias.Solid = solid;
- // check for child nodes
- if(!mReader->isEmptyElement())
- {
- ParseHelper_Node_Enter(ne);
- MACRO_NODECHECK_LOOPBEGIN("IndexedTriangleSet");
- // check for X3DComposedGeometryNodes
- if(XML_CheckNode_NameEqual("Color")) { ParseNode_Rendering_Color(); continue; }
- if(XML_CheckNode_NameEqual("ColorRGBA")) { ParseNode_Rendering_ColorRGBA(); continue; }
- if(XML_CheckNode_NameEqual("Coordinate")) { ParseNode_Rendering_Coordinate(); continue; }
- if(XML_CheckNode_NameEqual("Normal")) { ParseNode_Rendering_Normal(); continue; }
- if(XML_CheckNode_NameEqual("TextureCoordinate")) { ParseNode_Texturing_TextureCoordinate(); continue; }
- // check for X3DMetadataObject
- if(!ParseHelper_CheckRead_X3DMetadataObject()) XML_CheckNode_SkipUnsupported("IndexedTriangleSet");
- MACRO_NODECHECK_LOOPEND("IndexedTriangleSet");
- ParseHelper_Node_Exit();
- }// if(!mReader->isEmptyElement())
- else
- {
- NodeElement_Cur->Child.push_back(ne);// add made object as child to current element
- }
- NodeElement_List.push_back(ne);// add element to node element list because its a new object in graph
- }// if(!use.empty()) else
- }
- // <IndexedTriangleStripSet
- // DEF="" ID
- // USE="" IDREF
- // ccw="true" SFBool [initializeOnly]
- // colorPerVertex="true" SFBool [initializeOnly]
- // index="" MFInt32 [initializeOnly]
- // normalPerVertex="true" SFBool [initializeOnly]
- // solid="true" SFBool [initializeOnly]
- // >
- // <!-- ComposedGeometryContentModel -->
- // ComposedGeometryContentModel is the child-node content model corresponding to X3DComposedGeometryNodes. It can contain Color (or ColorRGBA), Coordinate,
- // Normal and TextureCoordinate, in any order. No more than one instance of these nodes is allowed. Multiple VertexAttribute (FloatVertexAttribute,
- // Matrix3VertexAttribute, Matrix4VertexAttribute) nodes can also be contained.
- // A ProtoInstance node (with the proper node type) can be substituted for any node in this content model.
- // </IndexedTriangleStripSet>
- void X3DImporter::ParseNode_Rendering_IndexedTriangleStripSet()
- {
- std::string use, def;
- bool ccw = true;
- bool colorPerVertex = true;
- std::list<int32_t> index;
- bool normalPerVertex = true;
- bool solid = true;
- CX3DImporter_NodeElement* ne( nullptr );
- MACRO_ATTRREAD_LOOPBEG;
- MACRO_ATTRREAD_CHECKUSEDEF_RET(def, use);
- MACRO_ATTRREAD_CHECK_RET("ccw", ccw, XML_ReadNode_GetAttrVal_AsBool);
- MACRO_ATTRREAD_CHECK_RET("colorPerVertex", colorPerVertex, XML_ReadNode_GetAttrVal_AsBool);
- MACRO_ATTRREAD_CHECK_REF("index", index, XML_ReadNode_GetAttrVal_AsListI32);
- MACRO_ATTRREAD_CHECK_RET("normalPerVertex", normalPerVertex, XML_ReadNode_GetAttrVal_AsBool);
- MACRO_ATTRREAD_CHECK_RET("solid", solid, XML_ReadNode_GetAttrVal_AsBool);
- MACRO_ATTRREAD_LOOPEND;
- // if "USE" defined then find already defined element.
- if(!use.empty())
- {
- MACRO_USE_CHECKANDAPPLY(def, use, ENET_IndexedTriangleStripSet, ne);
- }
- else
- {
- // check data
- if(index.size() == 0) throw DeadlyImportError("IndexedTriangleStripSet must contain not empty \"index\" attribute.");
- // create and if needed - define new geometry object.
- ne = new CX3DImporter_NodeElement_IndexedSet(CX3DImporter_NodeElement::ENET_IndexedTriangleStripSet, NodeElement_Cur);
- if(!def.empty()) ne->ID = def;
- CX3DImporter_NodeElement_IndexedSet& ne_alias = *((CX3DImporter_NodeElement_IndexedSet*)ne);
- ne_alias.CCW = ccw;
- ne_alias.ColorPerVertex = colorPerVertex;
- ne_alias.CoordIndex = index;
- ne_alias.NormalPerVertex = normalPerVertex;
- ne_alias.Solid = solid;
- // check for child nodes
- if(!mReader->isEmptyElement())
- {
- ParseHelper_Node_Enter(ne);
- MACRO_NODECHECK_LOOPBEGIN("IndexedTriangleStripSet");
- // check for X3DComposedGeometryNodes
- if(XML_CheckNode_NameEqual("Color")) { ParseNode_Rendering_Color(); continue; }
- if(XML_CheckNode_NameEqual("ColorRGBA")) { ParseNode_Rendering_ColorRGBA(); continue; }
- if(XML_CheckNode_NameEqual("Coordinate")) { ParseNode_Rendering_Coordinate(); continue; }
- if(XML_CheckNode_NameEqual("Normal")) { ParseNode_Rendering_Normal(); continue; }
- if(XML_CheckNode_NameEqual("TextureCoordinate")) { ParseNode_Texturing_TextureCoordinate(); continue; }
- // check for X3DMetadataObject
- if(!ParseHelper_CheckRead_X3DMetadataObject()) XML_CheckNode_SkipUnsupported("IndexedTriangleStripSet");
- MACRO_NODECHECK_LOOPEND("IndexedTriangleStripSet");
- ParseHelper_Node_Exit();
- }// if(!mReader->isEmptyElement())
- else
- {
- NodeElement_Cur->Child.push_back(ne);// add made object as child to current element
- }
- NodeElement_List.push_back(ne);// add element to node element list because its a new object in graph
- }// if(!use.empty()) else
- }
- // <LineSet
- // DEF="" ID
- // USE="" IDREF
- // vertexCount="" MFInt32 [initializeOnly]
- // >
- // <!-- ColorCoordinateContentModel -->
- // ColorCoordinateContentModel is the child-node content model corresponding to IndexedLineSet, LineSet and PointSet. ColorCoordinateContentModel can
- // contain any-order Coordinate node with Color (or ColorRGBA) node. No more than one instance of any single node type is allowed.
- // A ProtoInstance node (with the proper node type) can be substituted for any node in this content model.
- // </LineSet>
- void X3DImporter::ParseNode_Rendering_LineSet()
- {
- std::string use, def;
- std::list<int32_t> vertexCount;
- CX3DImporter_NodeElement* ne( nullptr );
- MACRO_ATTRREAD_LOOPBEG;
- MACRO_ATTRREAD_CHECKUSEDEF_RET(def, use);
- MACRO_ATTRREAD_CHECK_REF("vertexCount", vertexCount, XML_ReadNode_GetAttrVal_AsListI32);
- MACRO_ATTRREAD_LOOPEND;
- // if "USE" defined then find already defined element.
- if(!use.empty())
- {
- MACRO_USE_CHECKANDAPPLY(def, use, ENET_LineSet, ne);
- }
- else
- {
- // check data
- if(vertexCount.size() == 0) throw DeadlyImportError("LineSet must contain not empty \"vertexCount\" attribute.");
- // create and if needed - define new geometry object.
- ne = new CX3DImporter_NodeElement_Set(CX3DImporter_NodeElement::ENET_LineSet, NodeElement_Cur);
- if(!def.empty()) ne->ID = def;
- CX3DImporter_NodeElement_Set& ne_alias = *((CX3DImporter_NodeElement_Set*)ne);
- ne_alias.VertexCount = vertexCount;
- // create CoordIdx
- size_t coord_num = 0;
- ne_alias.CoordIndex.clear();
- for(std::list<int32_t>::const_iterator vc_it = ne_alias.VertexCount.begin(); vc_it != ne_alias.VertexCount.end(); vc_it++)
- {
- if(*vc_it < 2) throw DeadlyImportError("LineSet. vertexCount shall be greater than or equal to two.");
- for(int32_t i = 0; i < *vc_it; i++) ne_alias.CoordIndex.push_back(static_cast<int32_t>(coord_num++));// add vertices indices
- ne_alias.CoordIndex.push_back(-1);// add face delimiter.
- }
- // check for child nodes
- if(!mReader->isEmptyElement())
- {
- ParseHelper_Node_Enter(ne);
- MACRO_NODECHECK_LOOPBEGIN("LineSet");
- // check for X3DComposedGeometryNodes
- if(XML_CheckNode_NameEqual("Color")) { ParseNode_Rendering_Color(); continue; }
- if(XML_CheckNode_NameEqual("ColorRGBA")) { ParseNode_Rendering_ColorRGBA(); continue; }
- if(XML_CheckNode_NameEqual("Coordinate")) { ParseNode_Rendering_Coordinate(); continue; }
- // check for X3DMetadataObject
- if(!ParseHelper_CheckRead_X3DMetadataObject()) XML_CheckNode_SkipUnsupported("LineSet");
- MACRO_NODECHECK_LOOPEND("LineSet");
- ParseHelper_Node_Exit();
- }// if(!mReader->isEmptyElement())
- else
- {
- NodeElement_Cur->Child.push_back(ne);// add made object as child to current element
- }
- NodeElement_List.push_back(ne);// add element to node element list because its a new object in graph
- }// if(!use.empty()) else
- }
- // <PointSet
- // DEF="" ID
- // USE="" IDREF
- // >
- // <!-- ColorCoordinateContentModel -->
- // ColorCoordinateContentModel is the child-node content model corresponding to IndexedLineSet, LineSet and PointSet. ColorCoordinateContentModel can
- // contain any-order Coordinate node with Color (or ColorRGBA) node. No more than one instance of any single node type is allowed.
- // A ProtoInstance node (with the proper node type) can be substituted for any node in this content model.
- // </PointSet>
- void X3DImporter::ParseNode_Rendering_PointSet()
- {
- std::string use, def;
- CX3DImporter_NodeElement* ne( nullptr );
- MACRO_ATTRREAD_LOOPBEG;
- MACRO_ATTRREAD_CHECKUSEDEF_RET(def, use);
- MACRO_ATTRREAD_LOOPEND;
- // if "USE" defined then find already defined element.
- if(!use.empty())
- {
- MACRO_USE_CHECKANDAPPLY(def, use, ENET_PointSet, ne);
- }
- else
- {
- // create and if needed - define new geometry object.
- ne = new CX3DImporter_NodeElement_IndexedSet(CX3DImporter_NodeElement::ENET_PointSet, NodeElement_Cur);
- if(!def.empty()) ne->ID = def;
- // check for child nodes
- if(!mReader->isEmptyElement())
- {
- ParseHelper_Node_Enter(ne);
- MACRO_NODECHECK_LOOPBEGIN("PointSet");
- // check for X3DComposedGeometryNodes
- if(XML_CheckNode_NameEqual("Color")) { ParseNode_Rendering_Color(); continue; }
- if(XML_CheckNode_NameEqual("ColorRGBA")) { ParseNode_Rendering_ColorRGBA(); continue; }
- if(XML_CheckNode_NameEqual("Coordinate")) { ParseNode_Rendering_Coordinate(); continue; }
- // check for X3DMetadataObject
- if(!ParseHelper_CheckRead_X3DMetadataObject()) XML_CheckNode_SkipUnsupported("PointSet");
- MACRO_NODECHECK_LOOPEND("PointSet");
- ParseHelper_Node_Exit();
- }// if(!mReader->isEmptyElement())
- else
- {
- NodeElement_Cur->Child.push_back(ne);// add made object as child to current element
- }
- NodeElement_List.push_back(ne);// add element to node element list because its a new object in graph
- }// if(!use.empty()) else
- }
- // <TriangleFanSet
- // DEF="" ID
- // USE="" IDREF
- // ccw="true" SFBool [initializeOnly]
- // colorPerVertex="true" SFBool [initializeOnly]
- // fanCount="" MFInt32 [inputOutput]
- // normalPerVertex="true" SFBool [initializeOnly]
- // solid="true" SFBool [initializeOnly]
- // >
- // <!-- ComposedGeometryContentModel -->
- // ComposedGeometryContentModel is the child-node content model corresponding to X3DComposedGeometryNodes. It can contain Color (or ColorRGBA), Coordinate,
- // Normal and TextureCoordinate, in any order. No more than one instance of these nodes is allowed. Multiple VertexAttribute (FloatVertexAttribute,
- // Matrix3VertexAttribute, Matrix4VertexAttribute) nodes can also be contained.
- // A ProtoInstance node (with the proper node type) can be substituted for any node in this content model.
- // </TriangleFanSet>
- void X3DImporter::ParseNode_Rendering_TriangleFanSet()
- {
- std::string use, def;
- bool ccw = true;
- bool colorPerVertex = true;
- std::list<int32_t> fanCount;
- bool normalPerVertex = true;
- bool solid = true;
- CX3DImporter_NodeElement* ne( nullptr );
- MACRO_ATTRREAD_LOOPBEG;
- MACRO_ATTRREAD_CHECKUSEDEF_RET(def, use);
- MACRO_ATTRREAD_CHECK_RET("ccw", ccw, XML_ReadNode_GetAttrVal_AsBool);
- MACRO_ATTRREAD_CHECK_RET("colorPerVertex", colorPerVertex, XML_ReadNode_GetAttrVal_AsBool);
- MACRO_ATTRREAD_CHECK_REF("fanCount", fanCount, XML_ReadNode_GetAttrVal_AsListI32);
- MACRO_ATTRREAD_CHECK_RET("normalPerVertex", normalPerVertex, XML_ReadNode_GetAttrVal_AsBool);
- MACRO_ATTRREAD_CHECK_RET("solid", solid, XML_ReadNode_GetAttrVal_AsBool);
- MACRO_ATTRREAD_LOOPEND;
- // if "USE" defined then find already defined element.
- if(!use.empty())
- {
- MACRO_USE_CHECKANDAPPLY(def, use, ENET_TriangleFanSet, ne);
- }
- else
- {
- // check data
- if(fanCount.size() == 0) throw DeadlyImportError("TriangleFanSet must contain not empty \"fanCount\" attribute.");
- // create and if needed - define new geometry object.
- ne = new CX3DImporter_NodeElement_Set(CX3DImporter_NodeElement::ENET_TriangleFanSet, NodeElement_Cur);
- if(!def.empty()) ne->ID = def;
- CX3DImporter_NodeElement_Set& ne_alias = *((CX3DImporter_NodeElement_Set*)ne);
- ne_alias.CCW = ccw;
- ne_alias.ColorPerVertex = colorPerVertex;
- ne_alias.VertexCount = fanCount;
- ne_alias.NormalPerVertex = normalPerVertex;
- ne_alias.Solid = solid;
- // create CoordIdx
- size_t coord_num_first, coord_num_prev;
- ne_alias.CoordIndex.clear();
- // assign indices for first triangle
- coord_num_first = 0;
- coord_num_prev = 1;
- for(std::list<int32_t>::const_iterator vc_it = ne_alias.VertexCount.begin(); vc_it != ne_alias.VertexCount.end(); vc_it++)
- {
- if(*vc_it < 3) throw DeadlyImportError("TriangleFanSet. fanCount shall be greater than or equal to three.");
- for(int32_t vc = 2; vc < *vc_it; vc++)
- {
- if(ccw)
- {
- // 2 1
- // 0
- ne_alias.CoordIndex.push_back(static_cast<int32_t>(coord_num_first));// first vertex is a center and always is [0].
- ne_alias.CoordIndex.push_back(static_cast<int32_t>(coord_num_prev++));
- ne_alias.CoordIndex.push_back(static_cast<int32_t>(coord_num_prev));
- }
- else
- {
- // 1 2
- // 0
- ne_alias.CoordIndex.push_back(static_cast<int32_t>(coord_num_first));// first vertex is a center and always is [0].
- ne_alias.CoordIndex.push_back(static_cast<int32_t>(coord_num_prev + 1));
- ne_alias.CoordIndex.push_back(static_cast<int32_t>(coord_num_prev++));
- }// if(ccw) else
- ne_alias.CoordIndex.push_back(-1);// add face delimiter.
- }// for(int32_t vc = 2; vc < *vc_it; vc++)
- coord_num_prev++;// that index will be center of next fan
- coord_num_first = coord_num_prev++;// forward to next point - second point of fan
- }// for(std::list<int32_t>::const_iterator vc_it = ne_alias.VertexCount.begin(); vc_it != ne_alias.VertexCount.end(); vc_it++)
- // check for child nodes
- if(!mReader->isEmptyElement())
- {
- ParseHelper_Node_Enter(ne);
- MACRO_NODECHECK_LOOPBEGIN("TriangleFanSet");
- // check for X3DComposedGeometryNodes
- if(XML_CheckNode_NameEqual("Color")) { ParseNode_Rendering_Color(); continue; }
- if(XML_CheckNode_NameEqual("ColorRGBA")) { ParseNode_Rendering_ColorRGBA(); continue; }
- if(XML_CheckNode_NameEqual("Coordinate")) { ParseNode_Rendering_Coordinate(); continue; }
- if(XML_CheckNode_NameEqual("Normal")) { ParseNode_Rendering_Normal(); continue; }
- if(XML_CheckNode_NameEqual("TextureCoordinate")) { ParseNode_Texturing_TextureCoordinate(); continue; }
- // check for X3DMetadataObject
- if(!ParseHelper_CheckRead_X3DMetadataObject()) XML_CheckNode_SkipUnsupported("TriangleFanSet");
- MACRO_NODECHECK_LOOPEND("TriangleFanSet");
- ParseHelper_Node_Exit();
- }// if(!mReader->isEmptyElement())
- else
- {
- NodeElement_Cur->Child.push_back(ne);// add made object as child to current element
- }
- NodeElement_List.push_back(ne);// add element to node element list because its a new object in graph
- }// if(!use.empty()) else
- }
- // <TriangleSet
- // DEF="" ID
- // USE="" IDREF
- // ccw="true" SFBool [initializeOnly]
- // colorPerVertex="true" SFBool [initializeOnly]
- // normalPerVertex="true" SFBool [initializeOnly]
- // solid="true" SFBool [initializeOnly]
- // >
- // <!-- ComposedGeometryContentModel -->
- // ComposedGeometryContentModel is the child-node content model corresponding to X3DComposedGeometryNodes. It can contain Color (or ColorRGBA), Coordinate,
- // Normal and TextureCoordinate, in any order. No more than one instance of these nodes is allowed. Multiple VertexAttribute (FloatVertexAttribute,
- // Matrix3VertexAttribute, Matrix4VertexAttribute) nodes can also be contained.
- // A ProtoInstance node (with the proper node type) can be substituted for any node in this content model.
- // </TriangleSet>
- void X3DImporter::ParseNode_Rendering_TriangleSet()
- {
- std::string use, def;
- bool ccw = true;
- bool colorPerVertex = true;
- bool normalPerVertex = true;
- bool solid = true;
- CX3DImporter_NodeElement* ne( nullptr );
- MACRO_ATTRREAD_LOOPBEG;
- MACRO_ATTRREAD_CHECKUSEDEF_RET(def, use);
- MACRO_ATTRREAD_CHECK_RET("ccw", ccw, XML_ReadNode_GetAttrVal_AsBool);
- MACRO_ATTRREAD_CHECK_RET("colorPerVertex", colorPerVertex, XML_ReadNode_GetAttrVal_AsBool);
- MACRO_ATTRREAD_CHECK_RET("normalPerVertex", normalPerVertex, XML_ReadNode_GetAttrVal_AsBool);
- MACRO_ATTRREAD_CHECK_RET("solid", solid, XML_ReadNode_GetAttrVal_AsBool);
- MACRO_ATTRREAD_LOOPEND;
- // if "USE" defined then find already defined element.
- if(!use.empty())
- {
- MACRO_USE_CHECKANDAPPLY(def, use, ENET_TriangleSet, ne);
- }
- else
- {
- // create and if needed - define new geometry object.
- ne = new CX3DImporter_NodeElement_IndexedSet(CX3DImporter_NodeElement::ENET_TriangleSet, NodeElement_Cur);
- if(!def.empty()) ne->ID = def;
- CX3DImporter_NodeElement_Set& ne_alias = *((CX3DImporter_NodeElement_Set*)ne);
- ne_alias.CCW = ccw;
- ne_alias.ColorPerVertex = colorPerVertex;
- ne_alias.NormalPerVertex = normalPerVertex;
- ne_alias.Solid = solid;
- // check for child nodes
- if(!mReader->isEmptyElement())
- {
- ParseHelper_Node_Enter(ne);
- MACRO_NODECHECK_LOOPBEGIN("TriangleSet");
- // check for X3DComposedGeometryNodes
- if(XML_CheckNode_NameEqual("Color")) { ParseNode_Rendering_Color(); continue; }
- if(XML_CheckNode_NameEqual("ColorRGBA")) { ParseNode_Rendering_ColorRGBA(); continue; }
- if(XML_CheckNode_NameEqual("Coordinate")) { ParseNode_Rendering_Coordinate(); continue; }
- if(XML_CheckNode_NameEqual("Normal")) { ParseNode_Rendering_Normal(); continue; }
- if(XML_CheckNode_NameEqual("TextureCoordinate")) { ParseNode_Texturing_TextureCoordinate(); continue; }
- // check for X3DMetadataObject
- if(!ParseHelper_CheckRead_X3DMetadataObject()) XML_CheckNode_SkipUnsupported("TriangleSet");
- MACRO_NODECHECK_LOOPEND("TriangleSet");
- ParseHelper_Node_Exit();
- }// if(!mReader->isEmptyElement())
- else
- {
- NodeElement_Cur->Child.push_back(ne);// add made object as child to current element
- }
- NodeElement_List.push_back(ne);// add element to node element list because its a new object in graph
- }// if(!use.empty()) else
- }
- // <TriangleStripSet
- // DEF="" ID
- // USE="" IDREF
- // ccw="true" SFBool [initializeOnly]
- // colorPerVertex="true" SFBool [initializeOnly]
- // normalPerVertex="true" SFBool [initializeOnly]
- // solid="true" SFBool [initializeOnly]
- // stripCount="" MFInt32 [inputOutput]
- // >
- // <!-- ComposedGeometryContentModel -->
- // ComposedGeometryContentModel is the child-node content model corresponding to X3DComposedGeometryNodes. It can contain Color (or ColorRGBA), Coordinate,
- // Normal and TextureCoordinate, in any order. No more than one instance of these nodes is allowed. Multiple VertexAttribute (FloatVertexAttribute,
- // Matrix3VertexAttribute, Matrix4VertexAttribute) nodes can also be contained.
- // A ProtoInstance node (with the proper node type) can be substituted for any node in this content model.
- // </TriangleStripSet>
- void X3DImporter::ParseNode_Rendering_TriangleStripSet()
- {
- std::string use, def;
- bool ccw = true;
- bool colorPerVertex = true;
- std::list<int32_t> stripCount;
- bool normalPerVertex = true;
- bool solid = true;
- CX3DImporter_NodeElement* ne( nullptr );
- MACRO_ATTRREAD_LOOPBEG;
- MACRO_ATTRREAD_CHECKUSEDEF_RET(def, use);
- MACRO_ATTRREAD_CHECK_RET("ccw", ccw, XML_ReadNode_GetAttrVal_AsBool);
- MACRO_ATTRREAD_CHECK_RET("colorPerVertex", colorPerVertex, XML_ReadNode_GetAttrVal_AsBool);
- MACRO_ATTRREAD_CHECK_REF("stripCount", stripCount, XML_ReadNode_GetAttrVal_AsListI32);
- MACRO_ATTRREAD_CHECK_RET("normalPerVertex", normalPerVertex, XML_ReadNode_GetAttrVal_AsBool);
- MACRO_ATTRREAD_CHECK_RET("solid", solid, XML_ReadNode_GetAttrVal_AsBool);
- MACRO_ATTRREAD_LOOPEND;
- // if "USE" defined then find already defined element.
- if(!use.empty())
- {
- MACRO_USE_CHECKANDAPPLY(def, use, ENET_TriangleStripSet, ne);
- }
- else
- {
- // check data
- if(stripCount.size() == 0) throw DeadlyImportError("TriangleStripSet must contain not empty \"stripCount\" attribute.");
- // create and if needed - define new geometry object.
- ne = new CX3DImporter_NodeElement_Set(CX3DImporter_NodeElement::ENET_TriangleStripSet, NodeElement_Cur);
- if(!def.empty()) ne->ID = def;
- CX3DImporter_NodeElement_Set& ne_alias = *((CX3DImporter_NodeElement_Set*)ne);
- ne_alias.CCW = ccw;
- ne_alias.ColorPerVertex = colorPerVertex;
- ne_alias.VertexCount = stripCount;
- ne_alias.NormalPerVertex = normalPerVertex;
- ne_alias.Solid = solid;
- // create CoordIdx
- size_t coord_num0, coord_num1, coord_num2;// indices of current triangle
- bool odd_tri;// sequence of current triangle
- size_t coord_num_sb;// index of first point of strip
- ne_alias.CoordIndex.clear();
- coord_num_sb = 0;
- for(std::list<int32_t>::const_iterator vc_it = ne_alias.VertexCount.begin(); vc_it != ne_alias.VertexCount.end(); vc_it++)
- {
- if(*vc_it < 3) throw DeadlyImportError("TriangleStripSet. stripCount shall be greater than or equal to three.");
- // set initial values for first triangle
- coord_num0 = coord_num_sb;
- coord_num1 = coord_num_sb + 1;
- coord_num2 = coord_num_sb + 2;
- odd_tri = true;
- for(int32_t vc = 2; vc < *vc_it; vc++)
- {
- if(ccw)
- {
- // 0 2
- // 1
- ne_alias.CoordIndex.push_back(static_cast<int32_t>(coord_num0));
- ne_alias.CoordIndex.push_back(static_cast<int32_t>(coord_num1));
- ne_alias.CoordIndex.push_back(static_cast<int32_t>(coord_num2));
- }
- else
- {
- // 0 1
- // 2
- ne_alias.CoordIndex.push_back(static_cast<int32_t>(coord_num0));
- ne_alias.CoordIndex.push_back(static_cast<int32_t>(coord_num2));
- ne_alias.CoordIndex.push_back(static_cast<int32_t>(coord_num1));
- }// if(ccw) else
- ne_alias.CoordIndex.push_back(-1);// add face delimiter.
- // prepare values for next triangle
- if(odd_tri)
- {
- coord_num0 = coord_num2;
- coord_num2++;
- }
- else
- {
- coord_num1 = coord_num2;
- coord_num2 = coord_num1 + 1;
- }
- odd_tri = !odd_tri;
- coord_num_sb = coord_num2;// that index will be start of next strip
- }// for(int32_t vc = 2; vc < *vc_it; vc++)
- }// for(std::list<int32_t>::const_iterator vc_it = ne_alias.VertexCount.begin(); vc_it != ne_alias.VertexCount.end(); vc_it++)
- // check for child nodes
- if(!mReader->isEmptyElement())
- {
- ParseHelper_Node_Enter(ne);
- MACRO_NODECHECK_LOOPBEGIN("TriangleStripSet");
- // check for X3DComposedGeometryNodes
- if(XML_CheckNode_NameEqual("Color")) { ParseNode_Rendering_Color(); continue; }
- if(XML_CheckNode_NameEqual("ColorRGBA")) { ParseNode_Rendering_ColorRGBA(); continue; }
- if(XML_CheckNode_NameEqual("Coordinate")) { ParseNode_Rendering_Coordinate(); continue; }
- if(XML_CheckNode_NameEqual("Normal")) { ParseNode_Rendering_Normal(); continue; }
- if(XML_CheckNode_NameEqual("TextureCoordinate")) { ParseNode_Texturing_TextureCoordinate(); continue; }
- // check for X3DMetadataObject
- if(!ParseHelper_CheckRead_X3DMetadataObject()) XML_CheckNode_SkipUnsupported("TriangleStripSet");
- MACRO_NODECHECK_LOOPEND("TriangleStripSet");
- ParseHelper_Node_Exit();
- }// if(!mReader->isEmptyElement())
- else
- {
- NodeElement_Cur->Child.push_back(ne);// add made object as child to current element
- }
- NodeElement_List.push_back(ne);// add element to node element list because its a new object in graph
- }// if(!use.empty()) else
- }
- // <Normal
- // DEF="" ID
- // USE="" IDREF
- // vector="" MFVec3f [inputOutput]
- // />
- void X3DImporter::ParseNode_Rendering_Normal()
- {
- std::string use, def;
- std::list<aiVector3D> vector;
- CX3DImporter_NodeElement* ne;
- MACRO_ATTRREAD_LOOPBEG;
- MACRO_ATTRREAD_CHECKUSEDEF_RET(def, use);
- MACRO_ATTRREAD_CHECK_REF("vector", vector, XML_ReadNode_GetAttrVal_AsListVec3f);
- MACRO_ATTRREAD_LOOPEND;
- // if "USE" defined then find already defined element.
- if(!use.empty())
- {
- MACRO_USE_CHECKANDAPPLY(def, use, ENET_Normal, ne);
- }
- else
- {
- // create and if needed - define new geometry object.
- ne = new CX3DImporter_NodeElement_Normal(NodeElement_Cur);
- if(!def.empty()) ne->ID = def;
- ((CX3DImporter_NodeElement_Normal*)ne)->Value = vector;
- // check for X3DMetadataObject childs.
- if(!mReader->isEmptyElement())
- ParseNode_Metadata(ne, "Normal");
- else
- NodeElement_Cur->Child.push_back(ne);// add made object as child to current element
- NodeElement_List.push_back(ne);// add element to node element list because its a new object in graph
- }// if(!use.empty()) else
- }
- }// namespace Assimp
- #endif // !ASSIMP_BUILD_NO_X3D_IMPORTER
|