From c068f22329d5cc722622a2183bbb22eef2093df7 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Mon, 24 Aug 2026 11:16:07 +0200 Subject: initial import --- tool_src/BspLib/SingleInput.h | 83 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 tool_src/BspLib/SingleInput.h (limited to 'tool_src/BspLib/SingleInput.h') 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_ + -- cgit v1.2.3