2 * \file poly_object.cpp
4 * \date 2012-08-22 08:58GMT
5 * \author Jan Boon (Kaetemi)
10 * Copyright (C) 2012 by authors
12 * This file is part of RYZOM CORE PIPELINE.
13 * RYZOM CORE PIPELINE is free software: you can redistribute it
14 * and/or modify it under the terms of the GNU Affero General Public
15 * License as published by the Free Software Foundation, either
16 * version 3 of the License, or (at your option) any later version.
18 * RYZOM CORE PIPELINE is distributed in the hope that it will be
19 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
20 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Affero General Public License for more details.
23 * You should have received a copy of the GNU Affero General Public
24 * License along with RYZOM CORE PIPELINE. If not, see
25 * <http://www.gnu.org/licenses/>.
28 #include <nel/misc/types_nl.h>
29 #include "poly_object.h"
34 // #include <nel/misc/debug.h>
39 // using namespace NLMISC;
45 CPolyObject::CPolyObject(CScene
*scene
) : CGeomObject(scene
)
50 CPolyObject::~CPolyObject()
55 const ucstring
CPolyObject::DisplayName
= ucstring("PolyObject");
56 const char *CPolyObject::InternalName
= "PolyObject";
57 const NLMISC::CClassId
CPolyObject::ClassId
= NLMISC::CClassId(0x59772461, 0x6e1141e8); /* Not official, please correct */
58 const TSClassId
CPolyObject::SuperClassId
= CGeomObject::SuperClassId
;
59 const CPolyObjectClassDesc
PolyObjectClassDesc(&DllPluginDescBuiltin
);
61 void CPolyObject::parse(uint16 version
, uint filter
)
65 CGeomObject::parse(version
);
67 else if (filter
== PMB_POLY_OBJECT_PARSE_FILTER
)
69 if (!m_ChunksOwnsPointers
)
71 CGeomObject::parse(version
, PMB_GEOM_OBJECT_PARSE_FILTER
);
80 void CPolyObject::clean()
85 void CPolyObject::build(uint16 version
, uint filter
)
89 CGeomObject::build(version
);
91 else if (filter
== PMB_POLY_OBJECT_PARSE_FILTER
)
93 CGeomObject::build(version
, PMB_GEOM_OBJECT_PARSE_FILTER
);
101 void CPolyObject::disown()
103 CGeomObject::disown();
106 void CPolyObject::init()
111 bool CPolyObject::inherits(const NLMISC::CClassId classId
) const
113 if (classId
== classDesc()->classId()) return true;
114 return CGeomObject::inherits(classId
);
117 const ISceneClassDesc
*CPolyObject::classDesc() const
119 return &PolyObjectClassDesc
;
122 void CPolyObject::toStringLocal(std::ostream
&ostream
, const std::string
&pad
, uint filter
) const
126 CGeomObject::toStringLocal(ostream
, pad
);
128 else if (filter
== PMB_POLY_OBJECT_PARSE_FILTER
)
130 CGeomObject::toStringLocal(ostream
, pad
, PMB_GEOM_OBJECT_PARSE_FILTER
);
138 IStorageObject
*CPolyObject::createChunkById(uint16 id
, bool container
)
140 return CGeomObject::createChunkById(id
, container
);
143 } /* namespace BUILTIN */
144 } /* namespace MAX */
145 } /* namespace PIPELINE */