Added: #1440 Extended parser for GeomObject

--HG--
branch : build_pipeline_v3
hg/feature/build_pipeline_v3
kaetemi 12 years ago
parent 3f6de020c0
commit 3a6b7fc130

@ -126,9 +126,26 @@ const ISceneClassDesc *CGeomObject::classDesc() const
} }
void CGeomObject::toStringLocal(std::ostream &ostream, const std::string &pad, uint filter) const void CGeomObject::toStringLocal(std::ostream &ostream, const std::string &pad, uint filter) const
{
if (filter == 0)
{ {
CObject::toStringLocal(ostream, pad); CObject::toStringLocal(ostream, pad);
} }
else if (filter == PMB_GEOM_OBJECT_PARSE_FILTER)
{
std::string padpad = pad + "\t";
if (m_Unknown0900)
{
ostream << "\n" << pad << "GeomObject Unknown 0x0900: ";
m_Unknown0900->toString(ostream, padpad);
}
if (m_GeomBuffers)
{
ostream << "\n" << pad << "GeomBuffers: ";
m_GeomBuffers->toString(ostream, padpad);
}
}
}
IStorageObject *CGeomObject::createChunkById(uint16 id, bool container) IStorageObject *CGeomObject::createChunkById(uint16 id, bool container)
{ {

@ -59,9 +59,23 @@ const TSClassId CPolyObject::SuperClassId = CGeomObject::SuperClassId;
const CPolyObjectClassDesc PolyObjectClassDesc(&DllPluginDescBuiltin); const CPolyObjectClassDesc PolyObjectClassDesc(&DllPluginDescBuiltin);
void CPolyObject::parse(uint16 version, uint filter) void CPolyObject::parse(uint16 version, uint filter)
{
if (filter == 0)
{ {
CGeomObject::parse(version); CGeomObject::parse(version);
} }
else if (filter == PMB_POLY_OBJECT_PARSE_FILTER)
{
if (!m_ChunksOwnsPointers)
{
CGeomObject::parse(version, PMB_GEOM_OBJECT_PARSE_FILTER);
// 0x0906
// 0x0908
// 0x090a
// 0x090c
}
}
}
void CPolyObject::clean() void CPolyObject::clean()
{ {
@ -69,9 +83,20 @@ void CPolyObject::clean()
} }
void CPolyObject::build(uint16 version, uint filter) void CPolyObject::build(uint16 version, uint filter)
{
if (filter == 0)
{ {
CGeomObject::build(version); CGeomObject::build(version);
} }
else if (filter == PMB_POLY_OBJECT_PARSE_FILTER)
{
CGeomObject::build(version, PMB_GEOM_OBJECT_PARSE_FILTER);
// 0x0906
// 0x0908
// 0x090a
// 0x090c
}
}
void CPolyObject::disown() void CPolyObject::disown()
{ {
@ -95,9 +120,20 @@ const ISceneClassDesc *CPolyObject::classDesc() const
} }
void CPolyObject::toStringLocal(std::ostream &ostream, const std::string &pad, uint filter) const void CPolyObject::toStringLocal(std::ostream &ostream, const std::string &pad, uint filter) const
{
if (filter == 0)
{ {
CGeomObject::toStringLocal(ostream, pad); CGeomObject::toStringLocal(ostream, pad);
} }
else if (filter == PMB_POLY_OBJECT_PARSE_FILTER)
{
CGeomObject::toStringLocal(ostream, pad, PMB_GEOM_OBJECT_PARSE_FILTER);
// 0x0906
// 0x0908
// 0x090a
// 0x090c
}
}
IStorageObject *CPolyObject::createChunkById(uint16 id, bool container) IStorageObject *CPolyObject::createChunkById(uint16 id, bool container)
{ {

@ -68,7 +68,11 @@ void CTriObject::parse(uint16 version, uint filter)
{ {
if (!m_ChunksOwnsPointers) if (!m_ChunksOwnsPointers)
{ {
CGeomObject::parse(version, PMB_GEOM_OBJECT_PARSE_FILTER);
// 0x0901
// 0x0902
// 0x0904
// 0x0903
} }
} }
} }
@ -86,7 +90,11 @@ void CTriObject::build(uint16 version, uint filter)
} }
else if (filter == PMB_TRI_OBJECT_PARSE_FILTER) else if (filter == PMB_TRI_OBJECT_PARSE_FILTER)
{ {
CGeomObject::build(version, PMB_GEOM_OBJECT_PARSE_FILTER);
// 0x0901
// 0x0902
// 0x0904
// 0x0903
} }
} }
@ -112,9 +120,20 @@ const ISceneClassDesc *CTriObject::classDesc() const
} }
void CTriObject::toStringLocal(std::ostream &ostream, const std::string &pad, uint filter) const void CTriObject::toStringLocal(std::ostream &ostream, const std::string &pad, uint filter) const
{
if (filter == 0)
{ {
CGeomObject::toStringLocal(ostream, pad); CGeomObject::toStringLocal(ostream, pad);
} }
else if (filter == PMB_TRI_OBJECT_PARSE_FILTER)
{
CGeomObject::toStringLocal(ostream, pad, PMB_GEOM_OBJECT_PARSE_FILTER);
// 0x0901
// 0x0902
// 0x0904
// 0x0903
}
}
IStorageObject *CTriObject::createChunkById(uint16 id, bool container) IStorageObject *CTriObject::createChunkById(uint16 id, bool container)
{ {

Loading…
Cancel
Save