Click here to Skip to main content
11,648,785 members (76,935 online)
Click here to Skip to main content
Articles » Multimedia » OpenGL » General » Downloads
Add your own
alternative version

A small VRML viewer using OpenGL and MFC

, 30 Nov 1999 334.3K 14.2K 149
// ParserVrml.h
// class CParserVrml
// Created : 02/04/98
// Modified : 02/04/98

#ifndef _PARSER_VRML_
#define _PARSER_VRML_

#define MAX_LINE_VRML 10000
#define MAX_WORD_VRML 1000

class CParserVrml
private :

	int m_SizeFile;
	char *m_pBuffer;
	int m_IndexBuffer;
	CString m_FileName;
	char m_pBufferLine[MAX_LINE_VRML];
	char m_pBufferWord[MAX_WORD_VRML];

public :

	// Construtor / destructor

	// Running
	void Free(void);
	int Run(char *filename,CSceneGraph3d *pSceneGraph);

	// Word processing
	int ReadFile(char *filename);
	int ReadLine();
	int ReadWord();
	int OffsetToString(char *string);
	int OffsetToStringBefore(char *string,char *before);
	int OffsetToStringBeginLine(char *string);

	int CheckVersion();
	void CountDef(void);
	int CountMesh(void);
	int CheckMesh();
	int ReadMesh(CSceneGraph3d *pSceneGraph);
	int StoreMesh(CArray3d<CVertex3d> *pArrayVertex,CArray3d<CFace3d> *pArrayFace,int HasTexture,float *pTextureCoordinate,int *pTextureCoordinateIndex);
	int SizeMesh(int *pNbVertex,int *pNbFace,int HasTexture,int *pNbTextureCoordinate = NULL);

#endif // _PARSER_VRML_

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Pierre Alliez
France France
No Biography provided

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.150804.4 | Last Updated 1 Dec 1999
Article Copyright 1999 by Pierre Alliez
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid