Click here to Skip to main content
12,892,810 members (45,748 online)
Click here to Skip to main content
Articles » Multimedia » OpenGL » General » Downloads


152 bookmarked
Posted 30 Nov 1999

A small VRML viewer using OpenGL and MFC

, 30 Nov 1999
// 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...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170424.1 | Last Updated 1 Dec 1999
Article Copyright 1999 by Pierre Alliez
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid