Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/ObjReader/include/ObjManualMeshLoader.h
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/ObjReader/include/ObjManualMeshLoader.h	(revision 2110)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/ObjReader/include/ObjManualMeshLoader.h	(revision 2111)
@@ -1,4 +1,4 @@
-#ifndef __IVManualMeshLoader_H__
-#define __IVManualMeshLoader_H__
+#ifndef __ObjManualMeshLoader_H__
+#define __ObjManualMeshLoader_H__
 
 
@@ -7,10 +7,10 @@
 
 
-class __declspec(dllexport) IVManualMeshLoader: public Ogre::ManualResourceLoader
+class __declspec(dllexport) ObjManualMeshLoader: public Ogre::ManualResourceLoader
 {
 	public:
-		IVManualMeshLoader();
-		IVManualMeshLoader(IVMeshData *mData);
-		~IVManualMeshLoader(); 
+		ObjManualMeshLoader();
+		ObjManualMeshLoader(ObjMeshData *mData);
+		~ObjManualMeshLoader(); 
 
 		void loadResource(Ogre::Resource *resource);
@@ -18,5 +18,5 @@
 		Ogre::AxisAlignedBox *getBoundingBox();
 	private:
-		IVMeshData *data;
+		ObjMeshData *data;
 
 };
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/ObjReader/include/ObjReader.h
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/ObjReader/include/ObjReader.h	(revision 2110)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/ObjReader/include/ObjReader.h	(revision 2111)
@@ -1,131 +1,38 @@
-#ifndef __mIVReader_H__
-#define __mIVReader_H__
+#ifndef __ObjReader_H__
+#define __ObjReader_H__
+
+//#include <stdlib>
+#include <string>
+#include <vector>
+#include <Ogre.h>
+/*#include "ObjNode.h"
+#include "ObjMeshData.h"
+#include "ObjManualMeshLoader.h"
+*/
 
 
-#include "ObjNode.h"
-#include "ObjMeshData.h"
-#include "ObjManualMeshLoader.h"
-#include "Ogre.h"
+namespace GtpVisibilityPreprocessor {
 
-#define COMMENTCHAR '#'
-#define BLOCKSIZE 150
-#define BUFFERSIZE 256
+struct Triangle3;
 
+}
 
-static const int validIVHeaderCnt = 2;
+typedef std::vector<GtpVisibilityPreprocessor::Triangle3 *> TriangleContainer;
 
-static const char *validIVHeader[2] = {
-    { "#Inventor V2.1 ascii\n" },
-	{ "#VRML V1.0 ascii\n" },
+class __declspec(dllexport) ObjReader
+{
+public:
+	ObjReader();
+	~ObjReader();
+
+	bool LoadFile(const std::string &filename,
+				  TriangleContainer &triangles) const;
+	
+	const std::vector<Ogre::Entity *> &GetObjects() const;
+
+protected:
+
+	std::vector<Ogre::Entity *> mObjects;
 };
 
-
-enum IVTokenType
-{
-	IV_TOKEN_INVALID = -1,
-	IV_TOKEN_STRING = 0,
-	IV_TOKEN_INT = 1,
-	IV_TOKEN_REAL = 2,
-	IV_TOKEN_BRACEOPEN = 3,				// {
-	IV_TOKEN_BRACECLOSE = 4,			// }
-	IV_TOKEN_BRACKETOPEN = 5,			// [
-	IV_TOKEN_BRACKETCLOSE = 6,			// ]
-	IV_TOKEN_PARENTHESISOPEN = 7,		// (
-	IV_TOKEN_PARENTHESISCLOSE = 8,		// )
-	IV_TOKEN_DEF = 9,					// DEF
-	IV_TOKEN_USE = 10,					// USE
-};
-
-class __declspec(dllexport) IVMeshListNode
-{
-	public:
-		IVMeshListNode(std::string name, IVManualMeshLoader *loader);
-		~IVMeshListNode();
-
-		void attachNewNode(std::string name, IVManualMeshLoader *loader);
-
-		IVManualMeshLoader *getManualMeshLoader(std::string name);
-
-		IVMeshListNode *next;
-
-	private:
-		std::string name;
-		IVManualMeshLoader *loader;
-};
-
-class __declspec(dllexport) IVDefListNode
-{
-	public:
-		IVDefListNode(std::string name, IVNode *node);
-		~IVDefListNode();
-
-		void attachNewNode(std::string name, IVNode *node);
-
-		IVNode *getDef(std::string name);
-
-		IVDefListNode *next;
-
-	private:
-		std::string name;
-		IVNode *node;
-
-};
-
-class __declspec(dllexport) IVReader
-{
-	public:
-		IVReader();
-		~IVReader();
-
-		void setLog(Ogre::Log *IVLog = NULL);
-
-		bool loadFile(const char* filename);
-		void print();
-//		IVNode *getNode(const char* name);
-
-
-		void buildTree(Ogre::SceneManager *sceneMgr, Ogre::SceneNode *sceneNodeRoot);
-
-		void collapse();
-
-		static std::string intToStr(int num);
-		static std::string realToStr(Ogre::Real num);
-		
-		static Ogre::Log *IVLog;
-
-	private:
-		bool checkHeader(const char *string);
-		char buf[BUFFERSIZE];
-		int bufOffset;
-		bool getNextElement(char *token, IVTokenType *type);
-		void classify(char *token, IVTokenType *type);
-
-		bool isSpace(char c);
-		bool isNewline(char c);
-		bool eof;
-		bool isDigit(char c);
-		bool isHexDigit(char c);
-
-		IVNode *root;
-		FILE* infile;
-
-		static IVMeshListNode *meshList;
-		static void addMeshToList(std::string name, IVManualMeshLoader *loader);
-		
-		static int instanceCnt;
-
-		int treeCnt, nodeCnt, matCnt;
-		char *fileName;
-
-		Ogre::Entity *createEntity(Ogre::SceneManager* sceneMgr, std::string name, IVMeshData *mData, Ogre::Vector3 *translation = NULL);
-
-		void buildTree(Ogre::SceneManager *sceneMgr, Ogre::SceneNode *sceneNodeRoot, IVNode *mIVReaderoot, IVMeshData *mData = NULL, Ogre::Material *material = NULL);
-
-		IVDefListNode *defList;
-		void addDefToList(std::string name, IVNode *node);
-
-
-};
-
-
 #endif
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/ObjReader/include/ObjNode.h
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/ObjReader/include/ObjNode.h	(revision 2109)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/ObjReader/include/ObjNode.h	(revision 2111)
@@ -1,4 +1,4 @@
-#ifndef __IVNode_H__
-#define __IVNode_H__
+#ifndef __ObjNode_H__
+#define __ObjNode_H__
 
 
@@ -6,5 +6,5 @@
 #include <Ogre.h>
 
-enum IVType
+enum ObjType
 {
 	IV_INVALID = -1,
@@ -15,44 +15,44 @@
 
 
-class IVField
+class ObjField
 {
 public:
-	IVField();
-	~IVField();
+	ObjField();
+	~ObjField();
 
 	char *name;
 	void *value;
-	IVType typ;
+	ObjType typ;
 	int cnt;
-	IVField *next;
+	ObjField *next;
 };
 
-class __declspec(dllexport) IVNode
+class __declspec(dllexport) ObjNode
 {
 	public:
-		IVNode();
-		IVNode(const char *s);
-		~IVNode();
+		ObjNode();
+		ObjNode(const char *s);
+		~ObjNode();
 
 		void print(int ident=0);
-		void attachNode(IVNode *child);
+		void attachNode(ObjNode *child);
 		void addField(const char *name, char *value);
-		void addField(const char *name, void *value, int cnt, IVType typ);
+		void addField(const char *name, void *value, int cnt, ObjType typ);
 
-		IVNode *getParent() { return parent; }
+		ObjNode *getParent() { return parent; }
 		char *getName() { return name; }
-		IVNode *getNodeRecursive(const char *name);
-		IVNode *getNextChildNode(bool reset = false);
-		IVField *getField(const char *name);
-		void *getField(const char *name, IVType *typ, int *cnt);
+		ObjNode *getNodeRecursive(const char *name);
+		ObjNode *getNextChildNode(bool reset = false);
+		ObjField *getField(const char *name);
+		void *getField(const char *name, ObjType *typ, int *cnt);
 
 	private:
 		char *name;
-		IVField *fields;
-		IVNode *parent;
-		IVNode *children;
-		IVNode *next;
+		ObjField *fields;
+		ObjNode *parent;
+		ObjNode *children;
+		ObjNode *next;
 
-		IVNode *actual;
+		ObjNode *actual;
 };
 
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/ObjReader/include/ObjMeshData.h
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/ObjReader/include/ObjMeshData.h	(revision 2109)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/ObjReader/include/ObjMeshData.h	(revision 2111)
@@ -1,9 +1,9 @@
-#ifndef __IVMeshData_H__
-#define __IVMeshData_H__
+#ifndef __ObjMeshData_H__
+#define __ObjMeshData_H__
 
 
 #include <Ogre.h>
 
-enum mIVReaderenderOperationType
+enum ObjReaderOpType
 {
 	IV_ROT_INVALID = -1,
@@ -13,11 +13,11 @@
 };
 
-class __declspec(dllexport) IVMeshData
+class __declspec(dllexport) ObjMeshData
 {
 	public:	
-		IVMeshData();
-		~IVMeshData();
+		ObjMeshData();
+		~ObjMeshData();
 
-		IVMeshData *expand();
+		ObjMeshData *expand();
 
 		void collapse();
@@ -25,5 +25,5 @@
 		Ogre::Real *vertices, *normals, *texCoords, *indices, *normalIndices, *texCoordIndices;
 		int vcnt, ncnt, tcnt, icnt, nicnt, ticnt;
-		mIVReaderenderOperationType roType;
+		ObjReaderOpType roType;
 		Ogre::AxisAlignedBox *boundingBox;
 
