3 * \brief CGeomGeomObject
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 #ifndef PIPELINE_GEOM_OBJECT_H
29 #define PIPELINE_GEOM_OBJECT_H
30 #include <nel/misc/types_nl.h>
38 #include "storage/geom_buffers.h"
40 /// Must be passed to the parse and build functions by
41 /// inheriting classes to parse the actual geom object.
42 #define PMB_GEOM_OBJECT_PARSE_FILTER 0x432a4da6
49 * \brief CGeomGeomObject
50 * \date 2012-08-22 08:58GMT
51 * \author Jan Boon (Kaetemi)
54 class CGeomObject
: public CObject
57 CGeomObject(CScene
*scene
);
58 virtual ~CGeomObject();
61 static const ucstring DisplayName
;
62 static const char *InternalName
;
63 static const char *InternalNameUnknown
;
64 static const NLMISC::CClassId ClassId
;
65 static const TSClassId SuperClassId
;
68 virtual void parse(uint16 version
, uint filter
= 0);
70 virtual void build(uint16 version
, uint filter
= 0);
71 virtual void disown();
73 virtual bool inherits(const NLMISC::CClassId classId
) const;
74 virtual const ISceneClassDesc
*classDesc() const;
75 virtual void toStringLocal(std::ostream
&ostream
, const std::string
&pad
= "", uint filter
= 0) const;
77 static void triangulatePolyFace(std::vector
<STORAGE::CGeomTriIndex
> &triangles
, const STORAGE::CGeomPolyFaceInfo
&polyFace
);
80 inline STORAGE::CGeomBuffers
*geomBuffers() const { return m_GeomBuffers
; }
84 virtual IStorageObject
*createChunkById(uint16 id
, bool container
);
87 IStorageObject
*m_Unknown0900
;
88 STORAGE::CGeomBuffers
*m_GeomBuffers
;
90 }; /* class CGeomObject */
92 typedef CSceneClassDesc
<CGeomObject
> CGeomObjectClassDesc
;
93 extern const CGeomObjectClassDesc GeomObjectClassDesc
;
94 typedef CSuperClassDesc
<CGeomObject
> CGeomObjectSuperClassDesc
;
95 extern const CGeomObjectSuperClassDesc GeomObjectSuperClassDesc
;
97 } /* namespace BUILTIN */
99 } /* namespace PIPELINE */
101 #endif /* #ifndef PIPELINE_GEOM_OBJECT_H */