Linux multi-monitor fullscreen support
[ryzomcore.git] / nel / tools / 3d / pipeline_max / builtin / poly_object.cpp
blob25cd334d42cc4607c3fbf7c0da5d8b2094412fbc
1 /**
2 * \file poly_object.cpp
3 * \brief CPolyObject
4 * \date 2012-08-22 08:58GMT
5 * \author Jan Boon (Kaetemi)
6 * CPolyObject
7 */
9 /*
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"
31 // STL includes
33 // NeL includes
34 // #include <nel/misc/debug.h>
36 // Project includes
38 using namespace std;
39 // using namespace NLMISC;
41 namespace PIPELINE {
42 namespace MAX {
43 namespace BUILTIN {
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)
63 if (filter == 0)
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);
72 // 0x0906
73 // 0x0908
74 // 0x090a
75 // 0x090c
80 void CPolyObject::clean()
82 CGeomObject::clean();
85 void CPolyObject::build(uint16 version, uint filter)
87 if (filter == 0)
89 CGeomObject::build(version);
91 else if (filter == PMB_POLY_OBJECT_PARSE_FILTER)
93 CGeomObject::build(version, PMB_GEOM_OBJECT_PARSE_FILTER);
94 // 0x0906
95 // 0x0908
96 // 0x090a
97 // 0x090c
101 void CPolyObject::disown()
103 CGeomObject::disown();
106 void CPolyObject::init()
108 CGeomObject::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
124 if (filter == 0)
126 CGeomObject::toStringLocal(ostream, pad);
128 else if (filter == PMB_POLY_OBJECT_PARSE_FILTER)
130 CGeomObject::toStringLocal(ostream, pad, PMB_GEOM_OBJECT_PARSE_FILTER);
131 // 0x0906
132 // 0x0908
133 // 0x090a
134 // 0x090c
138 IStorageObject *CPolyObject::createChunkById(uint16 id, bool container)
140 return CGeomObject::createChunkById(id, container);
143 } /* namespace BUILTIN */
144 } /* namespace MAX */
145 } /* namespace PIPELINE */
147 /* end of file */