#ifndef GFX_SMF_INCLUDED // -*- C++ -*- #define GFX_SMF_INCLUDED /************************************************************************ SMF file parser. $Id: smf.h,v 1.8 1997/03/17 20:35:57 garland Exp $ ************************************************************************/ //#include #include #include #include #include namespace simplif { #define SMF_MAXLINE 4096 extern float SMF_version; extern char *SMF_version_string; extern char *SMF_source_revision; typedef buffer string_buffer; class SMF_Model { public: //////////////////////////////////////////////////////////////////////// // // SMF input methods // // // These are the REQUIRED methods virtual int in_Vertex(const Vec3&) = 0; virtual int in_Normal(const Vec3&) = 0; virtual int in_TexCoord(const Vec2&) = 0; virtual int in_Face(int v1, int v2, int v3, int n1, int n2, int n3, int t1, int t2, int t3) = 0; // // By default, arbitrary faces are flagged as errors virtual int in_Face(const buffer &); // // as are unknown commands virtual int in_Unparsed(const char *, string_buffer&); virtual int note_Vertices(int); virtual int note_Faces(int); virtual int note_BBox(const Vec3& min, const Vec3& max); virtual int note_BSphere(const Vec3&, real); virtual int note_PXform(const Mat4&); virtual int note_MXform(const Mat4&); virtual int note_Unparsed(const char *,string_buffer&); }; class SMF_State; // // Internal SMF variables // (not accessible via 'set' commands) // struct SMF_ivars { int next_vertex; int next_face; }; } // GFX_SMF_INCLUDED #endif