Added: #1440 Dummy classes for editable mesh, poly and patch

--HG--
branch : build_pipeline_v3
hg/feature/build_pipeline_v3
kaetemi 12 years ago
parent b6ec41f53d
commit e5cd5eb497

@ -14,8 +14,8 @@ ENDIF (NOT GLIB2_FOUND)
INCLUDE_DIRECTORIES(${GLIB2_INCLUDE_DIRS}) INCLUDE_DIRECTORIES(${GLIB2_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${LIBGSF_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${LIBGSF_INCLUDE_DIR})
FILE(GLOB SRCS *.cpp builtin/*.cpp builtin/storage/*.cpp) FILE(GLOB SRCS *.cpp builtin/*.cpp builtin/storage/*.cpp update1/*.cpp epoly/*.cpp)
FILE(GLOB HDRS *.h builtin/*.h builtin/storage/*.h) FILE(GLOB HDRS *.h builtin/*.h builtin/storage/*.h update1/*.h epoly/*.h)
NL_TARGET_LIB(pipeline_max NL_TARGET_LIB(pipeline_max
${SRCS} ${SRCS}

@ -51,6 +51,10 @@
#include "base_object.h" #include "base_object.h"
#include "object.h" #include "object.h"
#include "geom_object.h" #include "geom_object.h"
#include "tri_object.h"
#include "poly_object.h"
#include "patch_object.h"
#include "editable_patch.h"
// using namespace std; // using namespace std;
// using namespace NLMISC; // using namespace NLMISC;
@ -249,6 +253,14 @@ void CBuiltin::registerClasses(CSceneClassRegistry *registry)
{ {
registry->add(&GeomObjectSuperClassDesc); registry->add(&GeomObjectSuperClassDesc);
registry->add(&GeomObjectClassDesc); registry->add(&GeomObjectClassDesc);
{
registry->add(&TriObjectClassDesc);
registry->add(&PolyObjectClassDesc);
registry->add(&PatchObjectClassDesc);
{
registry->add(&EditablePatchClassDesc);
}
}
} }
} }

@ -0,0 +1,111 @@
/**
* \file editable_patch.cpp
* \brief CEditablePatch
* \date 2012-08-26 12:12GMT
* \author Jan Boon (Kaetemi)
* CEditablePatch
*/
/*
* Copyright (C) 2012 by authors
*
* This file is part of RYZOM CORE PIPELINE.
* RYZOM CORE PIPELINE is free software: you can redistribute it
* and/or modify it under the terms of the GNU Affero General Public
* License as published by the Free Software Foundation, either
* version 3 of the License, or (at your option) any later version.
*
* RYZOM CORE PIPELINE is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with RYZOM CORE PIPELINE. If not, see
* <http://www.gnu.org/licenses/>.
*/
#include <nel/misc/types_nl.h>
#include "editable_patch.h"
// STL includes
// NeL includes
// #include <nel/misc/debug.h>
// Project includes
// using namespace std;
// using namespace NLMISC;
namespace PIPELINE {
namespace MAX {
namespace BUILTIN {
CEditablePatch::CEditablePatch(CScene *scene) : CPatchObject(scene)
{
}
CEditablePatch::~CEditablePatch()
{
}
const ucstring CEditablePatch::DisplayName = ucstring("EditablePatch");
const char *CEditablePatch::InternalName = "EditablePatch";
const NLMISC::CClassId CEditablePatch::ClassId = NLMISC::CClassId(0x00001030, 0x00000000);
const TSClassId CEditablePatch::SuperClassId = CPatchObject::SuperClassId;
const CEditablePatchClassDesc EditablePatchClassDesc(&DllPluginDescBuiltin);
void CEditablePatch::parse(uint16 version)
{
CPatchObject::parse(version);
}
void CEditablePatch::clean()
{
CPatchObject::clean();
}
void CEditablePatch::build(uint16 version)
{
CPatchObject::build(version);
}
void CEditablePatch::disown()
{
CPatchObject::disown();
}
void CEditablePatch::init()
{
CPatchObject::init();
}
bool CEditablePatch::inherits(const NLMISC::CClassId classId) const
{
if (classId == classDesc()->classId()) return true;
return CPatchObject::inherits(classId);
}
const ISceneClassDesc *CEditablePatch::classDesc() const
{
return &EditablePatchClassDesc;
}
void CEditablePatch::toStringLocal(std::ostream &ostream, const std::string &pad) const
{
CPatchObject::toStringLocal(ostream, pad);
}
IStorageObject *CEditablePatch::createChunkById(uint16 id, bool container)
{
return CPatchObject::createChunkById(id, container);
}
} /* namespace BUILTIN */
} /* namespace MAX */
} /* namespace PIPELINE */
/* end of file */

@ -0,0 +1,86 @@
/**
* \file editable_patch.h
* \brief CEditablePatch
* \date 2012-08-26 12:12GMT
* \author Jan Boon (Kaetemi)
* CEditablePatch
*/
/*
* Copyright (C) 2012 by authors
*
* This file is part of RYZOM CORE PIPELINE.
* RYZOM CORE PIPELINE is free software: you can redistribute it
* and/or modify it under the terms of the GNU Affero General Public
* License as published by the Free Software Foundation, either
* version 3 of the License, or (at your option) any later version.
*
* RYZOM CORE PIPELINE is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with RYZOM CORE PIPELINE. If not, see
* <http://www.gnu.org/licenses/>.
*/
#ifndef PIPELINE_EDITABLE_PATCH_H
#define PIPELINE_EDITABLE_PATCH_H
#include <nel/misc/types_nl.h>
// STL includes
// NeL includes
// Project includes
#include "patch_object.h"
namespace PIPELINE {
namespace MAX {
namespace BUILTIN {
/**
* \brief CEditablePatch
* \date 2012-08-26 12:12GMT
* \author Jan Boon (Kaetemi)
* CEditablePatch
*/
class CEditablePatch : public CPatchObject
{
public:
CEditablePatch(CScene *scene);
virtual ~CEditablePatch();
// class desc
static const ucstring DisplayName;
static const char *InternalName;
static const NLMISC::CClassId ClassId;
static const TSClassId SuperClassId;
// inherited
virtual void parse(uint16 version);
virtual void clean();
virtual void build(uint16 version);
virtual void disown();
virtual void init();
virtual bool inherits(const NLMISC::CClassId classId) const;
virtual const ISceneClassDesc *classDesc() const;
virtual void toStringLocal(std::ostream &ostream, const std::string &pad = "") const;
protected:
// inherited
virtual IStorageObject *createChunkById(uint16 id, bool container);
}; /* class CEditablePatch */
typedef CSceneClassDesc<CEditablePatch> CEditablePatchClassDesc;
extern const CEditablePatchClassDesc EditablePatchClassDesc;
} /* namespace BUILTIN */
} /* namespace MAX */
} /* namespace PIPELINE */
#endif /* #ifndef PIPELINE_EDITABLE_PATCH_H */
/* end of file */

@ -35,14 +35,14 @@
// Project includes // Project includes
using namespace std; // using namespace std;
// using namespace NLMISC; // using namespace NLMISC;
namespace PIPELINE { namespace PIPELINE {
namespace MAX { namespace MAX {
namespace BUILTIN { namespace BUILTIN {
CPatchObject::CPatchObject(CScene *scene) : CObject(scene) CPatchObject::CPatchObject(CScene *scene) : CGeomObject(scene)
{ {
} }
@ -52,6 +52,58 @@ CPatchObject::~CPatchObject()
} }
const ucstring CPatchObject::DisplayName = ucstring("PatchObject");
const char *CPatchObject::InternalName = "PatchObject";
const NLMISC::CClassId CPatchObject::ClassId = NLMISC::CClassId(0xd0a6b36, 0x7dce4b64); /* Not official, please correct */
const TSClassId CPatchObject::SuperClassId = CGeomObject::SuperClassId;
const CPatchObjectClassDesc PatchObjectClassDesc(&DllPluginDescBuiltin);
void CPatchObject::parse(uint16 version)
{
CGeomObject::parse(version);
}
void CPatchObject::clean()
{
CGeomObject::clean();
}
void CPatchObject::build(uint16 version)
{
CGeomObject::build(version);
}
void CPatchObject::disown()
{
CGeomObject::disown();
}
void CPatchObject::init()
{
CGeomObject::init();
}
bool CPatchObject::inherits(const NLMISC::CClassId classId) const
{
if (classId == classDesc()->classId()) return true;
return CGeomObject::inherits(classId);
}
const ISceneClassDesc *CPatchObject::classDesc() const
{
return &PatchObjectClassDesc;
}
void CPatchObject::toStringLocal(std::ostream &ostream, const std::string &pad) const
{
CGeomObject::toStringLocal(ostream, pad);
}
IStorageObject *CPatchObject::createChunkById(uint16 id, bool container)
{
return CGeomObject::createChunkById(id, container);
}
} /* namespace BUILTIN */ } /* namespace BUILTIN */
} /* namespace MAX */ } /* namespace MAX */
} /* namespace PIPELINE */ } /* namespace PIPELINE */

@ -34,7 +34,7 @@
// NeL includes // NeL includes
// Project includes // Project includes
#include "object.h" #include "geom_object.h"
namespace PIPELINE { namespace PIPELINE {
namespace MAX { namespace MAX {
@ -46,14 +46,37 @@ namespace BUILTIN {
* \author Jan Boon (Kaetemi) * \author Jan Boon (Kaetemi)
* CPatchObject * CPatchObject
*/ */
class CPatchObject : public CObject class CPatchObject : public CGeomObject
{ {
public: public:
CPatchObject(CScene *scene); CPatchObject(CScene *scene);
virtual ~CPatchObject(); virtual ~CPatchObject();
// class desc
static const ucstring DisplayName;
static const char *InternalName;
static const NLMISC::CClassId ClassId;
static const TSClassId SuperClassId;
// inherited
virtual void parse(uint16 version);
virtual void clean();
virtual void build(uint16 version);
virtual void disown();
virtual void init();
virtual bool inherits(const NLMISC::CClassId classId) const;
virtual const ISceneClassDesc *classDesc() const;
virtual void toStringLocal(std::ostream &ostream, const std::string &pad = "") const;
protected:
// inherited
virtual IStorageObject *createChunkById(uint16 id, bool container);
}; /* class CPatchObject */ }; /* class CPatchObject */
typedef CSceneClassDesc<CPatchObject> CPatchObjectClassDesc;
extern const CPatchObjectClassDesc PatchObjectClassDesc;
} /* namespace BUILTIN */ } /* namespace BUILTIN */
} /* namespace MAX */ } /* namespace MAX */
} /* namespace PIPELINE */ } /* namespace PIPELINE */

@ -42,7 +42,7 @@ namespace PIPELINE {
namespace MAX { namespace MAX {
namespace BUILTIN { namespace BUILTIN {
CPolyObject::CPolyObject(CScene *scene) : CObject(scene) CPolyObject::CPolyObject(CScene *scene) : CGeomObject(scene)
{ {
} }
@ -52,6 +52,58 @@ CPolyObject::~CPolyObject()
} }
const ucstring CPolyObject::DisplayName = ucstring("PolyObject");
const char *CPolyObject::InternalName = "PolyObject";
const NLMISC::CClassId CPolyObject::ClassId = NLMISC::CClassId(0x59772461, 0x6e1141e8); /* Not official, please correct */
const TSClassId CPolyObject::SuperClassId = CGeomObject::SuperClassId;
const CPolyObjectClassDesc PolyObjectClassDesc(&DllPluginDescBuiltin);
void CPolyObject::parse(uint16 version)
{
CGeomObject::parse(version);
}
void CPolyObject::clean()
{
CGeomObject::clean();
}
void CPolyObject::build(uint16 version)
{
CGeomObject::build(version);
}
void CPolyObject::disown()
{
CGeomObject::disown();
}
void CPolyObject::init()
{
CGeomObject::init();
}
bool CPolyObject::inherits(const NLMISC::CClassId classId) const
{
if (classId == classDesc()->classId()) return true;
return CGeomObject::inherits(classId);
}
const ISceneClassDesc *CPolyObject::classDesc() const
{
return &PolyObjectClassDesc;
}
void CPolyObject::toStringLocal(std::ostream &ostream, const std::string &pad) const
{
CGeomObject::toStringLocal(ostream, pad);
}
IStorageObject *CPolyObject::createChunkById(uint16 id, bool container)
{
return CGeomObject::createChunkById(id, container);
}
} /* namespace BUILTIN */ } /* namespace BUILTIN */
} /* namespace MAX */ } /* namespace MAX */
} /* namespace PIPELINE */ } /* namespace PIPELINE */

@ -34,7 +34,7 @@
// NeL includes // NeL includes
// Project includes // Project includes
#include "object.h" #include "geom_object.h"
namespace PIPELINE { namespace PIPELINE {
namespace MAX { namespace MAX {
@ -46,14 +46,37 @@ namespace BUILTIN {
* \author Jan Boon (Kaetemi) * \author Jan Boon (Kaetemi)
* CPolyObject * CPolyObject
*/ */
class CPolyObject : public CObject class CPolyObject : public CGeomObject
{ {
public: public:
CPolyObject(CScene *scene); CPolyObject(CScene *scene);
virtual ~CPolyObject(); virtual ~CPolyObject();
// class desc
static const ucstring DisplayName;
static const char *InternalName;
static const NLMISC::CClassId ClassId;
static const TSClassId SuperClassId;
// inherited
virtual void parse(uint16 version);
virtual void clean();
virtual void build(uint16 version);
virtual void disown();
virtual void init();
virtual bool inherits(const NLMISC::CClassId classId) const;
virtual const ISceneClassDesc *classDesc() const;
virtual void toStringLocal(std::ostream &ostream, const std::string &pad = "") const;
protected:
// inherited
virtual IStorageObject *createChunkById(uint16 id, bool container);
}; /* class CPolyObject */ }; /* class CPolyObject */
typedef CSceneClassDesc<CPolyObject> CPolyObjectClassDesc;
extern const CPolyObjectClassDesc PolyObjectClassDesc;
} /* namespace BUILTIN */ } /* namespace BUILTIN */
} /* namespace MAX */ } /* namespace MAX */
} /* namespace PIPELINE */ } /* namespace PIPELINE */

@ -47,6 +47,8 @@ namespace STORAGE {
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
#define PMBS_APP_DATA_PARSE 1
// Elevate warnings to errors in this file for stricter reading // Elevate warnings to errors in this file for stricter reading
#undef nlwarning #undef nlwarning
#define nlwarning nlerror #define nlwarning nlerror
@ -151,8 +153,7 @@ void CAppData::toString(std::ostream &ostream, const std::string &pad) const
void CAppData::parse(uint16 version) void CAppData::parse(uint16 version)
{ {
/*if (level & PARSE_BUILTIN) #if PMBS_APP_DATA_PARSE
{*/
// Cannot be parsed yet // Cannot be parsed yet
if (!m_ChunksOwnsPointers) { nlerror("Already parsed"); return; } if (!m_ChunksOwnsPointers) { nlerror("Already parsed"); return; }
@ -183,20 +184,23 @@ void CAppData::parse(uint16 version)
// Take local ownership // Take local ownership
m_ChunksOwnsPointers = false; m_ChunksOwnsPointers = false;
/*}*/ #endif
} }
void CAppData::clean() void CAppData::clean()
{ {
#if PMBS_APP_DATA_PARSE
if (m_ChunksOwnsPointers) { nldebug("Not parsed, or disowned"); return; } // Must have local ownership if (m_ChunksOwnsPointers) { nldebug("Not parsed, or disowned"); return; } // Must have local ownership
if (m_Chunks.size() == 0) { nlwarning("Already cleaned (or did not build due to coding error)"); return; } // Already cleaned if (m_Chunks.size() == 0) { nlwarning("Already cleaned (or did not build due to coding error)"); return; } // Already cleaned
if (m_Chunks.begin()->first != PMBS_APP_DATA_HEADER_CHUNK_ID) { nlerror("Bad id %x, expected %x", (uint32)m_Chunks.begin()->first, PMBS_APP_DATA_HEADER_CHUNK_ID); return; } // Cannot happen, because we won't have local ownership if parsing failed if (m_Chunks.begin()->first != PMBS_APP_DATA_HEADER_CHUNK_ID) { nlerror("Bad id %x, expected %x", (uint32)m_Chunks.begin()->first, PMBS_APP_DATA_HEADER_CHUNK_ID); return; } // Cannot happen, because we won't have local ownership if parsing failed
delete m_Chunks.begin()->second; // Delete the header chunk, since we own it delete m_Chunks.begin()->second; // Delete the header chunk, since we own it
m_Chunks.clear(); // Clear the remaining chunks m_Chunks.clear(); // Clear the remaining chunks
#endif
} }
void CAppData::build(uint16 version) void CAppData::build(uint16 version)
{ {
#if PMBS_APP_DATA_PARSE
// Must be clean first // Must be clean first
if (!m_ChunksOwnsPointers && m_Chunks.size() != 0) { nlerror("Not cleaned"); return; } if (!m_ChunksOwnsPointers && m_Chunks.size() != 0) { nlerror("Not cleaned"); return; }
if (m_Chunks.size() != 0) { nldebug("Not parsed, or disowned"); return; } if (m_Chunks.size() != 0) { nldebug("Not parsed, or disowned"); return; }
@ -209,10 +213,12 @@ void CAppData::build(uint16 version)
// Set up the entries // Set up the entries
for (TMap::iterator it = m_Entries.begin(), end = m_Entries.end(); it != end; ++it) for (TMap::iterator it = m_Entries.begin(), end = m_Entries.end(); it != end; ++it)
m_Chunks.push_back(TStorageObjectWithId(PMBS_APP_DATA_ENTRY_CHUNK_ID, it->second)); m_Chunks.push_back(TStorageObjectWithId(PMBS_APP_DATA_ENTRY_CHUNK_ID, it->second));
#endif
} }
void CAppData::disown() void CAppData::disown()
{ {
#if PMBS_APP_DATA_PARSE
if (m_ChunksOwnsPointers) { nldebug("Not parsed"); } if (m_ChunksOwnsPointers) { nldebug("Not parsed"); }
if (!m_ChunksOwnsPointers && (m_Chunks.size() != (m_Entries.size() + 1))) { nlerror("Not built"); return; } // If chunks is not the owner, built chunks must match the parsed data if (!m_ChunksOwnsPointers && (m_Chunks.size() != (m_Entries.size() + 1))) { nlerror("Not built"); return; } // If chunks is not the owner, built chunks must match the parsed data
// NOTE: m_Chunks must be valid at this point! // NOTE: m_Chunks must be valid at this point!
@ -225,6 +231,7 @@ void CAppData::disown()
// Disown all the child chunks // Disown all the child chunks
CStorageContainer::disown(); CStorageContainer::disown();
#endif
} }
void CAppData::init() void CAppData::init()

@ -49,6 +49,8 @@ namespace STORAGE {
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
#define PMBS_GEOM_BUFFERS_PARSE 1
// Elevate warnings to errors in this file for stricter reading // Elevate warnings to errors in this file for stricter reading
#undef nlwarning #undef nlwarning
#define nlwarning nlerror #define nlwarning nlerror
@ -152,13 +154,13 @@ CGeomPolyFaceInfo::CGeomPolyFaceInfo() : I1(0), Material(0), SmoothingGroups(0)
void CGeomPolyFaceInfo::serial(NLMISC::IStream &stream) void CGeomPolyFaceInfo::serial(NLMISC::IStream &stream)
{ {
nldebug("go"); // nldebug("go");
stream.serialCont(Vertices); stream.serialCont(Vertices);
nldebug("%i vertices", Vertices.size()); // nldebug("%i vertices", Vertices.size());
uint16 bitfield; uint16 bitfield;
if (!stream.isReading()) if (!stream.isReading())
{ {
nldebug("writing"); /*nldebug("writing");*/
bitfield = 0x0000; bitfield = 0x0000;
if (I1) bitfield |= 0x0001; if (I1) bitfield |= 0x0001;
// bitfield |= 0x0002; // bitfield |= 0x0002;
@ -170,31 +172,31 @@ void CGeomPolyFaceInfo::serial(NLMISC::IStream &stream)
// bitfield |= 0x0080; // bitfield |= 0x0080;
} }
stream.serial(bitfield); stream.serial(bitfield);
nldebug("bitfield 0x%x", (uint32)bitfield); // nldebug("bitfield 0x%x", (uint32)bitfield);
if (bitfield & 0x0001) { nldebug("i1"); stream.serial(I1); nlassert(I1); bitfield &= ~0x0001; } if (bitfield & 0x0001) { /*nldebug("i1");*/ stream.serial(I1); nlassert(I1); bitfield &= ~0x0001; }
else I1 = 0; else I1 = 0;
if (bitfield & 0x0008) { nldebug("material"); stream.serial(Material); nlassert(Material); bitfield &= ~0x0008; } if (bitfield & 0x0008) { /*nldebug("material");*/ stream.serial(Material); nlassert(Material); bitfield &= ~0x0008; }
else Material = 0; else Material = 0;
if (bitfield & 0x0010) { nldebug("smoothing"); stream.serial(SmoothingGroups); nlassert(SmoothingGroups); bitfield &= ~0x0010; } if (bitfield & 0x0010) { /*nldebug("smoothing");*/ stream.serial(SmoothingGroups); nlassert(SmoothingGroups); bitfield &= ~0x0010; }
else SmoothingGroups = 0; else SmoothingGroups = 0;
if (bitfield & 0x0020) if (bitfield & 0x0020)
{ {
nldebug("triangles"); /*nldebug("triangles");*/
if (stream.isReading()) Triangulation.resize(Vertices.size() - 3); if (stream.isReading()) Triangulation.resize(Vertices.size() - 3);
else nlassert(Triangulation.size() == Vertices.size() - 3); else nlassert(Triangulation.size() == Vertices.size() - 3);
for (std::vector<std::pair<uint32, uint32> >::size_type i = 0; i < Triangulation.size(); ++i) for (std::vector<std::pair<uint32, uint32> >::size_type i = 0; i < Triangulation.size(); ++i)
{ {
stream.serial(Triangulation[i].first); stream.serial(Triangulation[i].first);
nldebug("cut from %i", Triangulation[i].first); /*nldebug("cut from %i", Triangulation[i].first);*/
nlassert(Triangulation[i].first < Vertices.size()); nlassert(Triangulation[i].first < Vertices.size());
stream.serial(Triangulation[i].second); stream.serial(Triangulation[i].second);
nldebug("to %i", Triangulation[i].second); /*nldebug("to %i", Triangulation[i].second);*/
nlassert(Triangulation[i].second < Vertices.size()); nlassert(Triangulation[i].second < Vertices.size());
} }
nlassert(Triangulation.size()); nlassert(Triangulation.size());
bitfield &= ~0x0020; bitfield &= ~0x0020;
} }
if (bitfield) nlerror("Remaining bitfield value 0x%x", (uint32)bitfield); if (bitfield) nlerror("Remaining bitfield value 0x%x, please debug and implement", (uint32)bitfield);
} }
std::string CGeomPolyFaceInfo::toString() const std::string CGeomPolyFaceInfo::toString() const
@ -230,26 +232,35 @@ void CGeomBuffers::toString(std::ostream &ostream, const std::string &pad) const
void CGeomBuffers::parse(uint16 version) void CGeomBuffers::parse(uint16 version)
{ {
#if PMBS_GEOM_BUFFERS_PARSE
CStorageContainer::parse(version); CStorageContainer::parse(version);
#endif
} }
void CGeomBuffers::clean() void CGeomBuffers::clean()
{ {
#if PMBS_GEOM_BUFFERS_PARSE
CStorageContainer::clean(); CStorageContainer::clean();
#endif
} }
void CGeomBuffers::build(uint16 version) void CGeomBuffers::build(uint16 version)
{ {
#if PMBS_GEOM_BUFFERS_PARSE
CStorageContainer::build(version); CStorageContainer::build(version);
#endif
} }
void CGeomBuffers::disown() void CGeomBuffers::disown()
{ {
#if PMBS_GEOM_BUFFERS_PARSE
CStorageContainer::disown(); CStorageContainer::disown();
#endif
} }
IStorageObject *CGeomBuffers::createChunkById(uint16 id, bool container) IStorageObject *CGeomBuffers::createChunkById(uint16 id, bool container)
{ {
#if PMBS_GEOM_BUFFERS_PARSE
switch (id) switch (id)
{ {
// nlassert(!container); // nlassert(!container);
@ -279,6 +290,7 @@ IStorageObject *CGeomBuffers::createChunkById(uint16 id, bool container)
nlassert(!container); nlassert(!container);
return new CStorageArraySizePre<NLMISC::CVector>(); return new CStorageArraySizePre<NLMISC::CVector>();
} }
#endif
return CStorageContainer::createChunkById(id, container); return CStorageContainer::createChunkById(id, container);
} }

@ -42,7 +42,7 @@ namespace PIPELINE {
namespace MAX { namespace MAX {
namespace BUILTIN { namespace BUILTIN {
CTriObject::CTriObject(CScene *scene) : CObject(scene) CTriObject::CTriObject(CScene *scene) : CGeomObject(scene)
{ {
} }
@ -52,6 +52,58 @@ CTriObject::~CTriObject()
} }
const ucstring CTriObject::DisplayName = ucstring("TriObject");
const char *CTriObject::InternalName = "TriObject";
const NLMISC::CClassId CTriObject::ClassId = NLMISC::CClassId(0x4553fa6, 0x30f8421e); /* Not official, please correct */
const TSClassId CTriObject::SuperClassId = CGeomObject::SuperClassId;
const CTriObjectClassDesc TriObjectClassDesc(&DllPluginDescBuiltin);
void CTriObject::parse(uint16 version)
{
CGeomObject::parse(version);
}
void CTriObject::clean()
{
CGeomObject::clean();
}
void CTriObject::build(uint16 version)
{
CGeomObject::build(version);
}
void CTriObject::disown()
{
CGeomObject::disown();
}
void CTriObject::init()
{
CGeomObject::init();
}
bool CTriObject::inherits(const NLMISC::CClassId classId) const
{
if (classId == classDesc()->classId()) return true;
return CGeomObject::inherits(classId);
}
const ISceneClassDesc *CTriObject::classDesc() const
{
return &TriObjectClassDesc;
}
void CTriObject::toStringLocal(std::ostream &ostream, const std::string &pad) const
{
CGeomObject::toStringLocal(ostream, pad);
}
IStorageObject *CTriObject::createChunkById(uint16 id, bool container)
{
return CGeomObject::createChunkById(id, container);
}
} /* namespace BUILTIN */ } /* namespace BUILTIN */
} /* namespace MAX */ } /* namespace MAX */
} /* namespace PIPELINE */ } /* namespace PIPELINE */

@ -34,7 +34,7 @@
// NeL includes // NeL includes
// Project includes // Project includes
#include "object.h" #include "geom_object.h"
namespace PIPELINE { namespace PIPELINE {
namespace MAX { namespace MAX {
@ -46,15 +46,37 @@ namespace BUILTIN {
* \author Jan Boon (Kaetemi) * \author Jan Boon (Kaetemi)
* CTriObject * CTriObject
*/ */
class CTriObject : public CObject class CTriObject : public CGeomObject
{ {
public: public:
CTriObject(CScene *scene); CTriObject(CScene *scene);
virtual ~CTriObject(); virtual ~CTriObject();
// class desc
static const ucstring DisplayName;
static const char *InternalName;
static const NLMISC::CClassId ClassId;
static const TSClassId SuperClassId;
// inherited
virtual void parse(uint16 version);
virtual void clean();
virtual void build(uint16 version);
virtual void disown();
virtual void init();
virtual bool inherits(const NLMISC::CClassId classId) const;
virtual const ISceneClassDesc *classDesc() const;
virtual void toStringLocal(std::ostream &ostream, const std::string &pad = "") const;
protected:
// inherited
virtual IStorageObject *createChunkById(uint16 id, bool container);
}; /* class CTriObject */ }; /* class CTriObject */
typedef CSceneClassDesc<CTriObject> CTriObjectClassDesc;
extern const CTriObjectClassDesc TriObjectClassDesc;
} /* namespace BUILTIN */ } /* namespace BUILTIN */
} /* namespace MAX */ } /* namespace MAX */
} /* namespace PIPELINE */ } /* namespace PIPELINE */

@ -0,0 +1,55 @@
/**
* \file derived_object.cpp
* \brief CDerivedObject
* \date 2012-08-26 12:04GMT
* \author Jan Boon (Kaetemi)
* CDerivedObject
*/
/*
* Copyright (C) 2012 by authors
*
* This file is part of RYZOM CORE PIPELINE.
* RYZOM CORE PIPELINE is free software: you can redistribute it
* and/or modify it under the terms of the GNU Affero General Public
* License as published by the Free Software Foundation, either
* version 3 of the License, or (at your option) any later version.
*
* RYZOM CORE PIPELINE is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with RYZOM CORE PIPELINE. If not, see
* <http://www.gnu.org/licenses/>.
*/
#include <nel/misc/types_nl.h>
#include "derived_object.h"
// STL includes
// NeL includes
// #include <nel/misc/debug.h>
// Project includes
using namespace std;
// using namespace NLMISC;
namespace PIPELINE {
CDerivedObject::CDerivedObject()
{
}
CDerivedObject::~CDerivedObject()
{
}
} /* namespace PIPELINE */
/* end of file */

@ -0,0 +1,63 @@
/**
* \file derived_object.h
* \brief CDerivedObject
* \date 2012-08-26 12:04GMT
* \author Jan Boon (Kaetemi)
* CDerivedObject
*/
/*
* Copyright (C) 2012 by authors
*
* This file is part of RYZOM CORE PIPELINE.
* RYZOM CORE PIPELINE is free software: you can redistribute it
* and/or modify it under the terms of the GNU Affero General Public
* License as published by the Free Software Foundation, either
* version 3 of the License, or (at your option) any later version.
*
* RYZOM CORE PIPELINE is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with RYZOM CORE PIPELINE. If not, see
* <http://www.gnu.org/licenses/>.
*/
#ifndef PIPELINE_DERIVED_OBJECT_H
#define PIPELINE_DERIVED_OBJECT_H
#include <nel/misc/types_nl.h>
// STL includes
// NeL includes
// Project includes
namespace PIPELINE {
/**
* \brief CDerivedObject
* \date 2012-08-26 12:04GMT
* \author Jan Boon (Kaetemi)
* CDerivedObject
*/
class CDerivedObject
{
protected:
// pointers
// ...
// instances
// ...
public:
CDerivedObject();
virtual ~CDerivedObject();
}; /* class CDerivedObject */
} /* namespace PIPELINE */
#endif /* #ifndef PIPELINE_DERIVED_OBJECT_H */
/* end of file */

@ -0,0 +1,112 @@
/**
* \file editable_poly.cpp
* \brief CEditablePoly
* \date 2012-08-26 12:02GMT
* \author Jan Boon (Kaetemi)
* CEditablePoly
*/
/*
* Copyright (C) 2012 by authors
*
* This file is part of RYZOM CORE PIPELINE.
* RYZOM CORE PIPELINE is free software: you can redistribute it
* and/or modify it under the terms of the GNU Affero General Public
* License as published by the Free Software Foundation, either
* version 3 of the License, or (at your option) any later version.
*
* RYZOM CORE PIPELINE is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with RYZOM CORE PIPELINE. If not, see
* <http://www.gnu.org/licenses/>.
*/
#include <nel/misc/types_nl.h>
#include "editable_poly.h"
// STL includes
// NeL includes
// #include <nel/misc/debug.h>
// Project includes
#include "epoly.h"
using namespace std;
// using namespace NLMISC;
namespace PIPELINE {
namespace MAX {
namespace EPOLY {
CEditablePoly::CEditablePoly(CScene *scene) : CPolyObject(scene)
{
}
CEditablePoly::~CEditablePoly()
{
}
const ucstring CEditablePoly::DisplayName = ucstring("EditablePoly");
const char *CEditablePoly::InternalName = "EditablePoly";
const NLMISC::CClassId CEditablePoly::ClassId = NLMISC::CClassId(0x1bf8338d, 0x192f6098);
const TSClassId CEditablePoly::SuperClassId = CPolyObject::SuperClassId;
const CEditablePolyClassDesc EditablePolyClassDesc(&DllPluginDescEPoly);
void CEditablePoly::parse(uint16 version)
{
CPolyObject::parse(version);
}
void CEditablePoly::clean()
{
CPolyObject::clean();
}
void CEditablePoly::build(uint16 version)
{
CPolyObject::build(version);
}
void CEditablePoly::disown()
{
CPolyObject::disown();
}
void CEditablePoly::init()
{
CPolyObject::init();
}
bool CEditablePoly::inherits(const NLMISC::CClassId classId) const
{
if (classId == classDesc()->classId()) return true;
return CPolyObject::inherits(classId);
}
const ISceneClassDesc *CEditablePoly::classDesc() const
{
return &EditablePolyClassDesc;
}
void CEditablePoly::toStringLocal(std::ostream &ostream, const std::string &pad) const
{
CPolyObject::toStringLocal(ostream, pad);
}
IStorageObject *CEditablePoly::createChunkById(uint16 id, bool container)
{
return CPolyObject::createChunkById(id, container);
}
} /* namespace EPOLY */
} /* namespace MAX */
} /* namespace PIPELINE */
/* end of file */

@ -0,0 +1,86 @@
/**
* \file editable_poly.h
* \brief CEditablePoly
* \date 2012-08-26 12:02GMT
* \author Jan Boon (Kaetemi)
* CEditablePoly
*/
/*
* Copyright (C) 2012 by authors
*
* This file is part of RYZOM CORE PIPELINE.
* RYZOM CORE PIPELINE is free software: you can redistribute it
* and/or modify it under the terms of the GNU Affero General Public
* License as published by the Free Software Foundation, either
* version 3 of the License, or (at your option) any later version.
*
* RYZOM CORE PIPELINE is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with RYZOM CORE PIPELINE. If not, see
* <http://www.gnu.org/licenses/>.
*/
#ifndef PIPELINE_EDITABLE_POLY_H
#define PIPELINE_EDITABLE_POLY_H
#include <nel/misc/types_nl.h>
// STL includes
// NeL includes
// Project includes
#include "../builtin/poly_object.h"
namespace PIPELINE {
namespace MAX {
namespace EPOLY {
/**
* \brief CEditablePoly
* \date 2012-08-26 12:02GMT
* \author Jan Boon (Kaetemi)
* CEditablePoly
*/
class CEditablePoly : public PIPELINE::MAX::BUILTIN::CPolyObject
{
public:
CEditablePoly(CScene *scene);
virtual ~CEditablePoly();
// class desc
static const ucstring DisplayName;
static const char *InternalName;
static const NLMISC::CClassId ClassId;
static const TSClassId SuperClassId;
// inherited
virtual void parse(uint16 version);
virtual void clean();
virtual void build(uint16 version);
virtual void disown();
virtual void init();
virtual bool inherits(const NLMISC::CClassId classId) const;
virtual const ISceneClassDesc *classDesc() const;
virtual void toStringLocal(std::ostream &ostream, const std::string &pad = "") const;
protected:
// inherited
virtual IStorageObject *createChunkById(uint16 id, bool container);
}; /* class CEditablePoly */
typedef CSceneClassDesc<CEditablePoly> CEditablePolyClassDesc;
extern const CEditablePolyClassDesc EditablePolyClassDesc;
} /* namespace EPOLY */
} /* namespace MAX */
} /* namespace PIPELINE */
#endif /* #ifndef PIPELINE_EDITABLE_POLY_H */
/* end of file */

@ -0,0 +1,81 @@
/**
* \file epoly.cpp
* \brief CEPoly
* \date 2012-08-26 12:03GMT
* \author Jan Boon (Kaetemi)
* CEPoly
*/
/*
* Copyright (C) 2012 by authors
*
* This file is part of RYZOM CORE PIPELINE.
* RYZOM CORE PIPELINE is free software: you can redistribute it
* and/or modify it under the terms of the GNU Affero General Public
* License as published by the Free Software Foundation, either
* version 3 of the License, or (at your option) any later version.
*
* RYZOM CORE PIPELINE is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with RYZOM CORE PIPELINE. If not, see
* <http://www.gnu.org/licenses/>.
*/
#include <nel/misc/types_nl.h>
#include "epoly.h"
// STL includes
// NeL includes
// #include <nel/misc/debug.h>
// Project includes
#include "../scene_class_registry.h"
#include "editable_poly.h"
using namespace std;
// using namespace NLMISC;
namespace PIPELINE {
namespace MAX {
namespace EPOLY {
CEPoly::CEPoly()
{
}
CEPoly::~CEPoly()
{
}
void CEPoly::registerClasses(CSceneClassRegistry *registry)
{
registry->add(&EditablePolyClassDesc);
}
const ucchar *CDllPluginDescEPoly::displayName() const
{
static const ucstring value = ucstring("Editable Poly Object (Ryzom Core)");
return value.c_str();
}
const ucchar *CDllPluginDescEPoly::internalName() const
{
static const ucstring value = ucstring("EPoly.dlo");
return value.c_str();
}
const CDllPluginDescEPoly DllPluginDescEPoly;
} /* namespace EPOLY */
} /* namespace MAX */
} /* namespace PIPELINE */
/* end of file */

@ -0,0 +1,84 @@
/**
* \file epoly.h
* \brief CEPoly
* \date 2012-08-26 12:03GMT
* \author Jan Boon (Kaetemi)
* CEPoly
*/
/*
* Copyright (C) 2012 by authors
*
* This file is part of RYZOM CORE PIPELINE.
* RYZOM CORE PIPELINE is free software: you can redistribute it
* and/or modify it under the terms of the GNU Affero General Public
* License as published by the Free Software Foundation, either
* version 3 of the License, or (at your option) any later version.
*
* RYZOM CORE PIPELINE is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with RYZOM CORE PIPELINE. If not, see
* <http://www.gnu.org/licenses/>.
*/
#ifndef PIPELINE_EPOLY_H
#define PIPELINE_EPOLY_H
#include <nel/misc/types_nl.h>
// STL includes
// NeL includes
// Project includes
#include "../dll_plugin_desc.h"
namespace PIPELINE {
namespace MAX {
class CSceneClassRegistry;
namespace EPOLY {
/**
* \brief CEPoly
* \date 2012-08-26 12:03GMT
* \author Jan Boon (Kaetemi)
* CEPoly
*/
class CEPoly
{
public:
static void registerClasses(CSceneClassRegistry *registry);
public:
CEPoly();
virtual ~CEPoly();
}; /* class CEPoly */
/**
* \brief CDllPluginDescEPoly
* \date 2012-08-26 12:03GMT
* \author Jan Boon (Kaetemi)
* CDllPluginDescEPoly
*/
class CDllPluginDescEPoly : public IDllPluginDescInternal
{
public:
virtual const ucchar *displayName() const;
virtual const ucchar *internalName() const;
}; /* class CDllPluginDescScript */
extern const CDllPluginDescEPoly DllPluginDescEPoly;
} /* namespace EPOLY */
} /* namespace MAX */
} /* namespace PIPELINE */
#endif /* #ifndef PIPELINE_EPOLY_H */
/* end of file */

@ -45,19 +45,19 @@ namespace MAX {
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
CSceneClassUnknownDllPluginDesc::CSceneClassUnknownDllPluginDesc(const ucstring &dllFilename, const ucstring &dllDescription) : m_DisplayName(dllFilename), m_InternalName(dllDescription) CSceneClassUnknownDllPluginDesc::CSceneClassUnknownDllPluginDesc(const ucstring &dllFilename, const ucstring &dllDescription) : m_InternalName(dllFilename), m_DisplayName(dllDescription)
{ {
} }
const ucchar *CSceneClassUnknownDllPluginDesc::displayName() const const ucchar *CSceneClassUnknownDllPluginDesc::internalName() const
{ {
return m_DisplayName.c_str(); return m_InternalName.c_str();
} }
const ucchar *CSceneClassUnknownDllPluginDesc::internalName() const const ucchar *CSceneClassUnknownDllPluginDesc::displayName() const
{ {
return m_InternalName.c_str(); return m_DisplayName.c_str();
} }
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////

@ -49,12 +49,12 @@ class CSceneClassUnknownDllPluginDesc : public IDllPluginDescInternal
{ {
public: public:
CSceneClassUnknownDllPluginDesc(const ucstring &dllFilename, const ucstring &dllDescription); CSceneClassUnknownDllPluginDesc(const ucstring &dllFilename, const ucstring &dllDescription);
virtual const ucchar *displayName() const;
virtual const ucchar *internalName() const; virtual const ucchar *internalName() const;
virtual const ucchar *displayName() const;
private: private:
ucstring m_DisplayName;
ucstring m_InternalName; ucstring m_InternalName;
ucstring m_DisplayName;
}; };

@ -0,0 +1,55 @@
/**
* \file storage_file.cpp
* \brief CStorageFile
* \date 2012-08-20 13:35GMT
* \author Jan Boon (Kaetemi)
* CStorageFile
*/
/*
* Copyright (C) 2012 by authors
*
* This file is part of RYZOM CORE PIPELINE.
* RYZOM CORE PIPELINE is free software: you can redistribute it
* and/or modify it under the terms of the GNU Affero General Public
* License as published by the Free Software Foundation, either
* version 3 of the License, or (at your option) any later version.
*
* RYZOM CORE PIPELINE is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with RYZOM CORE PIPELINE. If not, see
* <http://www.gnu.org/licenses/>.
*/
#include <nel/misc/types_nl.h>
#include "storage_file.h"
// STL includes
// NeL includes
// #include <nel/misc/debug.h>
// Project includes
using namespace std;
// using namespace NLMISC;
namespace PIPELINE {
CStorageFile::CStorageFile()
{
}
CStorageFile::~CStorageFile()
{
}
} /* namespace PIPELINE */
/* end of file */

@ -0,0 +1,63 @@
/**
* \file storage_file.h
* \brief CStorageFile
* \date 2012-08-20 13:35GMT
* \author Jan Boon (Kaetemi)
* CStorageFile
*/
/*
* Copyright (C) 2012 by authors
*
* This file is part of RYZOM CORE PIPELINE.
* RYZOM CORE PIPELINE is free software: you can redistribute it
* and/or modify it under the terms of the GNU Affero General Public
* License as published by the Free Software Foundation, either
* version 3 of the License, or (at your option) any later version.
*
* RYZOM CORE PIPELINE is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with RYZOM CORE PIPELINE. If not, see
* <http://www.gnu.org/licenses/>.
*/
#ifndef PIPELINE_STORAGE_FILE_H
#define PIPELINE_STORAGE_FILE_H
#include <nel/misc/types_nl.h>
// STL includes
// NeL includes
// Project includes
namespace PIPELINE {
/**
* \brief CStorageFile
* \date 2012-08-20 13:35GMT
* \author Jan Boon (Kaetemi)
* CStorageFile
*/
class CStorageFile
{
protected:
// pointers
// ...
// instances
// ...
public:
CStorageFile();
virtual ~CStorageFile();
}; /* class CStorageFile */
} /* namespace PIPELINE */
#endif /* #ifndef PIPELINE_STORAGE_FILE_H */
/* end of file */

@ -0,0 +1,112 @@
/**
* \file editable_mesh.cpp
* \brief CEditableMesh
* \date 2012-08-26 12:11GMT
* \author Jan Boon (Kaetemi)
* CEditableMesh
*/
/*
* Copyright (C) 2012 by authors
*
* This file is part of RYZOM CORE PIPELINE.
* RYZOM CORE PIPELINE is free software: you can redistribute it
* and/or modify it under the terms of the GNU Affero General Public
* License as published by the Free Software Foundation, either
* version 3 of the License, or (at your option) any later version.
*
* RYZOM CORE PIPELINE is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with RYZOM CORE PIPELINE. If not, see
* <http://www.gnu.org/licenses/>.
*/
#include <nel/misc/types_nl.h>
#include "editable_mesh.h"
// STL includes
// NeL includes
// #include <nel/misc/debug.h>
// Project includes
#include "update1.h"
using namespace std;
// using namespace NLMISC;
namespace PIPELINE {
namespace MAX {
namespace UPDATE1 {
CEditableMesh::CEditableMesh(CScene *scene) : CTriObject(scene)
{
}
CEditableMesh::~CEditableMesh()
{
}
const ucstring CEditableMesh::DisplayName = ucstring("EditableMesh");
const char *CEditableMesh::InternalName = "EditableMesh";
const NLMISC::CClassId CEditableMesh::ClassId = NLMISC::CClassId(0xe44f10b3, 0x00000000);
const TSClassId CEditableMesh::SuperClassId = CTriObject::SuperClassId;
const CEditableMeshClassDesc EditableMeshClassDesc(&DllPluginDescUpdate1);
void CEditableMesh::parse(uint16 version)
{
CTriObject::parse(version);
}
void CEditableMesh::clean()
{
CTriObject::clean();
}
void CEditableMesh::build(uint16 version)
{
CTriObject::build(version);
}
void CEditableMesh::disown()
{
CTriObject::disown();
}
void CEditableMesh::init()
{
CTriObject::init();
}
bool CEditableMesh::inherits(const NLMISC::CClassId classId) const
{
if (classId == classDesc()->classId()) return true;
return CTriObject::inherits(classId);
}
const ISceneClassDesc *CEditableMesh::classDesc() const
{
return &EditableMeshClassDesc;
}
void CEditableMesh::toStringLocal(std::ostream &ostream, const std::string &pad) const
{
CTriObject::toStringLocal(ostream, pad);
}
IStorageObject *CEditableMesh::createChunkById(uint16 id, bool container)
{
return CTriObject::createChunkById(id, container);
}
} /* namespace UPDATE1 */
} /* namespace MAX */
} /* namespace PIPELINE */
/* end of file */

@ -0,0 +1,86 @@
/**
* \file editable_mesh.h
* \brief CEditableMesh
* \date 2012-08-26 12:11GMT
* \author Jan Boon (Kaetemi)
* CEditableMesh
*/
/*
* Copyright (C) 2012 by authors
*
* This file is part of RYZOM CORE PIPELINE.
* RYZOM CORE PIPELINE is free software: you can redistribute it
* and/or modify it under the terms of the GNU Affero General Public
* License as published by the Free Software Foundation, either
* version 3 of the License, or (at your option) any later version.
*
* RYZOM CORE PIPELINE is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with RYZOM CORE PIPELINE. If not, see
* <http://www.gnu.org/licenses/>.
*/
#ifndef PIPELINE_EDITABLE_MESH_H
#define PIPELINE_EDITABLE_MESH_H
#include <nel/misc/types_nl.h>
// STL includes
// NeL includes
// Project includes
#include "../builtin/tri_object.h"
namespace PIPELINE {
namespace MAX {
namespace UPDATE1 {
/**
* \brief CEditableMesh
* \date 2012-08-26 12:11GMT
* \author Jan Boon (Kaetemi)
* CEditableMesh
*/
class CEditableMesh : public PIPELINE::MAX::BUILTIN::CTriObject
{
public:
CEditableMesh(CScene *scene);
virtual ~CEditableMesh();
// class desc
static const ucstring DisplayName;
static const char *InternalName;
static const NLMISC::CClassId ClassId;
static const TSClassId SuperClassId;
// inherited
virtual void parse(uint16 version);
virtual void clean();
virtual void build(uint16 version);
virtual void disown();
virtual void init();
virtual bool inherits(const NLMISC::CClassId classId) const;
virtual const ISceneClassDesc *classDesc() const;
virtual void toStringLocal(std::ostream &ostream, const std::string &pad = "") const;
protected:
// inherited
virtual IStorageObject *createChunkById(uint16 id, bool container);
}; /* class CEditableMesh */
typedef CSceneClassDesc<CEditableMesh> CEditableMeshClassDesc;
extern const CEditableMeshClassDesc EditableMeshClassDesc;
} /* namespace UPDATE1 */
} /* namespace MAX */
} /* namespace PIPELINE */
#endif /* #ifndef PIPELINE_EDITABLE_MESH_H */
/* end of file */

@ -0,0 +1,81 @@
/**
* \file update1.cpp
* \brief CUpdate1
* \date 2012-08-26 12:11GMT
* \author Jan Boon (Kaetemi)
* CUpdate1
*/
/*
* Copyright (C) 2012 by authors
*
* This file is part of RYZOM CORE PIPELINE.
* RYZOM CORE PIPELINE is free software: you can redistribute it
* and/or modify it under the terms of the GNU Affero General Public
* License as published by the Free Software Foundation, either
* version 3 of the License, or (at your option) any later version.
*
* RYZOM CORE PIPELINE is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with RYZOM CORE PIPELINE. If not, see
* <http://www.gnu.org/licenses/>.
*/
#include <nel/misc/types_nl.h>
#include "update1.h"
// STL includes
// NeL includes
// #include <nel/misc/debug.h>
// Project includes
#include "../scene_class_registry.h"
#include "editable_mesh.h"
using namespace std;
// using namespace NLMISC;
namespace PIPELINE {
namespace MAX {
namespace UPDATE1 {
CUpdate1::CUpdate1()
{
}
CUpdate1::~CUpdate1()
{
}
void CUpdate1::registerClasses(CSceneClassRegistry *registry)
{
registry->add(&EditableMeshClassDesc);
}
const ucchar *CDllPluginDescUpdate1::displayName() const
{
static const ucstring value = ucstring("Editable Mesh Object (Ryzom Core)");
return value.c_str();
}
const ucchar *CDllPluginDescUpdate1::internalName() const
{
static const ucstring value = ucstring("update1.dlo");
return value.c_str();
}
const CDllPluginDescUpdate1 DllPluginDescUpdate1;
} /* namespace UPDATE1 */
} /* namespace MAX */
} /* namespace PIPELINE */
/* end of file */

@ -0,0 +1,84 @@
/**
* \file update1.h
* \brief CUpdate1
* \date 2012-08-26 12:11GMT
* \author Jan Boon (Kaetemi)
* CUpdate1
*/
/*
* Copyright (C) 2012 by authors
*
* This file is part of RYZOM CORE PIPELINE.
* RYZOM CORE PIPELINE is free software: you can redistribute it
* and/or modify it under the terms of the GNU Affero General Public
* License as published by the Free Software Foundation, either
* version 3 of the License, or (at your option) any later version.
*
* RYZOM CORE PIPELINE is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with RYZOM CORE PIPELINE. If not, see
* <http://www.gnu.org/licenses/>.
*/
#ifndef PIPELINE_UPDATE1_H
#define PIPELINE_UPDATE1_H
#include <nel/misc/types_nl.h>
// STL includes
// NeL includes
// Project includes
#include "../dll_plugin_desc.h"
namespace PIPELINE {
namespace MAX {
class CSceneClassRegistry;
namespace UPDATE1 {
/**
* \brief CUpdate1
* \date 2012-08-26 12:11GMT
* \author Jan Boon (Kaetemi)
* CUpdate1
*/
class CUpdate1
{
public:
static void registerClasses(CSceneClassRegistry *registry);
public:
CUpdate1();
virtual ~CUpdate1();
}; /* class CUpdate1 */
/**
* \brief CDllPluginDescUpdate1
* \date 2012-08-26 12:03GMT
* \author Jan Boon (Kaetemi)
* CDllPluginDescUpdate1
*/
class CDllPluginDescUpdate1 : public IDllPluginDescInternal
{
public:
virtual const ucchar *displayName() const;
virtual const ucchar *internalName() const;
}; /* class CDllPluginDescScript */
extern const CDllPluginDescUpdate1 DllPluginDescUpdate1;
} /* namespace UPDATE1 */
} /* namespace MAX */
} /* namespace PIPELINE */
#endif /* #ifndef PIPELINE_UPDATE1_H */
/* end of file */

@ -0,0 +1,55 @@
/**
* \file wsm_derived_object.cpp
* \brief CWSMDerivedObject
* \date 2012-08-26 12:05GMT
* \author Jan Boon (Kaetemi)
* CWSMDerivedObject
*/
/*
* Copyright (C) 2012 by authors
*
* This file is part of RYZOM CORE PIPELINE.
* RYZOM CORE PIPELINE is free software: you can redistribute it
* and/or modify it under the terms of the GNU Affero General Public
* License as published by the Free Software Foundation, either
* version 3 of the License, or (at your option) any later version.
*
* RYZOM CORE PIPELINE is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with RYZOM CORE PIPELINE. If not, see
* <http://www.gnu.org/licenses/>.
*/
#include <nel/misc/types_nl.h>
#include "wsm_derived_object.h"
// STL includes
// NeL includes
// #include <nel/misc/debug.h>
// Project includes
using namespace std;
// using namespace NLMISC;
namespace PIPELINE {
CWSMDerivedObject::CWSMDerivedObject()
{
}
CWSMDerivedObject::~CWSMDerivedObject()
{
}
} /* namespace PIPELINE */
/* end of file */

@ -0,0 +1,63 @@
/**
* \file wsm_derived_object.h
* \brief CWSMDerivedObject
* \date 2012-08-26 12:05GMT
* \author Jan Boon (Kaetemi)
* CWSMDerivedObject
*/
/*
* Copyright (C) 2012 by authors
*
* This file is part of RYZOM CORE PIPELINE.
* RYZOM CORE PIPELINE is free software: you can redistribute it
* and/or modify it under the terms of the GNU Affero General Public
* License as published by the Free Software Foundation, either
* version 3 of the License, or (at your option) any later version.
*
* RYZOM CORE PIPELINE is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with RYZOM CORE PIPELINE. If not, see
* <http://www.gnu.org/licenses/>.
*/
#ifndef PIPELINE_WSM_DERIVED_OBJECT_H
#define PIPELINE_WSM_DERIVED_OBJECT_H
#include <nel/misc/types_nl.h>
// STL includes
// NeL includes
// Project includes
namespace PIPELINE {
/**
* \brief CWSMDerivedObject
* \date 2012-08-26 12:05GMT
* \author Jan Boon (Kaetemi)
* CWSMDerivedObject
*/
class CWSMDerivedObject
{
protected:
// pointers
// ...
// instances
// ...
public:
CWSMDerivedObject();
virtual ~CWSMDerivedObject();
}; /* class CWSMDerivedObject */
} /* namespace PIPELINE */
#endif /* #ifndef PIPELINE_WSM_DERIVED_OBJECT_H */
/* end of file */

@ -30,21 +30,27 @@
#include "../max/scene_class_registry.h" #include "../max/scene_class_registry.h"
// Testing // Testing
#include "../max/builtin/builtin.h"
#include "../max/update1/update1.h"
#include "../max/epoly/epoly.h"
#include "../max/builtin/storage/app_data.h" #include "../max/builtin/storage/app_data.h"
#include "../max/builtin/storage/geom_buffers.h" #include "../max/builtin/storage/geom_buffers.h"
#include "../max/builtin/builtin.h"
#include "../max/builtin/scene_impl.h" #include "../max/builtin/scene_impl.h"
#include "../max/builtin/i_node.h" #include "../max/builtin/i_node.h"
using namespace PIPELINE::MAX; using namespace PIPELINE::MAX;
using namespace PIPELINE::MAX::BUILTIN; using namespace PIPELINE::MAX::BUILTIN;
using namespace PIPELINE::MAX::BUILTIN::STORAGE; using namespace PIPELINE::MAX::BUILTIN::STORAGE;
using namespace PIPELINE::MAX::UPDATE1;
using namespace PIPELINE::MAX::EPOLY;
//static const char *filename = "/srv/work/database/interfaces/anims_max/cp_fy_hof_species.max"; //static const char *filename = "/srv/work/database/interfaces/anims_max/cp_fy_hof_species.max";
static const char *filename = "/home/kaetemi/source/minimax/GE_Acc_MikotoBaniere.max"; //static const char *filename = "/home/kaetemi/source/minimax/GE_Acc_MikotoBaniere.max";
//static const char *filename = "/home/kaetemi/3dsMax/scenes/test2008.max"; //static const char *filename = "/home/kaetemi/3dsMax/scenes/test2008.max";
//static const char *filename = "/home/kaetemi/3dsMax/scenes/teapot_test_scene.max"; //static const char *filename = "/home/kaetemi/3dsMax/scenes/teapot_test_scene.max";
//static const char *filename = "/home/kaetemi/3dsMax/scenes/testplane.max"; //static const char *filename = "/home/kaetemi/3dsMax/scenes/testplane.max";
static const char *filename = "/home/kaetemi/3dsMax/scenes/geomobjects.max";
static const char *streamname = "Scene"; static const char *streamname = "Scene";
void exportObj(const std::string &fileName, const CReferenceMaker *triObject) void exportObj(const std::string &fileName, const CReferenceMaker *triObject)
@ -71,10 +77,11 @@ int main(int argc, char **argv)
g_set_prgname(me); g_set_prgname(me);
gsf_init(); gsf_init();
// Register all plugin classes
PIPELINE::MAX::CSceneClassRegistry sceneClassRegistry; CSceneClassRegistry sceneClassRegistry;
PIPELINE::MAX::BUILTIN::CBuiltin::registerClasses(&sceneClassRegistry); CBuiltin::registerClasses(&sceneClassRegistry);
CUpdate1::registerClasses(&sceneClassRegistry);
CEPoly::registerClasses(&sceneClassRegistry);
GsfInfile *infile; GsfInfile *infile;
GError *error = NULL; GError *error = NULL;
@ -192,7 +199,7 @@ int main(int argc, char **argv)
nldebug("CLEAN"); nldebug("CLEAN");
//## scene.clean(); // cleanup unused file structure, don't clean up if we want direct access to chunks as well //## scene.clean(); // cleanup unused file structure, don't clean up if we want direct access to chunks as well
// <- TEST // <- TEST
//## scene.toString(std::cout); scene.toString(std::cout);//##
std::cout << "\n"; std::cout << "\n";
//classDirectory3.build(PIPELINE::MAX::VersionUnknown); //classDirectory3.build(PIPELINE::MAX::VersionUnknown);
//classDirectory3.disown(); //classDirectory3.disown();

Loading…
Cancel
Save