diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2026-08-24 11:16:07 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2026-08-24 11:16:07 +0200 |
| commit | c068f22329d5cc722622a2183bbb22eef2093df7 (patch) | |
| tree | 12d56c1aede67988a55e241364606bfbb4dba933 /tool_src/BspLib/SingleInput.h | |
| download | openparsec-c068f22329d5cc722622a2183bbb22eef2093df7.tar.xz openparsec-c068f22329d5cc722622a2183bbb22eef2093df7.zip | |
Diffstat (limited to 'tool_src/BspLib/SingleInput.h')
| -rw-r--r-- | tool_src/BspLib/SingleInput.h | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/tool_src/BspLib/SingleInput.h b/tool_src/BspLib/SingleInput.h new file mode 100644 index 0000000..41e4218 --- /dev/null +++ b/tool_src/BspLib/SingleInput.h @@ -0,0 +1,83 @@ +//----------------------------------------------------------------------------- +// BSPLIB HEADER: SingleInput.h +// +// Copyright (c) 1997-1998 by Markus Hadwiger +// All Rights Reserved. +//----------------------------------------------------------------------------- + +#ifndef _SINGLEINPUT_H_ +#define _SINGLEINPUT_H_ + +// bsplib header files +#include "BspLibDefs.h" +#include "BspObject.h" +#include "InputData3D.h" +#include "SingleFormat.h" + + +BSPLIB_NAMESPACE_BEGIN + + +// class providing single format type input capability ------------------------ +// +class SingleInput : public InputData3D, public virtual SingleFormat { + + friend class AodOutput; + friend class BspOutput; + +protected: + SingleInput( BspObjectList objectlist, const char *filename ); + ~SingleInput(); + +protected: + int ConvertColIndxs(); + void ApplyOriginTranslation(); + void FilterAxesDirSwitch(); + void FilterScaleFactors(); + void FilterAxesExchange(); + void EnforceMaximumExtents(); + + virtual void ParseError( int section ); + void ReadIntParameter( int& param, int lowbound ); + void ReadFloatParameter( double& param ); + void ReadTwoDoubles( double& x, double& y ); + void ReadThreeDoubles( double& x, double& y, double& z ); + void ReadFourDoubles( double& x, double& y, double& z, double& d ); + void ReadSixDoubles( Vertex3& v1, Vertex3& v2 ); + + void ReadVertex(); + void ReadFaceNormal( int& normalsread ); + void ReadFace( int aod_read ); + void ReadFaceProperties( int& facepropsread ); + void ReadCorrespondences(); + void ReadTextures(); + void ReadWorldLocation(); + void ReadCameraLocation(); + void ReadPaletteFilename(); + void ReadScaleFactors(); + void ReadXChangeCommand(); + void ReadOrigin(); + +private: + void ReadMaterialRGBA( ColorRGBA &col, int indx ); + +protected: + static const int PARSER_DOT_SIZE; + +protected: + BspObject* m_baseobject; + FileAccess m_input; + + char* m_scanptr; + int m_section; + int m_parser_lineno; + + Vertex3 m_maximumextents; +}; + + +BSPLIB_NAMESPACE_END + + +#endif // _SINGLEINPUT_H_ + |
