aboutsummaryrefslogtreecommitdiff
path: root/tool_src/BspLib/ObjectBspFormat.h
diff options
context:
space:
mode:
Diffstat (limited to 'tool_src/BspLib/ObjectBspFormat.h')
-rw-r--r--tool_src/BspLib/ObjectBspFormat.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/tool_src/BspLib/ObjectBspFormat.h b/tool_src/BspLib/ObjectBspFormat.h
new file mode 100644
index 0000000..7d599eb
--- /dev/null
+++ b/tool_src/BspLib/ObjectBspFormat.h
@@ -0,0 +1,53 @@
+//-----------------------------------------------------------------------------
+// BSPLIB HEADER: ObjectBspFormat.h
+//
+// Copyright (c) 1997 by Markus Hadwiger
+// All Rights Reserved.
+//-----------------------------------------------------------------------------
+
+#ifndef _OBJECTBSPFORMAT_H_
+#define _OBJECTBSPFORMAT_H_
+
+// bsplib header files
+#include "BspLibDefs.h"
+#include "BspObject.h"
+#include "BspFormat.h"
+
+
+BSPLIB_NAMESPACE_BEGIN
+
+
+// BspObject capable of BspFormat I/O operations ------------------------------
+//
+class ObjectBspFormat : public BspObject, public BspFormat {
+
+public:
+ ObjectBspFormat( BspObject& object, BspFormat& format );
+ ~ObjectBspFormat() { }
+
+ virtual int WriteVertexList( FileAccess& output );
+ virtual int WritePolygonList( FileAccess& output );
+ virtual int WriteFaceList( FileAccess& output );
+ virtual int WriteFaceProperties( FileAccess& output );
+ virtual int WriteTextureList( FileAccess& output );
+ virtual int WriteMappingList( FileAccess& output );
+ virtual int WriteNormals( FileAccess& output );
+ virtual int WriteBSPTree( FileAccess& output );
+
+private:
+ static char line[]; // scratchpad
+};
+
+// construct by copying base class objects ------------------------------------
+inline ObjectBspFormat::ObjectBspFormat( BspObject& object, BspFormat& format ) :
+ BspObject( object ),
+ BspFormat( format )
+{
+}
+
+
+BSPLIB_NAMESPACE_END
+
+
+#endif // _OBJECTBSPFORMAT_H_
+