gwnavruntime/utils/objfilewriter.h Source File

objfilewriter.h
Go to the documentation of this file.
1 /*
2 * Copyright 2015 Autodesk, Inc. All rights reserved.
3 * Use of this software is subject to the terms of the Autodesk license agreement and any attachments or Appendices thereto provided at the time of installation or download,
4 * or which otherwise accompanies this software in either electronic or hard copy form, or which is signed by you and accepted by Autodesk.
5 */
6 
7 
8 // primary contact: LAPA - secondary contact: NOBODY
9 #ifndef Navigation_ObjFileWriter_H
10 #define Navigation_ObjFileWriter_H
11 
15 
16 namespace Kaim
17 {
18 
19 class VisualGeometrySetupConfig;
20 
21 // construct a .obj file
22 class ObjFileWriter
23 {
24 public:
25  ObjFileWriter(File* file) : m_file(file) , m_vertexCount(0) {}
26 
27  ~ObjFileWriter() {}
28 
29  void PushTriangle(const Vec3f& clientA, const Vec3f& clientB, const Vec3f& clientC);
30 
31  File* m_file;
32  KyUInt32 m_vertexCount;
33 };
34 
35 
36 class ObjFileWriterVisualGeometry : public IVisualGeometry
37 {
38 public:
39  ObjFileWriterVisualGeometry(File* file) : m_objFileWriter(file) {}
40 
41 public:
42  virtual void DoBegin(const VisualGeometrySetupConfig& /*setupConfig*/) { }
43  virtual void DoPushLine(const VisualLine& /*visualLine*/) {}
44  virtual void DoPushText(const VisualText& /*visualText*/) {}
45  virtual void DoEnd() {}
46 
47  virtual void DoPushTriangle(const VisualTriangle& triangle)
48  {
49  m_objFileWriter.PushTriangle(triangle.A,triangle.B, triangle.C);
50  }
51 
52 public:
53  ObjFileWriter m_objFileWriter;
54 };
55 
56 
57 
58 } // namespace LabEngine
59 
60 #endif // Navigation_ObjFileWriter_H
Definition: gamekitcrowddispersion.h:20
unsigned int KyUInt32
Type used internally to represent an unsigned 32-bit integer.
Definition: types.h:36