Added: #1440 INode

--HG--
branch : build_pipeline_v3
hg/feature/build_pipeline_v3
kaetemi 13 years ago
parent 228b787513
commit 1f49f906ba

@ -38,6 +38,7 @@
#include "animatable.h" #include "animatable.h"
#include "reference_maker.h" #include "reference_maker.h"
#include "reference_target.h" #include "reference_target.h"
#include "i_node.h"
// using namespace std; // using namespace std;
// using namespace NLMISC; // using namespace NLMISC;
@ -95,11 +96,11 @@ const CMtlSuperClassDesc MtlSuperClassDesc(&ReferenceTargetClassDesc, "MtlSuperC
// 0xd00, soundobj, under reftarget directly // 0xd00, soundobj, under reftarget directly
typedef CSuperClassDescUnknown<CReferenceTarget, 0x00000d00> CSoundObjSuperClassDesc; typedef CSuperClassDescUnknown<CReferenceTarget, 0x00000d00> CSoundObjSuperClassDesc;
const CSoundObjSuperClassDesc SoundObjSuperClassDesc(&ReferenceTargetClassDesc, "SoundObjSuperClassUnknown"); const CSoundObjSuperClassDesc SoundObjSuperClassDesc(&ReferenceTargetClassDesc, "SoundObjSuperClassUnknown");
/*
// 0x1, node; under reftarget directly; classid 1 is node, 2 is rootnode // 0x1, node; under reftarget directly; classid 1 is node, 2 is rootnode
typedef CSuperClassDescUnknown<CReferenceTarget, 0x00000001> CNodeSuperClassDesc; typedef CSuperClassDescUnknown<CReferenceTarget, > CNodeSuperClassDesc;
const CNodeSuperClassDesc NodeSuperClassDesc(&ReferenceTargetClassDesc, "NodeSuperClassUnknown"); const CNodeSuperClassDesc NodeSuperClassDesc(&ReferenceTargetClassDesc, "NodeSuperClassUnknown");
*/
// 0x900b, controlposition, under control??? // 0x900b, controlposition, under control???
typedef CSuperClassDescUnknown<CReferenceTarget, 0x0000900b> CControlPositionSuperClassDesc; typedef CSuperClassDescUnknown<CReferenceTarget, 0x0000900b> CControlPositionSuperClassDesc;
const CControlPositionSuperClassDesc ControlPositionSuperClassDesc(&ReferenceTargetClassDesc, "ControlPositionSuperClassUnknown"); const CControlPositionSuperClassDesc ControlPositionSuperClassDesc(&ReferenceTargetClassDesc, "ControlPositionSuperClassUnknown");
@ -211,6 +212,9 @@ void CBuiltin::registerClasses(CSceneClassRegistry *registry)
registry->add(&ReferenceTargetClassDesc); registry->add(&ReferenceTargetClassDesc);
registry->add(&ReferenceTargetSuperClassDesc); registry->add(&ReferenceTargetSuperClassDesc);
registry->add(&NodeClassDesc);
registry->add(&NodeSuperClassDesc);
// invalid // invalid
registry->add(&NullSuperClassDesc); registry->add(&NullSuperClassDesc);
@ -226,7 +230,7 @@ void CBuiltin::registerClasses(CSceneClassRegistry *registry)
registry->add(&SamplerSuperClassDesc); registry->add(&SamplerSuperClassDesc);
registry->add(&MtlSuperClassDesc); registry->add(&MtlSuperClassDesc);
registry->add(&SoundObjSuperClassDesc); registry->add(&SoundObjSuperClassDesc);
registry->add(&NodeSuperClassDesc); // registry->add(&NodeSuperClassDesc);
registry->add(&ControlPositionSuperClassDesc); registry->add(&ControlPositionSuperClassDesc);
registry->add(&ControlRotationSuperClassDesc); registry->add(&ControlRotationSuperClassDesc);
registry->add(&ControlScaleSuperClassDesc); registry->add(&ControlScaleSuperClassDesc);

@ -0,0 +1,113 @@
/**
* \file i_node.cpp
* \brief INode
* \date 2012-08-22 19:45GMT
* \author Jan Boon (Kaetemi)
* INode
*/
/*
* 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 "i_node.h"
// STL includes
// NeL includes
// #include <nel/misc/debug.h>
// Project includes
using namespace std;
// using namespace NLMISC;
namespace PIPELINE {
namespace MAX {
namespace BUILTIN {
INode::INode()
{
}
INode::~INode()
{
}
const ucchar *INode::DisplayName = ucstring("Node").c_str();
const char *INode::InternalName = "Node";
const char *INode::InternalNameUnknown = "NodeUnknown";
const NLMISC::CClassId INode::ClassId = NLMISC::CClassId(0x8f5b13, 0x624d477d); /* Not official, please correct */
const TSClassId INode::SuperClassId = 0x00000001;
const CNodeClassDesc NodeClassDesc(&DllPluginDescBuiltin);
const CNodeSuperClassDesc NodeSuperClassDesc(&NodeClassDesc);
void INode::parse(uint16 version, TParseLevel level)
{
CReferenceTarget::parse(version, level);
}
void INode::clean()
{
CReferenceTarget::clean();
}
void INode::build(uint16 version)
{
CReferenceTarget::build(version);
}
void INode::disown()
{
CReferenceTarget::disown();
}
void INode::init()
{
CReferenceTarget::init();
}
bool INode::inherits(const NLMISC::CClassId classId) const
{
if (classId == classDesc()->classId()) return true;
return CReferenceTarget::inherits(classId);
}
const ISceneClassDesc *INode::classDesc() const
{
return &NodeClassDesc;
}
void INode::toStringLocal(std::ostream &ostream, const std::string &pad) const
{
CReferenceTarget::toStringLocal(ostream, pad);
}
IStorageObject *INode::createChunkById(uint16 id, bool container)
{
return CReferenceTarget::createChunkById(id, container);
}
} /* namespace BUILTIN */
} /* namespace MAX */
} /* namespace PIPELINE */
/* end of file */

@ -0,0 +1,89 @@
/**
* \file i_node.h
* \brief INode
* \date 2012-08-22 19:45GMT
* \author Jan Boon (Kaetemi)
* INode
*/
/*
* 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_I_NODE_H
#define PIPELINE_I_NODE_H
#include <nel/misc/types_nl.h>
// STL includes
// NeL includes
// Project includes
#include "reference_target.h"
namespace PIPELINE {
namespace MAX {
namespace BUILTIN {
/**
* \brief INode
* \date 2012-08-22 19:45GMT
* \author Jan Boon (Kaetemi)
* INode
*/
class INode : public CReferenceTarget
{
public:
INode();
virtual ~INode();
// class desc
static const ucchar *DisplayName;
static const char *InternalName;
static const char *InternalNameUnknown;
static const NLMISC::CClassId ClassId;
static const TSClassId SuperClassId;
// inherited
virtual void parse(uint16 version, TParseLevel level);
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 INode */
typedef CSceneClassDesc<INode> CNodeClassDesc;
extern const CNodeClassDesc NodeClassDesc;
typedef CSuperClassDesc<INode> CNodeSuperClassDesc;
extern const CNodeSuperClassDesc NodeSuperClassDesc;
} /* namespace BUILTIN */
} /* namespace MAX */
} /* namespace PIPELINE */
#endif /* #ifndef PIPELINE_I_NODE_H */
/* end of file */
Loading…
Cancel
Save