Index: GTP/trunk/Lib/Vis/README_ONLINE.txt
===================================================================
--- GTP/trunk/Lib/Vis/README_ONLINE.txt	(revision 643)
+++ GTP/trunk/Lib/Vis/README_ONLINE.txt	(revision 643)
@@ -0,0 +1,46 @@
+How to install the Visibility Work Package
+
+
+1) Requirements: 
+   WindowsXP
+   Ogre 1.03 for vs 7.1
+   Ogre Dependencies
+   svn
+
+2) check out gametools repository
+   in the following it is assumed that your repository is located in e:\svn\gametools (not required, just replace your path)
+
+   deprecated: the current stable version is located in D:\gametools\branches\0.3
+
+2) add following environment variables:
+   OGRE_PATH: directory where ogre.sln is located
+
+3) copy e:\svn\gametools\OGRE\trunk\ogre_changes into OGRE_PATH directory (only applies to version 1.03!!!!)
+
+4) Set configuration of Ogre soluation to release. add preprocessor flag GTP_VISIBILITY_MODIFIED_OGRE to following projects:
+   Plugin_OctreeSceneManager
+   RenderSystem_GL
+   RenderSystem_Direct9
+   RenderSystem_Direct7
+   OgreMain
+   GuiRenderer
+   
+   Also add the flag to the example projects you want to use
+
+5) Add following resources to OGRE_PATH\Samples\Common\bin\Release\resource.cfg:
+
+   FileSystem=e:\svn\gametools\OGRE\trunk\resources\materials\scripts
+   FileSystem=e:\svn\gametools\OGRE\trunk\resources\materials\textures
+   FileSystem=e:\svn\gametools\OGRE\trunk\resources\models
+   FileSystem=e:\svn\gametools\OGRE\trunk\resources\models\trees
+   FileSystem=e:\svn\gametools\OGRE\trunk\resources\overlays
+   FileSystem=e:\svn\gametools\OGRE\trunk\resources\media
+
+6) Add Plugin_VisibilitySceneManager to OGRE_PATH\Samples\Common\bin\Release\Plugins.cfg
+   and comment out OctreeSceneManager
+
+7) Copy D:\gametools\trunk\VUT\Ogre\resources\terrain.cfg into OGRE_PATH\Samples\Common\bin\Release
+
+8) open scripts\GtpVisibility.sln and compile all
+
+9) start TerrainExampleApplication for testing
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/OpenGL/stdafx.h
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/OpenGL/stdafx.h	(revision 629)
+++ 	(revision )
@@ -1,12 +1,0 @@
-// stdafx.h : include file for standard system include files,
-// or project specific include files that are used frequently, but
-// are changed infrequently
-//
-
-#pragma once
-
-
-#include <iostream>
-#include <tchar.h>
-
-// TODO: reference additional headers your program requires here
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/OpenGL/DataTypes.c
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/OpenGL/DataTypes.c	(revision 629)
+++ 	(revision )
@@ -1,225 +1,0 @@
-//Copyright and Disclaimer:
-//This code is copyright Vienna University of Technology, 2004.
-
-#include <memory.h>
-#include <stdlib.h>
-#include <malloc.h>
-#include "DataTypes.h"
-#include "MathStuff.h"
-
-const struct Object OBJECT_NULL = { 0, 0 };
-const struct VecPoint VECPOINT_NULL = { 0, 0 };
-const struct VecPlane VECPLANE_NULL = { 0, 0 };
-
-void copyVector3(Vector3 result, const Vector3 input) {
-	result[0] = input[0]; 
-	result[1] = input[1];
-	result[2] = input[2];
-}
-
-void addVector3(Vector3 result, const Vector3 a, const Vector3 b) {
-	int i;
-	for(i = 0; i < 3; i++) {
-		result[i] = a[i]+b[i];
-	}
-}
-
-void diffVector3(Vector3 result, const Vector3 a, const Vector3 b) {
-	int i;
-	for(i = 0; i < 3; i++) {
-		result[i] = a[i]-b[i];
-	}
-}
-
-void copyVector3Values(Vector3 result, const double x, const double y, const double z) {
-	result[0] = x; 
-	result[1] = y;
-	result[2] = z;
-}
-
-void copyMatrix(Matrix4x4 result, const Matrix4x4 input) {
-	if(input != result) {
-		memcpy(result,input,4*4*sizeof(double));
-	}
-}
-
-void planesSetSize(struct VecPlane* p, const int size) {
-	if(0 != p) {
-		if(size == p->size) {
-			return;
-		}
-		p->plane = (struct Plane*)realloc(p->plane,size*sizeof(struct Plane));
-		p->size = size;
-	}
-}
-
-void emptyVecPlane(struct VecPlane* p) {
-	planesSetSize(p,0);
-}
-
-void vecPointSetSize(struct VecPoint* poly, const int size) {
-	if(0 != poly) {
-		if(size == poly->size) {
-			return;
-		}
-		poly->points = (Vector3*)realloc(poly->points,size*sizeof(Vector3));
-		poly->size = size;
-	}
-}
-
-void emptyVecPoint(struct VecPoint* poly) {
-	vecPointSetSize(poly,0);
-}
-
-void append2VecPoint(struct VecPoint* poly, const Vector3 p) {
-	if(0 != poly) {
-		int size = poly->size;
-		vecPointSetSize(poly,size+1);
-		copyVector3(poly->points[size],p);
-	}
-}
-
-void copyVecPoint(struct VecPoint* poly, const struct VecPoint poly2) {
-	if(0 != poly) {
-		int i;
-		vecPointSetSize(poly,poly2.size);
-		for(i= 0; i < poly2.size; i++) {
-			copyVector3(poly->points[i],poly2.points[i]);
-		}
-	}
-}
-
-void swapVecPoint(struct VecPoint* poly1, struct VecPoint* poly2) {
-	if(0 != poly1 && 0 != poly2 && poly1 != poly2) {
-		{
-			Vector3* points = poly1->points;
-			poly1->points = poly2->points;
-			poly2->points = points;
-		}
-		{
-			int size = poly1->size;
-			poly1->size = poly2->size;
-			poly2->size = size;
-		}
-	}
-}
-
-void objectSetSize(struct Object* obj, const int size) {
-	if(0 != obj) {
-		int i;
-		if(size == obj->size) {
-			return;
-		}
-		//dispose if shrinking
-		for(i = size; i < obj->size; i++) {
-			emptyVecPoint( &(obj->poly[i]) ); 
-		}
-		//allocate new place
-		obj->poly = (struct VecPoint*)realloc(obj->poly,size*sizeof(struct VecPoint));
-		//initialize new place
-		for(i = obj->size; i < size; i++) {
-			obj->poly[i] = VECPOINT_NULL;
-		}
-		obj->size = size;
-	}
-}
-
-void emptyObject(struct Object* obj) {
-	objectSetSize(obj,0);
-}
-
-void copyObject(struct Object* obj, const struct Object objIn) {
-	if(0 != obj) {
-		int i;
-		objectSetSize(obj,objIn.size);
-		for(i = 0; i < objIn.size; i++) {
-			copyVecPoint( &(obj->poly[i]), objIn.poly[i]);
-		}
-	}
-}
-
-void append2Object(struct Object* obj, const struct VecPoint poly) {
-	if(0 != obj) {
-		int size = obj->size;
-		objectSetSize(obj,size+1);
-		copyVecPoint( &(obj->poly[size]) ,poly);
-	}
-}
-
-
-void convObject2VecPoint(struct VecPoint* points,const struct Object obj) {
-	if(0 != points) {
-		int i, j;
-		emptyVecPoint(points);
-		for(i = 0; i < obj.size; i++) {
-			struct VecPoint* p = &(obj.poly[i]);
-			for(j = 0; j < p->size; j++) {
-				append2VecPoint(points,p->points[j]);
-			}
-		}
-	}
-}
-
-void calcAABoxPoints(Vector3x8 points, const struct AABox b) {
-    //generate 8 corners of the box
-	copyVector3Values(points[0],b.min[0],b.min[1],b.min[2]);//     7+------+6
-	copyVector3Values(points[1],b.max[0],b.min[1],b.min[2]);//     /|     /|
-	copyVector3Values(points[2],b.max[0],b.max[1],b.min[2]);//    / |    / |
-	copyVector3Values(points[3],b.min[0],b.max[1],b.min[2]);//   / 4+---/--+5
-	copyVector3Values(points[4],b.min[0],b.min[1],b.max[2]);// 3+------+2 /    y   z
-	copyVector3Values(points[5],b.max[0],b.min[1],b.max[2]);//  | /    | /     |  /
-	copyVector3Values(points[6],b.max[0],b.max[1],b.max[2]);//  |/     |/      |/
-	copyVector3Values(points[7],b.min[0],b.max[1],b.max[2]);// 0+------+1      *---x
-}
-
-void calcAABoxPlanes(struct VecPlane* planes, const struct AABox b) {
-	if(0 != planes) {
-		struct Plane *p;
-		planesSetSize(planes,6);
-		
-		//bottom plane
-		p = &(planes->plane[0]);
-		copyVector3Values(p->n,0,-1,0);
-		p->d = absDouble(b.min[1]);
-
-		//top plane
-		p = &(planes->plane[1]);
-		copyVector3Values(p->n,0,1,0);
-		p->d = absDouble(b.max[1]);
-
-		//left plane
-		p = &(planes->plane[2]);
-		copyVector3Values(p->n,-1,0,0);
-		p->d = absDouble(b.min[0]);
-
-		//right plane
-		p = &(planes->plane[3]);
-		copyVector3Values(p->n,1,0,0);
-		p->d = absDouble(b.max[0]);
-
-		//back plane
-		p = &(planes->plane[4]);
-		copyVector3Values(p->n,0,0,-1);
-		p->d = absDouble(b.min[2]);
-
-		//front plane
-		p = &(planes->plane[5]);
-		copyVector3Values(p->n,0,0,1);
-		p->d = absDouble(b.max[2]);
-
-	}
-}
-
-double getPlaneCoeff(struct Plane* plane, int i)
-{
-	if(i < 3) return plane->n[i];
-	return plane->d;
-}
-
-void setPlaneCoeff(double coeff, struct Plane* plane, int i)
-{
-	if(i < 3) 
-		plane->n[i] = coeff;
-	else 
-		plane->d = coeff;
-}
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/OpenGL/Geometry.h
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/OpenGL/Geometry.h	(revision 629)
+++ 	(revision )
@@ -1,141 +1,0 @@
-#ifndef NO_PRAGMA_ONCE
-#pragma once
-#endif
-
-#ifndef GEOMETRY_H
-#define GEOMETRY_H
-
-extern "C"
-{
-	#include "MathStuff.h"
-}
-
-/** Represents a drawable geometry. It can draw simple objects (teapot,
-	torus, shere. It also contains the object transformation and 
-	the material .An AAB is used as bouning volume.
-*/
-class Geometry
-{
-public:
-	Geometry();
-	Geometry(Vector3 translation, float xRot, float yRot, float zRot, float scale, int objectType);
-	//! renders this geometry
-	void Render();
-	
-	//! sets rotations in degree : executed in the order x, y, and z rotation
-	void SetRotations(float xRot, float yRot, float zRot);
-	//! sets the rotation matrix
-	void SetTranslation(Vector3 translation);
-	//! a uniform scale
-	void SetScale(float scale);
-	//! returns current scale
-	float GetScale();
-
-	//! returns translation
-	void GetTranslation(Vector3 translation);
-	//! returns rotation
-	void GetRotations(float &xRot, float &yRot, float &zRot);
-
-	// --- material settings
-	void SetAmbientColor(float ambientR,   float ambientG,  float ambientB);
-	void SetDiffuseColor(float diffuseR,   float diffuseG,  float diffuseB);
-	void SetSpecularColor(float specularR, float specularG, float specularB);
-
-	const AABox& GetBoundingVolume();
-		
-	//! last visited flag, important for rendering each geometry only once
-	void SetLastVisited(int lastVisited);
-	//! returns lastvisited flag
-	int GetLastVisited();
-
-	// --- sets the object type to one of teapot, torus, sphere
-	void SetObjectType(int type);
-
-	enum{TEAPOT, TORUS, SPHERE, NUM_OBJECTS};
-	
-	static int sDisplayList[NUM_OBJECTS];
-	
-	//! cleans static members
-	static void CleanUp();
-	//! returns the triangle count of the specified object type
-	static int CountTriangles(int objectType);
-	//! initialises display lists
-	static void ResetLists(); 
-
-protected:
-	//! generates the display list this a object
-	void GenerateList();
-
-	//! calculates accumulated transformation matrix
-	void CalcTransform();
-	//! applies tranformations
-	void Transform();
-
-	// --- statistics
-	static int CountTorusTriangles();
-	static int CountSphereTriangles();
-	static int CountTeapotTriangles();
-
-	//!
-	static void CreateTorus(float innerRadius, float outerRadius, int precision);
-
-	//! calculates the bounding volume of this geometry
-	void CalcBoundingVolume();
-	// the size of the bounging box is calculated using the radius of the sphere
-	void CalcSphereBoundingVolume();
-	// the standard bounding volume calculation having an array of vertices
-	void CalcBoundingVolume(float *vertices, const int num_vertices);
-
-	// initialises static members
-	static bool Init();
-
-	// --- drawing routines
-	static void RenderTeapot();
-	static void RenderSphere();
-	static void RenderTorus();
-
-	// --- transformations
-	float mXRotation;
-	float mYRotation;
-	float mZRotation;
-	
-	float mScale;
-
-	Vector3 mTranslation;
-	
-	//! accumulated transform matrix 
-	Matrix4x4 mTransform;
-
-	// --- material
-	float mAmbientColor[3];
-	float mDiffuseColor[3];
-	float mSpecularColor[3];
-
-	AABox mBoundingBox;
-	//! type of the rendered object (teapot, sphere ...)
-	int mObjectType;
-	
-	int mLastVisited;
-
-	// --- static members
-
-	static bool sIsInitialised;
-
-	static float const sphere_radius;
-	
-	static int num_torus_indices;
-	static int num_torus_vertices;
-	static int num_torus_normals;
-
-	static float *torus_vertices;
-	static float *torus_normals;
-	static int *torus_indices;
-
-	static const int torus_precision;
-	static const int sphere_precision;
-	static const float torus_inner_radius;
-	static const float torus_outer_radius;
-};
-
-
-#endif // GEOMETRY_H
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/OpenGL/teapot.h
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/OpenGL/teapot.h	(revision 629)
+++ 	(revision )
@@ -1,3071 +1,0 @@
-#ifndef TEAPOT_H
-#define TEAPOT_H
-
-const int num_teapot_indices = 2781;
-const int num_teapot_vertices = 1364;
-const int num_teapot_normals = 1364;
-
-float teapot_vertices [] = {
-							0.0663056, 0.117825, 2.10688e-008,
-							0.0672, 0.1152, 2.05994e-008,
-							0.0639726, 0.117825, 0.0178043,
-							0.0648356, 0.1152, 0.0180445,
-							0.0573666, 0.117825, 0.0336931,
-							0.0581404, 0.1152, 0.0341476,
-							0.0470769, 0.117825, 0.0470769,
-							0.047712, 0.1152, 0.047712,
-							0.033693, 0.117825, 0.0573666,
-							0.0341476, 0.1152, 0.0581404,
-							0.0178043, 0.117825, 0.0639726,
-							0.0180444, 0.1152, 0.0648356,
-							0, 0.117825, 0.0663056,
-							0, 0.1152, 0.0672,
-							0.0664444, 0.1194, 2.13504e-008,
-							0.0641066, 0.1194, 0.0178416,
-							0.0574868, 0.1194, 0.0337636,
-							0.0471755, 0.1194, 0.0471756,
-							0.0337636, 0.1194, 0.0574868,
-							0.0178416, 0.1194, 0.0641066,
-							0, 0.1194, 0.0664444,
-							0.06735, 0.119925, 2.14443e-008,
-							0.0649803, 0.119925, 0.0180847,
-							0.0582702, 0.119925, 0.0342238,
-							0.0478185, 0.119925, 0.0478185,
-							0.0342238, 0.119925, 0.0582702,
-							0.0180847, 0.119925, 0.0649803,
-							0, 0.119925, 0.06735,
-							0.0687556, 0.1194, 2.13504e-008,
-							0.0663364, 0.1194, 0.0184622,
-							0.0594863, 0.1194, 0.034938,
-							0.0488164, 0.1194, 0.0488164,
-							0.034938, 0.1194, 0.0594863,
-							0.0184621, 0.1194, 0.0663364,
-							0, 0.1194, 0.0687556,
-							0.0703944, 0.117825, 2.10688e-008,
-							0.0679176, 0.117825, 0.0189022,
-							0.0609042, 0.117825, 0.0357708,
-							0.0499801, 0.117825, 0.0499801,
-							0.0357708, 0.117825, 0.0609042,
-							0.0189022, 0.117825, 0.0679176,
-							0, 0.117825, 0.0703944,
-							0.072, 0.1152, 2.05994e-008,
-							0.0694667, 0.1152, 0.0193333,
-							0.0622933, 0.1152, 0.0365867,
-							0.05112, 0.1152, 0.05112,
-							0.0365867, 0.1152, 0.0622933,
-							0.0193333, 0.1152, 0.0694667,
-							0, 0.1152, 0.072,
-							-0.0178043, 0.117825, 0.0639726,
-							-0.0180444, 0.1152, 0.0648356,
-							-0.033693, 0.117825, 0.0573666,
-							-0.0341476, 0.1152, 0.0581404,
-							-0.0470769, 0.117825, 0.0470769,
-							-0.047712, 0.1152, 0.047712,
-							-0.0573666, 0.117825, 0.033693,
-							-0.0581404, 0.1152, 0.0341476,
-							-0.0639726, 0.117825, 0.0178043,
-							-0.0648356, 0.1152, 0.0180445,
-							-0.0663056, 0.117825, 2.10688e-008,
-							-0.0672, 0.1152, 2.05994e-008,
-							-0.0178416, 0.1194, 0.0641066,
-							-0.0337636, 0.1194, 0.0574867,
-							-0.0471756, 0.1194, 0.0471756,
-							-0.0574867, 0.1194, 0.0337636,
-							-0.0641066, 0.1194, 0.0178416,
-							-0.0664444, 0.1194, 2.13504e-008,
-							-0.0180847, 0.119925, 0.0649803,
-							-0.0342238, 0.119925, 0.0582702,
-							-0.0478185, 0.119925, 0.0478185,
-							-0.0582702, 0.119925, 0.0342238,
-							-0.0649803, 0.119925, 0.0180847,
-							-0.06735, 0.119925, 2.14443e-008,
-							0, 0.1194, 0.0687556,
-							-0.0184621, 0.1194, 0.0663364,
-							-0.034938, 0.1194, 0.0594863,
-							-0.0488164, 0.1194, 0.0488164,
-							-0.0594863, 0.1194, 0.034938,
-							-0.0663364, 0.1194, 0.0184621,
-							-0.0687556, 0.1194, 2.13504e-008,
-							0, 0.117825, 0.0703944,
-							-0.0189022, 0.117825, 0.0679176,
-							-0.0357708, 0.117825, 0.0609042,
-							-0.0499801, 0.117825, 0.0499801,
-							-0.0609042, 0.117825, 0.0357708,
-							-0.0679176, 0.117825, 0.0189022,
-							-0.0703944, 0.117825, 2.10688e-008,
-							-0.0193333, 0.1152, 0.0694667,
-							-0.0365867, 0.1152, 0.0622933,
-							-0.05112, 0.1152, 0.05112,
-							-0.0622933, 0.1152, 0.0365867,
-							-0.0694667, 0.1152, 0.0193333,
-							-0.072, 0.1152, 2.05994e-008,
-							-0.0663055, 0.117825, 2.10688e-008,
-							-0.0639726, 0.117825, -0.0178043,
-							-0.0648356, 0.1152, -0.0180444,
-							-0.0573666, 0.117825, -0.033693,
-							-0.0581404, 0.1152, -0.0341475,
-							-0.0470769, 0.117825, -0.0470769,
-							-0.047712, 0.1152, -0.047712,
-							-0.033693, 0.117825, -0.0573666,
-							-0.0341476, 0.1152, -0.0581404,
-							-0.0178043, 0.117825, -0.0639726,
-							-0.0180444, 0.1152, -0.0648356,
-							0, 0.117825, -0.0663055,
-							0, 0.1152, -0.0672,
-							-0.0664444, 0.1194, 2.13504e-008,
-							-0.0641066, 0.1194, -0.0178416,
-							-0.0574867, 0.1194, -0.0337636,
-							-0.0471756, 0.1194, -0.0471756,
-							-0.0337636, 0.1194, -0.0574868,
-							-0.0178416, 0.1194, -0.0641066,
-							0, 0.1194, -0.0664444,
-							-0.0649803, 0.119925, -0.0180847,
-							-0.0582702, 0.119925, -0.0342238,
-							-0.0478185, 0.119925, -0.0478185,
-							-0.0342238, 0.119925, -0.0582702,
-							-0.0180847, 0.119925, -0.0649803,
-							0, 0.119925, -0.06735,
-							-0.0663364, 0.1194, -0.0184621,
-							-0.0594863, 0.1194, -0.034938,
-							-0.0488164, 0.1194, -0.0488164,
-							-0.034938, 0.1194, -0.0594863,
-							-0.0184621, 0.1194, -0.0663364,
-							0, 0.1194, -0.0687556,
-							-0.0703944, 0.117825, 2.10688e-008,
-							-0.0679176, 0.117825, -0.0189022,
-							-0.0609042, 0.117825, -0.0357708,
-							-0.0499801, 0.117825, -0.0499801,
-							-0.0357708, 0.117825, -0.0609042,
-							-0.0189022, 0.117825, -0.0679176,
-							0, 0.117825, -0.0703944,
-							-0.0694667, 0.1152, -0.0193333,
-							-0.0622933, 0.1152, -0.0365867,
-							-0.05112, 0.1152, -0.05112,
-							-0.0365867, 0.1152, -0.0622933,
-							-0.0193333, 0.1152, -0.0694667,
-							0, 0.1152, -0.072,
-							0.0178043, 0.117825, -0.0639726,
-							0.0180444, 0.1152, -0.0648356,
-							0.033693, 0.117825, -0.0573666,
-							0.0341476, 0.1152, -0.0581404,
-							0.0470769, 0.117825, -0.0470769,
-							0.047712, 0.1152, -0.047712,
-							0.0573666, 0.117825, -0.033693,
-							0.0581404, 0.1152, -0.0341475,
-							0.0639726, 0.117825, -0.0178043,
-							0.0648356, 0.1152, -0.0180444,
-							0.0663055, 0.117825, 2.10688e-008,
-							0.0178416, 0.1194, -0.0641066,
-							0.0337636, 0.1194, -0.0574867,
-							0.0471756, 0.1194, -0.0471756,
-							0.0574868, 0.1194, -0.0337636,
-							0.0641066, 0.1194, -0.0178415,
-							0.0664444, 0.1194, 2.13504e-008,
-							0.0180847, 0.119925, -0.0649803,
-							0.0342238, 0.119925, -0.0582702,
-							0.0478185, 0.119925, -0.0478185,
-							0.0582702, 0.119925, -0.0342238,
-							0.0649803, 0.119925, -0.0180847,
-							0.0184621, 0.1194, -0.0663364,
-							0.034938, 0.1194, -0.0594863,
-							0.0488164, 0.1194, -0.0488164,
-							0.0594863, 0.1194, -0.034938,
-							0.0663364, 0.1194, -0.0184621,
-							0.0687556, 0.1194, 2.13504e-008,
-							0.0189022, 0.117825, -0.0679176,
-							0.0357708, 0.117825, -0.0609042,
-							0.0499801, 0.117825, -0.0499801,
-							0.0609042, 0.117825, -0.0357708,
-							0.0679176, 0.117825, -0.0189022,
-							0.0703944, 0.117825, 2.10688e-008,
-							0.0193333, 0.1152, -0.0694667,
-							0.0365867, 0.1152, -0.0622933,
-							0.05112, 0.1152, -0.05112,
-							0.0622933, 0.1152, -0.0365867,
-							0.0694667, 0.1152, -0.0193333,
-							0.0779444, 0.102617, 1.83493e-008,
-							0.075202, 0.102617, 0.0209295,
-							0.0694667, 0.1152, 0.0193333,
-							0.0674364, 0.102617, 0.0396073,
-							0.0622933, 0.1152, 0.0365867,
-							0.0553406, 0.102617, 0.0553406,
-							0.0396073, 0.102617, 0.0674364,
-							0.0365867, 0.1152, 0.0622933,
-							0.0209296, 0.102617, 0.0752019,
-							0.0193334, 0.1152, 0.0694667,
-							0, 0.102617, 0.0779444,
-							0.0835556, 0.0901333, 1.61171e-008,
-							0.0806156, 0.0901333, 0.0224362,
-							0.072291, 0.0901333, 0.0424586,
-							0.0593244, 0.0901334, 0.0593245,
-							0.0424586, 0.0901333, 0.072291,
-							0.0224362, 0.0901333, 0.0806156,
-							0, 0.0901333, 0.0835556,
-							0.0885, 0.07785, 1.39207e-008,
-							0.0853861, 0.07785, 0.0237639,
-							0.0765689, 0.07785, 0.0449711,
-							0.062835, 0.07785, 0.062835,
-							0.0449711, 0.07785, 0.0765689,
-							0.0237639, 0.07785, 0.0853861,
-							0, 0.07785, 0.0885,
-							0.0924444, 0.0658667, 1.17779e-008,
-							0.0891918, 0.0658667, 0.024823,
-							0.0799816, 0.0658667, 0.0469755,
-							0.0656356, 0.0658667, 0.0656356,
-							0.0469755, 0.0658667, 0.0799816,
-							0.0248231, 0.0658667, 0.0891918,
-							0, 0.0658667, 0.0924444,
-							0.0950556, 0.0542833, 9.7066e-009,
-							0.091711, 0.0542833, 0.0255242,
-							0.0822407, 0.0542833, 0.0483023,
-							0.0674895, 0.0542833, 0.0674895,
-							0.0483023, 0.0542833, 0.0822406,
-							0.0255242, 0.0542833, 0.091711,
-							0, 0.0542833, 0.0950556,
-							0.096, 0.0432, 7.72476e-009,
-							0.0926222, 0.0432, 0.0257778,
-							0.0830578, 0.0432, 0.0487822,
-							0.06816, 0.0432, 0.06816,
-							0.0487822, 0.0432, 0.0830578,
-							0.0257778, 0.0432, 0.0926222,
-							0, 0.0432, 0.096,
-							0, 0.102617, 0.0779444,
-							-0.0209295, 0.102617, 0.075202,
-							-0.0193333, 0.1152, 0.0694667,
-							-0.0396073, 0.102617, 0.0674364,
-							-0.0365867, 0.1152, 0.0622933,
-							-0.0553405, 0.102617, 0.0553405,
-							-0.0674364, 0.102617, 0.0396073,
-							-0.0622933, 0.1152, 0.0365867,
-							-0.075202, 0.102617, 0.0209296,
-							-0.0694667, 0.1152, 0.0193334,
-							-0.0779444, 0.102617, 1.83493e-008,
-							0, 0.0901333, 0.0835555,
-							-0.0224362, 0.0901333, 0.0806156,
-							-0.0424586, 0.0901333, 0.072291,
-							-0.0593244, 0.0901334, 0.0593244,
-							-0.072291, 0.0901334, 0.0424586,
-							-0.0806156, 0.0901333, 0.0224362,
-							-0.0835555, 0.0901333, 1.61171e-008,
-							-0.0237639, 0.07785, 0.0853861,
-							-0.0449711, 0.07785, 0.0765689,
-							-0.062835, 0.07785, 0.062835,
-							-0.0765689, 0.07785, 0.0449711,
-							-0.0853861, 0.07785, 0.0237639,
-							-0.0885, 0.07785, 1.39207e-008,
-							0, 0.0658667, 0.0924444,
-							-0.024823, 0.0658667, 0.0891918,
-							-0.0469755, 0.0658667, 0.0799816,
-							-0.0656356, 0.0658667, 0.0656356,
-							-0.0799816, 0.0658667, 0.0469755,
-							-0.0891918, 0.0658667, 0.0248231,
-							-0.0924444, 0.0658667, 1.17779e-008,
-							0, 0.0542833, 0.0950556,
-							-0.0255242, 0.0542833, 0.091711,
-							-0.0483023, 0.0542833, 0.0822407,
-							-0.0674894, 0.0542834, 0.0674894,
-							-0.0822406, 0.0542834, 0.0483023,
-							-0.091711, 0.0542833, 0.0255242,
-							-0.0950556, 0.0542833, 9.70661e-009,
-							-0.0257778, 0.0432, 0.0926222,
-							-0.0487822, 0.0432, 0.0830578,
-							-0.06816, 0.0432, 0.06816,
-							-0.0830578, 0.0432, 0.0487822,
-							-0.0926222, 0.0432, 0.0257778,
-							-0.096, 0.0432, 7.72476e-009,
-							-0.0779444, 0.102617, 1.83493e-008,
-							-0.075202, 0.102617, -0.0209295,
-							-0.0694667, 0.1152, -0.0193333,
-							-0.0674364, 0.102617, -0.0396073,
-							-0.0622933, 0.1152, -0.0365866,
-							-0.0553406, 0.102617, -0.0553406,
-							-0.0396073, 0.102617, -0.0674364,
-							-0.0365867, 0.1152, -0.0622933,
-							-0.0209296, 0.102617, -0.0752019,
-							-0.0193334, 0.1152, -0.0694667,
-							0, 0.102617, -0.0779444,
-							-0.0835556, 0.0901333, 1.61171e-008,
-							-0.0806156, 0.0901333, -0.0224362,
-							-0.072291, 0.0901333, -0.0424586,
-							-0.0593244, 0.0901333, -0.0593244,
-							-0.0424586, 0.0901333, -0.072291,
-							-0.0224362, 0.0901333, -0.0806156,
-							0, 0.0901333, -0.0835556,
-							-0.0853861, 0.07785, -0.0237639,
-							-0.0765689, 0.07785, -0.0449711,
-							-0.062835, 0.07785, -0.062835,
-							-0.0449711, 0.07785, -0.0765689,
-							-0.0237639, 0.07785, -0.0853861,
-							0, 0.07785, -0.0885,
-							-0.0924444, 0.0658666, 1.17779e-008,
-							-0.0891918, 0.0658666, -0.024823,
-							-0.0799816, 0.0658666, -0.0469755,
-							-0.0656356, 0.0658666, -0.0656356,
-							-0.0469755, 0.0658666, -0.0799816,
-							-0.0248231, 0.0658666, -0.0891918,
-							0, 0.0658666, -0.0924444,
-							-0.0950556, 0.0542833, 9.7066e-009,
-							-0.091711, 0.0542833, -0.0255242,
-							-0.0822407, 0.0542833, -0.0483023,
-							-0.0674894, 0.0542833, -0.0674894,
-							-0.0483023, 0.0542833, -0.0822407,
-							-0.0255242, 0.0542833, -0.091711,
-							0, 0.0542833, -0.0950556,
-							-0.0926222, 0.0432, -0.0257778,
-							-0.0830578, 0.0432, -0.0487822,
-							-0.06816, 0.0432, -0.06816,
-							-0.0487822, 0.0432, -0.0830578,
-							-0.0257778, 0.0432, -0.0926222,
-							0, 0.0432, -0.096,
-							0.0209295, 0.102617, -0.075202,
-							0.0193333, 0.1152, -0.0694667,
-							0.0396073, 0.102617, -0.0674364,
-							0.0365867, 0.1152, -0.0622933,
-							0.0553406, 0.102617, -0.0553406,
-							0.0674364, 0.102617, -0.0396073,
-							0.0622933, 0.1152, -0.0365867,
-							0.0752019, 0.102617, -0.0209295,
-							0.0694667, 0.1152, -0.0193333,
-							0.0779444, 0.102617, 1.83493e-008,
-							0.0224362, 0.0901333, -0.0806156,
-							0.0424586, 0.0901333, -0.072291,
-							0.0593244, 0.0901333, -0.0593244,
-							0.072291, 0.0901333, -0.0424586,
-							0.0806156, 0.0901333, -0.0224362,
-							0.0835556, 0.0901333, 1.61171e-008,
-							0.0237639, 0.07785, -0.0853861,
-							0.0449711, 0.07785, -0.0765689,
-							0.062835, 0.07785, -0.062835,
-							0.0765689, 0.07785, -0.0449711,
-							0.0853861, 0.07785, -0.0237639,
-							0.024823, 0.0658666, -0.0891918,
-							0.0469755, 0.0658666, -0.0799816,
-							0.0656356, 0.0658666, -0.0656356,
-							0.0799816, 0.0658666, -0.0469755,
-							0.0891918, 0.0658666, -0.0248231,
-							0.0924444, 0.0658666, 1.17779e-008,
-							0.0255242, 0.0542833, -0.091711,
-							0.0483023, 0.0542833, -0.0822407,
-							0.0674894, 0.0542833, -0.0674894,
-							0.0822407, 0.0542833, -0.0483023,
-							0.091711, 0.0542833, -0.0255242,
-							0.0950556, 0.0542833, 9.7066e-009,
-							0.0257778, 0.0432, -0.0926222,
-							0.0487822, 0.0432, -0.0830578,
-							0.06816, 0.0432, -0.06816,
-							0.0830578, 0.0432, -0.0487822,
-							0.0926222, 0.0432, -0.0257778,
-							0.0942222, 0.0332833, 5.95152e-009,
-							0.090907, 0.0332833, 0.0253004,
-							0.0815197, 0.0332833, 0.0478788,
-							0.0668978, 0.0332833, 0.0668978,
-							0.0478789, 0.0332833, 0.0815197,
-							0.0253004, 0.0332833, 0.090907,
-							0, 0.0332833, 0.0942222,
-							0.0897778, 0.0250667, 4.48227e-009,
-							0.0866189, 0.0250667, 0.024107,
-							0.0776744, 0.0250667, 0.0456204,
-							0.0637422, 0.0250667, 0.0637422,
-							0.0456204, 0.0250667, 0.0776744,
-							0.024107, 0.0250667, 0.0866189,
-							0, 0.0250667, 0.0897778,
-							0.084, 0.01845, 3.29912e-009,
-							0.0810445, 0.01845, 0.0225556,
-							0.0726756, 0.01845, 0.0426844,
-							0.05964, 0.01845, 0.05964,
-							0.0426845, 0.01845, 0.0726755,
-							0.0225556, 0.01845, 0.0810444,
-							0, 0.01845, 0.084,
-							0.0782222, 0.0133334, 2.38419e-009,
-							0.07547, 0.0133333, 0.0210041,
-							0.0676767, 0.0133333, 0.0397485,
-							0.0555378, 0.0133333, 0.0555378,
-							0.0397485, 0.0133333, 0.0676767,
-							0.0210041, 0.0133333, 0.07547,
-							0, 0.0133333, 0.0782222,
-							0.0737778, 0.00961668, 1.7196e-009,
-							0.0711819, 0.00961668, 0.0198107,
-							0.0638315, 0.00961668, 0.03749,
-							0.0523822, 0.00961668, 0.0523822,
-							0.0374901, 0.00961668, 0.0638314,
-							0.0198107, 0.00961668, 0.0711819,
-							0, 0.00961668, 0.0737778,
-							0.072, 0.0072, 1.28746e-009,
-							0.0694667, 0.0072, 0.0193333,
-							0.0622933, 0.00719999, 0.0365867,
-							0.05112, 0.00719999, 0.05112,
-							0.0365867, 0.00719999, 0.0622933,
-							0.0193334, 0.00719999, 0.0694667,
-							0, 0.00719999, 0.072,
-							-0.0253004, 0.0332833, 0.090907,
-							-0.0478788, 0.0332833, 0.0815197,
-							-0.0668978, 0.0332833, 0.0668978,
-							-0.0815197, 0.0332833, 0.0478789,
-							-0.090907, 0.0332833, 0.0253004,
-							-0.0942222, 0.0332833, 5.95152e-009,
-							-0.024107, 0.0250667, 0.0866189,
-							-0.0456204, 0.0250667, 0.0776744,
-							-0.0637422, 0.0250667, 0.0637422,
-							-0.0776744, 0.0250667, 0.0456204,
-							-0.0866189, 0.0250667, 0.024107,
-							-0.0897778, 0.0250667, 4.48227e-009,
-							-0.0225556, 0.01845, 0.0810445,
-							-0.0426844, 0.01845, 0.0726756,
-							-0.05964, 0.01845, 0.05964,
-							-0.0726755, 0.01845, 0.0426845,
-							-0.0810444, 0.01845, 0.0225556,
-							-0.084, 0.01845, 3.29912e-009,
-							-0.0210041, 0.0133333, 0.07547,
-							-0.0397485, 0.0133333, 0.0676767,
-							-0.0555378, 0.0133333, 0.0555378,
-							-0.0676767, 0.0133333, 0.0397485,
-							-0.07547, 0.0133333, 0.0210041,
-							-0.0782222, 0.0133334, 2.38419e-009,
-							-0.0198107, 0.00961668, 0.0711819,
-							-0.03749, 0.00961667, 0.0638315,
-							-0.0523822, 0.00961668, 0.0523822,
-							-0.0638314, 0.00961668, 0.0374901,
-							-0.0711819, 0.00961668, 0.0198107,
-							-0.0737778, 0.00961668, 1.7196e-009,
-							-0.0193333, 0.00719999, 0.0694667,
-							-0.0365867, 0.00719999, 0.0622933,
-							-0.05112, 0.00719999, 0.05112,
-							-0.0622933, 0.00719999, 0.0365867,
-							-0.0694667, 0.0072, 0.0193334,
-							-0.072, 0.0072, 1.28746e-009,
-							-0.090907, 0.0332833, -0.0253004,
-							-0.0815197, 0.0332833, -0.0478788,
-							-0.0668978, 0.0332833, -0.0668978,
-							-0.0478789, 0.0332833, -0.0815197,
-							-0.0253004, 0.0332833, -0.090907,
-							0, 0.0332833, -0.0942222,
-							-0.0866189, 0.0250667, -0.024107,
-							-0.0776744, 0.0250667, -0.0456204,
-							-0.0637422, 0.0250667, -0.0637422,
-							-0.0456204, 0.0250667, -0.0776744,
-							-0.024107, 0.0250667, -0.0866189,
-							0, 0.0250667, -0.0897778,
-							-0.0810445, 0.01845, -0.0225556,
-							-0.0726756, 0.01845, -0.0426844,
-							-0.05964, 0.01845, -0.05964,
-							-0.0426845, 0.01845, -0.0726755,
-							-0.0225556, 0.01845, -0.0810444,
-							0, 0.01845, -0.084,
-							-0.07547, 0.0133334, -0.0210041,
-							-0.0676767, 0.0133334, -0.0397485,
-							-0.0555378, 0.0133334, -0.0555378,
-							-0.0397485, 0.0133334, -0.0676767,
-							-0.0210041, 0.0133334, -0.07547,
-							0, 0.0133334, -0.0782222,
-							-0.0711819, 0.00961669, -0.0198107,
-							-0.0638315, 0.00961669, -0.03749,
-							-0.0523822, 0.00961669, -0.0523822,
-							-0.0374901, 0.00961669, -0.0638314,
-							-0.0198107, 0.00961669, -0.0711819,
-							0, 0.00961669, -0.0737778,
-							-0.0694667, 0.0072, -0.0193333,
-							-0.0622933, 0.00720001, -0.0365867,
-							-0.05112, 0.00720001, -0.05112,
-							-0.0365867, 0.00720001, -0.0622933,
-							-0.0193334, 0.00720001, -0.0694667,
-							0, 0.00720001, -0.072,
-							0.0253004, 0.0332833, -0.090907,
-							0.0478788, 0.0332833, -0.0815197,
-							0.0668978, 0.0332833, -0.0668978,
-							0.0815197, 0.0332833, -0.0478789,
-							0.090907, 0.0332833, -0.0253004,
-							0.024107, 0.0250667, -0.0866189,
-							0.0456204, 0.0250667, -0.0776744,
-							0.0637422, 0.0250667, -0.0637422,
-							0.0776744, 0.0250667, -0.0456204,
-							0.0866189, 0.0250667, -0.024107,
-							0.0225556, 0.01845, -0.0810445,
-							0.0426844, 0.01845, -0.0726756,
-							0.05964, 0.01845, -0.05964,
-							0.0726755, 0.01845, -0.0426845,
-							0.0810444, 0.01845, -0.0225556,
-							0.0210041, 0.0133334, -0.07547,
-							0.0397485, 0.0133334, -0.0676767,
-							0.0555378, 0.0133334, -0.0555378,
-							0.0676767, 0.0133334, -0.0397485,
-							0.07547, 0.0133334, -0.0210041,
-							0.0198107, 0.00961669, -0.0711819,
-							0.03749, 0.00961669, -0.0638315,
-							0.0523822, 0.00961669, -0.0523822,
-							0.0638314, 0.00961669, -0.0374901,
-							0.0711819, 0.00961668, -0.0198107,
-							0.0193333, 0.00720001, -0.0694667,
-							0.0365867, 0.00720001, -0.0622933,
-							0.05112, 0.00720001, -0.05112,
-							0.0622933, 0.00720001, -0.0365867,
-							0.0694667, 0.0072, -0.0193334,
-							-0.0923778, 0.09715, 1.73718e-008,
-							-0.0768, 0.0972, 1.73807e-008,
-							-0.0924979, 0.0979463, 0.00600001,
-							-0.0764444, 0.098, 0.00600001,
-							-0.0927984, 0.099937, 0.00960001,
-							-0.0755556, 0.1, 0.00960001,
-							-0.0931889, 0.102525, 0.0108,
-							-0.0744, 0.1026, 0.0108,
-							-0.0935794, 0.105113, 0.0096,
-							-0.0732444, 0.1052, 0.0096,
-							-0.0938798, 0.107104, 0.006,
-							-0.0723556, 0.1072, 0.006,
-							-0.094, 0.1079, 1.9294e-008,
-							-0.072, 0.108, 1.93119e-008,
-							-0.105422, 0.0968, 1.73092e-008,
-							-0.105909, 0.0975704, 0.00600001,
-							-0.107128, 0.0994963, 0.00960001,
-							-0.108711, 0.102, 0.0108,
-							-0.110295, 0.104504, 0.0096,
-							-0.111513, 0.10643, 0.006,
-							-0.112, 0.1072, 1.91688e-008,
-							-0.1158, 0.09585, 1.71393e-008,
-							-0.116556, 0.09655, 0.00600001,
-							-0.118444, 0.0983, 0.00960001,
-							-0.1209, 0.100575, 0.0108,
-							-0.123356, 0.10285, 0.0096,
-							-0.125244, 0.1046, 0.006,
-							-0.126, 0.1053, 1.88291e-008,
-							-0.123378, 0.094, 1.68085e-008,
-							-0.124313, 0.094563, 0.00600001,
-							-0.12665, 0.0959704, 0.00960001,
-							-0.129689, 0.0978, 0.0108,
-							-0.132728, 0.0996296, 0.0096,
-							-0.135065, 0.101037, 0.006,
-							-0.136, 0.1016, 1.81675e-008,
-							-0.128022, 0.09095, 1.62631e-008,
-							-0.129058, 0.091287, 0.00600001,
-							-0.131646, 0.0921296, 0.00960001,
-							-0.135011, 0.093225, 0.0108,
-							-0.138376, 0.0943204, 0.0096,
-							-0.140965, 0.095163, 0.006,
-							-0.142, 0.0955, 1.70767e-008,
-							-0.1296, 0.0864, 1.54495e-008,
-							-0.130667, 0.0864, 0.00600001,
-							-0.133333, 0.0864, 0.00960001,
-							-0.1368, 0.0864, 0.0108,
-							-0.140267, 0.0864, 0.0096,
-							-0.142933, 0.0864, 0.006,
-							-0.144, 0.0864, 1.54495e-008,
-							-0.0938798, 0.107104, -0.00599999,
-							-0.0723556, 0.1072, -0.00599999,
-							-0.0935794, 0.105113, -0.0096,
-							-0.0732444, 0.1052, -0.0096,
-							-0.0931889, 0.102525, -0.0108,
-							-0.0744, 0.1026, -0.0108,
-							-0.0927983, 0.099937, -0.00959999,
-							-0.0755556, 0.1, -0.00959999,
-							-0.0924979, 0.0979463, -0.00599998,
-							-0.0764444, 0.098, -0.00599998,
-							-0.0923778, 0.09715, 1.73718e-008,
-							-0.112, 0.1072, 1.91688e-008,
-							-0.111513, 0.10643, -0.00599999,
-							-0.110295, 0.104504, -0.00959999,
-							-0.108711, 0.102, -0.0108,
-							-0.107128, 0.0994963, -0.00959999,
-							-0.105909, 0.0975704, -0.00599998,
-							-0.105422, 0.0968, 1.73092e-008,
-							-0.125244, 0.1046, -0.00599999,
-							-0.123356, 0.10285, -0.0096,
-							-0.1209, 0.100575, -0.0108,
-							-0.118444, 0.0983, -0.00959999,
-							-0.116556, 0.09655, -0.00599998,
-							-0.136, 0.1016, 1.81675e-008,
-							-0.135065, 0.101037, -0.00599999,
-							-0.132728, 0.0996296, -0.0096,
-							-0.129689, 0.0978, -0.0108,
-							-0.12665, 0.0959704, -0.00959999,
-							-0.124313, 0.094563, -0.00599998,
-							-0.123378, 0.094, 1.68085e-008,
-							-0.142, 0.0955, 1.70767e-008,
-							-0.140965, 0.095163, -0.00599999,
-							-0.138376, 0.0943204, -0.0096,
-							-0.135011, 0.093225, -0.0108,
-							-0.131646, 0.0921296, -0.00959999,
-							-0.129058, 0.091287, -0.00599998,
-							-0.128022, 0.09095, 1.62631e-008,
-							-0.142933, 0.0864, -0.00599999,
-							-0.140267, 0.0864, -0.0096,
-							-0.1368, 0.0864, -0.0108,
-							-0.133333, 0.0864, -0.00959999,
-							-0.130667, 0.0864, -0.00599998,
-							-0.128778, 0.0802, 1.43409e-008,
-							-0.129801, 0.079871, 0.00600001,
-							-0.132358, 0.0790484, 0.00960001,
-							-0.135683, 0.0779792, 0.0108,
-							-0.139008, 0.0769099, 0.0096,
-							-0.141566, 0.0760873, 0.006,
-							-0.142589, 0.0757583, 1.35466e-008,
-							-0.126222, 0.0728, 1.30176e-008,
-							-0.127118, 0.0722568, 0.00600001,
-							-0.129356, 0.0708988, 0.00960001,
-							-0.132267, 0.0691333, 0.0108,
-							-0.135177, 0.0673679, 0.0096,
-							-0.137416, 0.0660099, 0.00599999,
-							-0.138311, 0.0654667, 1.17063e-008,
-							-0.1218, 0.0648, 1.15871e-008,
-							-0.122489, 0.0641167, 0.00600001,
-							-0.124211, 0.0624083, 0.00960001,
-							-0.12645, 0.0601875, 0.0108,
-							-0.128689, 0.0579667, 0.0096,
-							-0.130411, 0.0562583, 0.00599999,
-							-0.1311, 0.055575, 9.93757e-009,
-							-0.115378, 0.0568, 1.01566e-008,
-							-0.115786, 0.0560099, 0.00600001,
-							-0.116807, 0.0540345, 0.0096,
-							-0.118133, 0.0514667, 0.0108,
-							-0.11946, 0.0488987, 0.0096,
-							-0.120481, 0.0469234, 0.00599999,
-							-0.120889, 0.0461333, 8.24927e-009,
-							-0.106822, 0.0494, 8.8334e-009,
-							-0.106881, 0.0484957, 0.00600001,
-							-0.107027, 0.0462349, 0.00960001,
-							-0.107217, 0.0432958, 0.0108,
-							-0.107407, 0.0403568, 0.0096,
-							-0.107553, 0.038096, 0.00599999,
-							-0.107611, 0.0371916, 6.65038e-009,
-							-0.0956444, 0.0421333, 0.00600001,
-							-0.0947556, 0.0394667, 0.0096,
-							-0.0936, 0.036, 0.0108,
-							-0.0924444, 0.0325333, 0.0096,
-							-0.0915556, 0.0298667, 0.00599999,
-							-0.0912, 0.0288, 5.14984e-009,
-							-0.141566, 0.0760873, -0.00599999,
-							-0.139008, 0.0769099, -0.0096,
-							-0.135683, 0.0779792, -0.0108,
-							-0.132358, 0.0790484, -0.00959999,
-							-0.129801, 0.079871, -0.00599998,
-							-0.137416, 0.0660099, -0.006,
-							-0.135177, 0.0673679, -0.0096,
-							-0.132267, 0.0691333, -0.0108,
-							-0.129356, 0.0708988, -0.00959999,
-							-0.127118, 0.0722568, -0.00599998,
-							-0.130411, 0.0562583, -0.006,
-							-0.128689, 0.0579667, -0.0096,
-							-0.12645, 0.0601875, -0.0108,
-							-0.124211, 0.0624083, -0.00959999,
-							-0.122489, 0.0641167, -0.00599998,
-							-0.120481, 0.0469234, -0.006,
-							-0.11946, 0.0488988, -0.0096,
-							-0.118133, 0.0514667, -0.0108,
-							-0.116807, 0.0540346, -0.00959999,
-							-0.115786, 0.0560099, -0.00599998,
-							-0.107553, 0.038096, -0.006,
-							-0.107407, 0.0403568, -0.0096,
-							-0.107217, 0.0432958, -0.0108,
-							-0.107027, 0.0462349, -0.00959999,
-							-0.106881, 0.0484957, -0.00599998,
-							-0.0915556, 0.0298667, -0.006,
-							-0.0924444, 0.0325333, -0.0096,
-							-0.0936, 0.036, -0.0108,
-							-0.0947556, 0.0394667, -0.00959999,
-							-0.0956445, 0.0421333, -0.00599998,
-							0.0988222, 0.0708667, 1.2672e-008,
-							0.0816, 0.0684, 1.22309e-008,
-							0.0994741, 0.0684099, 0.0125926,
-							0.0816, 0.0654667, 0.0132,
-							0.101104, 0.0622679, 0.0201482,
-							0.0816, 0.0581333, 0.02112,
-							0.103222, 0.0542833, 0.0226667,
-							0.0816, 0.0486, 0.02376,
-							0.105341, 0.0462987, 0.0201481,
-							0.0816, 0.0390666, 0.02112,
-							0.10697, 0.0401568, 0.0125926,
-							0.0816, 0.0317333, 0.0132,
-							0.107622, 0.0377, 6.74128e-009,
-							0.0816, 0.0288, 5.14984e-009,
-							0.108978, 0.0773333, 1.38283e-008,
-							0.109926, 0.0754568, 0.0110741,
-							0.112296, 0.0707654, 0.0177185,
-							0.115378, 0.0646667, 0.0199333,
-							0.118459, 0.0585679, 0.0177185,
-							0.12083, 0.0538765, 0.0110741,
-							0.121778, 0.052, 9.29832e-009,
-							0.1146, 0.0864, 1.54495e-008,
-							0.115667, 0.0851333, 0.00910001,
-							0.118333, 0.0819667, 0.01456,
-							0.1218, 0.07785, 0.01638,
-							0.125267, 0.0737333, 0.01456,
-							0.127933, 0.0705667, 0.00909999,
-							0.129, 0.0693, 1.23918e-008,
-							0.118222, 0.0966667, 1.72853e-008,
-							0.119407, 0.0959654, 0.00712594,
-							0.12237, 0.0942123, 0.0114015,
-							0.126222, 0.0919333, 0.0128267,
-							0.130074, 0.0896543, 0.0114015,
-							0.133037, 0.0879012, 0.00712592,
-							0.134222, 0.0872, 1.55926e-008,
-							0.122378, 0.106733, 1.90854e-008,
-							0.123859, 0.106479, 0.00560742,
-							0.127563, 0.105843, 0.00897186,
-							0.132378, 0.105017, 0.0100933,
-							0.137193, 0.10419, 0.00897185,
-							0.140896, 0.103554, 0.00560741,
-							0.142378, 0.1033, 1.84715e-008,
-							0.1296, 0.1152, 2.05994e-008,
-							0.131733, 0.1152, 0.00500001,
-							0.137067, 0.1152, 0.00800001,
-							0.144, 0.1152, 0.00900001,
-							0.150933, 0.1152, 0.008,
-							0.156267, 0.1152, 0.005,
-							0.1584, 0.1152, 2.05994e-008,
-							0.107622, 0.0377, 6.74128e-009,
-							0.10697, 0.0401568, -0.0125926,
-							0.0816, 0.0317333, -0.0132,
-							0.105341, 0.0462988, -0.0201482,
-							0.0816, 0.0390667, -0.02112,
-							0.103222, 0.0542833, -0.0226667,
-							0.0816, 0.0486, -0.02376,
-							0.101104, 0.0622679, -0.0201481,
-							0.0816, 0.0581334, -0.02112,
-							0.0994741, 0.0684099, -0.0125926,
-							0.0816, 0.0654667, -0.0132,
-							0.0988222, 0.0708667, 1.2672e-008,
-							0.121778, 0.052, 9.29832e-009,
-							0.12083, 0.0538765, -0.0110741,
-							0.118459, 0.0585679, -0.0177185,
-							0.115378, 0.0646667, -0.0199333,
-							0.112296, 0.0707654, -0.0177185,
-							0.109926, 0.0754568, -0.011074,
-							0.127933, 0.0705667, -0.0091,
-							0.125267, 0.0737333, -0.01456,
-							0.1218, 0.07785, -0.01638,
-							0.118333, 0.0819667, -0.01456,
-							0.115667, 0.0851333, -0.00909997,
-							0.134222, 0.0872, 1.55926e-008,
-							0.133037, 0.0879012, -0.00712592,
-							0.130074, 0.0896543, -0.0114015,
-							0.126222, 0.0919333, -0.0128267,
-							0.12237, 0.0942123, -0.0114015,
-							0.119407, 0.0959654, -0.0071259,
-							0.118222, 0.0966667, 1.72853e-008,
-							0.142378, 0.1033, 1.84715e-008,
-							0.140896, 0.103554, -0.0056074,
-							0.137193, 0.10419, -0.00897185,
-							0.132378, 0.105017, -0.0100933,
-							0.127563, 0.105843, -0.00897184,
-							0.123859, 0.106479, -0.00560739,
-							0.122378, 0.106733, 1.90854e-008,
-							0.156267, 0.1152, -0.00499999,
-							0.150933, 0.1152, -0.00799999,
-							0.144, 0.1152, -0.00899999,
-							0.137067, 0.1152, -0.00799999,
-							0.131733, 0.1152, -0.00499998,
-							0.131956, 0.1167, 2.08676e-008,
-							0.134228, 0.116732, 0.00485187,
-							0.139908, 0.116813, 0.00776297,
-							0.147292, 0.116919, 0.00873334,
-							0.154676, 0.117024, 0.00776297,
-							0.160356, 0.117105, 0.00485185,
-							0.162628, 0.117137, 2.09458e-008,
-							0.134044, 0.1176, 2.10285e-008,
-							0.136309, 0.117659, 0.0044815,
-							0.141972, 0.117807, 0.00717038,
-							0.149333, 0.118, 0.00806668,
-							0.156695, 0.118193, 0.00717038,
-							0.162357, 0.118341, 0.00448149,
-							0.164622, 0.1184, 2.11716e-008,
-							0.1356, 0.1179, 2.10822e-008,
-							0.137744, 0.117975, 0.00400002,
-							0.143106, 0.118162, 0.00640002,
-							0.150075, 0.118406, 0.00720001,
-							0.157044, 0.11865, 0.00640001,
-							0.162406, 0.118838, 0.00400001,
-							0.16455, 0.118912, 2.12632e-008,
-							0.136356, 0.1176, 2.10285e-008,
-							0.138298, 0.117674, 0.00351854,
-							0.143154, 0.117859, 0.00562965,
-							0.149467, 0.1181, 0.00633335,
-							0.155779, 0.118341, 0.00562964,
-							0.160635, 0.118526, 0.00351853,
-							0.162578, 0.1186, 2.12074e-008,
-							0.136044, 0.1167, 2.08676e-008,
-							0.137735, 0.116751, 0.00314817,
-							0.141963, 0.116878, 0.00503706,
-							0.147458, 0.117044, 0.00566668,
-							0.152954, 0.117209, 0.00503705,
-							0.157181, 0.117337, 0.00314816,
-							0.158872, 0.117387, 2.09906e-008,
-							0.1344, 0.1152, 2.05994e-008,
-							0.135822, 0.1152, 0.00300002,
-							0.139378, 0.1152, 0.00480002,
-							0.144, 0.1152, 0.00540002,
-							0.148622, 0.1152, 0.00480002,
-							0.152178, 0.1152, 0.00300001,
-							0.1536, 0.1152, 2.05994e-008,
-							0.160356, 0.117105, -0.00485184,
-							0.154676, 0.117024, -0.00776296,
-							0.147292, 0.116919, -0.00873333,
-							0.139908, 0.116813, -0.00776295,
-							0.134228, 0.116732, -0.00485183,
-							0.162357, 0.118341, -0.00448147,
-							0.156695, 0.118193, -0.00717036,
-							0.149333, 0.118, -0.00806666,
-							0.141972, 0.117807, -0.00717036,
-							0.136309, 0.117659, -0.00448146,
-							0.162406, 0.118837, -0.00399998,
-							0.157044, 0.11865, -0.00639999,
-							0.150075, 0.118406, -0.00719999,
-							0.143106, 0.118162, -0.00639998,
-							0.137744, 0.117975, -0.00399998,
-							0.160635, 0.118526, -0.0035185,
-							0.155779, 0.118341, -0.00562961,
-							0.149467, 0.1181, -0.00633332,
-							0.143154, 0.117859, -0.00562961,
-							0.138298, 0.117674, -0.00351849,
-							0.157181, 0.117337, -0.00314813,
-							0.152954, 0.117209, -0.00503702,
-							0.147458, 0.117044, -0.00566665,
-							0.141963, 0.116878, -0.00503701,
-							0.137735, 0.116751, -0.00314812,
-							0.152178, 0.1152, -0.00299998,
-							0.148622, 0.1152, -0.00479998,
-							0.144, 0.1152, -0.00539998,
-							0.139378, 0.1152, -0.00479998,
-							0.135822, 0.1152, -0.00299997,
-							0.0133778, 0.1501, 2.684e-008,
-							0, 0.1512, 2.70367e-008,
-							0.0129094, 0.1501, 0.00360378,
-							0, 0.1512, 2.70367e-008,
-							0.0115817, 0.1501, 0.00681272,
-							0, 0.1512, 2.70367e-008,
-							0.00951072, 0.1501, 0.00951074,
-							0.00681272, 0.1501, 0.0115817,
-							0.00360377, 0.1501, 0.0129094,
-							0, 0.1501, 0.0133778,
-							0.0174222, 0.1472, 2.63214e-008,
-							0.0168122, 0.1472, 0.00469302,
-							0.0150829, 0.1472, 0.00887204,
-							0.0123858, 0.1472, 0.0123858,
-							0.00887205, 0.1472, 0.0150829,
-							0.00469303, 0.1472, 0.0168122,
-							0, 0.1472, 0.0174222,
-							0.0156, 0.1431, 2.55883e-008,
-							0.0150536, 0.1431, 0.00420141,
-							0.0135049, 0.1431, 0.00794312,
-							0.0110895, 0.1431, 0.0110895,
-							0.00794312, 0.1431, 0.0135049,
-							0.00420141, 0.1431, 0.0150536,
-							0, 0.1431, 0.0156,
-							0.0113778, 0.1384, 2.47478e-008,
-							0.0109789, 0.1384, 0.00306257,
-							0.00984863, 0.1384, 0.00579109,
-							0.00808622, 0.1384, 0.00808624,
-							0.00579109, 0.1384, 0.00984864,
-							0.00306257, 0.1384, 0.0109789,
-							0, 0.1384, 0.0113778,
-							0.00822222, 0.1337, 2.39074e-008,
-							0.00793338, 0.1337, 0.00221015,
-							0.00711523, 0.1337, 0.00418109,
-							0.00584028, 0.1337, 0.0058403,
-							0.00418108, 0.1337, 0.00711524,
-							0.00221014, 0.1337, 0.0079334,
-							0, 0.1337, 0.00822224,
-							0.0096, 0.1296, 2.31743e-008,
-							0.00926222, 0.1296, 0.0025778,
-							0.00830578, 0.1296, 0.00487824,
-							0.006816, 0.1296, 0.00681602,
-							0.00487823, 0.1296, 0.00830579,
-							0.00257779, 0.1296, 0.00926224,
-							0, 0.1296, 0.00960002,
-							0, 0.1501, 0.0133778,
-							-0.00360375, 0.1501, 0.0129094,
-							-0.0068127, 0.1501, 0.0115817,
-							-0.00951072, 0.1501, 0.00951074,
-							-0.0115817, 0.1501, 0.00681274,
-							-0.0129094, 0.1501, 0.00360379,
-							-0.0133778, 0.1501, 2.684e-008,
-							0, 0.1472, 0.0174222,
-							-0.004693, 0.1472, 0.0168122,
-							-0.00887203, 0.1472, 0.0150829,
-							-0.0123858, 0.1472, 0.0123858,
-							-0.0150829, 0.1472, 0.00887207,
-							-0.0168122, 0.1472, 0.00469305,
-							-0.0174222, 0.1472, 2.63214e-008,
-							-0.00420139, 0.1431, 0.0150536,
-							-0.0079431, 0.1431, 0.0135049,
-							-0.0110895, 0.1431, 0.0110895,
-							-0.0135049, 0.1431, 0.00794314,
-							-0.0150536, 0.1431, 0.00420143,
-							-0.0156, 0.1431, 2.55883e-008,
-							0, 0.1384, 0.0113778,
-							-0.00306255, 0.1384, 0.010979,
-							-0.00579108, 0.1384, 0.00984865,
-							-0.00808623, 0.1384, 0.00808624,
-							-0.00984862, 0.1384, 0.00579111,
-							-0.0109789, 0.1384, 0.00306259,
-							-0.0113778, 0.1384, 2.47478e-008,
-							0, 0.1337, 0.00822224,
-							-0.00221013, 0.1337, 0.00793341,
-							-0.00418107, 0.1337, 0.00711525,
-							-0.00584028, 0.1337, 0.0058403,
-							-0.00711522, 0.1337, 0.0041811,
-							-0.00793338, 0.1337, 0.00221017,
-							-0.00822222, 0.1337, 2.39074e-008,
-							-0.00257778, 0.1296, 0.00926224,
-							-0.00487822, 0.1296, 0.0083058,
-							-0.006816, 0.1296, 0.00681602,
-							-0.00830577, 0.1296, 0.00487825,
-							-0.00926222, 0.1296, 0.00257781,
-							-0.0096, 0.1296, 2.31743e-008,
-							-0.0133778, 0.1501, 2.684e-008,
-							-0.0129094, 0.1501, -0.00360373,
-							-0.0115817, 0.1501, -0.00681268,
-							-0.00951073, 0.1501, -0.00951071,
-							-0.00681272, 0.1501, -0.0115816,
-							-0.00360377, 0.1501, -0.0129094,
-							0, 0.1501, -0.0133778,
-							-0.0174222, 0.1472, 2.63214e-008,
-							-0.0168122, 0.1472, -0.00469298,
-							-0.0150829, 0.1472, -0.00887201,
-							-0.0123858, 0.1472, -0.0123858,
-							-0.00887205, 0.1472, -0.0150829,
-							-0.00469303, 0.1472, -0.0168122,
-							0, 0.1472, -0.0174222,
-							-0.0150536, 0.1431, -0.00420136,
-							-0.0135049, 0.1431, -0.00794309,
-							-0.0110895, 0.1431, -0.0110895,
-							-0.00794312, 0.1431, -0.0135049,
-							-0.00420141, 0.1431, -0.0150536,
-							0, 0.1431, -0.0156,
-							-0.0113778, 0.1384, 2.47478e-008,
-							-0.0109789, 0.1384, -0.00306252,
-							-0.00984862, 0.1384, -0.00579105,
-							-0.00808622, 0.1384, -0.0080862,
-							-0.00579108, 0.1384, -0.0098486,
-							-0.00306256, 0.1384, -0.0109789,
-							0, 0.1384, -0.0113778,
-							-0.00822222, 0.1337, 2.39074e-008,
-							-0.00793338, 0.1337, -0.00221011,
-							-0.00711523, 0.1337, -0.00418104,
-							-0.00584028, 0.1337, -0.00584025,
-							-0.00418108, 0.1337, -0.0071152,
-							-0.00221014, 0.1337, -0.00793336,
-							0, 0.1337, -0.0082222,
-							-0.00926222, 0.1296, -0.00257775,
-							-0.00830578, 0.1296, -0.0048782,
-							-0.006816, 0.1296, -0.00681598,
-							-0.00487823, 0.1296, -0.00830575,
-							-0.00257779, 0.1296, -0.0092622,
-							0, 0.1296, -0.00959998,
-							0.00360375, 0.1501, -0.0129094,
-							0.0068127, 0.1501, -0.0115817,
-							0.00951073, 0.1501, -0.00951071,
-							0.0115817, 0.1501, -0.0068127,
-							0.0129094, 0.1501, -0.00360375,
-							0.0133778, 0.1501, 2.684e-008,
-							0.004693, 0.1472, -0.0168122,
-							0.00887203, 0.1472, -0.0150829,
-							0.0123858, 0.1472, -0.0123858,
-							0.0150829, 0.1472, -0.00887203,
-							0.0168122, 0.1472, -0.004693,
-							0.0174222, 0.1472, 2.63214e-008,
-							0.00420139, 0.1431, -0.0150536,
-							0.0079431, 0.1431, -0.0135049,
-							0.0110895, 0.1431, -0.0110895,
-							0.0135049, 0.1431, -0.00794311,
-							0.0150536, 0.1431, -0.00420139,
-							0.00306255, 0.1384, -0.0109789,
-							0.00579107, 0.1384, -0.0098486,
-							0.00808622, 0.1384, -0.0080862,
-							0.00984861, 0.1384, -0.00579106,
-							0.0109789, 0.1384, -0.00306254,
-							0.0113778, 0.1384, 2.47478e-008,
-							0.00221013, 0.1337, -0.00793336,
-							0.00418106, 0.1337, -0.00711521,
-							0.00584028, 0.1337, -0.00584025,
-							0.00711522, 0.1337, -0.00418105,
-							0.00793338, 0.1337, -0.00221012,
-							0.00822222, 0.1337, 2.39074e-008,
-							0.00257778, 0.1296, -0.0092622,
-							0.00487822, 0.1296, -0.00830576,
-							0.006816, 0.1296, -0.00681598,
-							0.00830577, 0.1296, -0.00487821,
-							0.00926222, 0.1296, -0.00257777,
-							0.0168444, 0.126533, 2.26259e-008,
-							0.0162518, 0.126533, 0.00452306,
-							0.0145736, 0.126533, 0.00855948,
-							0.0119595, 0.126533, 0.0119596,
-							0.00855948, 0.126533, 0.0145736,
-							0.00452306, 0.126533, 0.0162518,
-							0, 0.126533, 0.0168444,
-							0.0275555, 0.124267, 2.22206e-008,
-							0.026586, 0.124267, 0.00739918,
-							0.0238406, 0.124267, 0.0140023,
-							0.0195644, 0.124267, 0.0195644,
-							0.0140023, 0.124267, 0.0238406,
-							0.0073992, 0.124267, 0.026586,
-							0, 0.124267, 0.0275555,
-							0.0396, 0.1224, 2.18868e-008,
-							0.0382067, 0.1224, 0.0106333,
-							0.0342613, 0.1224, 0.0201227,
-							0.028116, 0.1224, 0.028116,
-							0.0201227, 0.1224, 0.0342613,
-							0.0106334, 0.1224, 0.0382067,
-							0, 0.1224, 0.0396,
-							0.0508444, 0.120533, 2.1553e-008,
-							0.0490554, 0.120533, 0.0136527,
-							0.0439898, 0.120533, 0.0258365,
-							0.0360995, 0.120533, 0.0360995,
-							0.0258365, 0.120533, 0.0439898,
-							0.0136527, 0.120533, 0.0490554,
-							0, 0.120533, 0.0508444,
-							0.0591555, 0.118267, 2.11477e-008,
-							0.0570741, 0.118267, 0.0158844,
-							0.0511805, 0.118267, 0.0300598,
-							0.0420004, 0.118267, 0.0420004,
-							0.0300598, 0.118267, 0.0511805,
-							0.0158844, 0.118267, 0.0570741,
-							0, 0.118267, 0.0591555,
-							0.0624, 0.1152, 2.05994e-008,
-							0.0602044, 0.1152, 0.0167556,
-							0.0539876, 0.1152, 0.0317084,
-							0.044304, 0.1152, 0.044304,
-							0.0317085, 0.1152, 0.0539875,
-							0.0167556, 0.1152, 0.0602044,
-							0, 0.1152, 0.0624,
-							-0.00452304, 0.126533, 0.0162518,
-							-0.00855946, 0.126533, 0.0145736,
-							-0.0119595, 0.126533, 0.0119596,
-							-0.0145735, 0.126533, 0.0085595,
-							-0.0162518, 0.126533, 0.00452308,
-							-0.0168444, 0.126533, 2.26259e-008,
-							-0.00739916, 0.124267, 0.026586,
-							-0.0140023, 0.124267, 0.0238407,
-							-0.0195644, 0.124267, 0.0195644,
-							-0.0238406, 0.124267, 0.0140023,
-							-0.026586, 0.124267, 0.00739922,
-							-0.0275555, 0.124267, 2.22206e-008,
-							-0.0106333, 0.1224, 0.0382067,
-							-0.0201227, 0.1224, 0.0342613,
-							-0.028116, 0.1224, 0.028116,
-							-0.0342613, 0.1224, 0.0201227,
-							-0.0382067, 0.1224, 0.0106334,
-							-0.0396, 0.1224, 2.18868e-008,
-							-0.0136527, 0.120533, 0.0490554,
-							-0.0258365, 0.120533, 0.0439898,
-							-0.0360995, 0.120533, 0.0360995,
-							-0.0439898, 0.120533, 0.0258365,
-							-0.0490554, 0.120533, 0.0136527,
-							-0.0508444, 0.120533, 2.1553e-008,
-							-0.0158843, 0.118267, 0.0570741,
-							-0.0300597, 0.118267, 0.0511805,
-							-0.0420004, 0.118267, 0.0420004,
-							-0.0511805, 0.118267, 0.0300598,
-							-0.0570741, 0.118267, 0.0158844,
-							-0.0591555, 0.118267, 2.11477e-008,
-							-0.0167555, 0.1152, 0.0602044,
-							-0.0317084, 0.1152, 0.0539876,
-							-0.044304, 0.1152, 0.044304,
-							-0.0539875, 0.1152, 0.0317085,
-							-0.0602044, 0.1152, 0.0167556,
-							-0.0624, 0.1152, 2.05994e-008,
-							-0.0162518, 0.126533, -0.00452302,
-							-0.0145736, 0.126533, -0.00855945,
-							-0.0119595, 0.126533, -0.0119595,
-							-0.00855948, 0.126533, -0.0145735,
-							-0.00452306, 0.126533, -0.0162517,
-							0, 0.126533, -0.0168444,
-							-0.026586, 0.124267, -0.00739915,
-							-0.0238406, 0.124267, -0.0140023,
-							-0.0195644, 0.124267, -0.0195644,
-							-0.0140023, 0.124267, -0.0238406,
-							-0.0073992, 0.124267, -0.026586,
-							0, 0.124267, -0.0275555,
-							-0.0382067, 0.1224, -0.0106333,
-							-0.0342613, 0.1224, -0.0201226,
-							-0.028116, 0.1224, -0.028116,
-							-0.0201227, 0.1224, -0.0342613,
-							-0.0106334, 0.1224, -0.0382066,
-							0, 0.1224, -0.0396,
-							-0.0490554, 0.120533, -0.0136526,
-							-0.0439898, 0.120533, -0.0258365,
-							-0.0360995, 0.120533, -0.0360995,
-							-0.0258365, 0.120533, -0.0439898,
-							-0.0136527, 0.120533, -0.0490554,
-							0, 0.120533, -0.0508444,
-							-0.0570741, 0.118267, -0.0158843,
-							-0.0511805, 0.118267, -0.0300597,
-							-0.0420004, 0.118267, -0.0420004,
-							-0.0300598, 0.118267, -0.0511805,
-							-0.0158844, 0.118267, -0.0570741,
-							0, 0.118267, -0.0591555,
-							-0.0602044, 0.1152, -0.0167555,
-							-0.0539876, 0.1152, -0.0317084,
-							-0.044304, 0.1152, -0.044304,
-							-0.0317085, 0.1152, -0.0539875,
-							-0.0167556, 0.1152, -0.0602044,
-							0, 0.1152, -0.0624,
-							0.00452304, 0.126533, -0.0162517,
-							0.00855946, 0.126533, -0.0145735,
-							0.0119595, 0.126533, -0.0119595,
-							0.0145735, 0.126533, -0.00855947,
-							0.0162518, 0.126533, -0.00452304,
-							0.00739916, 0.124267, -0.026586,
-							0.0140023, 0.124267, -0.0238406,
-							0.0195644, 0.124267, -0.0195644,
-							0.0238406, 0.124267, -0.0140023,
-							0.026586, 0.124267, -0.00739919,
-							0.0106333, 0.1224, -0.0382067,
-							0.0201227, 0.1224, -0.0342613,
-							0.028116, 0.1224, -0.028116,
-							0.0342613, 0.1224, -0.0201227,
-							0.0382067, 0.1224, -0.0106334,
-							0.0136527, 0.120533, -0.0490554,
-							0.0258365, 0.120533, -0.0439898,
-							0.0360995, 0.120533, -0.0360995,
-							0.0439898, 0.120533, -0.0258365,
-							0.0490554, 0.120533, -0.0136527,
-							0.0158843, 0.118267, -0.0570741,
-							0.0300597, 0.118267, -0.0511805,
-							0.0420004, 0.118267, -0.0420004,
-							0.0511805, 0.118267, -0.0300598,
-							0.0570741, 0.118267, -0.0158844,
-							0.0167555, 0.1152, -0.0602044,
-							0.0317084, 0.1152, -0.0539876,
-							0.044304, 0.1152, -0.044304,
-							0.0539875, 0.1152, -0.0317085,
-							0.0602044, 0.1152, -0.0167556,
-							0.0290833, 0.000283333, 5.06639e-011,
-							0, 0, 0,
-							0.02806, 0.000283335, -0.00780941,
-							0.0251625, 0.000283336, -0.0147786,
-							0.0206492, 0.000283337, -0.0206492,
-							0.0147787, 0.000283338, -0.0251625,
-							0.00780945, 0.000283338, -0.02806,
-							0, 0.000283338, -0.0290833,
-							0.0490667, 0.00106667, 1.90735e-010,
-							0.0473403, 0.00106667, -0.0131753,
-							0.0424518, 0.00106667, -0.0249331,
-							0.0348373, 0.00106667, -0.0348373,
-							0.0249332, 0.00106667, -0.0424517,
-							0.0131754, 0.00106667, -0.0473402,
-							0, 0.00106667, -0.0490667,
-							0.06165, 0.00225, 4.02331e-010,
-							0.0594808, 0.00225, -0.0165542,
-							0.0533387, 0.00225001, -0.0313273,
-							0.0437715, 0.00225001, -0.0437715,
-							0.0313274, 0.00225001, -0.0533386,
-							0.0165542, 0.00225001, -0.0594808,
-							0, 0.00225001, -0.06165,
-							0.0685333, 0.00373333, 6.67572e-010,
-							0.066122, 0.00373334, -0.0184025,
-							0.059294, 0.00373334, -0.0348251,
-							0.0486587, 0.00373334, -0.0486587,
-							0.0348251, 0.00373334, -0.059294,
-							0.0184026, 0.00373334, -0.066122,
-							0, 0.00373334, -0.0685333,
-							0.0714167, 0.00541667, 9.68575e-010,
-							0.0689039, 0.00541667, -0.0191767,
-							0.0617887, 0.00541667, -0.0362902,
-							0.0507058, 0.00541668, -0.0507058,
-							0.0362903, 0.00541668, -0.0617886,
-							0.0191768, 0.00541668, -0.0689038,
-							0, 0.00541668, -0.0714167,
-							0.0694667, 0.0072, -0.0193333,
-							0.0622933, 0.00720001, -0.0365866,
-							0.0365867, 0.00720001, -0.0622933,
-							0.0193334, 0.00720001, -0.0694666,
-							0, 0.000283338, -0.0290833,
-							-0.0078094, 0.000283338, -0.02806,
-							-0.0147786, 0.000283338, -0.0251625,
-							-0.0206492, 0.000283337, -0.0206492,
-							-0.0251624, 0.000283336, -0.0147787,
-							-0.02806, 0.000283335, -0.00780945,
-							-0.0290833, 0.000283333, 5.06639e-011,
-							0, 0.00106667, -0.0490667,
-							-0.0131753, 0.00106667, -0.0473402,
-							-0.0249331, 0.00106667, -0.0424518,
-							-0.0348373, 0.00106667, -0.0348373,
-							-0.0424517, 0.00106667, -0.0249332,
-							-0.0473402, 0.00106667, -0.0131754,
-							-0.0490667, 0.00106667, 1.90735e-010,
-							-0.0165542, 0.00225001, -0.0594808,
-							-0.0313273, 0.00225001, -0.0533387,
-							-0.0437715, 0.00225001, -0.0437715,
-							-0.0533386, 0.00225001, -0.0313274,
-							-0.0594808, 0.00225, -0.0165542,
-							-0.06165, 0.00225, 4.02331e-010,
-							0, 0.00373334, -0.0685333,
-							-0.0184024, 0.00373334, -0.066122,
-							-0.0348251, 0.00373334, -0.059294,
-							-0.0486587, 0.00373334, -0.0486587,
-							-0.059294, 0.00373334, -0.0348251,
-							-0.0661219, 0.00373334, -0.0184026,
-							-0.0685333, 0.00373333, 6.67572e-010,
-							0, 0.00541667, -0.0714167,
-							-0.0191767, 0.00541668, -0.0689039,
-							-0.0362902, 0.00541667, -0.0617887,
-							-0.0507058, 0.00541667, -0.0507058,
-							-0.0617886, 0.00541667, -0.0362903,
-							-0.0689038, 0.00541667, -0.0191768,
-							-0.0714167, 0.00541666, 9.68575e-010,
-							-0.0193333, 0.00720001, -0.0694667,
-							-0.0365866, 0.00720001, -0.0622933,
-							-0.0622933, 0.00720001, -0.0365867,
-							-0.0694666, 0.0072, -0.0193334,
-							-0.0290833, 0.000283334, 5.0664e-011,
-							-0.02806, 0.000283332, 0.00780941,
-							-0.0251625, 0.000283331, 0.0147786,
-							-0.0206492, 0.00028333, 0.0206492,
-							-0.0147787, 0.000283329, 0.0251625,
-							-0.00780945, 0.000283329, 0.02806,
-							0, 0.000283329, 0.0290833,
-							-0.0490667, 0.00106667, 1.90735e-010,
-							-0.0473403, 0.00106667, 0.0131753,
-							-0.0424518, 0.00106666, 0.0249331,
-							-0.0348374, 0.00106666, 0.0348374,
-							-0.0249332, 0.00106666, 0.0424517,
-							-0.0131754, 0.00106666, 0.0473402,
-							0, 0.00106666, 0.0490667,
-							-0.0594808, 0.00225, 0.0165542,
-							-0.0533387, 0.00224999, 0.0313273,
-							-0.0437715, 0.00224999, 0.0437715,
-							-0.0313274, 0.00224999, 0.0533386,
-							-0.0165542, 0.00224999, 0.0594808,
-							0, 0.00224999, 0.06165,
-							-0.0685333, 0.00373334, 6.67572e-010,
-							-0.066122, 0.00373333, 0.0184025,
-							-0.059294, 0.00373333, 0.0348251,
-							-0.0486587, 0.00373333, 0.0486587,
-							-0.0348251, 0.00373333, 0.059294,
-							-0.0184026, 0.00373333, 0.066122,
-							0, 0.00373333, 0.0685333,
-							-0.0714167, 0.00541667, 9.68576e-010,
-							-0.0689039, 0.00541667, 0.0191767,
-							-0.0617887, 0.00541666, 0.0362902,
-							-0.0507058, 0.00541666, 0.0507058,
-							-0.0362903, 0.00541666, 0.0617886,
-							-0.0191768, 0.00541666, 0.0689038,
-							0, 0.00541666, 0.0714167,
-							-0.0694667, 0.0072, 0.0193333,
-							-0.0622933, 0.00719999, 0.0365866,
-							-0.05112, 0.00719999, 0.05112,
-							-0.0365867, 0.00719999, 0.0622933,
-							-0.0193334, 0.00719999, 0.0694666,
-							0.00780941, 0.000283329, 0.02806,
-							0.0147786, 0.000283329, 0.0251625,
-							0.0206492, 0.00028333, 0.0206492,
-							0.0251625, 0.000283331, 0.0147787,
-							0.02806, 0.000283332, 0.00780945,
-							0.0290833, 0.000283334, 5.0664e-011,
-							0.0131753, 0.00106666, 0.0473403,
-							0.0249331, 0.00106666, 0.0424518,
-							0.0348374, 0.00106666, 0.0348374,
-							0.0424517, 0.00106666, 0.0249332,
-							0.0473402, 0.00106666, 0.0131754,
-							0.0490667, 0.00106667, 1.90735e-010,
-							0.0165542, 0.00224999, 0.0594808,
-							0.0313273, 0.00224999, 0.0533387,
-							0.0437715, 0.00224999, 0.0437715,
-							0.0533386, 0.00224999, 0.0313274,
-							0.0594808, 0.00225, 0.0165542,
-							0.0184025, 0.00373333, 0.066122,
-							0.0348251, 0.00373333, 0.059294,
-							0.0486587, 0.00373333, 0.0486587,
-							0.059294, 0.00373333, 0.0348251,
-							0.066122, 0.00373333, 0.0184026,
-							0.0685333, 0.00373334, 6.67572e-010,
-							0.0191767, 0.00541666, 0.0689039,
-							0.0362902, 0.00541666, 0.0617887,
-							0.0507058, 0.00541666, 0.0507058,
-							0.0617886, 0.00541666, 0.0362903,
-							0.0689038, 0.00541667, 0.0191768,
-							0.0714167, 0.00541667, 9.68576e-010,
-							0.0193333, 0.00719999, 0.0694667,
-							0.0365866, 0.00719999, 0.0622933,
-							0.05112, 0.00719999, 0.05112,
-							0.0622933, 0.00719999, 0.0365867,
-							0.0694666, 0.0072, 0.0193334,
-							0, 0, 0,
-							0, 0, 0,
-							0, 0, 0,
-							0, 0, 0,
-							0, 0, 0,
-							0, 0, 0,
-							0, 0, 0,
-							0, 0, 0,
-							0, 0, 0,
-							0, 0, 0,
-							0, 0, 0,
-							0, 0, 0,
-							-0.06165, 0.00225, 4.02331e-010,
-							0, 0, 0,
-							0, 0, 0,
-							0, 0, 0,
-							0, 0, 0,
-							0, 0, 0,
-							0, 0, 0,
-							0, 0, 0,
-							0.06165, 0.00225, 4.02331e-010,
-							0, 0, 0,
-							0, 0, 0,
-							0, 0, 0,
-							0, 0, 0,
-							0, 0, 0,
-							0, 0, 0,
-							0.006816, 0.1296, 0.00681602,
-							0.00487823, 0.1296, 0.00830579,
-							0.00257779, 0.1296, 0.00926224,
-							0, 0.1296, 0.00960002,
-							0, 0.1512, 2.70367e-008,
-							0, 0.1512, 2.70367e-008,
-							0, 0.1512, 2.70367e-008,
-							0, 0.1512, 2.70367e-008,
-							0, 0.1512, 2.70367e-008,
-							0, 0.1512, 2.70367e-008,
-							0, 0.1512, 2.70367e-008,
-							0, 0.1512, 2.70367e-008,
-							0, 0.1512, 2.70367e-008,
-							0, 0.1512, 2.70367e-008,
-							0, 0.1512, 2.70367e-008,
-							0, 0.1512, 2.70367e-008,
-							0, 0.1512, 2.70367e-008,
-							0, 0.1512, 2.70367e-008,
-							0, 0.1512, 2.70367e-008,
-							0, 0.1512, 2.70367e-008,
-							0, 0.1512, 2.70367e-008,
-							0.00830577, 0.1296, -0.00487821,
-							0.00487822, 0.1296, -0.00830576,
-							0.00257778, 0.1296, -0.0092622,
-							0, 0.1296, -0.00959998,
-							-0.00257779, 0.1296, -0.0092622,
-							-0.00487823, 0.1296, -0.00830575,
-							-0.00830578, 0.1296, -0.0048782,
-							-0.00257778, 0.1296, 0.00926224,
-							-0.00487822, 0.1296, 0.0083058,
-							-0.006816, 0.1296, 0.00681602,
-							0, 0.1512, 2.70367e-008,
-							0, 0.1512, 2.70367e-008,
-							0, 0.1512, 2.70367e-008,
-							0, 0.1512, 2.70367e-008,
-							0, 0.1512, 2.70367e-008,
-							0, 0.1512, 2.70367e-008,
-							0, 0.1512, 2.70367e-008,
-							0.156267, 0.1152, -0.00499999,
-							0.131733, 0.1152, -0.00499998,
-							0.1296, 0.1152, 2.05994e-008,
-							0.137067, 0.1152, 0.00800001,
-							-0.094, 0.1079, 1.9294e-008,
-							-0.096, 0.0432, 7.72476e-009,
-							-0.0897778, 0.0250667, 4.48227e-009,
-							0.0897778, 0.0250667, 4.48227e-009,
-							-0.084, 0.01845, 3.29912e-009,
-							0.084, 0.01845, 3.29912e-009,
-							-0.0782222, 0.0133334, 2.38419e-009,
-							0.0782222, 0.0133334, 2.38419e-009,
-							-0.0737778, 0.00961668, 1.7196e-009,
-							0.0737778, 0.00961668, 1.7196e-009,
-							0.0926222, 0.0432, 0.0257778,
-							0.072, 0.1152, 2.05994e-008,
-							0.05112, 0.1152, -0.05112,
-							0, 0.1152, -0.072,
-							-0.05112, 0.1152, -0.05112,
-							-0.072, 0.1152, 2.05994e-008,
-							0, 0.1152, 0.072,
-							-0.05112, 0.1152, 0.05112,
-							-0.0687556, 0.1194, 2.13504e-008,
-							0.05112, 0.1152, 0.05112,
-							0, 0.117825, 0.0663056,
-							-0.0396, 0.1224, 2.18868e-008,
-							0.0396, 0.1224, 2.18868e-008};
-
-float teapot_normals[] = {
-							-0.987635, -0.156768, 0,
-							-0.902861, -0.429933, 0,
-							-0.953562, -0.156989, -0.257047,
-							-0.871509, -0.430441, -0.234929,
-							-0.854265, -0.157281, -0.495474,
-							-0.780517, -0.431109, -0.4527,
-							-0.698293, -0.157393, -0.698294,
-							-0.637936, -0.431366, -0.637936,
-							-0.495474, -0.157281, -0.854265,
-							-0.4527, -0.431109, -0.780517,
-							-0.257047, -0.156989, -0.953562,
-							-0.234929, -0.430441, -0.871509,
-							0, -0.156767, -0.987636,
-							0, -0.429933, -0.902861,
-							-0.880022, 0.474932, 0,
-							-0.849414, 0.475466, -0.228973,
-							-0.76067, 0.476166, -0.441189,
-							-0.621695, 0.476435, -0.621695,
-							-0.441189, 0.476166, -0.76067,
-							-0.228972, 0.475466, -0.849414,
-							0, 0.474932, -0.880022,
-							0, 1, 0,
-							-3.12489e-007, 1, -4.53013e-008,
-							-4.74898e-007, 1, -2.15741e-007,
-							0, 1, 0,
-							-1.19502e-007, 1, -2.57504e-007,
-							-5.01339e-008, 1, -1.37835e-007,
-							0, 1, 0,
-							0.556738, 0.830688, 0,
-							0.537013, 0.831061, 0.14476,
-							0.480481, 0.83155, 0.278679,
-							0.392564, 0.831738, 0.392564,
-							0.278679, 0.83155, 0.480481,
-							0.14476, 0.831061, 0.537012,
-							0, 0.830688, 0.556738,
-							0.783289, 0.621658, 0,
-							0.755869, 0.622211, 0.203756,
-							0.67669, 0.622937, 0.39248,
-							0.552994, 0.623214, 0.552994,
-							0.39248, 0.622936, 0.676691,
-							0.203756, 0.62221, 0.755869,
-							0, 0.621658, 0.783289,
-							0.90286, 0.429934, 0,
-							0.871509, 0.430442, 0.234929,
-							0.780517, 0.431109, 0.4527,
-							0.637935, 0.431366, 0.637936,
-							0.4527, 0.431109, 0.780517,
-							0.234929, 0.430441, 0.87151,
-							0, 0.429934, 0.90286,
-							0.257047, -0.156989, -0.953562,
-							0.234929, -0.430441, -0.871509,
-							0.495474, -0.157281, -0.854265,
-							0.4527, -0.431109, -0.780517,
-							0.698293, -0.157393, -0.698294,
-							0.637936, -0.431366, -0.637936,
-							0.854265, -0.157281, -0.495474,
-							0.780517, -0.431109, -0.4527,
-							0.953562, -0.156989, -0.257047,
-							0.871509, -0.430441, -0.234929,
-							0.987636, -0.156767, 0,
-							0.902861, -0.429933, 0,
-							0.228973, 0.475465, -0.849414,
-							0.441188, 0.476167, -0.760669,
-							0.621695, 0.476434, -0.621696,
-							0.76067, 0.476167, -0.441188,
-							0.849414, 0.475466, -0.228972,
-							0.880022, 0.474932, 0,
-							4.53013e-008, 1, -3.12489e-007,
-							2.15741e-007, 1, -4.74898e-007,
-							0, 1, 0,
-							2.57504e-007, 1, -1.19502e-007,
-							1.37835e-007, 1, -5.01339e-008,
-							0, 1, 0,
-							0, 0.830689, 0.556737,
-							-0.14476, 0.831061, 0.537012,
-							-0.278679, 0.83155, 0.480481,
-							-0.392563, 0.831738, 0.392563,
-							-0.480482, 0.83155, 0.27868,
-							-0.537012, 0.831061, 0.14476,
-							-0.556738, 0.830688, 0,
-							0, 0.621658, 0.783289,
-							-0.203756, 0.62221, 0.755869,
-							-0.39248, 0.622937, 0.67669,
-							-0.552993, 0.623215, 0.552993,
-							-0.67669, 0.622937, 0.39248,
-							-0.755869, 0.62221, 0.203756,
-							-0.783289, 0.621658, 0,
-							-0.234929, 0.430442, 0.871509,
-							-0.4527, 0.431109, 0.780517,
-							-0.637935, 0.431366, 0.637936,
-							-0.780517, 0.431109, 0.4527,
-							-0.87151, 0.430441, 0.234929,
-							-0.90286, 0.429934, 0,
-							0.987636, -0.156767, 0,
-							0.953562, -0.156989, 0.257047,
-							0.871509, -0.430441, 0.234929,
-							0.854265, -0.15728, 0.495474,
-							0.780517, -0.431109, 0.4527,
-							0.698294, -0.157393, 0.698293,
-							0.637936, -0.431366, 0.637936,
-							0.495474, -0.157281, 0.854265,
-							0.4527, -0.431109, 0.780517,
-							0.257047, -0.156989, 0.953562,
-							0.234929, -0.430441, 0.871509,
-							0, -0.156767, 0.987636,
-							0, -0.429933, 0.902861,
-							0.880022, 0.474934, 0,
-							0.849413, 0.475467, 0.228972,
-							0.760669, 0.476167, 0.441188,
-							0.621695, 0.476436, 0.621695,
-							0.441188, 0.476167, 0.760669,
-							0.228972, 0.475466, 0.849414,
-							0, 0.474934, 0.880022,
-							3.12489e-007, 1, 4.53013e-008,
-							4.74898e-007, 1, 2.15741e-007,
-							0, 1, 0,
-							1.19502e-007, 1, 2.57504e-007,
-							5.01339e-008, 1, 1.37835e-007,
-							0, 1, 0,
-							-0.537013, 0.831061, -0.14476,
-							-0.480482, 0.83155, -0.27868,
-							-0.392566, 0.831735, -0.392566,
-							-0.27868, 0.83155, -0.480482,
-							-0.14476, 0.831061, -0.537012,
-							0, 0.830688, -0.556738,
-							-0.783289, 0.621657, 0,
-							-0.755869, 0.62221, -0.203756,
-							-0.676691, 0.622936, -0.39248,
-							-0.552994, 0.623215, -0.552993,
-							-0.392481, 0.622936, -0.676691,
-							-0.203756, 0.622209, -0.75587,
-							0, 0.621657, -0.783289,
-							-0.871509, 0.430442, -0.234929,
-							-0.780517, 0.431109, -0.4527,
-							-0.637936, 0.431366, -0.637935,
-							-0.4527, 0.431109, -0.780517,
-							-0.234929, 0.430441, -0.87151,
-							0, 0.429934, -0.90286,
-							-0.257047, -0.156989, 0.953562,
-							-0.234929, -0.430441, 0.871509,
-							-0.495474, -0.15728, 0.854265,
-							-0.4527, -0.431109, 0.780517,
-							-0.698294, -0.157393, 0.698293,
-							-0.637936, -0.431366, 0.637936,
-							-0.854265, -0.157281, 0.495474,
-							-0.780517, -0.431109, 0.4527,
-							-0.953562, -0.156989, 0.257047,
-							-0.871509, -0.430442, 0.234928,
-							-0.987636, -0.156767, 0,
-							-0.228972, 0.475467, 0.849413,
-							-0.441188, 0.476167, 0.760669,
-							-0.621695, 0.476436, 0.621695,
-							-0.76067, 0.476167, 0.441188,
-							-0.849414, 0.475466, 0.228972,
-							-0.880022, 0.474934, 0,
-							-4.53013e-008, 1, 3.12489e-007,
-							-2.15741e-007, 1, 4.74898e-007,
-							0, 1, 0,
-							-2.57504e-007, 1, 1.19502e-007,
-							-1.37835e-007, 1, 5.01339e-008,
-							0.14476, 0.831061, -0.537013,
-							0.27868, 0.83155, -0.480482,
-							0.392566, 0.831735, -0.392566,
-							0.480482, 0.83155, -0.27868,
-							0.537012, 0.831061, -0.14476,
-							0.556738, 0.830688, 0,
-							0.203756, 0.62221, -0.755869,
-							0.392481, 0.622936, -0.67669,
-							0.552994, 0.623215, -0.552993,
-							0.676691, 0.622936, -0.39248,
-							0.75587, 0.622209, -0.203756,
-							0.783289, 0.621657, 0,
-							0.234929, 0.430442, -0.871509,
-							0.4527, 0.431109, -0.780517,
-							0.637936, 0.431366, -0.637935,
-							0.780517, 0.431109, -0.4527,
-							0.87151, 0.430441, -0.234928,
-							0.906828, 0.421501, 0,
-							0.875348, 0.422003, 0.235963,
-							0.871509, 0.430442, 0.234929,
-							0.783966, 0.422664, 0.4547,
-							0.780517, 0.43111, 0.4527,
-							0.640758, 0.422917, 0.640758,
-							0.4547, 0.422664, 0.783966,
-							0.4527, 0.43111, 0.780517,
-							0.235964, 0.422003, 0.875348,
-							0.234929, 0.430442, 0.871509,
-							0, 0.421501, 0.906828,
-							0.918633, 0.395111, 0,
-							0.886771, 0.395595, 0.239043,
-							0.794229, 0.39623, 0.460653,
-							0.649156, 0.396474, 0.649157,
-							0.460653, 0.39623, 0.794229,
-							0.239043, 0.395595, 0.886771,
-							0, 0.395111, 0.918633,
-							0.937749, 0.347314, 0,
-							0.905271, 0.347757, 0.244029,
-							0.810853, 0.34834, 0.470295,
-							0.662761, 0.348563, 0.662761,
-							0.470295, 0.34834, 0.810853,
-							0.24403, 0.347757, 0.90527,
-							0, 0.347314, 0.937749,
-							0.96234, 0.271848, 0,
-							0.929073, 0.272213, 0.250446,
-							0.832247, 0.272693, 0.482704,
-							0.680271, 0.272877, 0.680271,
-							0.482704, 0.272693, 0.832247,
-							0.250446, 0.272213, 0.929073,
-							0, 0.271848, 0.96234,
-							0.987204, 0.15946, 0,
-							0.953145, 0.159686, 0.256935,
-							0.85389, 0.159982, 0.495256,
-							0.697986, 0.160096, 0.697986,
-							0.495256, 0.159982, 0.853889,
-							0.256935, 0.159686, 0.953145,
-							0, 0.15946, 0.987204,
-							1, 0, 0,
-							0.965535, -2.69333e-008, 0.260275,
-							0.865031, -2.6582e-008, 0.501718,
-							0.707107, -1.58051e-008, 0.707107,
-							0.501718, -5.72888e-009, 0.865031,
-							0.260275, -7.99313e-010, 0.965535,
-							0, 0, 1,
-							0, 0.421501, 0.906828,
-							-0.235963, 0.422003, 0.875348,
-							-0.234928, 0.430442, 0.871509,
-							-0.4547, 0.422664, 0.783966,
-							-0.4527, 0.43111, 0.780517,
-							-0.640758, 0.422917, 0.640758,
-							-0.783966, 0.422664, 0.454701,
-							-0.780517, 0.43111, 0.4527,
-							-0.875348, 0.422003, 0.235964,
-							-0.871509, 0.430442, 0.234929,
-							-0.906828, 0.421501, 0,
-							0, 0.395111, 0.918633,
-							-0.239043, 0.395595, 0.886771,
-							-0.460653, 0.39623, 0.794229,
-							-0.649157, 0.396474, 0.649157,
-							-0.794229, 0.39623, 0.460653,
-							-0.886771, 0.395595, 0.239043,
-							-0.918633, 0.395111, 0,
-							-0.244029, 0.347757, 0.905271,
-							-0.470295, 0.34834, 0.810853,
-							-0.662761, 0.348563, 0.662761,
-							-0.810853, 0.34834, 0.470295,
-							-0.90527, 0.347757, 0.24403,
-							-0.937749, 0.347314, 0,
-							0, 0.271848, 0.96234,
-							-0.250446, 0.272213, 0.929073,
-							-0.482703, 0.272693, 0.832248,
-							-0.680271, 0.272877, 0.680271,
-							-0.832247, 0.272693, 0.482704,
-							-0.929073, 0.272213, 0.250446,
-							-0.96234, 0.271848, 0,
-							0, 0.159461, 0.987204,
-							-0.256935, 0.159686, 0.953145,
-							-0.495256, 0.159983, 0.853889,
-							-0.697986, 0.160096, 0.697986,
-							-0.853889, 0.159982, 0.495256,
-							-0.953145, 0.159686, 0.256935,
-							-0.987204, 0.159461, 0,
-							-0.260274, -7.9931e-010, 0.965535,
-							-0.501718, -5.72887e-009, 0.865031,
-							-0.707107, -1.58051e-008, 0.707107,
-							-0.865031, -2.6582e-008, 0.501718,
-							-0.965535, -2.69333e-008, 0.260275,
-							0.410365, 0.911921, 0,
-							-0.906828, 0.421501, 0,
-							-0.875348, 0.422003, -0.235963,
-							-0.871509, 0.430442, -0.234928,
-							-0.783966, 0.422664, -0.4547,
-							-0.780517, 0.43111, -0.4527,
-							-0.640758, 0.422917, -0.640758,
-							-0.454701, 0.422664, -0.783966,
-							-0.4527, 0.43111, -0.780517,
-							-0.235964, 0.422003, -0.875348,
-							-0.234929, 0.430442, -0.871509,
-							0, 0.421501, -0.906828,
-							-0.918633, 0.395111, 0,
-							-0.886771, 0.395595, -0.239043,
-							-0.794229, 0.39623, -0.460653,
-							-0.649157, 0.396474, -0.649156,
-							-0.460653, 0.39623, -0.794229,
-							-0.239043, 0.395595, -0.886771,
-							0, 0.395111, -0.918633,
-							-0.905271, 0.347757, -0.244029,
-							-0.810853, 0.34834, -0.470295,
-							-0.662761, 0.348563, -0.662761,
-							-0.470295, 0.34834, -0.810853,
-							-0.24403, 0.347757, -0.90527,
-							0, 0.347314, -0.937749,
-							-0.96234, 0.271847, 0,
-							-0.929073, 0.272213, -0.250446,
-							-0.832248, 0.272693, -0.482703,
-							-0.680271, 0.272877, -0.680271,
-							-0.482704, 0.272693, -0.832247,
-							-0.250446, 0.272213, -0.929073,
-							0, 0.271847, -0.96234,
-							-0.987204, 0.15946, 0,
-							-0.953145, 0.159685, -0.256935,
-							-0.85389, 0.159982, -0.495256,
-							-0.697986, 0.160096, -0.697986,
-							-0.495256, 0.159982, -0.853889,
-							-0.256935, 0.159685, -0.953145,
-							0, 0.15946, -0.987204,
-							-0.965535, 2.69333e-008, -0.260274,
-							-0.865031, 2.6582e-008, -0.501718,
-							-0.707107, 1.58051e-008, -0.707107,
-							-0.501718, 5.72888e-009, -0.865031,
-							-0.260275, 7.99313e-010, -0.965535,
-							0, 0 , -1,
-							0.235963, 0.422003, -0.875348,
-							0.234928, 0.430442, -0.871509,
-							0.4547, 0.422664, -0.783966,
-							0.4527, 0.43111, -0.780517,
-							0.640758, 0.422917, -0.640758,
-							0.783966, 0.422664, -0.4547,
-							0.780517, 0.43111, -0.4527,
-							0.875348, 0.422003, -0.235964,
-							0.871509, 0.430442, -0.234929,
-							0.906828, 0.421501, 0,
-							0.239043, 0.395595, -0.886771,
-							0.460653, 0.39623, -0.794229,
-							0.649157, 0.396474, -0.649156,
-							0.794229, 0.39623, -0.460653,
-							0.886771, 0.395595, -0.239043,
-							0.918633, 0.395111, 0,
-							0.244029, 0.347757, -0.905271,
-							0.470295, 0.34834, -0.810853,
-							0.662761, 0.348563, -0.662761,
-							0.810853, 0.34834, -0.470295,
-							0.90527, 0.347757, -0.24403,
-							0.250446, 0.272213, -0.929073,
-							0.482704, 0.272693, -0.832247,
-							0.680271, 0.272877, -0.680271,
-							0.832247, 0.272693, -0.482704,
-							0.929073, 0.272213, -0.250446,
-							0.96234, 0.271847, 0,
-							0.256935, 0.159685, -0.953145,
-							0.495256, 0.159982, -0.85389,
-							0.697986, 0.160096, -0.697986,
-							0.853889, 0.159982, -0.495256,
-							0.953145, 0.159685, -0.256935,
-							0.987204, 0.15946, 0,
-							0.260274, 7.9931e-010, -0.965535,
-							0.501718, 5.72887e-009, -0.865031,
-							0.707107, 1.58051e-008, -0.707107,
-							0.865031, 2.6582e-008, -0.501718,
-							0.965535, 2.69333e-008, -0.260275,
-							0.938373, -0.345625, -3.10672e-010,
-							0.905874, -0.346066, 0.244192,
-							0.811396, -0.346647, 0.470609,
-							0.663205, -0.346869, 0.663205,
-							0.47061, -0.346647, 0.811395,
-							0.244192, -0.346066, 0.905874,
-							0, -0.345625, 0.938373,
-							0.811257, -0.584689, -4.41262e-009,
-							0.782908, -0.585247, 0.211045,
-							0.700957, -0.58598, 0.406555,
-							0.572843, -0.586261, 0.572843,
-							0.406555, -0.58598, 0.700957,
-							0.211045, -0.585247, 0.782908,
-							0, -0.584689, 0.811257,
-							0.6981, -0.716, -1.94916e-008,
-							0.673539, -0.716506, 0.181563,
-							0.602839, -0.717169, 0.349647,
-							0.492597, -0.717423, 0.492597,
-							0.349647, -0.717169, 0.602839,
-							0.181563, -0.716506, 0.673539,
-							0, -0.716, 0.6981,
-							0.636383, -0.771373, -5.3452e-008,
-							0.61392, -0.771826, 0.165491,
-							0.549392, -0.772419, 0.318648,
-							0.448897, -0.772647, 0.448897,
-							0.318648, -0.772419, 0.549392,
-							0.165492, -0.771826, 0.61392,
-							0, -0.771373, 0.636383,
-							0.675056, -0.737767, -1.05865e-007,
-							0.651275, -0.738254, 0.175561,
-							0.582878, -0.738893, 0.338069,
-							0.476275, -0.739138, 0.476275,
-							0.338069, -0.738893, 0.582878,
-							0.175561, -0.738254, 0.651275,
-							0, -0.737767, 0.675056,
-							1, 0, 0,
-							0.965535, -2.69332e-008, 0.260274,
-							0.865031, -2.65819e-008, 0.501718,
-							0.707107, -1.5805e-008, 0.707107,
-							0.501718, -5.72887e-009, 0.865031,
-							0.260275, -7.99311e-010, 0.965535,
-							0, 0, 1,
-							-0.244192, -0.346066, 0.905874,
-							-0.470609, -0.346647, 0.811396,
-							-0.663205, -0.346869, 0.663205,
-							-0.811395, -0.346647, 0.47061,
-							-0.905874, -0.346066, 0.244193,
-							-0.938373, -0.345625, -3.10672e-010,
-							-0.211045, -0.585247, 0.782908,
-							-0.406555, -0.58598, 0.700957,
-							-0.572843, -0.586261, 0.572843,
-							-0.700957, -0.58598, 0.406555,
-							-0.782908, -0.585247, 0.211045,
-							-0.811257, -0.584689, -4.41262e-009,
-							-0.181563, -0.716506, 0.673539,
-							-0.349647, -0.717169, 0.602839,
-							-0.492597, -0.717423, 0.492597,
-							-0.602839, -0.717169, 0.349647,
-							-0.673539, -0.716506, 0.181563,
-							-0.6981, -0.716, -1.94916e-008,
-							-0.165491, -0.771826, 0.61392,
-							-0.318648, -0.772419, 0.549393,
-							-0.448897, -0.772647, 0.448897,
-							-0.549392, -0.772419, 0.318648,
-							-0.61392, -0.771826, 0.165492,
-							-0.636383, -0.771373, -5.3452e-008,
-							-0.175561, -0.738254, 0.651275,
-							-0.338069, -0.738893, 0.582878,
-							-0.476275, -0.739138, 0.476275,
-							-0.582878, -0.738893, 0.338069,
-							-0.651275, -0.738254, 0.175561,
-							-0.675056, -0.737767, -1.05865e-007,
-							-0.260274, -7.99309e-010, 0.965535,
-							-0.501718, -5.72886e-009, 0.865031,
-							-0.707107, -1.5805e-008, 0.707107,
-							-0.865031, -2.65819e-008, 0.501718,
-							-0.965535, -2.69333e-008, 0.260275,
-							-1, 0, 0,
-							-0.905874, -0.346066, -0.244192,
-							-0.811396, -0.346647, -0.470609,
-							-0.663205, -0.346869, -0.663205,
-							-0.47061, -0.346647, -0.811395,
-							-0.244192, -0.346066, -0.905874,
-							0, -0.345625, -0.938373,
-							-0.782908, -0.585247, -0.211045,
-							-0.700957, -0.58598, -0.406555,
-							-0.572843, -0.586261, -0.572843,
-							-0.406555, -0.58598, -0.700957,
-							-0.211045, -0.585247, -0.782908,
-							0, -0.584689, -0.811257,
-							-0.673539, -0.716506, -0.181563,
-							-0.602839, -0.717169, -0.349647,
-							-0.492597, -0.717423, -0.492597,
-							-0.349647, -0.717169, -0.602839,
-							-0.181563, -0.716506, -0.673539,
-							0, -0.716, -0.6981,
-							-0.61392, -0.771826, -0.165491,
-							-0.549392, -0.77242, -0.318647,
-							-0.448897, -0.772647, -0.448897,
-							-0.318648, -0.77242, -0.549392,
-							-0.165492, -0.771826, -0.61392,
-							0, -0.771373, -0.636383,
-							-0.651275, -0.738254, -0.175561,
-							-0.582877, -0.738894, -0.338069,
-							-0.476274, -0.739138, -0.476274,
-							-0.338069, -0.738894, -0.582877,
-							-0.175561, -0.738255, -0.651275,
-							0, -0.737767, -0.675055,
-							-0.965535, 2.69333e-008, -0.260274,
-							-0.865031, 2.6582e-008, -0.501718,
-							-0.707107, 1.58051e-008, -0.707107,
-							-0.501718, 5.7289e-009, -0.865031,
-							-0.260275, 7.99315e-010, -0.965535,
-							0, 0 , -1,
-							0.244192, -0.346066, -0.905874,
-							0.470609, -0.346647, -0.811396,
-							0.663205, -0.346869, -0.663205,
-							0.811395, -0.346647, -0.47061,
-							0.905874, -0.346066, -0.244192,
-							0.211045, -0.585247, -0.782908,
-							0.406555, -0.58598, -0.700957,
-							0.572843, -0.586261, -0.572843,
-							0.700957, -0.58598, -0.406555,
-							0.782908, -0.585247, -0.211045,
-							0.181563, -0.716506, -0.673539,
-							0.349647, -0.717169, -0.602839,
-							0.492597, -0.717423, -0.492597,
-							0.602839, -0.717169, -0.349647,
-							0.673539, -0.716506, -0.181563,
-							0.165491, -0.771826, -0.61392,
-							0.318647, -0.77242, -0.549392,
-							0.448897, -0.772647, -0.448897,
-							0.549392, -0.77242, -0.318648,
-							0.61392, -0.771826, -0.165492,
-							0.175561, -0.738255, -0.651275,
-							0.338069, -0.738894, -0.582877,
-							0.476274, -0.739138, -0.476274,
-							0.582877, -0.738894, -0.338069,
-							0.651275, -0.738254, -0.175561,
-							0.260274, 7.99314e-010, -0.965535,
-							0.501718, 5.72889e-009, -0.865031,
-							0.707107, 1.58051e-008, -0.707107,
-							0.865031, 2.6582e-008, -0.501718,
-							0.965535, 2.69333e-008, -0.260275,
-							0.0104645, -0.999945, 0,
-							0 , -1, 0,
-							0.0104255, -0.954681, 0.297447,
-							2.56825e-008, -0.95448, 0.298276,
-							0.00846391, -0.708083, 0.706078,
-							1.14879e-007, -0.707106, 0.707108,
-							-2.9238e-009, -8.98486e-008, 1,
-							8.16344e-015, -8.94074e-008, 1,
-							-0.00997561, 0.707961, 0.706181,
-							5.80084e-008, 0.707107, 0.707107,
-							-0.0140841, 0.95459, 0.297589,
-							1.94189e-007, 0.95448, 0.298275,
-							-0.0149982, 0.999888, 0,
-							0, 1, 0,
-							0.0510697, -0.998695, 0,
-							0.0510028, -0.953615, 0.296676,
-							0.0415993, -0.706917, 0.706072,
-							-2.78701e-009, -9.11701e-008, 1,
-							-0.0493858, 0.704244, 0.708239,
-							-0.0701018, 0.951466, 0.299663,
-							-0.07479, 0.997199, 0,
-							0.14834, -0.988936, 0,
-							0.148104, -0.941964, 0.30128,
-							0.119688, -0.688399, 0.715389,
-							7.13598e-009, -8.17051e-008, 1,
-							-0.141352, 0.675015, 0.724137,
-							-0.204668, 0.927128, 0.313917,
-							-0.219512, 0.97561, 0,
-							0.364399, -0.931243, 0,
-							0.359682, -0.875088, 0.323804,
-							0.275915, -0.604128, 0.747597,
-							1.54202e-008, -6.37972e-008, 1,
-							-0.313659, 0.564289, 0.763672,
-							-0.474611, 0.807244, 0.350859,
-							-0.514496, 0.857493, 0,
-							0.767382, -0.64119, 0,
-							0.727532, -0.577566, 0.37029,
-							0.497151, -0.35353, 0.792374,
-							1.10972e-008, -5.53164e-008, 1,
-							-0.519904, 0.300684, 0.799556,
-							-0.810111, 0.441475, 0.385771,
-							-0.882353, 0.470588, 0,
-							1, 0, 0,
-							0.923077, -3.76483e-008, 0.384616,
-							0.599999, -4.20741e-008, 0.8,
-							0, -4.47037e-008, 1,
-							-0.600001, -5.17421e-008, 0.799999,
-							-0.923077, -4.14964e-008, 0.384614,
-							-1, 0, 0,
-							-0.014084, 0.95459, -0.297589,
-							5.67983e-008, 0.95448, -0.298275,
-							-0.00997558, 0.707961, -0.706182,
-							-4.84905e-008, 0.707107, -0.707107,
-							5.84773e-010, 8.94956e-008 , -1,
-							-8.16344e-015, 8.94074e-008 , -1,
-							0.0084637, -0.708085, -0.706076,
-							3.66172e-008, -0.707108, -0.707106,
-							0.0104256, -0.954682, -0.297445,
-							7.36826e-009, -0.95448, -0.298274,
-							0.0104646, -0.999945, 0,
-							-0.07479, 0.997199, 0,
-							-0.0701018, 0.951466, -0.299663,
-							-0.0493858, 0.704243, -0.708239,
-							-8.36107e-009, 8.41192e-008 , -1,
-							0.0415994, -0.706919, -0.70607,
-							0.0510028, -0.953616, -0.296674,
-							0.0510696, -0.998695, 0,
-							-0.204668, 0.927128, -0.313917,
-							-0.141352, 0.675015, -0.724137,
-							-7.13598e-009, 8.17051e-008 , -1,
-							0.119688, -0.688401, -0.715387,
-							0.148104, -0.941964, -0.301278,
-							-0.514495, 0.857493, 0,
-							-0.47461, 0.807244, -0.350859,
-							-0.313658, 0.564289, -0.763673,
-							-9.25216e-009, 7.40412e-008 , -1,
-							0.275916, -0.60413, -0.747595,
-							0.359681, -0.875089, -0.323802,
-							0.364399, -0.931243, 0,
-							-0.882353, 0.470589, 0,
-							-0.810111, 0.441477, -0.385771,
-							-0.519903, 0.300684, -0.799556,
-							-1.01322e-008, 5.82809e-008 , -1,
-							0.497153, -0.353532, -0.792373,
-							0.727532, -0.577567, -0.370288,
-							0.767381, -0.641191, 0,
-							-0.923077, 4.14963e-008, -0.384615,
-							-0.6, 5.17421e-008, -0.8,
-							0, 4.47037e-008 , -1,
-							0.600002, 4.2074e-008, -0.799999,
-							0.923078, 3.76482e-008, -0.384614,
-							0.972045, 0.234794, 0,
-							0.895972, 0.219226, 0.38623,
-							0.57987, 0.145888, 0.801541,
-							-1.56774e-008, -4.06593e-008, 1,
-							-0.577708, -0.153129, 0.801751,
-							-0.890548, -0.23959, 0.386678,
-							-0.965311, -0.261102, 0,
-							0.913811, 0.406139, 0,
-							0.842942, 0.38439, 0.376421,
-							0.548194, 0.264706, 0.793356,
-							-1.8594e-008, -5.87553e-008, 1,
-							-0.534196, -0.289235, 0.794341,
-							-0.807437, -0.452559, 0.378465,
-							-0.869653, -0.493664, 0,
-							0.83205, 0.5547, 0,
-							0.772293, 0.530527, 0.349435,
-							0.515845, 0.379263, 0.768156,
-							-2.48164e-008, -6.43889e-008, 1,
-							-0.486434, -0.411777, 0.770598,
-							-0.700515, -0.619694, 0.353919,
-							-0.743581, -0.668646, 0,
-							0.722373, 0.691503, 0,
-							0.676612, 0.666255, 0.31353,
-							0.471519, 0.495195, 0.729693,
-							-2.71577e-008, -7.53755e-008, 1,
-							-0.433172, -0.52092, 0.73553,
-							-0.589822, -0.740319, 0.322549,
-							-0.617031, -0.786939, 0,
-							0.580972, 0.813923, 0,
-							0.548733, 0.784249, 0.289562,
-							0.396971, 0.593617, 0.700024,
-							-2.572e-008, -8.77449e-008, 1,
-							-0.367048, -0.602921, 0.708352,
-							-0.485318, -0.820874, 0.301051,
-							-0.504835, -0.863216, 0,
-							0.390503, 0.867784, 0.307341,
-							0.285351, 0.634113, 0.718663,
-							-2.36665e-008, -9.72958e-008, 1,
-							-0.285351, -0.634114, 0.718661,
-							-0.390503, -0.867784, 0.30734,
-							-0.410365, -0.911921, 0,
-							-0.890548, -0.23959, -0.386679,
-							-0.577707, -0.153129, -0.801752,
-							1.08654e-008, 5.5622e-008 , -1,
-							0.579872, 0.145888, -0.801539,
-							0.895973, 0.219227, -0.386228,
-							-0.807437, -0.452558, -0.378466,
-							-0.534196, -0.289235, -0.794341,
-							2.27516e-008, 5.19016e-008 , -1,
-							0.548196, 0.264707, -0.793355,
-							0.842943, 0.384391, -0.376419,
-							-0.700515, -0.619694, -0.353919,
-							-0.486433, -0.411777, -0.770599,
-							2.48164e-008, 6.43889e-008 , -1,
-							0.515847, 0.379264, -0.768154,
-							0.772293, 0.530528, -0.349433,
-							-0.589822, -0.740319, -0.322549,
-							-0.433171, -0.520919, -0.735531,
-							2.71577e-008, 7.53755e-008 , -1,
-							0.47152, 0.495196, -0.729691,
-							0.676612, 0.666255, -0.313529,
-							-0.485318, -0.820874, -0.301052,
-							-0.367047, -0.60292, -0.708353,
-							2.88747e-008, 8.75411e-008 , -1,
-							0.396972, 0.593619, -0.700022,
-							0.548733, 0.784249, -0.289561,
-							-0.390503, -0.867784, -0.30734,
-							-0.285351, -0.634113, -0.718662,
-							2.36665e-008, 9.72958e-008 , -1,
-							0.285351, 0.634114, -0.718661,
-							0.390503, 0.867785, -0.307339,
-							-0.333935, 0.942596, 0,
-							0, 1, 0,
-							-0.291732, 0.855995, 0.426808,
-							-0.0157731, 0.886804, 0.461877,
-							-0.135103, 0.53438, 0.834377,
-							-0.0291362, 0.514277, 0.857129,
-							0.110195, 0.0292375, 0.99348,
-							4.3732e-009, -8.94073e-008, 1,
-							0.348602, -0.464039, 0.814337,
-							0.0673463, -0.513328, 0.855546,
-							0.492146, -0.767551, 0.410679,
-							0.134339, -0.878875, 0.457746,
-							0.528678, -0.848822, 0,
-							0.158678, -0.98733, 0,
-							-0.731055, 0.682318, 0,
-							-0.64585, 0.656206, 0.390219,
-							-0.31251, 0.484842, 0.816864,
-							0.215359, 0.108813, 0.970454,
-							0.627608, -0.260237, 0.733747,
-							0.813963, -0.465103, 0.348055,
-							0.854063, -0.52017, 0,
-							-0.920582, 0.39055, 0,
-							-0.835236, 0.412221, 0.363943,
-							-0.451322, 0.38916, 0.803034,
-							0.214084, 0.180281, 0.960035,
-							0.705425, -0.0805069, 0.704198,
-							0.913262, -0.239978, 0.329185,
-							0.957826, -0.287348, 0,
-							-0.948683, 0.316228, 0,
-							-0.842821, 0.34961, 0.409177,
-							-0.452672, 0.347535, 0.821162,
-							0.113546, 0.191909, 0.974822,
-							0.60461, -0.0547987, 0.794634,
-							0.880145, -0.253261, 0.401503,
-							0.947589, -0.319493, 0,
-							-0.874591, 0.484861, 0,
-							-0.723794, 0.476715, 0.498864,
-							-0.365377, 0.375544, 0.851743,
-							0.0260102, 0.151516, 0.988113,
-							0.417243, -0.185123, 0.88974,
-							0.70819, -0.506054, 0.492318,
-							0.787582, -0.61621, 0,
-							-0.600001, 0.799999, 0,
-							-0.497164, 0.711095, 0.497165,
-							-0.267367, 0.443286, 0.855577,
-							0, -4.47006e-008, 1,
-							0.250514, -0.54278, 0.801644,
-							0.366221, -0.855433, 0.36622,
-							0.384615, -0.923077, 0,
-							0.528678, -0.848822, 0,
-							0.492146, -0.767551, -0.41068,
-							0.134339, -0.878875, -0.457747,
-							0.348602, -0.464038, -0.814337,
-							0.0673462, -0.513327, -0.855546,
-							0.110195, 0.0292377, -0.99348,
-							-4.3732e-009, 8.94073e-008 , -1,
-							-0.135104, 0.534382, -0.834376,
-							-0.0291362, 0.514278, -0.857128,
-							-0.291732, 0.855996, -0.426806,
-							-0.0157731, 0.886804, -0.461876,
-							-0.333935, 0.942596, 0,
-							0.854063, -0.52017, 0,
-							0.813963, -0.465103, -0.348056,
-							0.627607, -0.260237, -0.733748,
-							0.215359, 0.108813, -0.970454,
-							-0.312512, 0.484843, -0.816862,
-							-0.645851, 0.656206, -0.390218,
-							0.913262, -0.239977, -0.329185,
-							0.705424, -0.0805064, -0.704199,
-							0.214084, 0.180281, -0.960035,
-							-0.451324, 0.38916, -0.803032,
-							-0.835237, 0.412221, -0.363941,
-							0.947589, -0.319493, 0,
-							0.880144, -0.253261, -0.401503,
-							0.60461, -0.0547981, -0.794635,
-							0.113546, 0.191909, -0.974822,
-							-0.452675, 0.347535, -0.821161,
-							-0.842822, 0.34961, -0.409175,
-							-0.948683, 0.316228, 0,
-							0.787582, -0.61621, 0,
-							0.70819, -0.506053, -0.492318,
-							0.417243, -0.185122, -0.88974,
-							0.0260103, 0.151516, -0.988113,
-							-0.365379, 0.375545, -0.851742,
-							-0.723796, 0.476715, -0.498861,
-							-0.874591, 0.484861, 0,
-							0.36622, -0.855433, -0.36622,
-							0.250514, -0.54278, -0.801644,
-							0, 4.47006e-008 , -1,
-							-0.267368, 0.443289, -0.855575,
-							-0.497165, 0.711096, -0.497162,
-							-0.467888, 0.883788, 0,
-							-0.387053, 0.824948, 0.411887,
-							-0.215548, 0.655025, 0.72421,
-							-0.00489616, 0.343259, 0.939228,
-							0.269127, -0.23781, 0.933283,
-							0.442187, -0.761825, 0.473385,
-							0.463425, -0.886136, 0,
-							-0.306008, 0.952029, 0,
-							-0.253998, 0.928137, 0.272115,
-							-0.14959, 0.863647, 0.481391,
-							-0.0195232, 0.746219, 0.665414,
-							0.218115, 0.441118, 0.870541,
-							0.612385, -0.337374, 0.714957,
-							0.694135, -0.719844, 0,
-							0, 1, 0,
-							-0.0182315, 0.999613, -0.0210205,
-							-0.0369304, 0.999286, 0.00796664,
-							-0.0348909, 0.997622, 0.059444,
-							-0.00787177, 0.994104, 0.108145,
-							0.0539575, 0.992309, 0.111405,
-							0.106533, 0.994309, 0,
-							0.913813, 0.406135, 0,
-							0.507716, 0.52532, -0.682835,
-							0.148478, 0.676273, -0.721533,
-							-0.0300304, 0.787464, -0.615629,
-							-0.144372, 0.876436, -0.459366,
-							-0.223743, 0.943891, -0.242919,
-							-0.253109, 0.967438, 0,
-							0.789351, -0.613942, 0,
-							0.577415, -0.400033, -0.711734,
-							0.241288, -0.0136421, -0.970358,
-							-0.0103803, 0.344669, -0.938667,
-							-0.199105, 0.663018, -0.72164,
-							-0.316295, 0.875642, -0.364979,
-							-0.349987, 0.936755, 0,
-							0.6, -0.8, 0,
-							0.483629, -0.690899, -0.537366,
-							0.247465, -0.40568, -0.879878,
-							0, 4.47028e-008 , -1,
-							-0.236617, 0.486025, -0.841304,
-							-0.378646, 0.824393, -0.420717,
-							-0.410365, 0.911921, 0,
-							0.442188, -0.761824, -0.473386,
-							0.269127, -0.237807, -0.933284,
-							-0.0048962, 0.343262, -0.939227,
-							-0.215548, 0.655028, -0.724208,
-							-0.387053, 0.82495, -0.411884,
-							0.612385, -0.337369, -0.714959,
-							0.218114, 0.441124, -0.870538,
-							-0.0195232, 0.746221, -0.665412,
-							-0.14959, 0.863648, -0.481389,
-							-0.253997, 0.928138, -0.272112,
-							0.0539562, 0.992309, -0.111404,
-							-0.00787199, 0.994104, -0.108144,
-							-0.0348909, 0.997622, -0.0594425,
-							-0.0369306, 0.999286, -0.00796709,
-							-0.0182318, 0.999613, 0.0210199,
-							-0.223743, 0.943891, 0.242919,
-							-0.144372, 0.876437, 0.459364,
-							-0.0300305, 0.787466, 0.615626,
-							0.148478, 0.676276, 0.721529,
-							0.507717, 0.525323, 0.682832,
-							-0.316294, 0.875642, 0.364979,
-							-0.199104, 0.663019, 0.72164,
-							-0.0103804, 0.344672, 0.938666,
-							0.241289, -0.0136406, 0.970357,
-							0.577417, -0.400034, 0.711732,
-							-0.378646, 0.824393, 0.420718,
-							-0.236617, 0.486023, 0.841305,
-							0, -4.47028e-008, 1,
-							0.247466, -0.405682, 0.879877,
-							0.48363, -0.690899, 0.537365,
-							0.249998, 0.968246, 0,
-							0.001257, 0.999999, 0,
-							0.241077, 0.968356, 0.0645611,
-							0.00120899, 0.999999, 0.000335259,
-							0.215548, 0.968509, 0.124615,
-							0.00108352, 0.999999, 0.000626407,
-							0.175886, 0.96857, 0.175886,
-							0.124616, 0.968509, 0.215548,
-							0.0645611, 0.968356, 0.241077,
-							0, 0.968246, 0.249998,
-							0.989204, 0.146548, 0,
-							0.955495, 0.146755, 0.255913,
-							0.856312, 0.147029, 0.495088,
-							0.699411, 0.147135, 0.699411,
-							0.495089, 0.147029, 0.856312,
-							0.255914, 0.146754, 0.955495,
-							0, 0.146548, 0.989204,
-							0.780869, -0.624695, 0,
-							0.753687, -0.625441, 0.201937,
-							0.674735, -0.626493, 0.390178,
-							0.550895, -0.62692, 0.550896,
-							0.390179, -0.626493, 0.674734,
-							0.201938, -0.625441, 0.753688,
-							0, -0.624695, 0.780869,
-							0.747409, -0.664364, 0,
-							0.721243, -0.665116, 0.193465,
-							0.645526, -0.66618, 0.373497,
-							0.527081, -0.666611, 0.527081,
-							0.373498, -0.66618, 0.645526,
-							0.193466, -0.665116, 0.721243,
-							0, -0.664364, 0.747409,
-							0.950775, -0.309882, 0,
-							0.917897, -0.310647, 0.246906,
-							0.822132, -0.311772, 0.476337,
-							0.671753, -0.312241, 0.671754,
-							0.476338, -0.311771, 0.822132,
-							0.246907, -0.310647, 0.917897,
-							0, -0.309882, 0.950775,
-							0.6, 0.8, 0,
-							0.578783, 0.800417, 0.15602,
-							0.517905, 0.800964, 0.300385,
-							0.423156, 0.801173, 0.423156,
-							0.300386, 0.800964, 0.517904,
-							0.156021, 0.800416, 0.578784,
-							0, 0.799999, 0.600001,
-							0, 0.968246, 0.249998,
-							-0.064561, 0.968356, 0.241077,
-							-0.124615, 0.968509, 0.215548,
-							-0.175885, 0.968571, 0.175885,
-							-0.215548, 0.968509, 0.124616,
-							-0.241076, 0.968356, 0.064561,
-							-0.249998, 0.968246, 0,
-							0, 0.146549, 0.989203,
-							-0.255913, 0.146755, 0.955495,
-							-0.495088, 0.14703, 0.856312,
-							-0.699411, 0.147136, 0.699411,
-							-0.856311, 0.14703, 0.495089,
-							-0.955495, 0.146755, 0.255914,
-							-0.989203, 0.146549, 0,
-							-0.201937, -0.625441, 0.753688,
-							-0.390178, -0.626493, 0.674735,
-							-0.550895, -0.62692, 0.550896,
-							-0.674734, -0.626493, 0.390179,
-							-0.753687, -0.625441, 0.201939,
-							-0.780869, -0.624695, 0,
-							0, -0.664364, 0.747409,
-							-0.193465, -0.665116, 0.721244,
-							-0.373497, -0.66618, 0.645527,
-							-0.527081, -0.666611, 0.527081,
-							-0.645526, -0.66618, 0.373498,
-							-0.721243, -0.665116, 0.193466,
-							-0.747409, -0.664364, 0,
-							0, -0.309883, 0.950775,
-							-0.246906, -0.310648, 0.917897,
-							-0.476336, -0.311773, 0.822132,
-							-0.671753, -0.312242, 0.671753,
-							-0.822131, -0.311773, 0.476338,
-							-0.917897, -0.310648, 0.246907,
-							-0.950775, -0.309883, 0,
-							-0.15602, 0.800417, 0.578784,
-							-0.300385, 0.800964, 0.517905,
-							-0.423156, 0.801173, 0.423156,
-							-0.517904, 0.800964, 0.300386,
-							-0.578783, 0.800417, 0.15602,
-							-0.6, 0.8, 0,
-							-0.249998, 0.968246, 0,
-							-0.241077, 0.968356, -0.064561,
-							-0.215548, 0.968509, -0.124615,
-							-0.175885, 0.968571, -0.175885,
-							-0.124616, 0.968509, -0.215548,
-							-0.064561, 0.968356, -0.241077,
-							0, 0.968246, -0.249998,
-							-0.989204, 0.146547, 0,
-							-0.955496, 0.146753, -0.255912,
-							-0.856312, 0.147028, -0.495088,
-							-0.699411, 0.147134, -0.699411,
-							-0.495089, 0.147028, -0.856312,
-							-0.255914, 0.146753, -0.955495,
-							0, 0.146547, -0.989204,
-							-0.753688, -0.625441, -0.201937,
-							-0.674735, -0.626494, -0.390178,
-							-0.550896, -0.62692, -0.550895,
-							-0.390179, -0.626494, -0.674734,
-							-0.201938, -0.625441, -0.753687,
-							0, -0.624695, -0.780869,
-							-0.747409, -0.664364, 0,
-							-0.721244, -0.665116, -0.193465,
-							-0.645526, -0.66618, -0.373497,
-							-0.527081, -0.666612, -0.527081,
-							-0.373498, -0.66618, -0.645526,
-							-0.193466, -0.665116, -0.721243,
-							0, -0.664364, -0.747409,
-							-0.950776, -0.30988, 0,
-							-0.917898, -0.310645, -0.246906,
-							-0.822133, -0.31177, -0.476337,
-							-0.671754, -0.312239, -0.671754,
-							-0.476338, -0.31177, -0.822132,
-							-0.246907, -0.310646, -0.917898,
-							0, -0.309881, -0.950775,
-							-0.578783, 0.800417, -0.15602,
-							-0.517905, 0.800964, -0.300384,
-							-0.423155, 0.801174, -0.423155,
-							-0.300386, 0.800964, -0.517904,
-							-0.15602, 0.800417, -0.578783,
-							0, 0.8, -0.6,
-							0.064561, 0.968356, -0.241077,
-							0.124615, 0.968509, -0.215548,
-							0.175885, 0.968571, -0.175885,
-							0.215549, 0.968509, -0.124616,
-							0.241077, 0.968356, -0.064561,
-							0.249998, 0.968246, 0,
-							0.255913, 0.146754, -0.955496,
-							0.495088, 0.147028, -0.856312,
-							0.699411, 0.147134, -0.699411,
-							0.856312, 0.147028, -0.495089,
-							0.955495, 0.146753, -0.255914,
-							0.989204, 0.146547, 0,
-							0.201937, -0.625441, -0.753687,
-							0.390178, -0.626494, -0.674735,
-							0.550896, -0.62692, -0.550895,
-							0.674734, -0.626494, -0.390179,
-							0.753687, -0.625441, -0.201938,
-							0.193465, -0.665116, -0.721243,
-							0.373497, -0.66618, -0.645526,
-							0.527081, -0.666612, -0.527081,
-							0.645526, -0.66618, -0.373498,
-							0.721244, -0.665116, -0.193466,
-							0.747409, -0.664364, 0,
-							0.246906, -0.310646, -0.917898,
-							0.476337, -0.31177, -0.822133,
-							0.671754, -0.312239, -0.671754,
-							0.822133, -0.31177, -0.476338,
-							0.917898, -0.310646, -0.246907,
-							0.950776, -0.30988, 0,
-							0.15602, 0.800417, -0.578783,
-							0.300384, 0.800964, -0.517905,
-							0.423155, 0.801174, -0.423155,
-							0.517904, 0.800964, -0.300386,
-							0.578783, 0.800417, -0.15602,
-							0.268354, 0.96332, 0,
-							0.258757, 0.963421, 0.0697519,
-							0.231413, 0.963552, 0.134219,
-							0.189037, 0.963603, 0.189037,
-							0.13422, 0.963552, 0.231413,
-							0.0697519, 0.963421, 0.258756,
-							0, 0.96332, 0.268354,
-							0.168031, 0.985782, 0,
-							0.162012, 0.985822, 0.0436728,
-							0.144879, 0.985875, 0.0840299,
-							0.118345, 0.985895, 0.118345,
-							0.0840302, 0.985875, 0.144879,
-							0.0436728, 0.985822, 0.162011,
-							0, 0.985782, 0.168031,
-							0.14834, 0.988936, 0,
-							0.143025, 0.988968, 0.0385546,
-							0.127899, 0.989009, 0.0741814,
-							0.104474, 0.989025, 0.104474,
-							0.0741816, 0.989009, 0.127899,
-							0.0385547, 0.988968, 0.143025,
-							0, 0.988936, 0.148341,
-							0.193633, 0.981074, 0,
-							0.186698, 0.981127, 0.0503274,
-							0.166959, 0.981197, 0.0968359,
-							0.136382, 0.981224, 0.136382,
-							0.0968361, 0.981197, 0.166958,
-							0.0503276, 0.981127, 0.186699,
-							0, 0.981074, 0.193633,
-							0.390291, 0.920691, 0,
-							0.376377, 0.920895, 0.101458,
-							0.336655, 0.921161, 0.19526,
-							0.275023, 0.921262, 0.275023,
-							0.19526, 0.921161, 0.336655,
-							0.101459, 0.920894, 0.376377,
-							0, 0.920691, 0.390291,
-							1, 0, 0,
-							0.965535, -2.6932e-008, 0.260274,
-							0.865031, -2.65808e-008, 0.501718,
-							0.707107, -1.58043e-008, 0.707107,
-							0.501719, -5.72865e-009, 0.865031,
-							0.260276, -7.99283e-010, 0.965534,
-							0, 0, 1,
-							-0.0697519, 0.963421, 0.258757,
-							-0.134219, 0.963552, 0.231413,
-							-0.189037, 0.963603, 0.189037,
-							-0.231413, 0.963552, 0.13422,
-							-0.258756, 0.963421, 0.0697519,
-							-0.268354, 0.96332, 0,
-							-0.0436727, 0.985822, 0.162012,
-							-0.0840298, 0.985875, 0.144879,
-							-0.118345, 0.985895, 0.118345,
-							-0.144879, 0.985875, 0.0840302,
-							-0.162011, 0.985822, 0.0436728,
-							-0.168031, 0.985782, 0,
-							-0.0385546, 0.988968, 0.143025,
-							-0.0741813, 0.989009, 0.127899,
-							-0.104474, 0.989025, 0.104474,
-							-0.127899, 0.989009, 0.0741816,
-							-0.143025, 0.988968, 0.0385547,
-							-0.14834, 0.988936, 0,
-							-0.0503274, 0.981127, 0.186698,
-							-0.0968359, 0.981197, 0.166959,
-							-0.136382, 0.981224, 0.136382,
-							-0.166958, 0.981197, 0.0968361,
-							-0.186699, 0.981127, 0.0503276,
-							-0.193633, 0.981074, 0,
-							-0.101458, 0.920895, 0.376377,
-							-0.19526, 0.921161, 0.336655,
-							-0.275023, 0.921262, 0.275023,
-							-0.336655, 0.921161, 0.19526,
-							-0.376377, 0.920894, 0.101459,
-							-0.390291, 0.920691, 0,
-							-0.260274, -7.99271e-010, 0.965535,
-							-0.501718, -5.72859e-009, 0.865031,
-							-0.707107, -1.58043e-008, 0.707107,
-							-0.865031, -2.65808e-008, 0.501719,
-							-0.965534, -2.69321e-008, 0.260276,
-							-1, 0, 0,
-							-0.258757, 0.963421, -0.0697518,
-							-0.231413, 0.963552, -0.134219,
-							-0.189037, 0.963603, -0.189037,
-							-0.13422, 0.963552, -0.231413,
-							-0.0697518, 0.963421, -0.258756,
-							0, 0.96332, -0.268354,
-							-0.162012, 0.985822, -0.0436727,
-							-0.144879, 0.985875, -0.0840298,
-							-0.118345, 0.985895, -0.118345,
-							-0.0840302, 0.985875, -0.144879,
-							-0.0436727, 0.985822, -0.162011,
-							0, 0.985782, -0.168031,
-							-0.143025, 0.988968, -0.0385546,
-							-0.127899, 0.989009, -0.0741813,
-							-0.104474, 0.989025, -0.104474,
-							-0.0741816, 0.989009, -0.127899,
-							-0.0385547, 0.988968, -0.143025,
-							0, 0.988936, -0.14834,
-							-0.186698, 0.981127, -0.0503273,
-							-0.166959, 0.981197, -0.0968358,
-							-0.136382, 0.981224, -0.136382,
-							-0.0968361, 0.981197, -0.166958,
-							-0.0503276, 0.981127, -0.186699,
-							0, 0.981074, -0.193633,
-							-0.376377, 0.920895, -0.101458,
-							-0.336655, 0.921161, -0.19526,
-							-0.275023, 0.921262, -0.275023,
-							-0.19526, 0.921161, -0.336655,
-							-0.101459, 0.920894, -0.376377,
-							0, 0.920691, -0.390291,
-							-0.965535, 2.6932e-008, -0.260274,
-							-0.865031, 2.65807e-008, -0.501718,
-							-0.707107, 1.58043e-008, -0.707107,
-							-0.501719, 5.72864e-009, -0.865031,
-							-0.260276, 7.99283e-010, -0.965534,
-							0, 0 , -1,
-							0.0697518, 0.963421, -0.258757,
-							0.134219, 0.963552, -0.231413,
-							0.189037, 0.963603, -0.189037,
-							0.231413, 0.963552, -0.13422,
-							0.258756, 0.963421, -0.0697518,
-							0.0436727, 0.985822, -0.162012,
-							0.0840298, 0.985875, -0.144879,
-							0.118345, 0.985895, -0.118345,
-							0.144879, 0.985875, -0.0840302,
-							0.162011, 0.985822, -0.0436727,
-							0.0385546, 0.988968, -0.143025,
-							0.0741813, 0.989009, -0.127899,
-							0.104474, 0.989025, -0.104474,
-							0.127899, 0.989009, -0.0741816,
-							0.143025, 0.988968, -0.0385547,
-							0.0503274, 0.981127, -0.186698,
-							0.0968359, 0.981197, -0.166959,
-							0.136382, 0.981224, -0.136382,
-							0.166958, 0.981197, -0.0968361,
-							0.186699, 0.981127, -0.0503276,
-							0.101458, 0.920895, -0.376377,
-							0.19526, 0.921161, -0.336655,
-							0.275023, 0.921262, -0.275023,
-							0.336655, 0.921161, -0.19526,
-							0.376377, 0.920894, -0.101459,
-							0.260274, 7.99271e-010, -0.965535,
-							0.501718, 5.72859e-009, -0.865031,
-							0.707107, 1.58043e-008, -0.707107,
-							0.865031, 2.65807e-008, -0.501719,
-							0.965534, 2.6932e-008, -0.260276,
-							0.0226746, -0.999743, -1.91575e-007,
-							0.00017586 , -1, -1.78936e-007,
-							0.0218614, -0.999744, -0.00589325,
-							0.0195486, -0.999745, -0.0113383,
-							0.0159681, -0.999745, -0.0159682,
-							0.0113382, -0.999745, -0.0195487,
-							0.0058931, -0.999744, -0.0218616,
-							0, -0.999743, -0.0226747,
-							0.0623783, -0.998053, -2.05165e-007,
-							0.0601415, -0.998058, -0.0162122,
-							0.0537792, -0.998066, -0.0311921,
-							0.0439291, -0.998068, -0.0439292,
-							0.031192, -0.998066, -0.0537793,
-							0.0162121, -0.998058, -0.0601416,
-							0, -0.998053, -0.0623784,
-							0.141421, -0.98995, -2.16354e-007,
-							0.136353, -0.989978, -0.0367563,
-							0.121933, -0.990016, -0.0707209,
-							0.0996006, -0.99003, -0.0996008,
-							0.070721, -0.990016, -0.121933,
-							0.0367563, -0.989978, -0.136353,
-							0, -0.98995, -0.141421,
-							0.328521, -0.944497, -2.21665e-007,
-							0.316788, -0.944644, -0.0853952,
-							0.283332, -0.944838, -0.164332,
-							0.231454, -0.944912, -0.231454,
-							0.164333, -0.944838, -0.283331,
-							0.0853954, -0.944644, -0.316788,
-							0, -0.944497, -0.328521,
-							0.770022, -0.638017, -1.57624e-007,
-							0.743044, -0.638566, -0.200299,
-							0.665183, -0.639286, -0.385806,
-							0.543581, -0.639561, -0.543581,
-							0.385806, -0.639286, -0.665182,
-							0.2003, -0.638566, -0.743044,
-							0, -0.638017, -0.770022,
-							0.965535, 2.69333e-008, -0.260274,
-							0.865031, 2.6582e-008, -0.501718,
-							0.501719, 5.7289e-009, -0.865031,
-							0.260276, 7.9932e-010, -0.965534,
-							0, -0.999743, -0.0226747,
-							-0.00589307, -0.999744, -0.0218616,
-							-0.0113382, -0.999745, -0.0195487,
-							-0.015968, -0.999745, -0.0159682,
-							-0.0195486, -0.999745, -0.0113384,
-							-0.0218614, -0.999744, -0.00589328,
-							-0.0226746, -0.999743, -1.91575e-007,
-							0, -0.998053, -0.0623784,
-							-0.016212, -0.998058, -0.0601416,
-							-0.0311919, -0.998066, -0.0537794,
-							-0.0439291, -0.998068, -0.0439292,
-							-0.0537792, -0.998066, -0.0311922,
-							-0.0601415, -0.998058, -0.0162123,
-							-0.0623783, -0.998053, -2.05165e-007,
-							-0.0367561, -0.989978, -0.136353,
-							-0.0707208, -0.990016, -0.121933,
-							-0.0996006, -0.99003, -0.0996008,
-							-0.121932, -0.990016, -0.0707211,
-							-0.136353, -0.989978, -0.0367565,
-							-0.141421, -0.98995, -2.16354e-007,
-							0, -0.944497, -0.32852,
-							-0.0853949, -0.944644, -0.316788,
-							-0.164332, -0.944838, -0.283331,
-							-0.231454, -0.944912, -0.231454,
-							-0.283331, -0.944838, -0.164333,
-							-0.316788, -0.944644, -0.0853956,
-							-0.32852, -0.944497, -2.21665e-007,
-							0, -0.638018, -0.770021,
-							-0.200298, -0.638567, -0.743043,
-							-0.385805, -0.639287, -0.665182,
-							-0.543581, -0.639562, -0.543581,
-							-0.665181, -0.639287, -0.385806,
-							-0.743043, -0.638567, -0.2003,
-							-0.770021, -0.638018, -1.57625e-007,
-							-0.260274, 7.99307e-010, -0.965535,
-							-0.501718, 5.72886e-009, -0.865031,
-							-0.865031, 2.65819e-008, -0.501719,
-							-0.965534, 2.69333e-008, -0.260276,
-							-0.0226746, -0.999743, -1.91442e-007,
-							-0.0218614, -0.999744, 0.00589289,
-							-0.0195486, -0.999745, 0.011338,
-							-0.0159681, -0.999745, 0.0159679,
-							-0.0113382, -0.999745, 0.0195484,
-							-0.0058931, -0.999744, 0.0218612,
-							0, -0.999743, 0.0226744,
-							-0.0623783, -0.998053, -2.04538e-007,
-							-0.0601415, -0.998058, 0.0162119,
-							-0.0537793, -0.998066, 0.0311918,
-							-0.0439291, -0.998068, 0.0439289,
-							-0.031192, -0.998066, 0.0537791,
-							-0.0162121, -0.998058, 0.0601414,
-							0, -0.998053, 0.0623782,
-							-0.136353, -0.989978, 0.0367559,
-							-0.121932, -0.990016, 0.0707206,
-							-0.0996006, -0.99003, 0.0996005,
-							-0.0707209, -0.990016, 0.121932,
-							-0.0367563, -0.989978, 0.136353,
-							0, -0.98995, 0.141421,
-							-0.328521, -0.944497, -2.1827e-007,
-							-0.316789, -0.944644, 0.0853949,
-							-0.283332, -0.944838, 0.164332,
-							-0.231455, -0.944911, 0.231454,
-							-0.164333, -0.944837, 0.283332,
-							-0.0853956, -0.944644, 0.316789,
-							0, -0.944497, 0.328521,
-							-0.770023, -0.638016, -1.53325e-007,
-							-0.743045, -0.638564, 0.200299,
-							-0.665184, -0.639284, 0.385806,
-							-0.543582, -0.63956, 0.543582,
-							-0.385807, -0.639284, 0.665183,
-							-0.2003, -0.638564, 0.743045,
-							0, -0.638016, 0.770023,
-							-0.965535, -2.69333e-008, 0.260274,
-							-0.865031, -2.6582e-008, 0.501718,
-							-0.707107, -1.58051e-008, 0.707107,
-							-0.501719, -5.7289e-009, 0.865031,
-							-0.260276, -7.9932e-010, 0.965534,
-							0.00589307, -0.999744, 0.0218612,
-							0.0113382, -0.999745, 0.0195484,
-							0.0159681, -0.999745, 0.0159679,
-							0.0195486, -0.999745, 0.011338,
-							0.0218614, -0.999744, 0.00589292,
-							0.0226746, -0.999743, -1.91442e-007,
-							0.016212, -0.998058, 0.0601414,
-							0.0311919, -0.998066, 0.0537791,
-							0.0439291, -0.998068, 0.0439289,
-							0.0537792, -0.998066, 0.0311918,
-							0.0601415, -0.998058, 0.016212,
-							0.0623783, -0.998053, -2.04538e-007,
-							0.0367561, -0.989978, 0.136353,
-							0.0707208, -0.990016, 0.121932,
-							0.0996006, -0.99003, 0.0996005,
-							0.121932, -0.990016, 0.0707208,
-							0.136353, -0.989978, 0.0367561,
-							0.0853951, -0.944644, 0.316789,
-							0.164332, -0.944838, 0.283332,
-							0.231455, -0.944911, 0.231454,
-							0.283332, -0.944837, 0.164333,
-							0.316789, -0.944644, 0.0853954,
-							0.328521, -0.944497, -2.1827e-007,
-							0.200299, -0.638564, 0.743045,
-							0.385806, -0.639284, 0.665184,
-							0.543582, -0.63956, 0.543582,
-							0.665183, -0.639284, 0.385807,
-							0.743045, -0.638565, 0.2003,
-							0.770023, -0.638016, -1.53325e-007,
-							0.260274, -7.99307e-010, 0.965535,
-							0.501718, -5.72886e-009, 0.865031,
-							0.707107, -1.58051e-008, 0.707107,
-							0.865031, -2.65819e-008, 0.501719,
-							0.965534, -2.69333e-008, 0.260276,
-							0.000169553 , -1, 4.55269e-005,
-							0.000151615 , -1, 8.7758e-005,
-							0.000123845 , -1, 0.000123666,
-							8.79365e-005 , -1, 0.000151436,
-							4.57054e-005 , -1, 0.000169374,
-							0 , -1, 0.000175681,
-							-4.57057e-005 , -1, 0.000169374,
-							-8.79367e-005 , -1, 0.000151436,
-							-0.000123845 , -1, 0.000123666,
-							-0.000151615 , -1, 8.77577e-005,
-							-0.000169553 , -1, 4.55266e-005,
-							-0.00017586 , -1, -1.78936e-007,
-							-0.141421, -0.98995, -2.18023e-007,
-							0 , -1, -0.000176026,
-							-4.57022e-005 , -1, -0.000169719,
-							-8.79303e-005 , -1, -0.000151783,
-							-0.000123836 , -1, -0.000124015,
-							-0.000151604 , -1, -8.81092e-005,
-							-0.00016954 , -1, -4.58813e-005,
-							-0.000175847 , -1, -1.78936e-007,
-							0.141421, -0.98995, -2.18023e-007,
-							0.000175847 , -1, -1.78936e-007,
-							0.000169541 , -1, -4.58811e-005,
-							0.000151604 , -1, -8.81091e-005,
-							0.000123836 , -1, -0.000124015,
-							8.79306e-005 , -1, -0.000151783,
-							4.57025e-005 , -1, -0.000169719,
-							0.423155, 0.801174, 0.423155,
-							0.300386, 0.800964, 0.517905,
-							0.15602, 0.800417, 0.578784,
-							0, 0.8, 0.6,
-							0.000884181, 0.999999, 0.000884182,
-							0.0006461, 0.999999, 0.00107175,
-							0.000305924, 0.999999, 0.00121748,
-							0, 0.999999, 0.001257,
-							0.00125688, 0.999999, 0,
-							0.00121716, 0.999999, -0.000305839,
-							0.00107193, 0.999999, -0.000646202,
-							0.00088386, 0.999999, -0.00088386,
-							0.000626479, 0.999999, -0.00108364,
-							0.000335298, 0.999999, -0.00120914,
-							0, 0.999999, -0.00125688,
-							-0.000305839, 0.999999, -0.00121716,
-							-0.000646202, 0.999999, -0.00107193,
-							-0.00088386, 0.999999, -0.00088386,
-							-0.00108364, 0.999999, -0.000626479,
-							-0.00120914, 0.999999, -0.000335298,
-							-0.00125688, 0.999999, 0,
-							0.517904, 0.800965, -0.300385,
-							0.300384, 0.800965, -0.517904,
-							0.15602, 0.800418, -0.578782,
-							0, 0.800001, -0.599999,
-							-0.15602, 0.800418, -0.578783,
-							-0.300385, 0.800965, -0.517903,
-							-0.517904, 0.800965, -0.300384,
-							-0.15602, 0.800417, 0.578783,
-							-0.300384, 0.800964, 0.517905,
-							-0.423155, 0.801174, 0.423155,
-							0, 0.999999, 0.00125701,
-							-0.000335262, 0.999999, 0.00120901,
-							-0.000626413, 0.999999, 0.00108353,
-							-0.00088419, 0.999999, 0.00088419,
-							-0.00107176, 0.999999, 0.000646106,
-							-0.00121749, 0.999999, 0.000305927,
-							-0.00125701, 0.999999, 0,
-							0.366221, -0.855433, -0.36622,
-							-0.497164, 0.711096, -0.497162,
-							-0.6, 0.8, 0,
-							-0.267367, 0.443287, 0.855577,
-							-0.0149983, 0.999888, 0,
-							-1, 0, 0,
-							-0.811257, -0.584689, -4.21204e-009,
-							0.811257, -0.584689, -4.21204e-009,
-							-0.6981, -0.716, -1.86057e-008,
-							0.6981, -0.716, -1.86057e-008,
-							-0.636383, -0.771373, -5.10224e-008,
-							0.636383, -0.771373, -5.10224e-008,
-							-0.675056, -0.737767, -1.01053e-007,
-							0.675056, -0.737767, -1.01053e-007,
-							0.965535, -2.6933e-008, 0.260274,
-							0.902861, 0.429933, 0,
-							0.637936, 0.431366, -0.637936,
-							0, 0.429933, -0.902861,
-							-0.637936, 0.431366, -0.637936,
-							-0.902861, 0.429933, 0,
-							0, 0.429933, 0.902861,
-							-0.637936, 0.431366, 0.637936,
-							-0.556737, 0.830689, 0,
-							0.637936, 0.431366, 0.637936,
-							0, -0.156768, -0.987635,
-							-0.148341, 0.988936, 0,
-							0.148341, 0.988936, 0};
-
-int  teapot_indices[] = {	
-							1122, 1243, 1272, 1242, 1273, 1241, 1274, 1240, 
-						1275, 1239, 1276, 1238, 1277, 1205, 1278, 1204, 
-						1279, 1203, 1280, 1202, 1281, 1201, 1282, 1200, 
-						1283, 1199, -1, 1243, 1249, 1242, 1248, 1241, 1247, 
-						1240, 1246, 1239, 1245, 1238, 1244, 1205, 1212, 
-						1204, 1211, 1203, 1210, 1202, 1209, 1201, 1208, 
-						1200, 1207, 1199, 1206, -1, 1249, 1136, 1248, 1254, 
-						1247, 1253, 1246, 1252, 1245, 1251, 1244, 1250, 
-						1212, 1218, 1211, 1217, 1210, 1216, 1209, 1215, 
-						1208, 1214, 1207, 1213, 1206, 1180, -1, 1136, 1260, 
-						1254, 1259, 1253, 1258, 1252, 1257, 1251, 1256, 
-						1250, 1255, 1218, 1225, 1217, 1224, 1216, 1223, 
-						1215, 1222, 1214, 1221, 1213, 1220, 1180, 1219, 
-						-1, 1260, 1266, 1259, 1265, 1258, 1264, 1257, 1263, 
-						1256, 1262, 1255, 1261, 1225, 1232, 1224, 1231, 
-						1223, 1230, 1222, 1229, 1221, 1228, 1220, 1227, 
-						1219, 1226, -1, 1266, 384, 1265, 1271, 1264, 1270, 
-						1263, 1269, 1262, 1268, 1261, 1267, 1232, 390, 
-						1231, 1237, 1230, 1236, 1229, 1235, 1228, 1234, 
-						1227, 1233, 1226, 426, -1, 462, 1188, 1195, 1189, 
-						1196, 1190, 459, 1191, 1197, 1192, 1198, 1193, 
-						426, 1194, -1, 1188, 1181, 1189, 1182, 1190, 1183, 
-						1191, 1184, 1192, 1185, 1193, 1186, 1194, 1187, 
-						-1, 1181, 1142, 1182, 1175, 1183, 1176, 1184, 1177, 
-						1185, 1178, 1186, 1179, 1187, 1284, -1, 1142, 1168, 
-						1175, 1169, 1176, 1170, 1177, 1171, 1178, 1172, 
-						1179, 1173, 1284, 1174, -1, 1168, 1161, 1169, 1162, 
-						1170, 1163, 1171, 1164, 1172, 1165, 1173, 1166, 
-						1174, 1167, -1, 1161, 1285, 1162, 1286, 1163, 1287, 
-						1164, 1288, 1165, 1289, 1166, 1290, 1167, 1291, 
-						-1, 384, 1150, 1157, 1151, 1158, 1152, 490, 1153, 
-						1159, 1154, 1160, 1155, 462, 1156, -1, 1150, 1143, 
-						1151, 1144, 1152, 1145, 1153, 1146, 1154, 1147, 
-						1155, 1148, 1156, 1149, -1, 1143, 1292, 1144, 1137, 
-						1145, 1138, 1146, 1139, 1147, 1140, 1148, 1141, 
-						1149, 1142, -1, 1292, 1129, 1137, 1130, 1138, 1131, 
-						1139, 1132, 1140, 1133, 1141, 1134, 1142, 1135, 
-						-1, 1129, 1121, 1130, 1123, 1131, 1124, 1132, 1125, 
-						1133, 1126, 1134, 1127, 1135, 1128, -1, 1121, 1293, 
-						1123, 1294, 1124, 1295, 1125, 1296, 1126, 1297, 
-						1127, 1298, 1128, 1285, -1, 902, 1024, 901, 1023, 
-						900, 1022, 899, 1021, 898, 1020, 897, 1019, 
-						862, 983, 861, 982, 860, 981, 859, 980, 
-						858, 979, 857, 978, 856, 977, -1, 856, 849, 
-						857, 850, 858, 851, 1299, 852, 1300, 853, 
-						1301, 854, 1302, 855, -1, 849, 842, 850, 843, 
-						851, 844, 852, 845, 853, 846, 854, 847, 
-						855, 848, -1, 842, 835, 843, 836, 844, 837, 
-						845, 838, 846, 839, 847, 840, 848, 841, 
-						-1, 835, 828, 836, 829, 837, 830, 838, 831, 
-						839, 832, 840, 833, 841, 834, -1, 828, 818, 
-						829, 820, 830, 822, 831, 824, 832, 825, 
-						833, 826, 834, 827, -1, 818, 819, 820, 821, 
-						822, 823, 824, 1303, 825, 1304, 826, 1305, 
-						827, 1306, -1, 1307, 948, 1308, 947, 1309, 946, 
-						1310, 945, 1311, 944, 1312, 943, 1313, 909, 
-						1314, 908, 1315, 907, 1316, 906, 1317, 905, 
-						1318, 904, 1319, 903, -1, 948, 954, 947, 953, 
-						946, 952, 945, 951, 944, 950, 943, 949, 
-						909, 916, 908, 915, 907, 914, 906, 913, 
-						905, 912, 904, 911, 903, 910, -1, 954, 835, 
-						953, 959, 952, 958, 951, 957, 950, 956, 
-						949, 955, 916, 922, 915, 921, 914, 920, 
-						913, 919, 912, 918, 911, 917, 910, 882, 
-						-1, 835, 965, 959, 964, 958, 963, 957, 962, 
-						956, 961, 955, 960, 922, 929, 921, 928, 
-						920, 927, 919, 926, 918, 925, 917, 924, 
-						882, 923, -1, 965, 971, 964, 970, 963, 969, 
-						962, 968, 961, 967, 960, 966, 929, 936, 
-						928, 935, 927, 934, 926, 933, 925, 932, 
-						924, 931, 923, 930, -1, 971, 856, 970, 976, 
-						969, 975, 968, 974, 967, 973, 966, 972, 
-						936, 942, 935, 941, 934, 940, 933, 939, 
-						932, 938, 931, 937, 930, 902, -1, 856, 977, 
-						976, 1095, 1320, 1094, 974, 1093, 1321, 1092, 
-						1322, 1091, 1323, 1060, 1324, 1059, 1325, 1058, 
-						939, 1057, 1326, 1056, 937, 1055, 902, 1024, 
-						-1, 1302, 890, 1327, 891, 1328, 892, 1329, 893, 
-						900, 894, 901, 895, 902, 896, -1, 890, 883, 
-						891, 884, 892, 885, 893, 886, 894, 887, 
-						895, 888, 896, 889, -1, 883, 841, 884, 877, 
-						885, 878, 886, 879, 887, 880, 888, 881, 
-						889, 882, -1, 841, 870, 877, 871, 878, 872, 
-						879, 873, 880, 874, 881, 875, 882, 876, 
-						-1, 870, 863, 871, 864, 872, 865, 873, 866, 
-						874, 867, 875, 868, 876, 869, -1, 863, 1330, 
-						864, 1331, 865, 1332, 866, 1333, 867, 1334, 
-						868, 1335, 869, 1336, -1, 787, 780, 813, 808, 
-						814, 809, 815, 810, 816, 811, 817, 812, 
-						781, 774, 782, 775, 783, 776, 784, 777, 
-						785, 778, 786, 779, 787, 780, -1, 774, 767, 
-						775, 768, 776, 769, 777, 770, 778, 771, 
-						779, 772, 780, 773, -1, 767, 760, 768, 761, 
-						769, 762, 770, 763, 771, 764, 772, 765, 
-						773, 766, 803, 798, 804, 799, 805, 800, 
-						806, 801, 807, 802, 767, 760, -1, 767, 774, 
-						807, 812, 806, 811, 805, 810, 804, 809, 
-						803, 808, 773, 780, -1, 760, 753, 761, 754, 
-						762, 755, 763, 756, 764, 757, 765, 758, 
-						766, 759, 798, 793, 799, 794, 800, 795, 
-						801, 796, 802, 797, 760, 753, -1, 759, 752, 
-						793, 788, 794, 789, 795, 790, 796, 791, 
-						797, 792, 753, 746, -1, 752, 703, 788, 741, 
-						789, 742, 790, 743, 791, 744, 792, 745, 
-						746, 697, 747, 698, 748, 699, 749, 700, 
-						750, 701, 751, 702, 752, 703, -1, 752, 759, 
-						751, 758, 750, 757, 749, 756, 748, 755, 
-						747, 754, 746, 753, -1, 703, 734, 1337, 735, 
-						742, 736, 743, 737, 744, 738, 1338, 739, 
-						1339, 740, -1, 734, 727, 735, 728, 736, 729, 
-						737, 730, 738, 731, 739, 732, 740, 733, 
-						-1, 727, 682, 728, 722, 729, 723, 730, 724, 
-						731, 725, 732, 726, 733, 676, -1, 682, 716, 
-						722, 717, 723, 718, 724, 719, 725, 720, 
-						726, 721, 676, 669, -1, 716, 704, 717, 705, 
-						718, 707, 719, 709, 720, 711, 721, 713, 
-						669, 715, -1, 704, 668, 705, 706, 707, 708, 
-						709, 710, 711, 712, 713, 714, 715, 656, 
-						-1, 1339, 690, 698, 691, 1340, 692, 700, 693, 
-						701, 694, 702, 695, 703, 696, -1, 690, 683, 
-						691, 684, 692, 685, 693, 686, 694, 687, 
-						695, 688, 696, 689, -1, 683, 676, 684, 677, 
-						685, 678, 686, 679, 687, 680, 688, 681, 
-						689, 682, -1, 676, 669, 677, 670, 678, 671, 
-						679, 672, 680, 673, 681, 674, 682, 675, 
-						-1, 669, 655, 670, 657, 671, 659, 672, 661, 
-						673, 663, 674, 665, 675, 667, -1, 655, 656, 
-						657, 658, 659, 660, 661, 662, 663, 664, 
-						665, 666, 667, 668, -1, 624, 618, 650, 645, 
-						651, 646, 652, 647, 653, 648, 654, 649, 
-						266, 612, -1, 266, 612, 619, 613, 620, 614, 
-						621, 615, 622, 616, 623, 617, 624, 618, 
-						-1, 612, 605, 613, 606, 614, 607, 615, 608, 
-						616, 609, 617, 610, 618, 611, 645, 640, 
-						646, 641, 647, 642, 648, 643, 649, 644, 
-						612, 605, -1, 605, 598, 606, 599, 607, 600, 
-						608, 601, 609, 602, 610, 603, 611, 604, 
-						640, 635, 641, 636, 642, 637, 643, 638, 
-						644, 639, 605, 598, -1, 604, 597, 635, 630, 
-						636, 631, 637, 632, 638, 633, 639, 634, 
-						598, 591, -1, 597, 590, 630, 625, 631, 626, 
-						632, 627, 633, 628, 634, 629, 591, 584, 
-						-1, 590, 541, 625, 579, 626, 580, 627, 581, 
-						628, 582, 629, 583, 584, 535, 585, 536, 
-						586, 537, 587, 538, 588, 539, 589, 540, 
-						590, 541, -1, 590, 597, 589, 596, 588, 595, 
-						587, 594, 586, 593, 585, 592, 584, 591, 
-						-1, 597, 604, 596, 603, 595, 602, 594, 601, 
-						593, 600, 592, 599, 591, 598, -1, 541, 572, 
-						579, 573, 580, 574, 581, 575, 582, 576, 
-						583, 577, 535, 578, -1, 572, 565, 573, 566, 
-						574, 567, 575, 568, 576, 569, 577, 570, 
-						578, 571, -1, 565, 520, 566, 560, 567, 561, 
-						568, 562, 569, 563, 570, 564, 571, 514, 
-						-1, 520, 553, 560, 554, 561, 555, 562, 556, 
-						563, 557, 564, 558, 514, 559, -1, 553, 505, 
-						554, 542, 555, 544, 556, 546, 557, 548, 
-						558, 550, 559, 552, -1, 505, 506, 542, 543, 
-						544, 545, 546, 547, 548, 549, 550, 551, 
-						552, 494, -1, 535, 528, 536, 529, 537, 530, 
-						538, 531, 539, 532, 540, 533, 541, 534, 
-						-1, 528, 521, 529, 522, 530, 523, 531, 524, 
-						532, 525, 533, 526, 534, 527, -1, 521, 514, 
-						522, 515, 523, 516, 524, 517, 525, 518, 
-						526, 519, 527, 520, -1, 514, 507, 515, 508, 
-						516, 509, 517, 510, 518, 511, 519, 512, 
-						520, 513, -1, 507, 493, 508, 495, 509, 497, 
-						510, 499, 511, 501, 512, 503, 513, 1341, 
-						-1, 493, 494, 495, 496, 497, 498, 499, 500, 
-						501, 502, 503, 504, 1341, 506, -1, 216, 349, 
-						348, 467, 347, 466, 346, 465, 345, 464, 
-						344, 463, 310, 432, 309, 431, 308, 430, 
-						307, 429, 306, 428, 305, 427, 1342, 396, 
-						-1, 349, 356, 467, 472, 466, 471, 465, 470, 
-						464, 469, 463, 468, 432, 438, 431, 437, 
-						430, 436, 429, 435, 428, 434, 427, 433, 
-						396, 402, -1, 356, 363, 472, 477, 471, 476, 
-						470, 475, 469, 474, 468, 473, 438, 444, 
-						437, 443, 436, 442, 435, 441, 434, 440, 
-						433, 439, 402, 408, -1, 363, 370, 477, 482, 
-						476, 481, 475, 480, 474, 479, 473, 478, 
-						444, 450, 443, 449, 442, 448, 441, 447, 
-						440, 446, 439, 445, 408, 414, -1, 370, 377, 
-						482, 487, 481, 486, 480, 485, 479, 484, 
-						478, 483, 450, 456, 449, 455, 448, 454, 
-						447, 453, 446, 452, 445, 451, 414, 420, 
-						-1, 377, 384, 487, 492, 486, 491, 485, 490, 
-						484, 489, 483, 488, 456, 462, 455, 461, 
-						454, 460, 453, 459, 452, 458, 451, 457, 
-						420, 426, -1, 1342, 396, 265, 395, 264, 394, 
-						263, 393, 262, 392, 261, 391, 222, 355, 
-						221, 354, 220, 353, 219, 352, 218, 351, 
-						217, 350, 216, 349, -1, 396, 1343, 395, 401, 
-						394, 400, 393, 399, 392, 398, 391, 397, 
-						355, 362, 354, 361, 353, 360, 352, 359, 
-						351, 358, 350, 357, 349, 1344, -1, 1343, 1345, 
-						401, 407, 400, 406, 399, 405, 398, 404, 
-						397, 403, 362, 369, 361, 368, 360, 367, 
-						359, 366, 358, 365, 357, 364, 1344, 1346, 
-						-1, 1345, 1347, 407, 413, 406, 412, 405, 411, 
-						404, 410, 403, 409, 369, 376, 368, 375, 
-						367, 374, 366, 373, 365, 372, 364, 371, 
-						1346, 1348, -1, 1347, 1349, 413, 419, 412, 418, 
-						411, 417, 410, 416, 409, 415, 376, 383, 
-						375, 382, 374, 381, 373, 380, 372, 379, 
-						371, 378, 1348, 1350, -1, 1349, 426, 419, 425, 
-						418, 424, 417, 423, 416, 422, 415, 421, 
-						383, 390, 382, 389, 381, 388, 380, 387, 
-						379, 386, 378, 385, 1350, 384, -1, 42, 320, 
-						319, 318, 317, 316, 174, 315, 314, 313, 
-						312, 311, 137, 277, 276, 275, 274, 273, 
-						134, 272, 271, 270, 269, 268, 92, 267, 
-						-1, 320, 326, 318, 325, 316, 324, 315, 323, 
-						313, 322, 311, 321, 277, 284, 275, 283, 
-						273, 282, 272, 281, 270, 280, 268, 279, 
-						267, 278, -1, 326, 195, 325, 331, 324, 330, 
-						323, 329, 322, 328, 321, 327, 284, 290, 
-						283, 289, 282, 288, 281, 287, 280, 286, 
-						279, 285, 278, 246, -1, 195, 337, 331, 336, 
-						330, 335, 329, 334, 328, 333, 327, 332, 
-						290, 297, 289, 296, 288, 295, 287, 294, 
-						286, 293, 285, 292, 246, 291, -1, 337, 343, 
-						336, 342, 335, 341, 334, 340, 333, 339, 
-						332, 338, 297, 304, 296, 303, 295, 302, 
-						294, 301, 293, 300, 292, 299, 291, 298, 
-						-1, 343, 216, 342, 348, 341, 347, 340, 346, 
-						339, 345, 338, 344, 304, 310, 303, 309, 
-						302, 308, 301, 307, 300, 306, 299, 305, 
-						298, 1342, -1, 222, 254, 261, 255, 262, 256, 
-						263, 257, 264, 258, 265, 259, 1342, 260, 
-						-1, 254, 247, 255, 248, 256, 249, 257, 250, 
-						258, 251, 259, 252, 260, 253, -1, 247, 201, 
-						248, 241, 249, 242, 250, 243, 251, 244, 
-						252, 245, 253, 246, -1, 201, 234, 241, 235, 
-						242, 236, 243, 237, 244, 238, 245, 239, 
-						246, 240, -1, 234, 223, 235, 224, 236, 226, 
-						237, 228, 238, 229, 239, 231, 240, 233, 
-						-1, 223, 48, 224, 225, 226, 227, 228, 89, 
-						229, 230, 231, 232, 233, 92, -1, 216, 209, 
-						1351, 210, 218, 211, 219, 212, 220, 213, 
-						221, 214, 222, 215, -1, 209, 202, 210, 203, 
-						211, 204, 212, 205, 213, 206, 214, 207, 
-						215, 208, -1, 202, 195, 203, 196, 204, 197, 
-						205, 198, 206, 199, 207, 200, 208, 201, 
-						-1, 195, 188, 196, 189, 197, 190, 198, 191, 
-						199, 192, 200, 193, 201, 194, -1, 188, 177, 
-						189, 178, 190, 180, 191, 182, 192, 183, 
-						193, 185, 194, 187, -1, 177, 42, 178, 179, 
-						180, 181, 182, 45, 183, 184, 185, 186, 
-						187, 48, -1, 1, 148, 147, 146, 145, 144, 
-						143, 142, 141, 140, 139, 138, 105, 104, 
-						103, 102, 101, 100, 99, 98, 97, 96, 
-						95, 94, 60, 93, -1, 148, 154, 146, 153, 
-						144, 152, 142, 151, 140, 150, 138, 149, 
-						104, 112, 102, 111, 100, 110, 98, 109, 
-						96, 108, 94, 107, 93, 106, -1, 154, 21, 
-						153, 159, 152, 158, 151, 157, 150, 156, 
-						149, 155, 112, 118, 111, 117, 110, 116, 
-						109, 115, 108, 114, 107, 113, 106, 72, 
-						-1, 21, 165, 159, 164, 158, 163, 157, 162, 
-						156, 161, 155, 160, 118, 124, 117, 123, 
-						116, 122, 115, 121, 114, 120, 113, 119, 
-						72, 79, -1, 165, 171, 164, 170, 163, 169, 
-						162, 168, 161, 167, 160, 166, 124, 131, 
-						123, 130, 122, 129, 121, 128, 120, 127, 
-						119, 126, 79, 125, -1, 171, 1352, 170, 176, 
-						169, 175, 168, 1353, 167, 173, 166, 172, 
-						131, 1354, 130, 136, 129, 135, 128, 1355, 
-						127, 133, 126, 132, 125, 1356, -1, 1357, 80, 
-						87, 81, 88, 82, 1358, 83, 90, 84, 
-						91, 85, 1356, 86, -1, 80, 73, 81, 74, 
-						82, 75, 83, 76, 84, 77, 85, 78, 
-						86, 1359, -1, 73, 27, 74, 67, 75, 68, 
-						76, 69, 77, 70, 78, 71, 1359, 72, 
-						-1, 27, 20, 67, 61, 68, 62, 69, 63, 
-						70, 64, 71, 65, 72, 66, -1, 20, 12, 
-						61, 49, 62, 51, 63, 53, 64, 55, 
-						65, 57, 66, 59, -1, 12, 13, 49, 50, 
-						51, 52, 53, 54, 55, 56, 57, 58, 
-						59, 60, -1, 1352, 35, 43, 36, 44, 37, 
-						1360, 38, 46, 39, 47, 40, 1357, 41, 
-						-1, 35, 28, 36, 29, 37, 30, 38, 31, 
-						39, 32, 40, 33, 41, 34, -1, 28, 21, 
-						29, 22, 30, 23, 31, 24, 32, 25, 
-						33, 26, 34, 27, -1, 21, 14, 22, 15, 
-						23, 16, 24, 17, 25, 18, 26, 19, 
-						27, 20, -1, 14, 0, 15, 2, 16, 4, 
-						17, 6, 18, 8, 19, 10, 20, 1361, 
-						-1, 0, 1, 2, 3, 4, 5, 6, 7, 
-						8, 9, 10, 11, 1361, 13, -1, 1024, 1055, 
-						1061, 1062, 1068, 1069, 1075, 1076, 1082, 1083, 
-						1089, 1090, -1, 1089, 1088, 1082, 1081, 1075, 1074, 
-						1068, 1067, 1061, 1030, 1024, 1023, -1, 1030, 1067, 
-						1036, 1073, 1042, 1079, 1048, 1085, 1054, -1, 1085, 
-						1079, 1086, 1080, 1087, 1081, 1088, -1, 1081, 1080, 
-						1074, 1073, 1067, -1, 1080, 1079, 1073, -1, 1055, 1056, 
-						1062, 1063, 1069, 1070, 1076, 1077, 1083, 1084, 
-						1090, 1116, -1, 1056, 1057, 1063, 1064, 1070, 1071, 
-						1077, 1078, 1084, 1111, 1116, 1117, -1, 1057, 1058, 
-						1064, 1065, 1071, 1072, 1078, 1106, 1111, 1112, 
-						1117, 1118, -1, 1058, 1059, 1065, 1066, 1072, 1101, 
-						1106, 1107, 1112, 1113, 1118, 1119, -1, 1059, 1060, 
-						1066, 1096, 1101, 1102, 1107, 1108, 1113, 1114, 
-						1119, 1120, -1, 1060, 1091, 1096, 1097, 1102, 1103, 
-						1108, 1109, 1114, 1115, 1120, 1012, -1, 1091, 1092, 
-						1097, 1098, 1103, 1104, 1109, 1110, 1115, 1005, 
-						1012, 1013, -1, 1092, 1093, 1098, 1099, 1104, 1105, 
-						1110, 998, 1005, 1006, 1013, 1014, -1, 998, 1105, 
-						991, 1100, 984, 1095, 977, -1, 1095, 1100, 1094, 
-						1099, 1093, -1, 1100, 1105, 1099, -1, 984, 977, 985, 
-						978, 986, 979, 987, 980, 988, 981, 989, 
-						982, 990, 983, 1025, 1019, 1026, 1020, 1027, 
-						1021, 1028, 1022, 1029, 1023, 1030, -1, 1030, 1362, 
-						1029, 1035, 1028, 1034, 1027, 1033, 1026, 1032, 
-						1025, 1031, 990, 997, 989, 996, 988, 995, 
-						987, 994, 986, 993, 985, 992, 984, 1363, 
-						-1, 1362, 1042, 1035, 1041, 1034, 1040, 1033, 1039, 
-						1032, 1038, 1031, 1037, 997, 1004, 996, 1003, 
-						995, 1002, 994, 1001, 993, 1000, 992, 999, 
-						1363, 998, -1, 998, 999, 1006, 1007, 1014, 1015, 
-						-1, 999, 1000, 1007, 1008, 1015, 1016, -1, 1000, 1001, 
-						1008, 1009, 1016, 1017, -1, 1001, 1002, 1009, 1010, 
-						1017, 1018, -1, 1002, 1003, 1010, 1011, 1018, 1049, 
-						-1, 1003, 1004, 1011, 1043, 1049, 1050, -1, 1004, 1037, 
-						1043, 1044, 1050, 1051, -1, 1037, 1038, 1044, 1045, 
-						1051, 1052, -1, 1038, 1039, 1045, 1046, 1052, 1053, 
-						-1, 1039, 1040, 1046, 1047, 1053, 1054, -1, 1054, 1047, 
-						1048, 1041, 1042, -1, 1041, 1047, 1040, -1, 			
-	};
-
-#endif // TEAPOT_H
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/OpenGL/MathStuff.c
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/OpenGL/MathStuff.c	(revision 629)
+++ 	(revision )
@@ -1,1041 +1,0 @@
-//Copyright and Disclaimer:
-//This code is copyright Vienna University of Technology, 2004.
-
-#include <memory.h>
-#include <math.h>
-#include <float.h>
-#include <stdlib.h>
-#include <malloc.h>
-#include <stdio.h>
-#include "MathStuff.h"
-
-#ifndef M_PI
-#define M_PI (double)3.14159265358979323846
-#endif
-
-const double DOUBLE_MAX = DBL_MAX;
-const double PI = M_PI;
-const double PI_2 = M_PI/2;
-const double PI_180 = M_PI/180;
-const Vector3 ZERO = {0.0, 0.0, 0.0};
-const Vector3 UNIT_X = {1.0, 0.0, 0.0};
-const Vector3 UNIT_Y = {0.0, 1.0, 0.0};
-const Vector3 UNIT_Z = {0.0, 0.0, 1.0};
-
-const Matrix4x4 IDENTITY = {1.0, 0.0, 0.0, 0.0, 
-							0.0, 1.0, 0.0, 0.0,
-							0.0, 0.0, 1.0, 0.0,
-							0.0, 0.0, 0.0, 1.0};
-
-double maximum(const double a, const double b) {
-	return ( (a > b)? (a):(b) );
-
-}
-
-void clamp(double* value, const double min, const double max) {
-	if( (*value) > max) {
-		(*value) = max;
-	}
-	else {
-		if( (*value) < min) {
-			(*value) = min;
-		}
-	}
-}
-
-double absDouble(const double a) {
-	return ( (a < 0.0)? (-a):(a) );
-}
-
-double signDouble(const double a) {
-	return ( (a < 0.0)? (-1.0f): ( (a == 0.0)? (0.0f):(1.0f) ) );
-}
-
-double coTan(const double vIn) {
-	return (double)-tan(vIn+PI_2);
-}
-
-double relativeEpsilon(const double a, const double epsilon) {
-	double relEpsilon = maximum(absDouble(a*epsilon),epsilon);
-	return relEpsilon;
-}
-
-int alike(const double a, const double b, const double epsilon) {
-	if(a == b) {
-		return 1;
-	}
-	{
-		double relEps = relativeEpsilon(a,epsilon);
-		return (a-relEps <= b) && (b <= a+relEps);
-	}
-}
-
-
-
-int alikeVector3(const Vector3 a, const Vector3 b, const double epsilon) {
-	return 
-		alike(a[0],b[0],epsilon) &&
-		alike(a[1],b[1],epsilon) &&
-		alike(a[2],b[2],epsilon);
-}
-
-void linCombVector3(Vector3 result, const Vector3 pos, const Vector3 dir, const double t) {
-	int i;
-	for(i = 0; i < 3; i++) {
-		result[i] = pos[i]+t*dir[i];
-	}
-}
-
-double squaredLength(const Vector3 vec) {
-	int i;
-	double tmp = 0.0;
-	for(i = 0; i < 3; i++) {
-		tmp += vec[i]*vec[i];
-	}
-	return tmp;
-}
-
-void normalize(Vector3 vec) {
-	int i;
-	const double len = (double)(1.0/sqrt(squaredLength(vec)));
-	for(i = 0; i < 3; i++) {
-		vec[i] *= len;
-	}
-}
-
-void copyNormalize(Vector3 vec, const Vector3 input) {
-	copyVector3(vec,input),
-	normalize(vec);
-}
-
-/*	| a1 a2 |
-	| b1 b2 | calculate the determinent of a 2x2 matrix*/
-double det2x2(const double a1, const double a2,
-			const double b1, const double b2) {
-	return a1*b2 - b1*a2;
-}
-
-/*	| a1 a2 a3 |
-	| b1 b2 b3 |
-	| c1 c2 c3 | calculate the determinent of a 3x3 matrix*/
-double det3x3(const double a1, const double a2, const double a3,
-			  const double b1, const double b2, const double b3,
-			  const double c1, const double c2, const double c3) {
-	return a1*det2x2(b2,b3,c2,c3) - b1*det2x2(a2,a3,c2,c3) +
-			c1*det2x2(a2,a3,b2,b3);
-}
-void cross(Vector3 result, const Vector3 a, const Vector3 b) {
-	result[0] =  det2x2(a[1],b[1],a[2],b[2]);
-	result[1] = -det2x2(a[0],b[0],a[2],b[2]);
-	result[2] =  det2x2(a[0],b[0],a[1],b[1]);
-}
-
-double dot(const Vector3 a, const Vector3 b) {
-	return a[0]*b[0]+a[1]*b[1]+a[2]*b[2];
-}
-
-void look(Matrix4x4 output, const Vector3 pos, const Vector3 dir, const Vector3 up) {
-	Vector3 dirN;
-	Vector3 upN;
-	Vector3 lftN;
-
-	cross(lftN,dir,up);
-	normalize(lftN);
-
-	cross(upN,lftN,dir);
-	normalize(upN);
-	copyNormalize(dirN,dir);
-
-	output[ 0] = lftN[0];
-	output[ 1] = upN[0];
-	output[ 2] = -dirN[0];
-	output[ 3] = 0.0;
-
-	output[ 4] = lftN[1];
-	output[ 5] = upN[1];
-	output[ 6] = -dirN[1];
-	output[ 7] = 0.0;
-
-	output[ 8] = lftN[2];
-	output[ 9] = upN[2];
-	output[10] = -dirN[2];
-	output[11] = 0.0;
-
-	output[12] = -dot(lftN,pos);
-	output[13] = -dot(upN,pos);
-	output[14] = dot(dirN,pos);
-	output[15] = 1.0;
-}
-
-void makeScaleMtx(Matrix4x4 output, const double x, const double y, const double z) {
-	output[ 0] = x;
-	output[ 1] = 0.0;
-	output[ 2] = 0.0;
-	output[ 3] = 0.0;
-
-	output[ 4] = 0.0;
-	output[ 5] = y;
-	output[ 6] = 0.0;
-	output[ 7] = 0.0;
-
-	output[ 8] = 0.0;
-	output[ 9] = 0.0;
-	output[10] = z;
-	output[11] = 0.0;
-
-	output[12] = 0.0;
-	output[13] = 0.0;
-	output[14] = 0.0;
-	output[15] = 1.0;
-}
-
-void makeTranslationMtx(Matrix4x4 output, Vector3 translation) {
-	output[ 0] = 1.0;
-	output[ 1] = 0.0;
-	output[ 2] = 0.0;
-	output[ 3] = 0;//translation[0];
-
-	output[ 4] = 0.0;
-	output[ 5] = 1.0;
-	output[ 6] = 0.0;
-	output[ 7] = 0;//translation[1];
-
-	output[ 8] = 0.0;
-	output[ 9] = 0.0;
-	output[10] = 1.0;
-	output[11] = 0;//translation[2];
-
-	output[12] = translation[0];//0.0;
-	output[13] = translation[1];//0.0;
-	output[14] = translation[2];//0.0;
-	output[15] = 1.0;
-}
-
-void makeRotationZMtx(Matrix4x4 output, const double rad)
-{
-	output[ 0] = cos(rad);
-	output[ 1] = sin(rad);
-	output[ 2] = 0.0;
-	output[ 3] = 0.0;
-
-	output[ 4] = -sin(rad);
-	output[ 5] = cos(rad);
-	output[ 6] = 0.0;
-	output[ 7] = 0.0;
-
-	output[ 8] = 0.0;
-	output[ 9] = 0.0;
-	output[10] = 1.0;
-	output[11] = 0.0;
-
-	output[12] = 0.0;
-	output[13] = 0.0;
-	output[14] = 0.0;
-	output[15] = 1.0;
-}
-
-void makeRotationXMtx(Matrix4x4 output, const double rad)
-{
-	output[ 0] = 1.0;
-	output[ 1] = 0.0;
-	output[ 2] = 0.0;
-	output[ 3] = 0.0;
-
-	output[ 4] = 0.0;
-	output[ 5] = cos(rad);
-	output[ 6] = sin(rad);
-	output[ 7] = 0.0;
-
-	output[ 8] = 0.0;
-	output[ 9] = -sin(rad);
-	output[10] = cos(rad);
-	output[11] = 0.0;
-
-	output[12] = 0.0;
-	output[13] = 0.0;
-	output[14] = 0.0;
-	output[15] = 1.0;
-}
-
-void makeRotationYMtx(Matrix4x4 output, const double rad)
-{
-	output[ 0] = cos(rad);
-	output[ 1] = 0.0;
-	output[ 2] = -sin(rad);
-	output[ 3] = 0.0;
-
-	output[ 4] = 0.0;
-	output[ 5] = 1.0;
-	output[ 6] = 0.0;
-	output[ 7] = 0.0;
-
-	output[ 8] = sin(rad);
-	output[ 9] = 0.0;
-	output[10] = cos(rad);
-	output[11] = 0.0;
-
-	output[12] = 0.0;
-	output[13] = 0.0;
-	output[14] = 0.0;
-	output[15] = 1.0;
-}
-
-void scaleTranslateToFit(Matrix4x4 output, const Vector3 vMin, const Vector3 vMax) {
-	output[ 0] = 2/(vMax[0]-vMin[0]);
-	output[ 4] = 0;
-	output[ 8] = 0;
-	output[12] = -(vMax[0]+vMin[0])/(vMax[0]-vMin[0]);
-
-	output[ 1] = 0;
-	output[ 5] = 2/(vMax[1]-vMin[1]);
-	output[ 9] = 0;
-	output[13] = -(vMax[1]+vMin[1])/(vMax[1]-vMin[1]);
-
-	output[ 2] = 0;
-	output[ 6] = 0;
-	output[10] = 2/(vMax[2]-vMin[2]);
-	output[14] = -(vMax[2]+vMin[2])/(vMax[2]-vMin[2]);
-
-	output[ 3] = 0;
-	output[ 7] = 0;
-	output[11] = 0;
-	output[15] = 1;
-}
-
-void perspectiveRad(Matrix4x4 output, const double vFovy, const double vAspect,
-						  const double vNearDis, const double vFarDis) {
-	const double f = coTan(vFovy/2);
-	const double dif = 1/(vNearDis-vFarDis);
-
-	output[ 0] = f/vAspect;
-	output[ 4] = 0;
-	output[ 8] = 0;
-	output[12] = 0;
-
-	output[ 1] = 0;
-	output[ 5] = f;
-	output[ 9] = 0;
-	output[13] = 0;
-
-	output[ 2] = 0;
-	output[ 6] = 0;
-	output[10] = (vFarDis+vNearDis)*dif;
-	output[14] = 2*vFarDis*vNearDis*dif;
-
-	output[ 3] = 0;
-	output[ 7] = 0;
-	output[11] = -1;
-	output[15] = 0;
-}
-
-void perspectiveDeg(Matrix4x4 output, const double vFovy, const double vAspect,
-					const double vNearDis, const double vFarDis) {
-	perspectiveRad(output,vFovy*PI_180,vAspect,vNearDis,vFarDis);
-}
-
-void invert(Matrix4x4 output, const Matrix4x4 i) {
-	double a11 =  det3x3(i[5],i[6],i[7],i[9],i[10],i[11],i[13],i[14],i[15]);
-	double a21 = -det3x3(i[1],i[2],i[3],i[9],i[10],i[11],i[13],i[14],i[15]);
-	double a31 =  det3x3(i[1],i[2],i[3],i[5],i[6],i[7],i[13],i[14],i[15]);
-	double a41 = -det3x3(i[1],i[2],i[3],i[5],i[6],i[7],i[9],i[10],i[11]);
-
-	double a12 = -det3x3(i[4],i[6],i[7],i[8],i[10],i[11],i[12],i[14],i[15]);
-	double a22 =  det3x3(i[0],i[2],i[3],i[8],i[10],i[11],i[12],i[14],i[15]);
-	double a32 = -det3x3(i[0],i[2],i[3],i[4],i[6],i[7],i[12],i[14],i[15]);
-	double a42 =  det3x3(i[0],i[2],i[3],i[4],i[6],i[7],i[8],i[10],i[11]);
-
-	double a13 =  det3x3(i[4],i[5],i[7],i[8],i[9],i[11],i[12],i[13],i[15]);
-	double a23 = -det3x3(i[0],i[1],i[3],i[8],i[9],i[11],i[12],i[13],i[15]);
-	double a33 =  det3x3(i[0],i[1],i[3],i[4],i[5],i[7],i[12],i[13],i[15]);
-	double a43 = -det3x3(i[0],i[1],i[3],i[4],i[5],i[7],i[8],i[9],i[11]);
-
-	double a14 = -det3x3(i[4],i[5],i[6],i[8],i[9],i[10],i[12],i[13],i[14]);
-	double a24 =  det3x3(i[0],i[1],i[2],i[8],i[9],i[10],i[12],i[13],i[14]);
-	double a34 = -det3x3(i[0],i[1],i[2],i[4],i[5],i[6],i[12],i[13],i[14]);
-	double a44 =  det3x3(i[0],i[1],i[2],i[4],i[5],i[6],i[8],i[9],i[10]);
-
-	double det = (i[0]*a11) + (i[4]*a21) + (i[8]*a31) + (i[12]*a41);
-	double oodet = 1/det;
-
-	output[ 0] = a11*oodet;
-	output[ 1] = a21*oodet;
-	output[ 2] = a31*oodet;
-	output[ 3] = a41*oodet;
-
-	output[ 4] = a12*oodet;
-	output[ 5] = a22*oodet;
-	output[ 6] = a32*oodet;
-	output[ 7] = a42*oodet;
-
-	output[ 8] = a13*oodet;
-	output[ 9] = a23*oodet;
-	output[10] = a33*oodet;
-	output[11] = a43*oodet;
-
-	output[12] = a14*oodet;
-	output[13] = a24*oodet;
-	output[14] = a34*oodet;
-	output[15] = a44*oodet;
-}
-
-void multUnSave(Matrix4x4 output, const Matrix4x4 a, const Matrix4x4 b) {
-	const int SIZE = 4;
-	int iCol;
-	for(iCol = 0; iCol < SIZE; iCol++) {
-		const int cID = iCol*SIZE;
-		int iRow;
-		for(iRow = 0; iRow < SIZE; iRow++) {
-			const int id = iRow+cID;
-			int k;
-			output[id] = a[iRow]*b[cID];
-			for(k = 1; k < SIZE; k++) {
-				output[id] += a[iRow+k*SIZE]*b[k+cID];
-			}
-		}
-	}
-}
-
-void mult(Matrix4x4 output, const Matrix4x4 a, const Matrix4x4 b) {
-	if(a == output) {
-		Matrix4x4 tmpA;
-		copyMatrix(tmpA,a);
-		if(b == output) {
-			multUnSave(output,tmpA,tmpA);
-		}
-		else {
-			multUnSave(output,tmpA,b);
-		}
-	}
-	else {
-		if(b == output) {
-			Matrix4x4 tmpB;
-			copyMatrix(tmpB,b);
-			multUnSave(output,a,tmpB);
-		}
-		else {
-			multUnSave(output,a,b);
-		}
-	}
-}
-
-void mulHomogenPoint(Vector3 output, const Matrix4x4 m, const Vector3 v) {
-	//if v == output -> overwriting problems -> so store in temp
-	double x = m[0]*v[0] + m[4]*v[1] + m[ 8]*v[2] + m[12];
-	double y = m[1]*v[0] + m[5]*v[1] + m[ 9]*v[2] + m[13];
-	double z = m[2]*v[0] + m[6]*v[1] + m[10]*v[2] + m[14];
-	double w = m[3]*v[0] + m[7]*v[1] + m[11]*v[2] + m[15];
-
-	output[0] = x/w;
-	output[1] = y/w;
-	output[2] = z/w;
-}
-
-void appendToCubicHull(Vector3 min, Vector3 max, const Vector3 v) {
-	int j;
-	for(j = 0; j < 3; j++) {
-		if(v[j] < min[j]) {
-			min[j] = v[j];
-		}
-		else if(v[j] > max[j]) {
-			max[j] = v[j];
-		}
-	}
-}
-
-void calcCubicHull(Vector3 min, Vector3 max, const Vector3* ps, const int size) {
-	if(size > 0) {
-		int i;
-		copyVector3(min,ps[0]);
-		copyVector3(max,ps[0]);
-		for(i = 1; i < size; i++) {
-			appendToCubicHull(min,max,ps[i]);
-		}
-	}
-}
-
-void calcViewFrustumWorldCoord(Vector3x8 points, const Matrix4x4 invEyeProjView) {
-	const struct AABox box = {
-		{-1, -1, -1},
-		{1, 1, 1}
-	};
-	int i;
-	calcAABoxPoints(points,box); //calc unit cube corner points
-	for(i = 0; i < 8; i++) {
-		mulHomogenPoint(points[i],invEyeProjView,points[i]); //camera to world frame
-	}
-	//viewFrustumWorldCoord[0] == near-bottom-left
-	//viewFrustumWorldCoord[1] == near-bottom-right
-	//viewFrustumWorldCoord[2] == near-top-right
-	//viewFrustumWorldCoord[3] == near-top-left
-	//viewFrustumWorldCoord[4] == far-bottom-left
-	//viewFrustumWorldCoord[5] == far-bottom-right
-	//viewFrustumWorldCoord[6] == far-top-right
-	//viewFrustumWorldCoord[7] == far-top-left
-}
-
-void calcViewFrustObject(struct Object* obj, const Vector3x8 p) {
-	int i;
-	Vector3* ps;
-	objectSetSize(obj,6);
-	for(i = 0; i < 6; i++) {
-		vecPointSetSize(&obj->poly[i],4);
-	}
-	//near poly ccw
-	ps = obj->poly[0].points;
-	for(i = 0; i < 4; i++) {
-		copyVector3(ps[i],p[i]);
-	}
-	//far poly ccw
-	ps = obj->poly[1].points;
-	for(i = 4; i < 8; i++) {
-		copyVector3(ps[i-4],p[11-i]);
-	}
-	//left poly ccw
-	ps = obj->poly[2].points;
-	copyVector3(ps[0],p[0]);
-	copyVector3(ps[1],p[3]);
-	copyVector3(ps[2],p[7]);
-	copyVector3(ps[3],p[4]);
-	//right poly ccw
-	ps = obj->poly[3].points;
-	copyVector3(ps[0],p[1]);
-	copyVector3(ps[1],p[5]);
-	copyVector3(ps[2],p[6]);
-	copyVector3(ps[3],p[2]);
-	//bottom poly ccw
-	ps = obj->poly[4].points;
-	copyVector3(ps[0],p[4]);
-	copyVector3(ps[1],p[5]);
-	copyVector3(ps[2],p[1]);
-	copyVector3(ps[3],p[0]);
-	//top poly ccw
-	ps = obj->poly[5].points;
-	copyVector3(ps[0],p[6]);
-	copyVector3(ps[1],p[7]);
-	copyVector3(ps[2],p[3]);
-	copyVector3(ps[3],p[2]);
-}
-
-void transformVecPoint(struct VecPoint* poly, const Matrix4x4 xForm) {
-	if(0 != poly) {
-		int i;
-		for(i = 0; i < poly->size; i++) {
-			mulHomogenPoint(poly->points[i],xForm,poly->points[i]);
-		}
-	}
-}
-
-void transformObject(struct Object* obj, const Matrix4x4 xForm) {
-	if(0 != obj) {
-		int i;
-		for(i = 0; i < obj->size; i++) {
-			transformVecPoint( &(obj->poly[i]) ,xForm);
-		}
-	}
-}
-
-void calcObjectCubicHull(Vector3 min, Vector3 max, const struct Object obj) {
-	if(0 < obj.size) {
-		int i;
-		calcCubicHull(min,max,obj.poly[0].points,obj.poly[0].size);
-		for(i = 1; i < obj.size; i++) {
-			struct VecPoint* p = &(obj.poly[i]);
-			int j;
-			for(j = 0; j < p->size; j++) {
-				appendToCubicHull(min,max,p->points[j]);
-			}
-		}
-	}
-}
-
-int findSamePointInVecPoint(const struct VecPoint poly, const Vector3 p) {
-	int i;
-	for(i = 0; i < poly.size; i++) {
-		if(alikeVector3(poly.points[i],p,(double)0.001)) {
-			return i;
-		}
-	}
-	return -1;
-}
-
-int findSamePointInObjectAndSwapWithLast(struct Object *inter, const Vector3 p) {
-	int i;
-	if(0 == inter) {
-		return -1;
-	}
-	if(1 > inter->size) {
-		return -1;
-	}
-	for(i = inter->size; i > 0; i--) {
-		struct VecPoint* poly = &(inter->poly[i-1]);
-		if(2 == poly->size) {
-			const int nr = findSamePointInVecPoint(*poly,p);
-			if(0 <= nr) {
-				//swap with last
-				swapVecPoint(poly, &(inter->poly[inter->size-1]) );
-				return nr;
-			}
-		}
-	}
-	return -1;
-}
-
-void appendIntersectionVecPoint(struct Object* obj, struct Object* inter) {
-	struct VecPoint *polyOut;
-	struct VecPoint *polyIn;
-	int size = obj->size;
-	int i;
-	//you need at least 3 sides for a polygon
-	if(3 > inter->size) {
-		return;
-	}
-	//compact inter: remove poly.size != 2 from end on forward
-	for(i = inter->size; 0 < i; i--) {
-		if(2 == inter->poly[i-1].size) {
-			break;
-		}
-	}
-	objectSetSize(inter,i);
-	//you need at least 3 sides for a polygon
-	if(3 > inter->size) {
-		return;
-	}
-	//make place for one additional polygon in obj
-	objectSetSize(obj,size+1);
-	polyOut = &(obj->poly[size]);
-	//we have line segments in each poly of inter 
-	//take last linesegment as first and second point
-	polyIn = &(inter->poly[inter->size-1]);
-	append2VecPoint(polyOut,polyIn->points[0]);
-	append2VecPoint(polyOut,polyIn->points[1]);
-	//remove last poly from inter, because it is already saved
-	objectSetSize(inter,inter->size-1);
-
-	//iterate over inter until their is no line segment left
-	while(0 < inter->size) {
-		//pointer on last point to compare
-		Vector3 *lastPt = &(polyOut->points[polyOut->size-1]);
-		//find same point in inter to continue polygon
-		const int nr = findSamePointInObjectAndSwapWithLast(inter,*lastPt);
-		if(0 <= nr) {
-			//last line segment
-			polyIn = &(inter->poly[inter->size-1]);
-			//get the other point in this polygon and save into polyOut
-			append2VecPoint(polyOut,polyIn->points[(nr+1)%2]);
-		}
-		//remove last poly from inter, because it is already saved or degenerated
-		objectSetSize(inter,inter->size-1);
-	}
-	//last point can be deleted, because he is the same as the first (closes polygon)
-	vecPointSetSize(polyOut,polyOut->size-1);
-}
-
-double pointPlaneDistance(const struct Plane A, const Vector3 p) {
-	return dot(A.n,p)+(A.d);
-}
-
-int pointBeforePlane(const struct Plane A, const Vector3 p) {
-	return pointPlaneDistance(A,p) > 0.0;
-}
-
-int intersectPlaneEdge(Vector3 output, const struct Plane A, const Vector3 a, const Vector3 b) {
-	Vector3 diff;
-	double t;
-	diffVector3(diff,b,a);
-	t = dot(A.n,diff);
-	if(0.0 == t)
-		return 0;
-	t = (A.d-dot(A.n,a))/t;
-	if(t < 0.0 || 1.0 < t)
-		return 0;
-	linCombVector3(output,a,diff,t);
-	return 1;
-}
-
-void clipVecPointByPlane(const struct VecPoint poly, const struct Plane A, struct VecPoint* polyOut, struct VecPoint* interPts) {
-	int i;
-	int *outside = 0;
-	if(poly.size < 3 || 0 == polyOut) {
-		return;
-	}
-	outside = (int*)realloc(outside,sizeof(int)*poly.size);
-	//for each point
-	for(i = 0; i < poly.size; i++) {
-		outside[i] = pointBeforePlane(A,poly.points[i]);
-	}
-	for(i = 0; i < poly.size; i++) {
-		int idNext = (i+1) % poly.size;
-		//both outside -> save none
-		if(outside[i] && outside[idNext]) {
-			continue;
-		}
-		//outside to inside -> calc intersection save intersection and save i+1
-		if(outside[i]) {
-			Vector3 inter;
-			if(intersectPlaneEdge(inter,A,poly.points[i],poly.points[idNext])) {
-				append2VecPoint(polyOut,inter);
-				if(0 != interPts) {
-					append2VecPoint(interPts,inter);
-				}
-			}
-			append2VecPoint(polyOut,poly.points[idNext]);
-			continue;
-		}
-		//inside to outside -> calc intersection save intersection
-		if(outside[idNext]) {
-			Vector3 inter;
-			if(intersectPlaneEdge(inter,A,poly.points[i],poly.points[idNext])) {
-				append2VecPoint(polyOut,inter);
-				if(0 != interPts) {
-					append2VecPoint(interPts,inter);
-				}
-			}
-			continue;
-		}
-		//both inside -> save point i+1
-		append2VecPoint(polyOut,poly.points[idNext]);
-	}
-	outside = (int*)realloc(outside,0);
-}
-
-void clipObjectByPlane(const struct Object obj, const struct Plane A, struct Object* objOut) {
-	int i;
-	struct Object inter = OBJECT_NULL;
-	struct Object objIn = OBJECT_NULL;
-	if(0 == obj.size || 0 == objOut)
-		return;
-	if(obj.poly == objOut->poly) {
-		//need to copy object if input and output are the same
-		copyObject(&objIn,obj);
-	}
-	else {
-		objIn = obj;
-	}
-	emptyObject(objOut);
-
-	for(i = 0; i < objIn.size; i++)
-	{
-		int size = objOut->size;
-		objectSetSize(objOut,size+1);
-		objectSetSize(&inter,size+1);
-		clipVecPointByPlane(objIn.poly[i],A, &(objOut->poly[size]) , &(inter.poly[size]));
-		//if whole poly was clipped away -> delete empty poly
-		if(0 == objOut->poly[size].size) {
-			objectSetSize(objOut,size);
-			objectSetSize(&inter,size);
-		}
-	}
-	//add a polygon of all intersection points with plane to close the object
-	appendIntersectionVecPoint(objOut,&inter);
-	emptyObject(&inter);
-	emptyObject(&objIn);
-}
-
-
-void clipObjectByAABox(struct Object* obj, const struct AABox box) {
-	struct VecPlane planes = VECPLANE_NULL;
-	int i;
-	if(0 == obj) {
-		return;
-	}
-	
-	calcAABoxPlanes(&planes,box);
-	for(i = 0; i < planes.size; i++) {
-		clipObjectByPlane(*obj,planes.plane[i],obj);
-	}
-
-	emptyVecPlane(&planes);
-}
-
-int clipTest(const double p, const double q, double* u1, double* u2) {
-	// Return value is 'true' if line segment intersects the current test
-	// plane.  Otherwise 'false' is returned in which case the line segment
-	// is entirely clipped.
-	if(0 == u1 || 0 == u2) {
-		return 0;
-	}
-	if(p < 0.0) {
-		double r = q/p;
-		if(r > (*u2)) {
-			return 0;
-		}
-		else {
-			if(r > (*u1)) {
-				(*u1) = r;
-			}
-			return 1;
-		}
-	}
-	else {
-		if(p > 0.0)	{
-			double r = q/p;
-			if(r < (*u1)) {
-				return 0;
-			}
-			else {
-				if(r < (*u2)) {
-					(*u2) = r;
-				}
-				return 1;
-			}
-		}
-		else {
-			return q >= 0.0;
-		}
-	}
-}
-
-int intersectionLineAABox(Vector3 v, const Vector3 p, const Vector3 dir, const struct AABox b) {
-	double t1 = 0.0;
-	double t2 = DOUBLE_MAX;
-	int intersect =
-		clipTest(-dir[2],p[2]-b.min[2],&t1,&t2) && clipTest(dir[2],b.max[2]-p[2],&t1,&t2) &&
-		clipTest(-dir[1],p[1]-b.min[1],&t1,&t2) && clipTest(dir[1],b.max[1]-p[1],&t1,&t2) &&
-		clipTest(-dir[0],p[0]-b.min[0],&t1,&t2) && clipTest(dir[0],b.max[0]-p[0],&t1,&t2);
-	if(!intersect) {
-		return 0;
-	}
-	intersect = 0;
-	if(0 <= t1) {
-		linCombVector3(v,p,dir,t1);
-		intersect = 1;
-	}
-	if(0 <= t2) {
-		linCombVector3(v,p,dir,t2);
-		intersect = 1;
-	}
-	return intersect;
-}
-
-
-void includeObjectLightVolume(struct VecPoint* points, const struct Object obj,
-							  const Vector3 lightDir, const struct AABox sceneAABox) {
-	if(0 != points) {
-		int i, size;
-		Vector3 ld;
-		copyVector3Values(ld,-lightDir[0],-lightDir[1],-lightDir[2]);
-		convObject2VecPoint(points,obj);
-		size = points->size;
-		//for each point add the point on the ray in -lightDir
-		//intersected with the sceneAABox
-		for(i = 0; i < size; i++) {
-			Vector3 pt;
-			if(intersectionLineAABox(pt,points->points[i],ld,sceneAABox) ) {
-				append2VecPoint(points,pt);
-			}
-		}
-	}
-}
-
-void calcFocusedLightVolumePoints(struct VecPoint* points, const Matrix4x4 invEyeProjView,
-								  const Vector3 lightDir,const struct AABox sceneAABox) {
-	Vector3x8 pts;
-	struct Object obj = OBJECT_NULL;
-
-	calcViewFrustumWorldCoord(pts,invEyeProjView);
-	calcViewFrustObject(&obj, pts);
-	clipObjectByAABox(&obj,sceneAABox);
-	includeObjectLightVolume(points,obj,lightDir,sceneAABox);
-	emptyObject(&obj);
-}
-
-void calcViewFrustumPlanes(struct VecPlane* planes, const Matrix4x4 eyeProjView) {
-	if(0 != planes) {
-		int i;
-		
-		planesSetSize(planes, 6);
-	
-		//---- extract the plane equations
-		for (i = 0; i < 4; i++)	{
-			setPlaneCoeff(eyeProjView[i * 4 + 3] - eyeProjView[i * 4 + 0], planes->plane + 0, i);   // right plane
-			setPlaneCoeff(eyeProjView[i * 4 + 3] + eyeProjView[i * 4 + 0], planes->plane + 1, i);	// left plane
-			setPlaneCoeff(eyeProjView[i * 4 + 3] + eyeProjView[i * 4 + 1], planes->plane + 2, i);	// bottom plane
-			setPlaneCoeff(eyeProjView[i * 4 + 3] - eyeProjView[i * 4 + 1], planes->plane + 3, i);	// top plane
-			setPlaneCoeff(eyeProjView[i * 4 + 3] - eyeProjView[i * 4 + 2], planes->plane + 4, i);	// far plane
-			setPlaneCoeff(eyeProjView[i * 4 + 3] + eyeProjView[i * 4 + 2], planes->plane + 5, i);	// near plane
-		}
-
-		//---- normalize the coefficients
-		for (i = 0; i < 6; i++)	{
-			float invLength = 1;
-			float length = (float)sqrt(squaredLength(planes->plane[i].n));
-
-			if(length) invLength	= 1.0f / length;
-
-			planes->plane[i].n[0] *= invLength;
-			planes->plane[i].n[1] *= invLength;
-			planes->plane[i].n[2] *= invLength;
-			
-			planes->plane[i].d *= invLength;
-		}
-	}
-}
-
-int calcAABNearestVertexIdx(Vector3 clipPlaneNormal) {
-	int	index;
-
-	//     7+------+6
-	//     /|     /|
-	//    / |    / |
-	//   / 4+---/--+5
-	// 3+------+2 /    y   z
-	//  | /    | /     |  /
-	//  |/     |/      |/
-	// 0+------+1      *---x
-	if (clipPlaneNormal[0] <= 0.0f) {
-		index	= (clipPlaneNormal[1] <= 0.0f) ? 0 : 3;
-	}
-	else {
-		index	= (clipPlaneNormal[1] <= 0.0f) ? 1 : 2;
-	}
-
-	return (clipPlaneNormal[2] <= 0.0f) ? index : 4 + index;
-}
-
-int calcAABFarthestVertexIdx(Vector3 clipPlaneNormal) {
-	int index;
-
-	if (clipPlaneNormal[0] > 0.0f) {
-		index	= (clipPlaneNormal[1] > 0.0f) ? 0 : 3;
-	}
-	else {
-		index	= (clipPlaneNormal[1] > 0.0f) ? 1 : 2;
-	}
-
-	return (clipPlaneNormal[2] > 0.0f) ? index : 4 + index;
-}
-
-void calcAABNPVertexIndices(int *vertexIndices, const struct VecPlane planes) {
-	int i;
-	for (i = 0; i < 6; i++)	
-	{
-		vertexIndices[i * 2 + 0] = calcAABNearestVertexIdx(planes.plane[i].n);	// n-vertex
-		vertexIndices[i * 2 + 1] = calcAABFarthestVertexIdx(planes.plane[i].n); // p-vertex
-	}
-}
-
-void combineAABoxes(struct AABox *a, const struct AABox b) {
-	appendToCubicHull(a->min, a->max, b.min);
-	appendToCubicHull(a->min, a->max, b.max);
-}
-
-double calcAABoxVolume(const struct AABox aab)
-{
-	return (aab.max[0] - aab.min[0]) * 
-		   (aab.max[1] - aab.min[1]) * 
-		   (aab.max[2] - aab.min[2]);
-}
-
-
-void calcAABoxCenter(Vector3 vec, const struct AABox aab)
-{
-	diffVector3(vec, aab.max, aab.min);
-	vec[0] *= 0.5f; vec[1] *= 0.5f; vec[2] *= 0.5f;
-	
-	addVector3(vec, aab.min, vec);
-}
-
-
-double calcAABoxSurface(const struct AABox aab)
-{
-	return 2 * (aab.max[0] - aab.min[0]) * (aab.max[1] - aab.min[1]) +
-		   2 * (aab.max[0] - aab.min[0]) * (aab.max[2] - aab.min[2]) +
-		   2 * (aab.max[1] - aab.min[1]) * (aab.max[2] - aab.min[2]);
-}
-
-void clipAABoxByAABox(struct AABox *aab, const struct AABox enclosed)
-{
-	int i;
-	for(i=0; i < 3; i++)
-	{
-		if(aab->min[i] < enclosed.min[i])
-			aab->min[i] = enclosed.min[i];
-		if(aab->max[i] > enclosed.max[i])
-			aab->max[i] = enclosed.max[i];
-	}
-}
-
-
-void rotateVectorZ(Vector3 v, double rad)
-{
-	Vector3 temp;
-
-	temp[0] = v[0]*cos(rad) - v[1]*sin(rad);
-	temp[1] = v[0]*sin(rad) + v[1]*cos(rad);
-	temp[2] = v[2];
-
-	copyVector3(v, temp);
-}
-
-
-void rotateVectorX(Vector3 v, double rad)
-{
-	Vector3 temp;
-	
-	temp[0] = v[0];
-	temp[1] = v[1]*cos(rad) - v[2]*sin(rad);
-	temp[2] = v[1]*sin(rad) + v[2]*cos(rad);
-	
-	copyVector3(v, temp);
-}
-
-
-void rotateVectorY(Vector3 v, double rad)
-{
-	Vector3 temp;
-
-	temp[0] = v[2]*sin(rad) + v[0]*cos(rad);
-	temp[1] = v[1]; 
-	temp[2] = v[2]*cos(rad) - v[0]*sin(rad);
-
-	copyVector3(v, temp);
-}
-
-
-
-void rotateVector(Vector3 result, const Vector3 input, const float rad, const Vector3 axis)
-{
-	// using quaternions (vector and scalar part)
-	float s = (float)cos(rad * 0.5);
-	float h = (float)sin(rad * 0.5);
-	float p_v_dot;
-
-	Vector3 hvec = {axis[0] * h, axis[1]* h, axis[2] * h};
-	Vector3 hvec2;
-	Vector3 hvec3;
-
-	cross(hvec2, hvec, input);
-	cross(hvec3, hvec, hvec2);
-
-	p_v_dot = (float)dot(input, hvec);
-
-	result[0] = s * s * input[0] + hvec[0] * p_v_dot + 
-					 2.0f * s * hvec2[0] + hvec3[0];
-
-	result[1] = s * s * input[1] + hvec[1] * p_v_dot + 
-					 2.0f * s *hvec2[1] + hvec3[1];
-
-	result[2] = s * s * input[2] + hvec[2] * p_v_dot + 
-					 2.0f * s *hvec2[2] + hvec3[2];
-
-}
-
-
-void vectorNormal(Vector3 result, const Vector3 vec)
-{
-	result[0] = 0.0f;
-	result[1] = 0.0f;
-	result[2] = 0.0f;
-
-	// to avoid 0-vector: look if at least one component is not 0)
-	if((vec[0] != 0.0f) || (vec[1] != 0.0f))
-	{
-		result[0] = -vec[1];
-		result[1] = vec[0];
-	}	
-	else
-	{
-		result[0] = -vec[2];
-		result[1] = vec[0];
-	}
-}
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/OpenGL/DataTypes.h
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/OpenGL/DataTypes.h	(revision 629)
+++ 	(revision )
@@ -1,86 +1,0 @@
-//Copyright and Disclaimer:
-//This code is copyright Vienna University of Technology, 2004.
-
-#ifndef DATATYPES_H
-#define DATATYPES_H
-
-typedef double Vector3[3];
-
-typedef Vector3 Vector3x8[8];
-
-//Plane defined through normal vector n and distance to origin d
-struct Plane {
-	Vector3 n;
-	double d;
-};
-
-//a dynamic array of planes
-struct VecPlane {
-	struct Plane* plane;
-	int size;
-};
-
-//a dynamic array 3d points
-struct VecPoint {
-	Vector3* points;
-	int size;
-};
-
-//a dynamic array of point list each point list is a polygon
-struct Object {
-	struct VecPoint* poly;
-	int size;
-};
-
-//Axis-Aligned Bounding Box defined through the two extreme points
-struct AABox {
-	Vector3 min;
-	Vector3 max;
-};
-
-//4x4 matrix
-typedef double Matrix4x4[16];
-
-//initialisation objects (because we have no constructors)
-extern const struct Object OBJECT_NULL;
-extern const struct VecPoint VECPOINT_NULL;
-extern const struct VecPlane VECPLANE_NULL;
-
-//copy the 3 values of the input vector into the output vector
-extern void copyVector3(Vector3, const Vector3);
-//copy the 3 values of the input vector into the output vector
-extern void copyVector3Values(Vector3, const double, const double, const double);
-//copy the 3 values of the substraction of the two input vectors into the output vector
-extern void diffVector3(Vector3, const Vector3, const Vector3);
-//copy the 3 values of the addition of the two input vectors into the output vector
-extern void addVector3(Vector3 result, const Vector3, const Vector3);
-
-//copy the 16 values of the input matrix into the output matrix
-extern void copyMatrix(Matrix4x4, const Matrix4x4);
-
-extern void vecPointSetSize(struct VecPoint*, const int);
-extern void emptyVecPoint(struct VecPoint*);
-extern void swapVecPoint(struct VecPoint*, struct VecPoint*);
-extern void copyVecPoint(struct VecPoint*, const struct VecPoint);
-extern void append2VecPoint(struct VecPoint*, const Vector3);
-
-extern void emptyVecPlane(struct VecPlane*);
-
-extern void objectSetSize(struct Object*, const int);
-extern void emptyObject(struct Object*);
-extern void copyObject(struct Object*, const struct Object);
-//makes 1 VecPoint out of all the VecPoints of an object
-extern void convObject2VecPoint(struct VecPoint* points, const struct Object);
-
-//calculates the 8 corner points of the given AABox
-extern void calcAABoxPoints(Vector3x8 points, const struct AABox b);
-//calculates the 6 planes of the given AABox
-extern void calcAABoxPlanes(struct VecPlane*, const struct AABox);
-// allocates size planes and sets size variable
-extern void planesSetSize(struct VecPlane* p, const int size);
-// access plane per index
-extern double getPlaneCoeff(struct Plane* plane, int i);
-// set plane coefficienr per index
-extern void setPlaneCoeff(double coeff, struct Plane* plane, int i);
-
-#endif // DATATYPES
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/OpenGL/Timers.cpp
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/OpenGL/Timers.cpp	(revision 629)
+++ 	(revision )
@@ -1,141 +1,0 @@
-#include <time.h>
-
-
-#ifdef HRTIME
-#include <hrtime.h>
-#endif
-
-#ifdef _WIN32
-
-#include <windows.h>
-#include <sys/types.h>
-#include <sys/timeb.h>
-#include <time.h>
-#include <resource.h>
-
-#else
-
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/times.h>
-#include <sys/time.h>
-#include <sys/resource.h>
-
-#endif
-
-
-#include "Timers.h"
-
-/*real time or user time*/
-
-#define REAL_TIME 
-
-
-// global file streams
-/*ofstream debugs("debug.log");*/
-
-static int hasHRTimer = 0;
-
-#ifdef  _MSC_VER
-static LARGE_INTEGER hrFreq;
-#endif
-
-
-#ifdef HRTIME
-struct hrtime_struct *hrTimer = NULL;
-#endif
-
-void initTiming()
-{
-#ifdef  _MSC_VER
-     hasHRTimer = QueryPerformanceFrequency(&hrFreq);
-#else
-#ifdef HRTIME
-     if (hrtime_is_present()) 
-     {
-	  hrtime_init();
-	  hasHRTimer = (0 == get_hrtime_struct(0, &hrTimer));
-	  debugs<<"Using UNIX hires timer"<<endl;
-     } else 
-     {
-	  debugs<<"No UNIX hires timer"<<endl;
-     }
-#endif
-#endif
-}
-
-void finishTiming()
-{
-#ifdef HRTIME
-     if (hasHRTimer == 1)
-	  free_hrtime_struct(hrTimer);
-#endif
-  
-}
-
-
-long
-getTime()
-{
-#ifndef  _MSC_VER
-
-#ifdef REAL_TIME
-
-  static struct timeval _tstart;
-  static struct timezone tz;
-
-  gettimeofday(&_tstart,&tz);
-  return (long)(1000000*_tstart.tv_sec + _tstart.tv_usec);
-
-#else
-  
-  if (hasHRTimer == 0) {
-
-    static struct rusage r;
-    getrusage(RUSAGE_SELF,&r);
-    return r.ru_utime.tv_usec+1000000*r.ru_utime.tv_sec;
-  } else {
-#ifdef HRTIME
-    hrtime_t dest;
-    get_hrutime(hrTimer, &dest);
-    return (long) (dest/500.0);
-#else
-    return 0;
-#endif
-  }
-#endif
-  
-#else
-  
-  if (hasHRTimer == 1) {
-    LARGE_INTEGER counter;
-    QueryPerformanceCounter(&counter);
-    // return in usec
-    return (long) (1000000*counter.QuadPart/(hrFreq.QuadPart));
-  } else {
-    static struct _timeb mtime;
-    _ftime(&mtime);
-    
-    return 1000*(1000*mtime.time + mtime.millitm);
-  }
-#endif
-}
-
-
-// return time diff. in ms
-double
-timeDiff(long time1,long time2) // in ms
-{
-  const double clk=1.0E-3; // ticks per second
-  long t=time2-time1;
-  
-  return ((t<0)?-t:t)*clk;
-}
-
-char
-*timeString()
-{
-  time_t t;
-  time(&t);
-  return ctime(&t);
-}
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/OpenGL/MathStuff.h
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/OpenGL/MathStuff.h	(revision 629)
+++ 	(revision )
@@ -1,134 +1,0 @@
-//Copyright and Disclaimer:
-//This code is copyright Vienna University of Technology, 2004.
-
-/*
-a few simple mathematical routines; not the most efficient ones, but easy to understand.
-*/
-
-#ifndef MathStuffH
-#define MathStuffH
-
-#include "DataTypes.h"
-
-//PI
-extern const double PI;
-//PI/2
-extern const double PI_2;
-//PI/180
-extern const double PI_180;
-
-//vector = (0,0,0)
-extern const Vector3 ZERO;
-//vector = (1,0,0)
-extern const Vector3 UNIT_X;
-//vector = (0,1,0)
-extern const Vector3 UNIT_Y;
-//vector = (0,0,1)
-extern const Vector3 UNIT_Z;
-
-//[1,0,0,0]
-//[0,1,0,0]
-//[0,0,1,0]
-//[0,0,0,1]
-extern const Matrix4x4 IDENTITY;
-
-//absolut value of double
-extern double absDouble(const double);
-//signum of double
-extern double signDouble(const double);
-//clamp value in between min and max borders
-extern void clamp(double* value, const double min, const double max);
-//result = pos+t*dir
-extern void linCombVector3(Vector3 result, const Vector3 pos, const Vector3 dir, const double t);
-extern double dot(const Vector3, const Vector3);
-extern void cross(Vector3, const Vector3, const Vector3);
-extern void normalize(Vector3);
-extern double squaredLength(const Vector3);
-
-//[x,0,0,0]
-//[0,y,0,0]
-//[0,0,z,0]
-//[0,0,0,1]
-extern void makeScaleMtx(Matrix4x4 output, const double x, const double y, const double z);
-//rotation around x axis
-extern void makeRotationXMtx(Matrix4x4 output, const double rad);
-//rotation around y axis
-extern void makeRotationYMtx(Matrix4x4 output, const double rad);
-//rotation around z axis
-extern void makeRotationZMtx(Matrix4x4 output, const double rad);
-//translation
-extern void makeTranslationMtx(Matrix4x4 output, Vector3 translation);
-
-//output = a*b (matrix product)
-extern void mult(Matrix4x4 output, const Matrix4x4 a, const Matrix4x4 b);
-//output = i^(-1)
-extern void invert(Matrix4x4 output, const Matrix4x4 i);
-//output = look from position:pos into direction:dir with up-vector:up
-extern void look(Matrix4x4 output, const Vector3 pos, const Vector3 dir, const Vector3 up);
-//make a scaleTranslate matrix that includes the two values vMin and vMax
-extern void scaleTranslateToFit(Matrix4x4 output, const Vector3 vMin, const Vector3 vMax);
-//output is initialized with the same result as glPerspective vFovy in degrees
-extern void perspectiveDeg(Matrix4x4 output, const double vFovy, const double vAspect,
-	const double vNearDis, const double vFarDis);
-
-//calc matrix-vector product; input has assumed homogenous component w = 1
-//before the output is  written homogen division is performed (w = 1)
-extern void mulHomogenPoint(Vector3 output, const Matrix4x4 m, const Vector3 v);
-//min and max are the two extreme points of an AABB containing all the points
-extern void calcCubicHull(Vector3 min, Vector3 max, const Vector3* ps, const int size);
-//calculates the world coordinates of the view frustum corner points
-//input matrix is the (eyeProj*eyeView)^(-1) matrix
-extern void calcViewFrustumWorldCoord(Vector3x8, const Matrix4x4);
-// mulHomogenPoint each point of VecPoint
-extern void transformVecPoint(struct VecPoint* , const Matrix4x4);
-// transformVecPoint each VecPoint of Object
-extern void transformObject(struct Object*, const Matrix4x4);
-//min and max are the two extreme points of an AABB containing all the points of the object
-extern void calcObjectCubicHull(Vector3 min, Vector3 max, const struct Object);
-
-//calculates the six polygons defining an view frustum
-extern void calcViewFrustObject(struct Object*, const Vector3x8);
-//the given object is clipped by the given AABox; the object is assumed closed
-//and is closed after the clipping
-extern void clipObjectByAABox(struct Object*, const struct AABox);
-//extrudes the object into -lightDir and clippes by the AABox the defining points are returned
-extern void includeObjectLightVolume(struct VecPoint* points, const struct Object,
-	const Vector3 lightDir, const struct AABox sceneAABox);
-//calculates the ViewFrustum Object	clippes this Object By the sceneAABox and
-//extrudes the object into -lightDir and clippes by the AABox the defining points are returned
-extern void calcFocusedLightVolumePoints(struct VecPoint* points,const Matrix4x4 invEyeProjView,
-	const Vector3 lightDir,const struct AABox sceneAABox);
-// calculates the index of the nearest vertex in the AAB vertex set
-// obtainened by calcAABoxPoints according to the normal vector of a clip plane
-extern int calcAABNearestVertexIdx(Vector3 clipPlaneNormal);
-// calculates the index of the farthest vertex in the AAB vertex set
-// obtainened by calcAABoxPoints according to the normal vector of a clip plane
-extern int calcAABFarthestVertexIdx(Vector3 clipPlaneNormal);
-
-extern double pointPlaneDistance(const struct Plane A, const Vector3 p);
-
-extern int pointBeforePlane(const struct Plane A, const Vector3 p);
-// calculates the view frustum planes of the frustum defined by the eyeProjView matrix
-extern void calcViewFrustumPlanes(struct VecPlane* planes, const Matrix4x4 eyeProjView);
-// calculates the np-indices of an aab for a set of 6 clipping planes
-// the indices are stored in the form (n0, p0, n1, p1, ..., n11, p11) in the array vertexIdx 
-extern void calcAABNPVertexIndices(int *vertexIndices, const struct VecPlane planes);
-// combines two AABs, stores result in a
-extern void combineAABoxes(struct AABox *a, const struct AABox b);
-// calculates volume of this aab
-extern double calcAABoxVolume(const struct AABox aab);
-// calculates surface of this aab
-double calcAABoxSurface(const struct AABox aab);
-// clips box aab by box enclosed
-extern void clipAABoxByAABox(struct AABox *aab, const struct AABox enclosed);
-// computes world position center of an aab
-extern void calcAABoxCenter(Vector3 vec, const struct AABox aab);
-
-extern void rotateVectorX(Vector3 v, double rad);
-extern void rotateVectorY(Vector3 v, double rad);
-extern void rotateVectorZ(Vector3 v, double rad);
-// rotates vector around axis(must be unit vector)
-extern void rotateVector(Vector3 result, const Vector3 input, const float rad, const Vector3 axis);
-// generates normal vector of a vector
-extern void vectorNormal(Vector3 result, const Vector3 vec);
-#endif
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/OpenGL/Timers.h
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/OpenGL/Timers.h	(revision 629)
+++ 	(revision )
@@ -1,54 +1,0 @@
-// ================================================================
-// $Id: Timers.h,v, 1.1.1.1 2004/10/12 12:49:13 matt Exp $
-// ****************************************************************
-// 
-/** \file time.h
-
-Various time measuring routines
-
-@author Jiri Bittner
-*/
-
-#ifndef __TIMERS_H
-#define __TIMERS_H
-
-void initTiming();
-
-void finishTiming();
-
-long getTime();
-
-double timeDiff(long t1,long t2);
-
-char * timeString();
-
-
-/** Example of usage:
-see timers.h for diffirent possibilities of what is really measured..
-
-
-InitTiming();
-
-long t1, t2, t3;
-
-t1 = GetTime();
-
-Algortihm1();
-
-t2 = GetTime();
-
-Algorithm2();
-
-t3 = GetTime();
-
-
-cout<<"Algorithm 1"<<TimeDiff(t1, t2)<<"[ms]"<<endl;
-cout<<"Algorithm 2"<<TimeDiff(t2, t3)<<"[ms]"<<endl;
-
-
-FinishTiming();
-
-*/
-
-
-#endif
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/OpenGL/RenderTraverser.cpp
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/OpenGL/RenderTraverser.cpp	(revision 629)
+++ 	(revision )
@@ -1,473 +1,0 @@
-#include "RenderTraverser.h"
-#include "glInterface.h"
-#include "Timers.h"
-
-extern "C"
-{
-	#include "MathStuff.h"
-}
-
-
-RenderTraverser::RenderTraverser(): mFrameID(1), mVisibilityThreshold(0),
-mHierarchyRoot(NULL), mOcclusionQueries(NULL), mCurrentTestIdx(0), mIsQueryMode(false),
-mNumTraversedNodes(0), mNumQueryCulledNodes(0), mNumFrustumCulledNodes(0),
-mRenderTime(0), mNumRenderedGeometry(0), mUseOptimization(true)
-{
-}
-
-RenderTraverser::~RenderTraverser()
-{
-	if(mOcclusionQueries) 
-		delete [] mOcclusionQueries;
-}
-
-void RenderTraverser::Render(int mode)
-{
-	mDistanceQueue.push(mHierarchyRoot);
-
-	long startTime = getTime();
-
-	Preprocess();
-
-	switch(mode)
-	{
-		case RENDER_CULL_FRUSTUM:
-			RenderCullFrustum();
-            break;
-		case RENDER_STOP_AND_WAIT:
-			RenderStopAndWait();
-			break;
-		case RENDER_COHERENT:
-			RenderCoherentWithQueue();
-			break;
-		default:
-			RenderCullFrustum();
-			break;
-	}
-
-	mFrameID ++;
-	ResetQueries();
-
-	long endTime = getTime();
-	mRenderTime = endTime - startTime;
-
-	finishTiming();
-}
-
-/**
-	This is the standard render traversal algorithm doing only frustum culling
-*/
-void RenderTraverser::RenderCullFrustum()
-{
-	while(!mDistanceQueue.empty())
-	{
-		HierarchyNode *node = mDistanceQueue.top();
-		mDistanceQueue.pop();
-	
-		// interesting for the visualization, so rest and set
-		node->SetVisible(false);
-		mNumTraversedNodes ++;
-
-		bool intersects;
-	
-		if(InsideViewFrustum(node, intersects))
-		{
-			// update node's visited flag => needed for rendering
-			// so set it also here
-			node->SetLastVisited(mFrameID);
-			node->SetVisible(true);
-			TraverseNode(node);
-		}
-		else
-		{
-			mNumFrustumCulledNodes ++;
-		}
-	}
-}
-
-void RenderTraverser::RenderStopAndWait()
-{
-	while(! mDistanceQueue.empty())
-	{
-		HierarchyNode *node = mDistanceQueue.top();
-		mDistanceQueue.pop();
-		mNumTraversedNodes ++;
-		// interesting for the visualization, so rest and set
-		node->SetVisible(false);
-
-		bool intersects;
-		
-		if(InsideViewFrustum(node, intersects))
-		{
-			// update node's visited flag
-			node->SetLastVisited(mFrameID);
-
-			// for near plane intersecting abbs possible 
-			// wrong results => skip occlusion query
-			if(intersects)
-			{
-				node->SetVisible(true);
-				TraverseNode(node);
-			}
-			else
-			{
-				IssueOcclusionQuery(node, false);
-				
-				// wait if result not available
-				int visiblePixels = GetOcclusionQueryResult(node);
-				
-				// node visible
-				if(visiblePixels > mVisibilityThreshold)
-				{
-					node->SetVisible(true);
-					TraverseNode(node);
-				}
-				else
-				{
-					mNumQueryCulledNodes ++;
-				}
-			}					
-		}
-		else
-		{
-			mNumFrustumCulledNodes ++;
-		}
-	}
-}
-
-void RenderTraverser::RenderCoherentWithQueue()
-{
-	QueryQueue queryQueue;
-
-	//-- PART 1: process finished occlusion queries
-	while(!mDistanceQueue.empty() || !queryQueue.empty())
-	{
-		while(!queryQueue.empty() && 
-			  (ResultAvailable(queryQueue.front()) || mDistanceQueue.empty()))
-		{
-			HierarchyNode *node = queryQueue.front();
-			queryQueue.pop();
-			
-			// wait until result available
-			int visiblePixels = GetOcclusionQueryResult(node);
-
-			if(visiblePixels > mVisibilityThreshold)
-			{
-				PullUpVisibility(node);
-				TraverseNode(node);
-			}
-			else
-			{
-				mNumQueryCulledNodes ++;
-			}
-		}	
-
-		//-- PART 2: hierarchical traversal
-		if(! mDistanceQueue.empty())
-		{
-			HierarchyNode *node = mDistanceQueue.top();
-
-			mDistanceQueue.pop();
-	
-			mNumTraversedNodes ++;
-
-			bool intersects;
-			
-			if(InsideViewFrustum(node, intersects))
-			{
-				// for near plane intersecting bounding box possible 
-				// wrong results => skip occlusion query
-				if(intersects)
-				{
-					// update node's visited flag
-					node->SetLastVisited(mFrameID);
-					node->SetVisible(true);
-					PullUpVisibility(node);
-					TraverseNode(node);
-				}
-				else
-				{		
-					// identify previously visible nodes
-					bool wasVisible = node->Visible() && (node->LastVisited() == mFrameID - 1);
-					
-					// identify nodes that we cannot skip queries for
-					bool leafOrWasInvisible = (node->LastVisited() != mFrameID) && (!wasVisible || node->IsLeaf());
-
-					// reset node's visibility classification 
-					node->SetVisible(false);
-
-					// update node's visited flag
-					node->SetLastVisited(mFrameID);
-					
-					// skip testing previously visible interior nodes
-					if(leafOrWasInvisible)
-					{
-						IssueOcclusionQuery(node, wasVisible);
-						queryQueue.push(node);
-					}
-					
-					// always traverse a node if it was visible
-					if(wasVisible)
-						TraverseNode(node);
-				}
-			}
-			else
-			{
-				// for stats
-				mNumFrustumCulledNodes ++;
-			}
-		}
-	}
-}
-	
-void RenderTraverser::TraverseNode(HierarchyNode *node)
-{
-	if(node->IsLeaf())
-		mNumRenderedGeometry += node->Render();
-	else 
-	{
-		// for non leafs this renders only the bounding volume (if the flag is set)
-		//node->Render();
-		mDistanceQueue.push(node->GetLeftChild());
-		mDistanceQueue.push(node->GetRightChild());
-	}
-}
-
-void RenderTraverser::RenderVisualization()
-{
-	mDistanceQueue.push(mHierarchyRoot);
-
-	while(!	mDistanceQueue.empty())
-	{
-		HierarchyNode *node = mDistanceQueue.top();
-		mDistanceQueue.pop();
-
-		// identify previously visible nodes
-		bool wasVisible = node->Visible() && (node->LastVisited() == mFrameID - 1);
-
-		if(wasVisible)
-			TraverseNode(node);
-		else
-		{
-			// also render culled nodes
-			glColor3f(1.0,0.0,0.0);
-			node->RenderBoundingVolumeForVisualization();		
-		}
-	}
-}
-
-
-void RenderTraverser::PullUpVisibility(HierarchyNode *node)
-{
-	while(node && !node->Visible())
-	{
-		node->SetVisible(true);
-		node = node->GetParent();
-	}
-}
-
-bool RenderTraverser::ResultAvailable(HierarchyNode *node)
-{
-	int result;
-
-	glGetQueryivARB(node->GetOcclusionQuery(),
-					GL_QUERY_RESULT_AVAILABLE_ARB, &result);
-
-	return (result == GL_TRUE);
-}
-
-void RenderTraverser::SetHierarchy(HierarchyNode *sceneRoot)
-{
-	mHierarchyRoot = sceneRoot;
-
-	// not valid anymore for new hierarchy => delete
-	delete [] mOcclusionQueries;
-	mOcclusionQueries = NULL;
-}
-
-HierarchyNode *RenderTraverser::GetHierarchy()
-{
-	return mHierarchyRoot;
-}
-
-int RenderTraverser::GetOcclusionQueryResult(HierarchyNode *node)
-{
-	unsigned int result;
-	
-	glGetQueryObjectuivARB(node->GetOcclusionQuery(), GL_QUERY_RESULT_ARB, &result);
-
-	return (int)result;
-}
-
-
-void RenderTraverser::Switch2GLQueryState()
-{	
-	// boolean used to avoid unnecessary state changes
-	if(!mIsQueryMode)
-	{
-		glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
-		glDepthMask(GL_FALSE);
-		glDisable(GL_LIGHTING);
-		mIsQueryMode = true;
-	}
-}
-
-
-void RenderTraverser::Switch2GLRenderState()
-{
-	// boolean used to avoid unnecessary state changes
-	if(mIsQueryMode)
-	{
-		// switch back to rendermode		
-		glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
-		glDepthMask(GL_TRUE);
-		glEnable(GL_LIGHTING);
-		mIsQueryMode = false;
-	}
-}
-
-void RenderTraverser::IssueOcclusionQuery(HierarchyNode *node, const bool wasVisible)
-{
-	// get next available test id
-	unsigned int occlusionQuery = mOcclusionQueries[mCurrentTestIdx++];
-	
-	node->SetOcclusionQuery(occlusionQuery);
-	// do the actual occlusion query for this node
-	glBeginQueryARB(GL_SAMPLES_PASSED_ARB, occlusionQuery);
-	
-	// if leaf and was visible => will be rendered anyway, thus we
-	// can also test with the real geometry 
-	if(node->IsLeaf() && wasVisible && mUseOptimization)
-	{
-		mNumRenderedGeometry += node->Render();
-	}
-	else
-	{
-		// change state so the bounding box gets not actually rendered on the screen
-		Switch2GLQueryState();
-		node->RenderBoundingVolume();
-		Switch2GLRenderState();
-	}
-
-	glEndQueryARB(GL_SAMPLES_PASSED_ARB);
-}
-
-void RenderTraverser::Preprocess()
-{
-	if(!mOcclusionQueries)
-	{
-		mOcclusionQueries = new unsigned int[mHierarchyRoot->GetNumHierarchyNodes()];
-	}
-
-	// view frustum planes for view frustum culling
-	calcViewFrustumPlanes(&mClipPlanes, mProjViewMatrix);
-	calcAABNPVertexIndices(mNPVertexIndices, mClipPlanes);
-	// generate ids for occlusion test
-	glGenQueriesARB(mHierarchyRoot->GetNumHierarchyNodes(), mOcclusionQueries);
-	mCurrentTestIdx = 0;
-
-	// reset statistics
-	mNumTraversedNodes = 0;
-	mNumQueryCulledNodes = 0;
-	mNumFrustumCulledNodes = 0;
-	mNumRenderedGeometry = 0;
-}
-
-
-void RenderTraverser::ResetQueries()
-{
-	// tell the driver that the occlusion queries won't be needed any more
-	glDeleteQueriesARB(mHierarchyRoot->GetNumHierarchyNodes(), mOcclusionQueries);
-}
-
-
-void RenderTraverser::SetViewpoint(Vector3 const &viewpoint)
-{
-	copyVector3(mViewpoint, viewpoint);
-}
-	
-
-void RenderTraverser::SetProjViewMatrix(Matrix4x4 const &projViewMatrix)
-{
-	copyMatrix(mProjViewMatrix, projViewMatrix);
-}
-
-
-bool RenderTraverser::InsideViewFrustum(HierarchyNode *node, bool &intersects)
-{
-	Vector3x8 vertices;
-	
-	bool intersect = false;
-
-	calcAABoxPoints(vertices, node->GetBoundingVolume());
-
-	// simply test all 6 vertices
-	for (int i = 0; i < 6; i++)
-	{		
-		// test the n-vertex
-		// note: the calcAABNearestVertexId should be preprocessed
-		if(!pointBeforePlane(mClipPlanes.plane[i], vertices[mNPVertexIndices[i * 2]]))
-		{
-			// outside
-			return false;
-		}
-	}
-
-	// test if bounding box is intersected by nearplane (using the p-vertex)
-	intersects = (!pointBeforePlane(mClipPlanes.plane[5], vertices[mNPVertexIndices[11]]));
-
-	// -- get vector from viewpoint to center of bounding volume
-	Vector3 vec;
-	calcAABoxCenter(vec, node->GetBoundingVolume());
-	diffVector3(vec, vec, mViewpoint);
-
-	// compute distance from nearest point to viewpoint
-	diffVector3(vec, vertices[calcAABNearestVertexIdx(vec)], mViewpoint);
-	node->SetDistance(squaredLength(vec));
-	
-	return true;
-}
-
-
-void RenderTraverser::SetVisibilityThreshold(int threshold)
-{
-	mVisibilityThreshold = threshold;
-}
-
-long RenderTraverser::GetRenderTime()
-{
-	return mRenderTime;
-}
-
-int RenderTraverser::GetNumTraversedNodes()
-{
-	return mNumTraversedNodes;
-}
-
-int RenderTraverser::GetNumQueryCulledNodes()
-{
-	return mNumQueryCulledNodes;
-}
-
-int RenderTraverser::GetNumFrustumCulledNodes()
-{
-	return mNumFrustumCulledNodes;
-}
-
-
-int RenderTraverser::GetNumRenderedGeometry()
-{
-	return mNumRenderedGeometry;
-}
-
-
-int RenderTraverser::GetVisibilityThreshold()
-{
-	return mVisibilityThreshold;
-}
-
-void RenderTraverser::SetUseOptimization(bool useOptimization)
-{
-	mUseOptimization = useOptimization;
-	printf("using opt %d\n", mUseOptimization);
-}
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/OpenGL/RenderTraverser.h
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/OpenGL/RenderTraverser.h	(revision 629)
+++ 	(revision )
@@ -1,123 +1,0 @@
-#ifndef NO_PRAGMA_ONCE
-#pragma once
-#endif
-
-#ifndef RENDERTRAVERSER_H
-#define RENDERTRAVERSER_H
-
-#include "glInterface.h"
-#include "HierarchyNode.h"
-#include <queue>
-//#include <priority_queue>
-#include <stack>
-
-using namespace std;
-
-typedef stack<HierarchyNode *> TraversalStack;
-typedef queue<HierarchyNode *> QueryQueue;
-typedef priority_queue<HierarchyNode *, vector<HierarchyNode *>, myless<vector<HierarchyNode *>::value_type> > PriorityQueue;
-
-class RenderTraverser
-{
-public:
-	enum {RENDER_CULL_FRUSTUM, RENDER_STOP_AND_WAIT, RENDER_COHERENT, NUM_RENDERMODES};
-
-	RenderTraverser();
-	//! Renders the scene with the specified method
-	/**
-		The mode is one of
-		RENDER_CULL_FRUSTUM: renders the scene with view frustum culling only
-		RENDER_STOP_AND_WAIT: renders the scene with the hierarchical stop and wait algorithm
-		RENDER_COHERENT: renders the scene with the coherent hierarchical algorithm
-	*/
-	void Render(int mode=RENDER_CULL_FRUSTUM);
-	//! sets the scene hierarchy.
-	void SetHierarchy(HierarchyNode *sceneRoot);
-	//! sets viewpoint
-	void SetViewpoint(Vector3 const &viewpoint);
-	//! sets view projection matrix
-	void SetProjViewMatrix(Matrix4x4 const &projViewMatrix);
-	//! returns root of hierarchy
-	HierarchyNode *GetHierarchy();
-	//! sets visible pixels threshold for visibility classification
-	void SetVisibilityThreshold(int threshold);
-	//! returns visibility threshold
-	int GetVisibilityThreshold();
-
-	// several statistics for a rendering pass
-	long GetRenderTime();
-	int GetNumTraversedNodes();
-	int GetNumQueryCulledNodes();
-	int GetNumFrustumCulledNodes();
-	int GetNumRenderedGeometry();
-
-	//! renders a visualization of the hierarchy
-	void RenderVisualization();
-
-	//! use optimization to take leaf nodes instead of bounding box for occlusion queries	
-	void SetUseOptimization(bool useOptimization);
-
-protected:
-
-	//! renders the scene with view frustum culling only
-	void RenderCullFrustum();
-	//! renders the scene with the hierarchical stop and wait algorithm
-	void RenderStopAndWait();
-	//! renders the scene with the coherent hierarchical algorithm and the query queye
-	void RenderCoherentWithQueue();
-	//! does some importand initialisations
-	void Preprocess();
-	
-	//! returns occlusion query result for specified node
-	int GetOcclusionQueryResult(HierarchyNode *node);
-	//! the node is traversed as usual
-	void TraverseNode(HierarchyNode *node);
-	//! visibility is pulled up from visibility of children 
-	void PullUpVisibility(HierarchyNode *node);
-	//! is result available from query queue?
-	bool ResultAvailable(HierarchyNode *node);
-	//! issues occlusion query for specified node
-	void IssueOcclusionQuery(HierarchyNode *node, bool wasVisible);
-	//! resets occlusion queries after a traversal
-	void ResetQueries();
-	//! does view frustum culling. returns intersect (if intersects view plane)
-	bool InsideViewFrustum(HierarchyNode *node, bool &intersects);
-	//! switches to normal render mode
-	void Switch2GLRenderState();
-	//! switches to occlusion query mode (geometry not rendered on the screen)
-	void Switch2GLQueryState();
-
-protected:
-
-	// the current clip planes of the view frustum
-	VecPlane mClipPlanes;
-	// the indices of the np-vertices of the bounding box for view frustum culling
-	int mNPVertexIndices[12];
-
-	Vector3 mViewpoint;
-	Matrix4x4 mProjViewMatrix;
-	HierarchyNode *mHierarchyRoot;
-	//TraversalStack mTraversalStack;
-	PriorityQueue mDistanceQueue; // use a priority queue rather than a renderstack
-	
-	//priority_queue<vector<HierarchyNode *>, HierarchyNode *> mPriorityQueue;
-	int mFrameID;
-	int mVisibilityThreshold;
-	unsigned int *mOcclusionQueries;
-	int mCurrentTestIdx;
-	bool mIsQueryMode;
-	
-	bool mIntersects;
-
-	// statistics
-	int mNumTraversedNodes;
-	int mNumQueryCulledNodes;
-	int mNumFrustumCulledNodes;
-	int mNumRenderedGeometry;
-
-	long mRenderTime;
-
-	bool mUseOptimization;
-};
-
-#endif // RENDERTRAVERSER_H
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/OpenGL/HierarchyNode.cpp
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/OpenGL/HierarchyNode.cpp	(revision 629)
+++ 	(revision )
@@ -1,464 +1,0 @@
-#include "HierarchyNode.h"
-#include "glInterface.h"
-#include <math.h>
-#include <limits.h>
-#include <float.h>
-
-typedef vector<Geometry *> GeometryList;
-
-// criteria and values partly taken from Piringer's thesis
-
-// values used as termination criteria for the tree generation
-// the overall surface
-float HierarchyNode::sSurfaceThreshold;
-// the maximum tree depth
-int HierarchyNode::sMaxDepth;
-// maximum number of objects in a node
-int HierarchyNode::sGeometryThreshold;
-
-// percentage of allowed deviation from the center split plane
-float HierarchyNode::sSplitBandwith;
-
-// also render bounding volume
-bool HierarchyNode::sRenderBoundingVolume = false;
-
-HierarchyNode::HierarchyNode(): mVisible(false), mLastVisited(0), 
-mParent(NULL), mOcclusionQuery(0), mAABValid(false), mLeftChild(NULL), mRightChild(NULL),
-mNumHierarchyNodes(1), mSplitAxis(X_AXIS), mLastRendered(-1), mSplitValue(0),
-mDepth(0), mEnclosedSpaceValid(false), mDistance(0)
-{
-	copyVector3Values(mBoundingBox.min, 0, 0, 0);
-	copyVector3Values(mBoundingBox.max, 0, 0, 0);
-
-	copyVector3Values(mEnclosedSpace.min, 0, 0, 0);
-	copyVector3Values(mEnclosedSpace.max, 0, 0, 0);
-
-	// bounding box color
-	mBoxColor[0] = mBoxColor[2] = 0; mBoxColor[1] = 1.0;
-}
-
-HierarchyNode::HierarchyNode(const Vector3 boundLower, const Vector3 boundUpper, 
-							 HierarchyNode *parent, int depth)
-:mNumHierarchyNodes(1), mOcclusionQuery(0), mLeftChild(NULL), 
-mRightChild(NULL), mSplitAxis(X_AXIS), mVisible(false), 
-mLastVisited(0), mParent(parent), mAABValid(false), 
-mLastRendered(-1), mSplitValue(0), mDepth(depth), 
-mEnclosedSpaceValid(true), mDistance(0)
-{
-	copyVector3Values(mBoundingBox.min, 0, 0, 0);
-	copyVector3Values(mBoundingBox.max, 0, 0, 0);
-
-	copyVector3(mEnclosedSpace.min, boundLower);
-	copyVector3(mEnclosedSpace.max, boundUpper);
-
-	float vol = calcAABoxSurface(mEnclosedSpace);
-
-	mBoxColor[0] = mBoxColor[2] = 0; mBoxColor[1] = 1.0;
-}
-
-
-void HierarchyNode::InitKdTree(HierarchyNode *root)
-{
-	sMaxDepth = (int)((log((float) root->GetGeometry().size())/log(2.0f)) * 20.0f);
-
-	sSurfaceThreshold = FLT_MAX;
-
-	// factor times mininal surface as determination criterium
-	const float factor = 2.5;
-
-	for (GeometryList::const_iterator it = root->GetGeometry().begin(); it != root->GetGeometry().end(); it++)
-	{
-		// same geometry can possible be in to or more nodes => also test for them
-		float surface = calcAABoxSurface((*it)->GetBoundingVolume()) * factor;
-
-		if(surface < sSurfaceThreshold) sSurfaceThreshold = surface;
-	}
-
-	// number of objects in a leaf
-	sGeometryThreshold = 1;
-
-	// percentage of allowed deviation from the center split plane
-	sSplitBandwith = 0.15;
-}
-
-
-HierarchyNode::~HierarchyNode()
-{
-	if(mLeftChild)
-		delete mLeftChild;
-
-	if(mRightChild)
-		delete mRightChild;
-}
-
-int HierarchyNode::Render()
-{
-	int renderedGeometry = 0;
-
-	if(sRenderBoundingVolume)
-	{
-		glColor3fv(mBoxColor);
-        RenderBoundingVolumeForVisualization();
-	}
-
-	// prevent the geometry to be rendered several times in the same frame
-	if(mLastRendered != mLastVisited)
-	{
-		for (GeometryList::const_iterator it = mGeometry.begin(); it != mGeometry.end(); it++)
-		{
-			// same geometry can possible be in to or more nodes => also test for them
-			if((*it)->GetLastVisited() != mLastVisited)
-			{
-				(*it)->SetLastVisited(mLastVisited);
-				(*it)->Render();
-				renderedGeometry ++;
-			}
-		}
-		mLastRendered = mLastVisited;
-	}
-
-	return renderedGeometry;
-}
-
-bool HierarchyNode::Visible()
-{
-	return mVisible;
-}
-
-void HierarchyNode::SetVisible(bool visible)
-{
-	mVisible = visible;
-}
-
-void HierarchyNode::SetLeftChild(HierarchyNode *child)
-{
-	mLeftChild = child;
-}
-
-void HierarchyNode::SetRightChild(HierarchyNode *child)
-{
-	mRightChild = child;
-}
-
-HierarchyNode *HierarchyNode::GetLeftChild()
-{
-	return mLeftChild;
-}
-
-HierarchyNode *HierarchyNode::GetRightChild()
-{
-	return mRightChild;
-}
-
-unsigned int HierarchyNode::LastVisited()
-{
-	return mLastVisited;
-}
-
-void HierarchyNode::SetLastVisited(unsigned int lastVisited)
-{
-	mLastVisited = lastVisited;
-}
-
-bool HierarchyNode::IsLeaf()
-{
-	return (!mLeftChild && !mRightChild);
-}
-
-void HierarchyNode::AddGeometry(Geometry *geometry)
-{
-	mGeometry.push_back(geometry);
-		
-	if(!mAABValid)
-	{
-		copyVector3(mBoundingBox.min, geometry->GetBoundingVolume().min);
-		copyVector3(mBoundingBox.max, geometry->GetBoundingVolume().max);
-
-		mAABValid = true;
-	}
-	else
-		combineAABoxes(&mBoundingBox, geometry->GetBoundingVolume());
-
-	// root node
-	if(mDepth == 0)
-	{
-		if(!mEnclosedSpaceValid)
-		{
-			copyVector3(mEnclosedSpace.min, geometry->GetBoundingVolume().min);
-			copyVector3(mEnclosedSpace.max, geometry->GetBoundingVolume().max);
-
-			mEnclosedSpaceValid = true;
-		}
-		else 
-			combineAABoxes(&mEnclosedSpace, geometry->GetBoundingVolume());	
-	}
-	else
-	{
-		// cut boxes so they fit into the enclosed space
-		clipAABoxByAABox(&mBoundingBox, mEnclosedSpace);
-	}
-}
-
-HierarchyNode *HierarchyNode::GetParent()
-{
-	return mParent;
-}
-
-int HierarchyNode::GetOcclusionQuery()
-{
-	return mOcclusionQuery;
-}
-
-void HierarchyNode::SetOcclusionQuery(int occlusionQuery)
-{
-	mOcclusionQuery = occlusionQuery;
-}
-
-void HierarchyNode::RenderBoundingVolume()
-{
-	Vector3x8 vertices;
-
-	calcAABoxPoints(vertices, mBoundingBox);
-
-	//glPolygonMode(GL_FRONT, GL_LINE);
-	//     7+------+6
-	//     /|     /|
-	//    / |    / |
-	//   / 4+---/--+5
-	// 3+------+2 /    y   z
-	//  | /    | /     |  /
-	//  |/     |/      |/
-	// 0+------+1      *---x
-
-	//---- render AABB
-	glBegin(GL_TRIANGLE_FAN);
-		glVertex3dv(vertices[6]);
-		glVertex3dv(vertices[5]);
-		glVertex3dv(vertices[4]);
-		glVertex3dv(vertices[7]);
-		glVertex3dv(vertices[3]);
-		glVertex3dv(vertices[2]);
-		glVertex3dv(vertices[1]);
-		glVertex3dv(vertices[5]);
-	glEnd();
-
-	//---- render second half of AABB
-	glBegin(GL_TRIANGLE_FAN);
-		glVertex3dv(vertices[0]);
-		glVertex3dv(vertices[1]);
-		glVertex3dv(vertices[2]);
-		glVertex3dv(vertices[3]);
-		glVertex3dv(vertices[7]);
-		glVertex3dv(vertices[4]);
-		glVertex3dv(vertices[5]);
-		glVertex3dv(vertices[1]);
-	glEnd();
-}
-
-
-void HierarchyNode::RenderBoundingVolumeForVisualization()
-{
-	glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
-	glDisable(GL_LIGHTING);
-	glDisable(GL_CULL_FACE);
-		
-	RenderBoundingVolume();
-
-	glEnable(GL_CULL_FACE);
-	glEnable(GL_LIGHTING);
-	glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
-}
-
-
-
-const AABox &HierarchyNode::GetBoundingVolume()
-{
-	return mBoundingBox;
-}
-
-int	HierarchyNode::GenerateKdTree()
-{
-	// check the termination criterium (a heuristic)
-	if (SimpleEnough()) 
-	{
-		return 1;
-	}
-
-	// largest dimension will be split
-	Vector3 size;
-	diffVector3(size, mBoundingBox.max, mBoundingBox.min);
-    
-	if (size[X_AXIS] > size[Y_AXIS])	
-		mSplitAxis	= (size[X_AXIS] > size[Z_AXIS]) ? X_AXIS : Z_AXIS;
-	else					
-		mSplitAxis	= (size[Y_AXIS] > size[Z_AXIS]) ? Y_AXIS : Z_AXIS;
-
-	// select the value of the split plane
-	mSplitValue = ComputeSplitPlane();
-	
-	// generate the children
-	Vector3 changedLower;
-	Vector3 changedUpper;
-
-	copyVector3(changedLower, mEnclosedSpace.min);
-	copyVector3(changedUpper, mEnclosedSpace.max);
-	   	
-	changedLower[mSplitAxis] = mSplitValue;
-	changedUpper[mSplitAxis] = mSplitValue;
-
-	mLeftChild	= new HierarchyNode(mEnclosedSpace.min, changedUpper, this, mDepth + 1);
-	mRightChild	= new HierarchyNode(changedLower, mEnclosedSpace.max, this, mDepth + 1);
-
-	// add the geometry to the according children
-	for (GeometryList::iterator it = mGeometry.begin(); it != mGeometry.end(); it++)
-	{
-		if ((*it)->GetBoundingVolume().min[mSplitAxis] >= mSplitValue)
-		{
-			// box lies completely within right part
-			mRightChild->AddGeometry(*it);
-		}
-		else if ((*it)->GetBoundingVolume().max[mSplitAxis] <= mSplitValue)
-		{
-			// box lies completely within left part
-			mLeftChild->AddGeometry((*it));
-		}
-		else
-		{
-			//---- box intersects both parts
-			mLeftChild->AddGeometry((*it));
-			mRightChild->AddGeometry((*it));
-		}
-	}
-
-	//---- we continue with the children
-	int leftSize  = mLeftChild->GenerateKdTree();
-	int rightSize = mRightChild->GenerateKdTree();
-
-	// since the geometry is now referenced by the children
-	mGeometry.clear();
-	
-	mNumHierarchyNodes = leftSize + rightSize + 1;
-
-	return mNumHierarchyNodes;
-}
-
-bool HierarchyNode::SimpleEnough()
-{
-	return ((mGeometry.size() <= (unsigned int)sGeometryThreshold) ||
-		    (calcAABoxSurface(mBoundingBox) <= sSurfaceThreshold) ||
-			(sMaxDepth <= mDepth));
-}
-
-float HierarchyNode::ComputeSplitPlane()
-{
-	float left	= mBoundingBox.min[mSplitAxis];
-	float right	= mBoundingBox.max[mSplitAxis];
-
-	// the smaller the value returned from the heuristic, the better => big starting value
-	float bestValue	= FLT_MAX; 
-	float result = 0.0f;
-
-	bool found	= false;
-
-	// calculate the borders of the band
-	float currLeft, currRight;
-	currLeft = currRight = (left + right) / 2.0f;
-	
-	currLeft  -= (right - left) * sSplitBandwith;
-	currRight += (right - left) * sSplitBandwith;
-
-	// check all geometry within that node
-	for (GeometryList::const_iterator it = mGeometry.begin(); it != mGeometry.end(); it++)
-	{
-		// one border of the geometry's AABB
-		float leftPlane	 = (*it)->GetBoundingVolume().min[mSplitAxis];
-		// the other border of the geometry's AABB
-		float rightPlane = (*it)->GetBoundingVolume().max[mSplitAxis];
-		
-		// only consider planes that lie within the band
-		if ((leftPlane > currLeft) && (leftPlane < currRight))
-		{
-			// compute the heuristic for the left plane and note the value if it was good
-			float currValue	= ComputeHeuristics(leftPlane);
-
-			if (currValue < bestValue)
-			{
-				bestValue = currValue;
-				result	  = leftPlane;
-				found	  = true;
-			}
-		}
-
-		if ((rightPlane > currLeft) && (rightPlane < currRight))
-		{
-			// compute the heuristic for the right plane and note the value if it was good
-			float currValue = ComputeHeuristics(rightPlane);
-
-			if (currValue < bestValue)
-			{
-				bestValue	= currValue;
-				result		= rightPlane;
-				found		= true;
-			}
-		}
-	}
-
-	// in case we haven't found any proper plane, we simply take the center
-	if (!found)	
-		result = (left + right) / 2.0f;
-			
-	return result;
-}
-
-float HierarchyNode::ComputeHeuristics(float pos)
-{
-	// this implements a very simple heuristic: it simply counts the nodes being intersected by the splitplane
-	float result = 0.0f;
-
-	for (GeometryList::const_iterator it = mGeometry.begin(); it != mGeometry.end(); it++)
-	{
-		if (((*it)->GetBoundingVolume().min[mSplitAxis] < pos) &&
-			((*it)->GetBoundingVolume().max[mSplitAxis] > pos))
-		{
-			result += 1.0f;
-		}
-	}
-
-	return result;
-}
-
-int HierarchyNode::GetNumHierarchyNodes()
-{
-	return mNumHierarchyNodes;
-}
-
-void HierarchyNode::PushChildrenOrdered(const Vector3 viewpoint, TraversalStack &traversalStack)
-{
-	if(viewpoint[mSplitAxis] > mSplitValue)
-	{
-		traversalStack.push(mLeftChild);
-		traversalStack.push(mRightChild);
-	}
-	else
-	{
-		traversalStack.push(mRightChild);
-		traversalStack.push(mLeftChild);
-	}
-}
-
-
-void HierarchyNode::SetRenderBoundingVolume(bool renderBoundingVolume)
-{
-	sRenderBoundingVolume = renderBoundingVolume;
-}
-
-
-GeometryList &HierarchyNode::GetGeometry()
-{
-	return mGeometry;
-}
-
-void HierarchyNode::SetDistance(float distance)
-{
-	mDistance = distance;
-}
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/OpenGL/glInterface.h
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/OpenGL/glInterface.h	(revision 629)
+++ 	(revision )
@@ -1,25 +1,0 @@
-//Copyright and Disclaimer:
-//This code is copyright Vienna University of Technology, 2004.
-
-#ifndef NO_PRAGMA_ONCE
-#pragma once
-#endif
-
-#ifndef GLINTERFACE_H
-#define GLINTERFACE_H
-
-//includes an openGL extension header file
-//http://glew.sourceforge.net/
-#include "GL/glew.h"
-//includes the glut header file
-#include "GL/glut.h"
-
-//includes  windows specific stuff
-#ifdef _WIN32
-	#include "GL/wglew.h"
-#else
-//include linux specific stuff
-	#include "GL/glxew.h"
-#endif	
-
-#endif // GLINTERFACE_H
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/OpenGL/HierarchyNode.h
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/OpenGL/HierarchyNode.h	(revision 629)
+++ 	(revision )
@@ -1,168 +1,0 @@
-#ifndef NO_PRAGMA_ONCE
-#pragma once
-#endif
-
-#ifndef HIERARCHYNODE_H
-#define HIERARCHYNODE_H
-
-#include "Geometry.h"
-extern "C"
-{
-	#include "DataTypes.h"
-}
-#include <vector>
-#include <stack>
-
-using namespace std;
-
-class HierarchyNode;
-
-/**
-	This class implements the compare operator for the priority queue.
-	a lower distance has a higher value in the queue
-*/
-template <typename T> class myless
-{
-public:
-	
-	//bool operator() (HierarchyNode *v1, HierarchyNode *v2) const
-	bool operator() (T v1, T v2) const
-    {
-		return (v1->mDistance > v2->mDistance);
-    }
-};
-
-/** This class represents a node in a k-d tree hierarchy. A
-	node has two children. The node can be either an interior node (i.e., left and right child
-	NULL) or a leaf node, which holds the actual geometry.
-*/
-
-class HierarchyNode
-{
-	friend class myless;
-
-public:
-	typedef stack<HierarchyNode *> TraversalStack;
-    typedef vector<Geometry *> GeometryList;
-
-	HierarchyNode();
-	HierarchyNode(const Vector3 boundLower, const Vector3 boundUpper, 
-				 HierarchyNode *parent, int depth);
-	~HierarchyNode();
-	//! was this node visible the last time it was visited?
-	bool Visible();
-	//! last time this node was visited (in framenumber)
-	unsigned int LastVisited();
-	//! sets visible flag
-	void SetVisible(bool visible);
-	//! sets timestamp (current framenumber)
-	void SetLastVisited(unsigned int lastVisited);
-	//! is this node a leaf node (i.e., geometry)
-	bool IsLeaf();
-	//! renders the geometry in this node. returns number of rendered geometry
-	int Render();
-	//! returns occlusion query id
-	int GetOcclusionQuery();
-	//! sets occlusion query id
-	void SetOcclusionQuery(int occlusionQuery);
-	//! renders the bounding volume  (i.e., a axis aligned bounding box) of the node
-	void RenderBoundingVolume();
-	//! adds geometry to this node (rendered if this node is a leaf)
-	void AddGeometry(Geometry *geometry);
-
-	void SetLeftChild(HierarchyNode *child);
-	void SetRightChild(HierarchyNode *child);
-
-	HierarchyNode *GetParent();
-    HierarchyNode *GetLeftChild();
-	HierarchyNode *GetRightChild();
-
-	//! compute bounding volume (i.e., a axis aligned bounding box) for this geometry.
-	//void CalcBoundingVolume();
-	const AABox& GetBoundingVolume();
-	
-	//! generates the kd-tree from this root-node, returns number of nodes in hierarchy.
-	int	GenerateKdTree();
-
-	//! returns number of nodes in hierarchy with this node.
-	int GetNumHierarchyNodes();
-
-	//! add children of this node ordered to a traversal stack with respect to the view point
-	void PushChildrenOrdered(const Vector3 viewpoint, TraversalStack &traversalStack);
-
-	//! if this node was culled, set the type of culling (frustum, query)
-	void SetCulledType(int culledtype);
-	//! returns type of culling
-	int GetCulledType();
-	//! set gl state to visible render bounding volume
-	void RenderBoundingVolumeForVisualization();
-	//! returns geometry list
-	GeometryList &GetGeometry();
-
-	//! visibly renders also bounding volume of this node
-	static void SetRenderBoundingVolume(bool renderBoundingVolume);
-	
-	/**
-		initialises the static termination criteria.
-		shall be called after all geometry has been added to the root node.
-	*/
-	static void InitKdTree(HierarchyNode *root);
-
-	float GetSquaredDistance();
-	void SetDistance(float distance);
-
-	float mDistance;
-
-protected:
-	
-	enum {X_AXIS, Y_AXIS, Z_AXIS};
-
-	//! criteria to stop the splitting of this kd-tree node
-	bool SimpleEnough();
-	//! split plane of the kd-tree (according to mSplitAxis, it is the x, y, or z axis)
-	float ComputeSplitPlane();
-
-	/** calculates a value that expresses if it's reasonable to split the 
-	   node at the specified position (the smaller the value the better the split)
-	   */
-	float ComputeHeuristics(float pos);
-
-	GeometryList mGeometry;
-	//! id of this occlusion query of this node
-	int mOcclusionQuery;
-
-	HierarchyNode *mLeftChild;	
-	HierarchyNode *mRightChild;
-	HierarchyNode *mParent;
-	
-	bool  mVisible;
-	int mLastVisited;
-	bool mAABValid;
-	bool mEnclosedSpaceValid;
-	int mNumHierarchyNodes;
-	
-	AABox mBoundingBox;
-	// the enclosed space of the pure kd-treenode (without considering the geometry)
-	AABox mEnclosedSpace;
-	
-	int mSplitAxis;
-	int mLastRendered;
-	float mSplitValue;
-	int mDepth;
-
-	static bool sRenderBoundingVolume;
-	static float sSplitBandwith;
-
-	// --termination criteria
-
-	static int sGeometryThreshold;
-	// the maximum bounding box surface
-	static float HierarchyNode::sSurfaceThreshold;
-	// the maximum tree depth
-	static int HierarchyNode::sMaxDepth;
-	// the default bounding box drawing color
-	float mBoxColor[3];
-	// distance to the view point
-};
-
-#endif // HIERARCHYNODE_H
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/OpenGL/stdafx.cpp
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/OpenGL/stdafx.cpp	(revision 629)
+++ 	(revision )
@@ -1,8 +1,0 @@
-// stdafx.cpp : source file that includes just the standard includes
-// occquery.pch will be the pre-compiled header
-// stdafx.obj will contain the pre-compiled type information
-
-#include "stdafx.h"
-
-// TODO: reference any additional headers you need in STDAFX.H
-// and not in this file
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/OpenGL/Readme.txt
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/OpenGL/Readme.txt	(revision 629)
+++ 	(revision )
@@ -1,101 +1,0 @@
-HARDWARE OCCLUSION QUERIES MADE USEFUL
-======================================
-
-This programn is a demonstration of the Coherent Hierarchical Culling algorithm 
-described in the chapter "Hardware Occlusion Queries Made Useful" of the book GPU 
-Gems II. Additional information and sample images are available at
-
-http://www.cg.tuwien.ac.at/research/vr/chcull/
-
-Updates to this demo can can be found on the same webpage.
-
-Copyright and Disclaimer:
-
-This code is copyright Vienna University of Technology, 2004.
-
-
-Please feel FREE to COPY and USE the code to include it in your own work,
-provided you include this copyright notice.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-Author of this demo:
-
-Oliver Mattausch (matt@cg.tuwien.ac.at)
-
-Authors of the book chapter:
-
-Michael Wimmer (wimmer@cg.tuwien.ac.at)
-Jiri Bittner (bittner@cg.tuwien.ac.at)
-
-Date: December 18, 2004
-
-----------
-Input
-----------
-
-Help for keybord and mouse is available with F1.
-
-You can switch between the different occlusion modes described in the book chapter using the 
-SPACE key (view-frustum culling, hierarchical stop and wait, coherent hierarchical culling).
-
-A visualization of the culling algorithm from can be shown by pressing '1' on the keyboard. Note that the 
-classification of nodes usually changes in consecutive frames, so that the hierarchy seems to oscillate. 
-This is expected, since the classification of previously visible interior nodes is based on the classification 
-of their children, which might be more accurate (leading to the interior node to become occluded) than the 
-query for the node itself.
-
-----------
-The scene
-----------
-
-The scene used in this program consists of basic objects randomly placed in a box. The extent of the box and the 
-number and size of objects can be changed (see F1).
-
-The hierarchical structure is a kd-tree with objects intersecting a split plane placed into multiple leaf nodes.
-
-By playing with the parameters and moving around, the user can explore situtations where occlusion culling is extremly 
-useful, and where it is not (because the objects are too sparse or there is too much to see from this viewpoint).
-
-The hierarchical coherent culling algorithm is compared to simple view-frustum culling and the hierarchical stop and wait 
-algorithm (which also uses hardware occlusion queries, but in a less sophisticated way).
-
-----------
-Installation
-----------
-
-A binary for Win32 is included.
-
-The program should compile under Windows and Linux, a CMAKE makefile for multi-platform
-compilation is included (see www.cmake.org for details).
-
-For Linux, you need to have a working GLUT and GLEW installation.
-
-----------
-Structure
-----------
-
-This demo is written in C++ and partly C and uses OpenGL.
-It has few external needs like limits.h, stdlib.h, math.h, string.h, stdio.h, or time.h.
-We also make heavy use of stl classes, like priority_queue.
-
-The program expects the GL_ARB_occlusion_query extension.
-
-The program and especially the mathematical routines are not designed for speed or
-efficiency, but for simplicity and clarity.
-
-RenderTraverser.cpp: implements the core algorithm described in the paper
-
-occquery.cpp: contains the OpenGl setup code, glut stuff, and sets up of the scene hierarchy
-HierarchyNode.cpp: contains a kd-tree hierarchy implementation, which can be traversed by the culling algorithm
-Geometry.cpp: represents simple drawable geometry, so that we have something to cull for the algorithm
-
-Timers.cpp: contains exact timer functions in order to accurately measure the frame render time
-stdafx.cpp: source file that includes just the standard includes
-glInterface.h: includes gl, glut and glew headers
-DataTypes.c: defines basic geometric datatypes
-MathStuff.c: declares some handy mathematical routines
-teapot.h: contains the teapot geometry
-
-If you find any problem with the code or have any comments, we would like to hear from you!
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/OpenGL/occquery.cpp
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/OpenGL/occquery.cpp	(revision 629)
+++ 	(revision )
@@ -1,828 +1,0 @@
-// occquery.cpp : Defines the entry point for the console application.
-//
-
-#include "stdafx.h"
-
-extern "C"
-{
-	#include "MathStuff.h"
-	#include "DataTypes.h"
-}
-
-#include "glInterface.h"
-#include "RenderTraverser.h"
-#include <math.h>
-#include <time.h>
-
-double nearDist = 0.1; // eye near plane distance
-int winWidth, winHeight;
-int objectType = Geometry::TEAPOT;
-int nextObjectType = objectType;
-
-float visZoomFactor = 1.5f;
-
-bool showHelp = false;
-bool showStatistics = true;
-bool showBoundingVolumes = false;
-bool visMode = false;
-bool showCreateParams = false;
-
-// traverses and renders the hierarchy
-RenderTraverser traverser;
-
-Vector3 eyePos = {0.0, 0.0, 3.0};  // eye position 
-Vector3 viewDir = {0.0, 0.0, -1.0};  // eye view dir 
-Vector3 lightDir = {0.0, 0.0, 1.0};  // light dir 
-
-Matrix4x4 eyeView; // eye view matrix
-Matrix4x4 eyeProjection; // eye projection matrix
-Matrix4x4 eyeProjView; //= eyeProjection*eyeView
-Matrix4x4 invEyeProjView; //= eyeProjView^(-1)
-Matrix4x4 visView; // visualisation view matrix
-
-//mouse navigation state
-int xEyeBegin, yEyeBegin, yMotionBegin, verticalMotionBegin, horizontalMotionBegin = 0;
-int renderMode = RenderTraverser::RENDER_COHERENT;
-
-// relative size of an object
-float objectSize = 3.5f;
-
-int numObjects = 2000;
-int numNextObjects = numObjects;
-float zLength = 30.0f;
-
-// this defines the volume where objects can be drawn
-Vector3 minTranslation = {-2.5f, -2.5f, -3.0f};
-Vector3 maxTranslation = {2.5f, 2.5f, -3.0 - zLength};
-
-const float minAngle = 0;
-const float maxAngle = 360;
-
-const int renderTimeSize = 100;
-long renderTimes[renderTimeSize];
-int renderTimesIdx = 0;
-int renderTimesValid = 0;
-
-typedef vector<Geometry *> GeometryList;
-GeometryList geometry;
-
-bool useOptimization = true;
-
-Vector3 amb[2];
-Vector3 dif[2];
-Vector3 spec[2];
-
-void begin2D(void);
-void end2D(void);
-void output(const int x, const int y, const char *string);
-void initGLstate(void);
-void keyboard(const unsigned char c, const int x, const int y);
-void drawHelpMessage(void);
-void drawStatistics(void);
-void display(void);
-void special(const int c, const int x, const int y);
-void reshape(const int w, const int h);
-void mouse(int button, int state, int x, int y);
-void initExtensions(void);
-void leftMotion(int x, int y);
-//void rightMotion(int x, int y);
-void middleMotion(int x, int y);
-void drawEyeView(void);
-void setupEyeView(void);
-void setupVisView(void);
-void updateEyeMtx(void);
-long calcRenderTime(void);
-void resetTimer(void);
-void cleanUp(void);
-void calcDecimalPoint(string &str, int d);
-
-HierarchyNode* generateHierarchy(int numObjects);
-Geometry *generateGeometry(Vector3 translateRatio, float xRotRatio, 
-						   float yRotRatio, float zRotRatio, int materialIdx);
-void displayVisualization();
-
-void deleteGeometry();
-
-
-int _tmain(int argc, _TCHAR* argv[])
-{
-	glutInitWindowSize(800,600);
-	glutInit(&argc,argv);
-	glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH);
-	
-	glutCreateWindow("Coherent Hierarchical Culling");
-
-	glutDisplayFunc(display);
-	glutKeyboardFunc(keyboard);
-	glutSpecialFunc(special);
-	glutReshapeFunc(reshape);
-	glutMouseFunc(mouse);
-	glutIdleFunc(display);
-	initExtensions();
-	initGLstate();
-
-	leftMotion(0,0);
-	middleMotion(0,0);
-	
-	HierarchyNode *hierarchy = generateHierarchy(numObjects);
-	traverser.SetHierarchy(hierarchy);
-
-	/// initialise rendertime array
-	for(int i=0; i<renderTimeSize; i++)
-		renderTimes[i] = 0;
-
-	glutMainLoop();
-
-	// clean up
-	cleanUp();
-	
-	return 0;
-}
-
-
-void initGLstate(void) 
-{
-	glClearColor(0.6, 0.6, 0.8, 1.0);
-	
-	glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
-	glPixelStorei(GL_PACK_ALIGNMENT,1); 
-	
-	glDepthRange(0.0, 1.0);
-	glClearDepth(1.0);
-	glDepthFunc(GL_LESS);
-
-	glEnable(GL_LIGHTING);
-	glEnable(GL_LIGHT0);
-
-	glShadeModel(GL_SMOOTH);
-	
-	GLfloat ambient[] = { 0.0, 0.0, 0.0, 1.0 };
-	GLfloat diffuse[] = { 1.0, 1.0, 1.0, 1.0 };
-	GLfloat specular[] = { 1.0, 1.0, 1.0, 1.0 };
-	GLfloat position[] = { 0.0, 3.0, 3.0, 0.0 };
-    
-	GLfloat lmodel_ambient[] = { 0.2, 0.2, 0.2, 1.0 };
-	GLfloat local_view[] = { 0.0 };
-
-	glLightfv(GL_LIGHT0, GL_AMBIENT, ambient);
-	glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse);
-	glLightfv(GL_LIGHT0, GL_POSITION, position);
-	
-	glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient);
-	glLightModelfv(GL_LIGHT_MODEL_LOCAL_VIEWER, local_view);
-
-	glMaterialf(GL_FRONT, GL_SHININESS, 64);
-	glEnable(GL_NORMALIZE);
-			
-	glFrontFace(GL_CCW);
-	glCullFace(GL_BACK);
-	glEnable(GL_CULL_FACE);
-	
-	glClearColor(0.2, 0.2, 0.8, 0.0);
-
-	setupVisView();
-}
-
-
-void drawHelpMessage(void) 
-{
-	const char *message[] = 
-	{
-		"Help information",
-		"",
-		"'F1'           - shows/dismisses this message",
-		"'F2'           - decreases number of objects (valid after scene recreation)",
-		"'F3'           - increases number of objects (valid after scene recreation)",
-		"'F4'           - decreases box length in z direction (valid after scene recreation)",
-		"'F5'           - increases box length in z direction (valid after scene recreation)",
-		"'F6'           - decreases object size (valid after scene recreation)",
-		"'F7'           - increases object size (valid after scene recreation)",
-		"'F8'           - cycles through object types (teapot, ...) (valid after scene recreation)",
-		"",
-		"'MOUSE-LEFT'   - turn left/right, move forward/backward",
-		"'MOUSE-RIGHT'  - turn left/right, move forward/backward",
-		"'MOUSE-MIDDLE' - move up/down, left/right",
-		"'CURSOR UP'    - move forward",
-		"'CURSOR BACK'  - move backward",
-		"'CURSOR RIGHT' - turn right",
-		"'CURSOR LEFT'  - turn left",
-		"",
-		"'SPACE'        - cycles through occlusion culling algorithms",
-		"'-'            - decreases visibility threshold",
-		"'+'            - increases visibility threshold",
-		"'C'            - recreates the scene hierarchy",
-		"'G'            - enables/disables optimization to take geometry as occluder",
-		"",
-		"'R'            - shows/hides recreation parameters",
-		"'S'            - shows/hides statistics",
-		"'V'            - shows/hides bounding volumes",
-		"",
-		"'1'            - shows/hides visualization",
-		"'2'            - zooms out visualization",
-		"'3'            - zooms in visualization",
-		0,
-	};
-	
-	int i;
-	int x = 40, y = 42;
-	glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-	glEnable(GL_BLEND);
-	glColor4f(0.0,1.0,0.0,0.2);  // 20% green. 
-
-	// Drawn clockwise because the flipped Y axis flips CCW and CW. 
-	glRecti(winWidth - 30, 30, 30, winHeight - 30);
-	
-	glDisable(GL_BLEND);
-	
-
-	glColor3f(1.0,1.0,1.0);
-	for(i = 0; message[i] != 0; i++) {
-		if(message[i][0] == '\0') {
-			y += 7;
-		} else {
-			output(x,y,message[i]);
-			y += 14;
-		}
-	}
-
-}
-
-// generates a teapot, all parameters between zero and one
-Geometry *generateGeometry(Vector3 translationRatio, float xRotRatio, 
-						   float yRotRatio, float zRotRatio, int materialIdx)
-{
-	float xRot = minAngle + xRotRatio * (maxAngle - minAngle);
-	float yRot = minAngle + yRotRatio * (maxAngle - minAngle);
-	float zRot = minAngle + zRotRatio * (maxAngle - minAngle);
-
-	Vector3 translation;
-	translation[0] = minTranslation[0] + translationRatio[0] * (maxTranslation[0] - minTranslation[0]);
-	translation[1] = minTranslation[1] + translationRatio[1] * (maxTranslation[1] - minTranslation[1]);
-	translation[2] = minTranslation[2] + translationRatio[2] * (maxTranslation[2] - minTranslation[2]);
-
-	Geometry *result = new Geometry(translation, xRot, yRot, zRot, objectSize, objectType);
-
-	result->SetAmbientColor(amb[materialIdx][0], amb[materialIdx][1], amb[materialIdx][2]);
-	result->SetDiffuseColor(dif[materialIdx][0], dif[materialIdx][1], dif[materialIdx][2]);
-	result->SetSpecularColor(spec[materialIdx][0], spec[materialIdx][1], spec[materialIdx][2]);
-
-	return result;
-}
-
-// generates a the scene hierarchy with random values
-HierarchyNode* generateHierarchy(int numObjects)
-{
-    HierarchyNode *hierarchy = new HierarchyNode();
-
-	// initialise materials
-	copyVector3Values(amb[0], 0.0215, 0.1745, 0.0215);
-	copyVector3Values(dif[0], 0.727811, 0.633, 0.6);
-	copyVector3Values(spec[0], 0.633, 0.727811, 0.633);
-
-	copyVector3Values(amb[1], 0.1745, 0.01175, 0.01175);
-	copyVector3Values(dif[1], 0.61424, 0.04136, 0.04136);
-	copyVector3Values(spec[1], 0.727811, 0.626959, 0.626959);
-
-	srand (time (0));
-	
-	printf("generating geometry with random position and orientation ... ");
-
-	for(int i=0; i < numObjects; i++)
-	{
-		float xRotRatio = rand() / (float) RAND_MAX;
-		float yRotRatio = rand() / (float) RAND_MAX;
-		float zRotRatio = rand() / (float) RAND_MAX;
-
-		Vector3 translationRatio = {rand() / (float) RAND_MAX, 
-									rand() / (float) RAND_MAX, 
-									rand() / (float) RAND_MAX};
-
-		int materialIdx = int(2 * rand() / (float) RAND_MAX);
-			
-		Geometry *geo = generateGeometry(translationRatio, xRotRatio, 
-									     yRotRatio, zRotRatio, materialIdx);
-		hierarchy->AddGeometry(geo);
-
-		// put into global geometry list for later deletion
-		geometry.push_back(geo);
-	}
-
-	printf("finished\n");
-	printf("generating new kd-tree hierarchy ... ");
-	HierarchyNode::InitKdTree(hierarchy);
-	hierarchy->GenerateKdTree();
-	printf("finished\n");
-
-	return hierarchy;
-}
-
-
-void updateEyeMtx(void) 
-{
-	const Vector3 up = {0.0, 1.0, 0.0};
-
-	look(eyeView, eyePos, viewDir, up);
-	mult(eyeProjView, eyeProjection, eyeView); //eyeProjView = eyeProjection*eyeView
-	invert(invEyeProjView, eyeProjView); //invert matrix
-}
-
-
-void setupEyeView(void)
-{
-	glMatrixMode(GL_PROJECTION);
-	glLoadMatrixd(eyeProjection);
-
-	glMatrixMode(GL_MODELVIEW);
-	glLoadMatrixd(eyeView);
-}
-
-
-void display(void) 
-{
-	char * msg[] = {"Frustum culling only", "Hierarchical stop and wait",
-				    "Coherent hierarchical culling"};
-
-	char msg2[200];
-	char msg3[200];
-	char msg4[100];
-	char msg5[100];
-	char msg6[100];
-	char msg7[100];
-	char msg8[100];
-
-	sprintf(msg2, "Traversed: %4d, frustum culled: %4d, query culled: %4d (of %d nodes)",
-			traverser.GetNumTraversedNodes(), traverser.GetNumFrustumCulledNodes(),
-			traverser.GetNumQueryCulledNodes(), 
-			traverser.GetHierarchy()->GetNumHierarchyNodes());
-	
-	char *optstr[2] = {"", ", using optimization"};
-	
-	float fps = 1000.0;
-	long renderTime = calcRenderTime();
-	if(renderTime) fps = 1000000.0f / (float)calcRenderTime();
-
-	sprintf(msg3, "Threshold: %4d, algorithm rendering time: %ld ms (%3.3f fps)%s", 
-			traverser.GetVisibilityThreshold(), renderTime / 1000, fps, optstr[useOptimization]);
-
-	string str;
-	string str2;
-
-	calcDecimalPoint(str, Geometry::CountTriangles(objectType) * traverser.GetNumRenderedGeometry());
-	calcDecimalPoint(str2, Geometry::CountTriangles(objectType) * numObjects);
-
-	sprintf(msg4, "Rendered objects %d (of %d), rendered triangles: %s (of %s)", 
-			traverser.GetNumRenderedGeometry(), numObjects, str.c_str(), str2.c_str()); 
-
-	sprintf(msg5, "Next object num: %d", numNextObjects);
-	sprintf(msg6, "Next length in z dir: %3.3f", zLength);
-	
-	char *objectTypeStr[3] = {"teapot", "torus", "sphere"};
-
-	sprintf(msg7, "Next object type: %s", objectTypeStr[nextObjectType]);
-	sprintf(msg8, "Next object size: %3.3f", objectSize);
-
-	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
-	updateEyeMtx(); // bring eye modelview matrix up-to-date
-	setupEyeView();
-
-	traverser.SetViewpoint(eyePos);
-	traverser.SetProjViewMatrix(eyeProjView);
-	traverser.Render(renderMode);
-
-	// cycle through rendertime array
-	renderTimes[renderTimesIdx] = traverser.GetRenderTime();
-	renderTimesIdx = (renderTimesIdx + 1) % renderTimeSize;
-
-	if(renderTimesIdx  > renderTimesValid) 
-		renderTimesValid = renderTimesIdx;
-
-	if(visMode)
-	{
-		displayVisualization();
-	}
-	
-	begin2D();
-	if(showHelp)
-		drawHelpMessage();
-	else
-	{
-		glColor3f(1.0,1.0,1.0);
-		output(10,winHeight-10, msg[renderMode]);
-
-		if(showStatistics)
-		{
-			if(showCreateParams)
-			{
-				output(10, winHeight-150, msg8);
-				output(10, winHeight-130, msg7);
-				output(10, winHeight-110, msg6);
-				output(10, winHeight-90,  msg5);
-			}
-			output(10, winHeight-70, msg3);
-			output(10, winHeight-50, msg4);
-			output(10, winHeight-30, msg2);
-		}
-	}
-	end2D();
-
-	glutSwapBuffers();
-}
-
-
-#pragma warning( disable : 4100 )
-void keyboard(const unsigned char c, const int x, const int y) 
-{
-	int threshold;
-	HierarchyNode *hierarchy;
-
-	switch(c) 
-	{
-	case 27:
-		exit(0);
-		break;
-	case 32: //space
-		renderMode = (renderMode + 1) % RenderTraverser::NUM_RENDERMODES;
-		
-		resetTimer();
-		traverser.Render(renderMode);		// render once so stats are updated
-		break;
-	case 'h':
-	case 'H':
-		showHelp = !showHelp;
-		break;
-	case 'v':
-	case 'V':
-		showBoundingVolumes = !showBoundingVolumes;
-		HierarchyNode::SetRenderBoundingVolume(showBoundingVolumes);
-		break;
-	case 's':
-	case 'S':
-		showStatistics = !showStatistics;
-		break;
-	case '+':
-		threshold = traverser.GetVisibilityThreshold() + 10;
-		traverser.SetVisibilityThreshold(threshold);
-		break;
-	case '-':
-		threshold = traverser.GetVisibilityThreshold() - 10;
-		if(threshold < 0) threshold = 0;
-
-		traverser.SetVisibilityThreshold(threshold);		
-		break;
-	case '1':
-		visMode = !visMode;
-		break;
-	
-	case '2':
-		visZoomFactor += 0.1;	
-		setupVisView();
-		break;
-	case '3':
-		visZoomFactor -= 0.1;
-		if(visZoomFactor < 0.1) visZoomFactor = 0.1;
-	
-		setupVisView();
-		break;
-	case 'r':
-	case 'R':
-		showCreateParams = !showCreateParams;
-		break;
-	case 'g':
-	case 'G':
-		useOptimization = !useOptimization;
-		traverser.SetUseOptimization(useOptimization);
-		break;
-	case 'c':
-	case 'C':	
-		
-		hierarchy = traverser.GetHierarchy();
-		// delete old hierarchy
-		if(hierarchy) delete hierarchy; 
-		deleteGeometry();
-
-		maxTranslation[2] = -3.0 - zLength;
-		numObjects = numNextObjects;
-		objectType = nextObjectType;
-		
-		hierarchy = generateHierarchy(numObjects);
-		traverser.SetHierarchy(hierarchy);
-
-		showCreateParams = false;
-
-		traverser.Render(renderMode); // render once to update stats
-		resetTimer();
-		break;
-
-	default:
-		return;
-	}
-
-	glutPostRedisplay();
-}
-
-
-void special(const int c, const int x, const int y) 
-{
-	// used to avoid vertical motion with the keys
-	Vector3 hvec = {viewDir[0], 0, viewDir[2]};
-	
-	switch(c) 
-	{
-	case GLUT_KEY_F1:
-		showHelp = !showHelp;
-		break;
-	case GLUT_KEY_F2:
-		numNextObjects -= 100;
-		if(numNextObjects < 100) numNextObjects = 100;
-		break;
-	case GLUT_KEY_F3:
-        numNextObjects += 100;
-		break;
-	case GLUT_KEY_F4:
-		zLength -= 1;
-		if(zLength < 0) zLength = 0;
-		break;
-	case GLUT_KEY_F5:
-		zLength += 1;
-		break;		
-	case GLUT_KEY_F6:
-		objectSize -= 0.1;
-		if(objectSize < 0.1) objectSize = 0.1;
-		break;
-	case GLUT_KEY_F7:
-		objectSize += 0.1;
-		break;
-	case GLUT_KEY_F8:
-		nextObjectType = (nextObjectType + 1) % Geometry::NUM_OBJECTS;
-		break;
-	case GLUT_KEY_LEFT:
-		rotateVectorY(viewDir, 0.2);
-		break;
-	case GLUT_KEY_RIGHT:
-		rotateVectorY(viewDir, -0.2);
-		break;
-	case GLUT_KEY_UP:
-		linCombVector3(eyePos, eyePos, hvec, 0.6);
-		break;
-	case GLUT_KEY_DOWN:
-		linCombVector3(eyePos, eyePos, hvec, -0.6);
-		break;
-	default:
-		return;
-
-	}
-
-	glutPostRedisplay();
-}
-#pragma warning( default : 4100 )
-
-
-void reshape(const int w, const int h) 
-{
-	double winAspectRatio = 1.0;
-
-	glViewport(0, 0, w, h);
-	
-	winWidth = w;
-	winHeight = h;
-
-	if(w) winAspectRatio = (double) h / (double) w;
-
-	perspectiveDeg(eyeProjection, 60.0, 1.0/winAspectRatio, nearDist, 150.0);
-
-	glutPostRedisplay();
-}
-
-
-void mouse(int button, int state, int x, int y) 
-{
-	if(((button == GLUT_LEFT_BUTTON) || (button == GLUT_RIGHT_BUTTON)) && state == GLUT_DOWN) 
-	{
-		xEyeBegin = x;
-		yMotionBegin = y;
-
-		glutMotionFunc(leftMotion);
-	}
-	else if(button == GLUT_MIDDLE_BUTTON && state == GLUT_DOWN)
-	{
-		horizontalMotionBegin = x;
-		verticalMotionBegin = y;
-		glutMotionFunc(middleMotion);
-	}
-
-	glutPostRedisplay();
-}
-
-/**
-	rotation for left/right mouse drag
-	motion for up/down mouse drag
-*/
-void leftMotion(int x, int y) 
-{
-	static double eyeXAngle = 0.0;
-	// not move in the vertical direction
-	Vector3 horView = {viewDir[0], 0, viewDir[2]};
-	
-	eyeXAngle = 0.6 *  PI * (xEyeBegin - x) / 180.0;
-	linCombVector3(eyePos, eyePos, horView, (yMotionBegin - y) * 0.1);
-	
-	rotateVectorY(viewDir, eyeXAngle);
-	
-	xEyeBegin = x;
-	yMotionBegin = y;
-
-	glutPostRedisplay();
-}
-
-// strafe
-void middleMotion(int x, int y) 
-{
-	// the 90 degree rotated view vector 
-	// y zero so we don't move in the vertical
-	Vector3 rVec = {viewDir[0], 0, viewDir[2]};
-	
-	rotateVectorY(rVec, PI / 2.0);
-	linCombVector3(eyePos, eyePos, rVec, (horizontalMotionBegin - x) * 0.1);
-	
-	eyePos[1] += (verticalMotionBegin - y) * 0.1;
-
-	horizontalMotionBegin = x;
-	verticalMotionBegin = y;
-
-	glutPostRedisplay();
-}
-
-
-void initExtensions(void) 
-{
-	GLenum err = glewInit();
-	if(GLEW_OK != err) {
-		// problem: glewInit failed, something is seriously wrong
-		fprintf(stderr,"Error: %s\n",glewGetErrorString(err));
-		exit(1);
-	}
-
-	if(!GLEW_ARB_occlusion_query) {
-		printf("I require the GL_ARB_occlusion_query OpenGL extension to work.\n");
-		exit(1);
-	}
-}
-
-
-void begin2D(void) 
-{
-	glDisable(GL_LIGHTING);
-	glDisable(GL_DEPTH_TEST);
-
-	glPushMatrix();
-	glLoadIdentity();
-
-	glMatrixMode(GL_PROJECTION);
-	glPushMatrix();
-	glLoadIdentity();
-	gluOrtho2D(0, winWidth, winHeight, 0);
-}
-
-
-void end2D(void) 
-{
-	glPopMatrix();
-	glMatrixMode(GL_MODELVIEW);
-	glPopMatrix();
-
-	glEnable(GL_LIGHTING);
-	glEnable(GL_DEPTH_TEST);
-}
-
-
-void output(const int x, const int y, const char *string) 
-{
-	if(string != 0) 
-	{
-		int len, i;
-		glRasterPos2f(x,y);
-		len = (int) strlen(string);
-		
-		for (i = 0; i < len; i++) 
-		{
-			glutBitmapCharacter(GLUT_BITMAP_8_BY_13,string[i]);
-		}
-	}
-}
-
-// explicitly deletes geometry generated for hierarchy 
-// (deleting the hierarchy does not delete the geometry)
-void deleteGeometry()
-{
-	for (GeometryList::iterator it = geometry.begin(); it != geometry.end(); it++)
-		if(*it)	delete (*it);
-	
-	geometry.clear();
-}
-
-// displays the visualisation of the kd tree node culling
-void displayVisualization()
-{
-	begin2D();
-	glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-	glEnable(GL_BLEND);
-	glColor4f(0.0,0.0,0.0,0.5); 
-
-	glRecti(winWidth, 0, winWidth / 2, winHeight / 2);
-	glDisable(GL_BLEND);
-	end2D();
-
-	glViewport(winWidth / 2, winHeight / 2, winWidth, winHeight);
-	glPushMatrix();
-	glLoadMatrixd(visView);
-	
-	glClear(GL_DEPTH_BUFFER_BIT);
-
-	// --- visualization of the occlusion culling
-	HierarchyNode::SetRenderBoundingVolume(true);
-	traverser.RenderVisualization();
-	HierarchyNode::SetRenderBoundingVolume(showBoundingVolumes);
-
-	glPopMatrix();
-	glViewport(0, 0, winWidth, winHeight);
-}
-
-/**
-	sets up view matrix in order to get a good position 
-	for viewing the kd tree node culling
-*/
-void setupVisView()
-{
-	const Vector3 up = {0.0, 1.0, 0.0};
-	
-	Vector3 visPos = {24, 23, -6};
-	
-	visPos[0] *= visZoomFactor; 
-	visPos[1] *= visZoomFactor; 
-	visPos[2] *= visZoomFactor;
-
-	Vector3 visDir = {-1.3,-1,-1};
-	
-	normalize(visDir);
-	look(visView, visPos, visDir, up);
-}
-
-// we take a couple of measurements and compute the average
-long calcRenderTime()
-{
-	long result = 0;
-
-	for(int i=0; i<renderTimesValid; i++)
-		result += renderTimes[i];
-    
-	if(renderTimesValid)
-		result /= renderTimesValid;
-
-	return result;
-}
-
-
-// reset the timer array for a new traversal method
-void resetTimer()
-{
-	renderTimesValid = 0;
-	renderTimesIdx = 0;
-}
-
-// cleanup routine after the main loop
-void cleanUp()
-{
-	if(traverser.GetHierarchy()) 
-		delete traverser.GetHierarchy();
-
-	deleteGeometry();
-
-	Geometry::CleanUp();
-}
-
-// this function inserts a dezimal point after each 1000
-void calcDecimalPoint(string &str, int d)
-{
-	vector<int> numbers;
-	char hstr[100];
-
-	while(d != 0)
-	{
-		numbers.push_back(d % 1000);
-		d /= 1000;
-	}
-
-	// first element without leading zeros
-	if(numbers.size() > 0)
-	{
-		sprintf(hstr, "%d", numbers.back());
-		str.append(hstr);
-	}
-	
-	for(int i=numbers.size()-2; i >= 0; i--)
-	{
-		sprintf(hstr, ",%03d", numbers[i]);
-		str.append(hstr);
-	}
-}
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/OpenGL/Geometry.cpp
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/OpenGL/Geometry.cpp	(revision 629)
+++ 	(revision )
@@ -1,538 +1,0 @@
-#include "Geometry.h"
-#include "glInterface.h"
-#include "stdio.h"
-#include "teapot.h"
-#include <math.h>
-
-#define NO_LIST    -1
-#define STRIP_END  -1
-
-int Geometry::num_torus_indices;
-int Geometry::num_torus_vertices;
-int Geometry::num_torus_normals;
-
-const int Geometry::torus_precision = 24;
-const int Geometry::sphere_precision = 24;
-
-float *Geometry::torus_vertices;
-float *Geometry::torus_normals;
-int *Geometry::torus_indices;
-
-// choose size so the glut-rendered sphere is approximately
-// as big as the other objects
-const float Geometry::sphere_radius = 1.0 / 9.0f;
-const float Geometry::torus_inner_radius = 0.05;
-const float Geometry::torus_outer_radius = 0.07;
-
-int Geometry::sDisplayList[NUM_OBJECTS];
-
-bool Geometry::sIsInitialised = Init();
-
-Geometry::Geometry(): 
-mXRotation(0), mYRotation(0), mZRotation(0), mScale(1.0), mObjectType(TEAPOT)
-{
-	copyVector3Values(mTranslation, 0, 0, 0);
-	
-	SetAmbientColor(0.1745, 0.01175, 0.01175);
-	SetDiffuseColor(0.61424, 0.04136, 0.04136);
-	SetSpecularColor(0.727811, 0.626959, 0.626959);
-	
-	CalcBoundingVolume();
-	CalcTransform();
-	GenerateList();
-}
-
-Geometry::Geometry(Vector3 translation, float xRot, float yRot, float zRot, float scale, int objectType):
-mXRotation(xRot), mYRotation(yRot), mZRotation(zRot), mScale(scale), mObjectType(objectType)
-{
-	copyVector3(mTranslation, translation);
-
-	SetAmbientColor(0.1745, 0.01175, 0.01175);
-	SetDiffuseColor(0.61424, 0.04136, 0.04136);
-	SetSpecularColor(0.727811, 0.626959, 0.626959);
-	
-	CalcBoundingVolume();
-	CalcTransform();
-	GenerateList();
-}
-
-void Geometry::ResetLists()
-{
-	for(int i = 0; i < NUM_OBJECTS; i++)
-	{
-        if(sDisplayList[i] == NO_LIST)
-			glDeleteLists(sDisplayList[i], 1);
-
-		sDisplayList[i] = NO_LIST;
-	}
-}
-
-void Geometry::CleanUp()
-{
-	ResetLists();
-
-	delete [] torus_vertices;
-	delete [] torus_normals;
-	delete [] torus_indices;
-}
-
-
-bool Geometry::Init()
-{
-	for(int i=0; i < NUM_OBJECTS; i++)
-		sDisplayList[i] = NO_LIST;
-
-	// parameters chosen so torus is approximately as big as teapot
-	CreateTorus(torus_inner_radius, torus_outer_radius, torus_precision);
-
-	return true;
-}
-
-void Geometry::GenerateList()
-{
-	if(sDisplayList[mObjectType] == NO_LIST)
-	{
-		sDisplayList[mObjectType] = glGenLists(1);
-		glNewList(sDisplayList[mObjectType], GL_COMPILE);
-
-		switch(mObjectType)
-		{
-			case TEAPOT:
-				RenderTeapot();
-				break;
-			case TORUS:
-				RenderTorus();
-				break;
-			case SPHERE:	
-				RenderSphere();
-				break;
-			
-			default:
-				break;
-		}
-		glEndList();
-	}
-}
-
-void Geometry::Render()
-{
-	glMaterialfv(GL_FRONT, GL_AMBIENT, mAmbientColor);
-	glMaterialfv(GL_FRONT, GL_DIFFUSE, mDiffuseColor);
-	glMaterialfv(GL_FRONT, GL_SPECULAR, mSpecularColor);
-	
-	glPushMatrix();
-	
-	Transform();
-	
-	glCallList(sDisplayList[mObjectType]);
-
-	glPopMatrix();
-}
-
-
-//! sets rotations around the three axis: executed in the order specified here
-void Geometry::SetRotations(float xRot, float yRot, float zRot)
-{
-	mXRotation = xRot;
-	mYRotation = yRot;
-	mZRotation = zRot;
-
-	CalcBoundingVolume();
-	CalcTransform();
-}
-
-
-void Geometry::SetTranslation(Vector3 translation)
-{
-	copyVector3(mTranslation, translation);
-
-	CalcBoundingVolume();
-	CalcTransform();
-}
-
-
-void Geometry::SetScale(float scale)
-{
-	mScale = scale;
-	CalcTransform();
-
-	CalcBoundingVolume();
-}
-
-
-void Geometry::SetAmbientColor(float ambientR, float ambientG, float ambientB)
-{
-	mAmbientColor[0] = ambientR;
-	mAmbientColor[1] = ambientG;
-	mAmbientColor[2] = ambientB;
-}
-
-
-void Geometry::SetDiffuseColor(float diffuseR, float diffuseG, float diffuseB)
-{
-	mDiffuseColor[0] = diffuseR;
-	mDiffuseColor[1] = diffuseG;
-	mDiffuseColor[2] = diffuseB;
-}
-
-
-void Geometry::SetSpecularColor(float specularR, float specularG, float specularB)
-{
-	mSpecularColor[0] = specularR;
-	mSpecularColor[1] = specularG;
-	mSpecularColor[2] = specularB;
-}
-
-
-float Geometry::GetScale()
-{
-	return mScale;
-}
-
-
-void Geometry::GetTranslation(Vector3 translation)
-{
-	copyVector3(translation, mTranslation);
-}
-
-
-void Geometry::GetRotations(float &xRot, float &yRot, float &zRot)
-{
-	xRot = mXRotation;
-	yRot = mYRotation;
-	zRot = mZRotation;
-}
-
-	
-const AABox &Geometry::GetBoundingVolume()
-{
-	return mBoundingBox;
-}
-
-
-void Geometry::SetLastVisited(int lastVisited)
-{
-	mLastVisited = lastVisited;
-}
-
-
-int Geometry::GetLastVisited()
-{
-	return mLastVisited;
-}
-
-
-void Geometry::SetObjectType(int type)
-{
-	mObjectType = type;
-	GenerateList();
-}
-
-
-void Geometry::RenderTeapot()
-{
-	int i = 0;
-
-	while(i < num_teapot_indices)
-	{
-		glBegin(GL_TRIANGLE_STRIP);
-			while(teapot_indices[i] != STRIP_END)
-			{	
-				int index = teapot_indices[i] * 3;
-				
-				glNormal3fv(teapot_normals + index);
-				glVertex3fv(teapot_vertices + index);
-				
-				i++;		
-			}
-		glEnd();
-		
-		i++; // skip strip end flag
-	}
-}
-
-void Geometry::CalcBoundingVolume()
-{
-    switch(mObjectType)
-	{
-		case TORUS:
-			CalcBoundingVolume(torus_vertices, num_torus_vertices);
-			break;
-		case SPHERE:
-			CalcSphereBoundingVolume();
-			break;
-		case TEAPOT:
-			CalcBoundingVolume(teapot_vertices, num_teapot_vertices);
-			break;
-		default:
-			break;
-	}
-}
-
-
-void Geometry::CalcBoundingVolume(float *vertices, const int num_vertices)
-{
-	Vector3 *rotatedPoints = new Vector3[num_vertices];
-	
-	for(int i = 0; i < num_vertices; i++)
-	{
-		copyVector3Values(rotatedPoints[i], vertices[i * 3],
-						  vertices[i * 3 + 1], vertices[i * 3 + 2]);
-	
-		rotateVectorZ(rotatedPoints[i], mZRotation * PI_180);
-		rotateVectorY(rotatedPoints[i], mYRotation * PI_180);
-		rotateVectorX(rotatedPoints[i], mXRotation * PI_180);
-	}
-
-	calcCubicHull(mBoundingBox.min, mBoundingBox.max, rotatedPoints, num_vertices);
-
-	for(int i=0; i< 3; i++)
-	{
-		mBoundingBox.min[i] *= mScale;
-		mBoundingBox.max[i] *= mScale;
-	}
-
-	addVector3(mBoundingBox.min, mTranslation, mBoundingBox.min);
-    addVector3(mBoundingBox.max, mTranslation, mBoundingBox.max);
-
-	delete [] rotatedPoints;
-}
-
-
-void Geometry::CalcSphereBoundingVolume()
-{
-	float len = mScale * sphere_radius;
-	Vector3 size = {len, len, len};
-					
-	diffVector3(mBoundingBox.min, mTranslation, size);
-	addVector3(mBoundingBox.max, mTranslation, size);
-}
-
-
-void Geometry::RenderTorus()
-{
-	glVertexPointer(3, GL_FLOAT, sizeof(float), torus_vertices);
-	glEnableClientState(GL_VERTEX_ARRAY);
-
-	glNormalPointer(GL_FLOAT, sizeof(float), torus_normals);
-	glEnableClientState(GL_NORMAL_ARRAY);
-
-    glDrawElements(GL_TRIANGLES, num_torus_indices, GL_UNSIGNED_INT, torus_indices);
-
-	glDisableClientState(GL_VERTEX_ARRAY);
-	glDisableClientState(GL_NORMAL_ARRAY);
-}
-
-/*
-	creates a torus with specified radii, with number of rings and ring
-	subdivision = precision.
-*/
-void Geometry::CreateTorus(float innerRadius, float outerRadius, int precision)
-{
-	num_torus_vertices = num_torus_normals = (precision + 1) * (precision + 1);
-	num_torus_indices = 2 * precision * precision * 3;
-
-	torus_vertices = new float[num_torus_vertices * 3];
-	torus_normals = new float[num_torus_normals * 3];
-	torus_indices = new int[num_torus_indices];
-
-	for(int i=0; i<precision+1; i++)
-	{
-		int index = i * 3;
-
-		Vector3 currentVertex = {innerRadius, 0.0f, 0.0f};
-		rotateVectorZ(currentVertex, ((float)i * 2.0 * PI) / (float)precision);
-
-		currentVertex[0] += outerRadius;
-		
-		Vector3 sTangent = {0.0f, 0.0f, -1.0f};
-		Vector3 tTangent = {0, -1, 0};
-		rotateVectorZ(tTangent, ((float)i * 2.0 * PI) / (float)precision);
-
-      	Vector3 currentNormal;
-
-		cross(currentNormal, tTangent, sTangent);
-
-		torus_normals[index + 0] = currentNormal[0];
-		torus_normals[index + 1] = currentNormal[1];
-		torus_normals[index + 2] = currentNormal[2];
-		
-		torus_vertices[index + 0] = currentVertex[0];
-		torus_vertices[index + 1] = currentVertex[1];
-		torus_vertices[index + 2] = currentVertex[2];
-	}
-
-	for(int i_rng=1; i_rng<precision+1; ++i_rng)
-	{
-		for(int i=0; i<precision+1; ++i)
-		{
-			int index = 3 * (i_rng * (precision + 1) + i);
-
-			Vector3 currentVertex = {torus_vertices[i*3], torus_vertices[i*3+1], torus_vertices[i*3+2]};
-			
-			rotateVectorY(currentVertex, ((float)i_rng * 2.0 * PI) / (float)precision);
-						
-			Vector3 currentNormal = {torus_normals[i*3], torus_normals[i*3+1], torus_normals[i*3+2]};
-			
-			rotateVectorY(currentNormal, ((float)i_rng * 2.0 * PI) / (float)precision);
-
-			torus_normals[index + 0] = currentNormal[0];
-			torus_normals[index + 1] = currentNormal[1];
-			torus_normals[index + 2] = currentNormal[2];
-		
-			torus_vertices[index + 0] = currentVertex[0];
-			torus_vertices[index + 1] = currentVertex[1];
-			torus_vertices[index + 2] = currentVertex[2];
-		}
-	}
-
-	for(i_rng=0; i_rng<precision; ++i_rng)
-	{
-		for(i=0; i<precision; ++i)
-		{
-			int index = ((i_rng * precision + i) * 2) * 3;
-
-			torus_indices[index+0] = (i_rng     * (precision+1) + i)*3;
-			torus_indices[index+1] = ((i_rng+1) * (precision+1) + i)*3;
-			torus_indices[index+2] = (i_rng     * (precision+1) + i + 1)*3;
-
-			index = ((i_rng * precision + i) * 2 + 1) * 3;
-
-			torus_indices[index+0] = (i_rng     * (precision+1) + i + 1)*3;
-			torus_indices[index+1] = ((i_rng+1) * (precision+1) + i)*3;
-			torus_indices[index+2] = ((i_rng+1) * (precision+1) + i + 1)*3;
-		}
-	}
-}
-
-/**
-	counts the triangles of the teapot.
-	traverses through all the triangle strips.
-*/
-int Geometry::CountTeapotTriangles()
-{
-	int result = 0;
-	int i=0;
-	// n - 2 triangles are drawn for a strip
-	while(i < num_teapot_indices)
-	{
-		while(teapot_indices[i] != STRIP_END)
-		{	
-			result ++;;
-			i++;		
-		}
-		result -= 2;
-		i++; // skip STRIP_END
-	}
-	return result;
-}
-
-/**
-	counts the triangles of the torus
-*/
-int Geometry::CountTorusTriangles()
-{
-	// every 3 indices specify one triangle
-	return num_torus_indices / 3;
-}
-
-/**
-	counts the triangles of the sphere.
-	sphere_precision / 2 + 1 strips with sphere_precision * 2 - 2 triangles each
-*/
-int Geometry::CountSphereTriangles()
-{
-	return sphere_precision * sphere_precision;
-}
-
-
-int Geometry::CountTriangles(int objectType)
-{
-	int result = 0;
-
-	switch(objectType)
-	{
-		case TEAPOT:
-			result = CountTeapotTriangles();
-			break;
-		case TORUS:
-			result = CountTorusTriangles();
-			break;
-		case SPHERE:	
-			result = CountSphereTriangles();
-			break;
-		default:
-			break;
-	}
-	return result;
-}
-
-
-void Geometry::Transform()
-{
-	glMultMatrixd(mTransform);
-}
-
-void Geometry::CalcTransform()
-{
-	Matrix4x4 scale;
-	Matrix4x4 xrot;
-	Matrix4x4 yrot;
-	Matrix4x4 zrot;
-	Matrix4x4 transl;
-
-	makeScaleMtx(scale, mScale, mScale, mScale);
-	makeTranslationMtx(transl, mTranslation);
-	makeRotationXMtx(xrot, mXRotation * PI_180);
-	makeRotationYMtx(yrot, mYRotation * PI_180);
-	makeRotationZMtx(zrot, mZRotation * PI_180);
-
-	copyMatrix(mTransform, IDENTITY);
-	mult(mTransform, mTransform, transl);
-	mult(mTransform, mTransform, xrot);
-	mult(mTransform, mTransform, yrot);
-	mult(mTransform, mTransform, zrot);
-	mult(mTransform, mTransform, scale);
-}
-
-/**
-   renders a sphere with sphere_precision subdivisions.
-   note: works only for even sphere_precision
-*/
-void Geometry::RenderSphere()
-{
-	Vector3 vertex;
-
-	// this algorithm renders the triangles clockwise
-	glFrontFace(GL_CW);
-
-	for (int j = 0; j < sphere_precision/2; ++j) 
-	{
-		double alpha = j * PI * 2.0 / (double)sphere_precision - PI_2;
-		double beta = (j + 1) * PI * 2.0 / (double)sphere_precision - PI_2;
-
-		glBegin(GL_TRIANGLE_STRIP);
-
-		for (int i = 0; i <= sphere_precision; ++i) 
-		{
-			double gamma = i * PI * 2.0 / (double)sphere_precision;
-	
-			vertex[0] = sphere_radius * cos(beta) * cos(gamma);
-			vertex[1] = sphere_radius * sin(beta);
-			vertex[2] = sphere_radius * cos(beta) * sin(gamma);
-
-			glNormal3dv(vertex);
-			glVertex3dv(vertex);
-
-			vertex[0] = sphere_radius * cos(alpha) * cos(gamma);
-			vertex[1] = sphere_radius * sin(alpha);
-			vertex[2] = sphere_radius * cos(alpha) * sin(gamma);
-
-		    glNormal3dv(vertex);
-			glVertex3dv(vertex);
-
-		}
-		glEnd();
-	}
-	glFrontFace(GL_CCW);
-}
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/OpenGL/CMakeLists.txt
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/OpenGL/CMakeLists.txt	(revision 629)
+++ 	(revision )
@@ -1,11 +1,0 @@
-PROJECT (occquery C)
-
-ADD_EXECUTABLE(occquery DataTypes.c occquery.cpp MathStuff.c  DataTypes.h MathStuff.h HierarchyNode.h HierarchyNode.cpp Geometry.h Geometry.cpp RenderTraverser.cpp RenderTraverser.h Timers.h Timers.cpp)
-
-IF (WIN32)
-  TARGET_LINK_LIBRARIES(occquery ${CMAKE_CURRENT_SOURCE_DIR}/GL/glew32.lib)
-  TARGET_LINK_LIBRARIES(occquery ${CMAKE_CURRENT_SOURCE_DIR}/GL/glut32.lib)
-ELSE (WIN32)
-  TARGET_LINK_LIBRARIES(occquery glew)
-  TARGET_LINK_LIBRARIES(occquery glut)
-ENDIF (WIN32)
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/scripts/Plugin_VisibilitySceneManager.vcproj
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/scripts/Plugin_VisibilitySceneManager.vcproj	(revision 316)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/scripts/Plugin_VisibilitySceneManager.vcproj	(revision 643)
@@ -88,5 +88,5 @@
 				EnableFiberSafeOptimizations="TRUE"
 				OptimizeForProcessor="2"
-				AdditionalIncludeDirectories="&quot;$(OGRE_PATH)\PlugIns\OctreeSceneManager\include&quot;;&quot;$(OGRE_ADDONS_PATH)\dotsceneoctree\PlugIns\DotSceneManager\include&quot;;&quot;$(OGRE_PATH)\Samples\Common\include&quot;;&quot;$(OGRE_PATH)\Dependencies\include\CEGUI&quot;;&quot;$(OGRE_PATH)\Samples\Common\CEGUIRenderer\include&quot;;&quot;$(OGRE_PATH)\OgreMain\include&quot;;&quot;$(OGRE_PATH)\Dependencies\include&quot;;..\include;..\..\GtpVisibility\include"
+				AdditionalIncludeDirectories="&quot;$(OGRE_PATH)\PlugIns\OctreeSceneManager\include&quot;;&quot;$(OGRE_ADDONS_PATH)\dotsceneoctree\PlugIns\DotSceneManager\include&quot;;&quot;$(OGRE_PATH)\Samples\Common\include&quot;;&quot;$(OGRE_PATH)\Dependencies\include\CEGUI&quot;;&quot;$(OGRE_PATH)\Samples\Common\CEGUIRenderer\include&quot;;&quot;$(OGRE_PATH)\OgreMain\include&quot;;&quot;$(OGRE_PATH)\Dependencies\include&quot;;..\include;..\..\..\OnlineCullingCHC\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;GTP_VISIBILITY_MODIFIED_OGRE"
 				StringPooling="TRUE"
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/scripts/scripts/Plugin_VisibilitySceneManager.vcproj
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/scripts/scripts/Plugin_VisibilitySceneManager.vcproj	(revision 316)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/scripts/scripts/Plugin_VisibilitySceneManager.vcproj	(revision 316)
@@ -0,0 +1,265 @@
+<?xml version="1.0" encoding="windows-1250"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="Plugin_VisibilitySceneManager"
+	ProjectGUID="{80DECC17-BDDD-4412-8CF8-F7C1C17A7436}"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\lib\$(ConfigurationName)"
+			IntermediateDirectory="..\obj\$(ConfigurationName)"
+			ConfigurationType="2"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="&quot;$(OGRE_PATH)\PlugIns\OctreeSceneManager\include&quot;;&quot;$(OGRE_ADDONS_PATH)\dotsceneoctree\PlugIns\DotSceneManager\include&quot;;&quot;$(OGRE_PATH)\Samples\Common\include&quot;;&quot;$(OGRE_PATH)\Dependencies\include\CEGUI&quot;;&quot;$(OGRE_PATH)\Samples\Common\CEGUIRenderer\include&quot;;&quot;$(OGRE_PATH)\OgreMain\include&quot;;&quot;$(OGRE_PATH)\Dependencies\include&quot;;..\include;..\..\GtpVisibility\include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PLUGIN_OCCLUSIONCULLINGSCENEMANAGER_EXPORTS;GTP_VISIBILITY_MODIFIED_OGRE"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				EnableFunctionLevelLinking="TRUE"
+				RuntimeTypeInfo="TRUE"
+				UsePrecompiledHeader="2"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="4"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				IgnoreImportLibrary="TRUE"
+				AdditionalDependencies="OgreMain_d.lib CEGUIBase_d.lib OgreGUIRenderer_d.lib Plugin_OctreeSceneManager.lib Plugin_DotSceneManager.lib GtpVisibility.lib"
+				OutputFile="$(OutDir)/Plugin_VisibilitySceneManager.dll"
+				Version="0.99"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories="&quot;$(OGRE_PATH)\OgreMain\lib\$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)\Dependencies\lib\$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)\PlugIns\OctreeSceneManager\bin\$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)\Samples\Common\CEGUIRenderer\lib&quot;;&quot;$(OGRE_ADDONS_PATH)\dotsceneoctree\PlugIns\DotSceneManager\bin\$(ConfigurationName)&quot;;&quot;..\lib\$(ConfigurationName)&quot;;&quot;..\..\lib\$(ConfigurationName)&quot;;&quot;..\..\GtpVisibility\lib\$(ConfigurationName)&quot;"
+				ModuleDefinitionFile="..\misc\OgreVisibilitySceneManager.def"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile="$(OutDir)/Plugin_VisibilitySceneManager.pdb"
+				SubSystem="2"
+				ImportLibrary="$(OutDir)/Plugin_VisibilitySceneManager.lib"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				CommandLine="copy $(OutDir)\$(TargetFileName) $(OGRE_PATH)\Samples\Common\bin\$(ConfigurationName)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\lib\$(ConfigurationName)"
+			IntermediateDirectory="..\obj\$(ConfigurationName)"
+			ConfigurationType="2"
+			CharacterSet="2"
+			WholeProgramOptimization="TRUE">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="3"
+				GlobalOptimizations="TRUE"
+				InlineFunctionExpansion="2"
+				EnableIntrinsicFunctions="TRUE"
+				ImproveFloatingPointConsistency="TRUE"
+				FavorSizeOrSpeed="1"
+				OmitFramePointers="TRUE"
+				EnableFiberSafeOptimizations="TRUE"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="&quot;$(OGRE_PATH)\PlugIns\OctreeSceneManager\include&quot;;&quot;$(OGRE_ADDONS_PATH)\dotsceneoctree\PlugIns\DotSceneManager\include&quot;;&quot;$(OGRE_PATH)\Samples\Common\include&quot;;&quot;$(OGRE_PATH)\Dependencies\include\CEGUI&quot;;&quot;$(OGRE_PATH)\Samples\Common\CEGUIRenderer\include&quot;;&quot;$(OGRE_PATH)\OgreMain\include&quot;;&quot;$(OGRE_PATH)\Dependencies\include&quot;;..\include;..\..\GtpVisibility\include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;GTP_VISIBILITY_MODIFIED_OGRE"
+				StringPooling="TRUE"
+				RuntimeLibrary="2"
+				BufferSecurityCheck="FALSE"
+				EnableFunctionLevelLinking="TRUE"
+				RuntimeTypeInfo="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				IgnoreImportLibrary="TRUE"
+				AdditionalDependencies="OgreMain.lib CEGUIBase.lib OgreGUIRenderer.lib Plugin_OctreeSceneManager.lib GtpVisibility.lib"
+				OutputFile="$(OutDir)/Plugin_VisibilitySceneManager.dll"
+				Version="0.99"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories="&quot;$(OGRE_PATH)\PlugIns\OctreeSceneManager\bin\$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)\OgreMain\lib\$(ConfigurationName)&quot;;&quot;$(OGRE_ADDONS_PATH)\dotsceneoctree\PlugIns\DotSceneManager\bin\$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)\Samples\Common\CEGUIRenderer\lib&quot;;&quot;..\..\GtpVisibility\lib\$(ConfigurationName)&quot;;&quot;..\..\lib\$(ConfigurationName)&quot;;&quot;..\lib\$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)\Dependencies\lib\$(ConfigurationName)&quot;"
+				ModuleDefinitionFile="..\misc\OgreVisibilitySceneManager.def"
+				GenerateDebugInformation="TRUE"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				ImportLibrary="$(OutDir)/Plugin_VisibilitySceneManager.lib"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				CommandLine="copy $(OutDir)\$(TargetFileName) $(OGRE_PATH)\Samples\Common\bin\$(ConfigurationName)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="SceneManager_Plugins"
+			Filter="">
+			<Filter
+				Name="Header Files"
+				Filter="">
+				<File
+					RelativePath="..\include\OgreOctreeHierarchyInterface.h">
+				</File>
+				<File
+					RelativePath="..\include\OgreTerrainContentGenerator.h">
+				</File>
+				<File
+					RelativePath="..\include\OgreVisibilityOctreeSceneManager.h">
+				</File>
+				<File
+					RelativePath="..\include\OgreVisibilityTerrainSceneManager.h">
+				</File>
+			</Filter>
+			<Filter
+				Name="Source Files"
+				Filter="">
+				<File
+					RelativePath="..\src\OgreBspHierarchyInterface.cpp">
+				</File>
+				<File
+					RelativePath="..\src\OgreOctreeHierarchyInterface.cpp">
+				</File>
+				<File
+					RelativePath="..\src\OgreTerrainContentGenerator.cpp">
+				</File>
+				<File
+					RelativePath="..\src\OgreVisibilityOctreeSceneManager.cpp">
+				</File>
+				<File
+					RelativePath="..\src\OgreVisibilityTerrainSceneManager.cpp">
+				</File>
+			</Filter>
+		</Filter>
+		<Filter
+			Name="VisibilitySceneManager"
+			Filter="">
+			<Filter
+				Name="Header Files"
+				Filter="h;hpp;hxx;hm;inl;inc">
+				<File
+					RelativePath="..\include\OgreBspHierarchyInterface.h">
+				</File>
+				<File
+					RelativePath="..\include\OgreOcclusionQueriesQueryManager.h">
+				</File>
+				<File
+					RelativePath="..\include\OgrePlatformHierarchyInterface.h">
+				</File>
+				<File
+					RelativePath="..\include\OgrePlatformOcclusionQuery.h">
+				</File>
+				<File
+					RelativePath="..\include\OgrePlatformQueryManager.h">
+				</File>
+				<File
+					RelativePath="..\include\OgreSceneContentGenerator.h">
+				</File>
+				<File
+					RelativePath="..\include\OgreSceneNodeHierarchyInterface.h">
+				</File>
+				<File
+					RelativePath="..\include\OgreSolidBoundingBox.h">
+				</File>
+				<File
+					RelativePath="..\include\OgreSolidHalfBoundingBox.h">
+				</File>
+				<File
+					RelativePath="..\include\OgreVisibilityOptionsManager.h">
+				</File>
+				<File
+					RelativePath="..\include\OgreVisibilitySceneManager.h">
+				</File>
+			</Filter>
+			<Filter
+				Name="Source Files"
+				Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
+				<File
+					RelativePath="..\src\OgreOcclusionQueriesQueryManager.cpp">
+				</File>
+				<File
+					RelativePath="..\src\OgrePlatformHierarchyInterface.cpp">
+				</File>
+				<File
+					RelativePath="..\src\OgrePlatformOcclusionQuery.cpp">
+				</File>
+				<File
+					RelativePath="..\src\OgrePlatformQueryManager.cpp">
+				</File>
+				<File
+					RelativePath="..\src\OgreSceneContentGenerator.cpp">
+				</File>
+				<File
+					RelativePath="..\src\OgreSceneNodeHierarchyInterface.cpp">
+				</File>
+				<File
+					RelativePath="..\src\OgreSolidBoundingBox.cpp">
+				</File>
+				<File
+					RelativePath="..\src\OgreSolidHalfBoundingBox.cpp">
+				</File>
+				<File
+					RelativePath="..\src\OgreVisibilityOptionsManager.cpp">
+				</File>
+				<File
+					RelativePath="..\src\OgreVisibilitySceneManager.cpp">
+				</File>
+				<File
+					RelativePath="..\src\OgreVisibilitySceneManagerDll.cpp">
+				</File>
+			</Filter>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/scripts/scripts/Plugin_VisibilitySceneManager.dsp
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/scripts/scripts/Plugin_VisibilitySceneManager.dsp	(revision 59)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/scripts/scripts/Plugin_VisibilitySceneManager.dsp	(revision 59)
@@ -0,0 +1,137 @@
+# Microsoft Developer Studio Project File - Name="Plugin_OcclusionCullingSceneManager" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=Plugin_OcclusionCullingSceneManager - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "Plugin_OcclusionCullingSceneManager.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "Plugin_OcclusionCullingSceneManager.mak" CFG="Plugin_OcclusionCullingSceneManager - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "Plugin_OcclusionCullingSceneManager - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "Plugin_OcclusionCullingSceneManager - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "Plugin_OcclusionCullingSceneManager - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "..\bin\Release"
+# PROP Intermediate_Dir "..\obj\Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PLUGIN_OCCLUSIONCULLINGSCENEMANAGER_EXPORTS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\include" /I "$(OGRE_PATH)\OgreMain\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PLUGIN_OCCLUSIONCULLINGSCENEMANAGER_EXPORTS" /YX /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x418 /d "NDEBUG"
+# ADD RSC /l 0x418 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib OgreMain.lib /nologo /dll /machine:I386 /libpath:"$(OGRE_PATH)\OgreMain\lib\Release"
+# SUBTRACT LINK32 /pdb:none
+# Begin Special Build Tool
+SOURCE="$(InputPath)"
+PostBuild_Cmds=copy ..\bin\Release\*.dll $(OGRE_PATH)\Samples\Common\bin\Release
+# End Special Build Tool
+
+!ELSEIF  "$(CFG)" == "Plugin_OcclusionCullingSceneManager - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "..\bin\Debug"
+# PROP Intermediate_Dir "..\obj\Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PLUGIN_OCCLUSIONCULLINGSCENEMANAGER_EXPORTS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\include" /I "$(OGRE_PATH)\OgreMain\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PLUGIN_OCCLUSIONCULLINGSCENEMANAGER_EXPORTS" /YX /FD /GZ /Zm200 /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x418 /d "_DEBUG"
+# ADD RSC /l 0x418 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib OgreMain_d.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"$(OGRE_PATH)\OgreMain\lib\Debug"
+# SUBTRACT LINK32 /pdb:none
+# Begin Special Build Tool
+SOURCE="$(InputPath)"
+PostBuild_Cmds=copy ..\bin\Debug\*.dll $(OGRE_PATH)\Samples\Common\bin\Debug
+# End Special Build Tool
+
+!ENDIF 
+
+# Begin Target
+
+# Name "Plugin_OcclusionCullingSceneManager - Win32 Release"
+# Name "Plugin_OcclusionCullingSceneManager - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\src\OgreOcclusionCullingResourceManager.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\OgreOcclusionCullingSceneManager.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\misc\OgreOcclusionCullingSceneManager.def
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\OgreOcclusionCullingSceneManagerDll.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=..\include\OgreOcclusionCullingResourceManager.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\OgreOcclusionCullingSceneManager.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
Index: GTP/trunk/Lib/Vis/Preprocessing/scripts/default.env
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/scripts/default.env	(revision 639)
+++ GTP/trunk/Lib/Vis/Preprocessing/scripts/default.env	(revision 643)
@@ -331,5 +331,5 @@
 		missTolerance		6
 		
-		maxViewCells		256
+		maxViewCells		2048
 		
 		# used for pvs criterium
Index: GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp	(revision 639)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp	(revision 643)
@@ -68,5 +68,5 @@
 mViewCellsManager(NULL),
 mOutOfBoundsCell(NULL),
-mStoreRays(true),
+mStoreRays(false),
 mRenderCostWeight(0.5),
 mUseRandomAxis(false),
Index: GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp	(revision 639)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp	(revision 643)
@@ -16,5 +16,5 @@
 #include "RssPreprocessor.h"
 
-#define SAMPLE_AFTER_SUBDIVISION 1
+#define SAMPLE_AFTER_SUBDIVISION 0
 
 
@@ -3101,5 +3101,5 @@
 		if (1 || mExportRays)
 		{
-			if (1)
+			if (0)
 			{
 				VssRayContainer vcRays;
@@ -3141,5 +3141,5 @@
 			
 
-			if (0)
+			if (1)
 			{
 				VssRayContainer vcRays;
@@ -3175,8 +3175,4 @@
 		ExportViewCellGeometry(exporter, vc);
 	
-
-		m.mDiffuseColor = RgbColor(1, 0, 0);
-	    exporter->SetForcedMaterial(m);
-
 		exporter->SetFilled();
 
@@ -3199,6 +3195,6 @@
 				if (!intersect->Mailed())
 				{
-					//m = RandomMaterial();
-					//exporter->SetForcedMaterial(m);
+					m = RandomMaterial();
+					exporter->SetForcedMaterial(m);
 
 					exporter->ExportIntersectable(intersect);
@@ -3209,4 +3205,7 @@
 		else
 		{
+			m.mDiffuseColor = RgbColor(1, 0, 0);
+			exporter->SetForcedMaterial(m);
+
 			exporter->ExportGeometry(objects);
 		}
Index: GTP/trunk/Lib/Vis/shared/scripts/GtpVisibility.sln
===================================================================
--- GTP/trunk/Lib/Vis/shared/scripts/GtpVisibility.sln	(revision 634)
+++ GTP/trunk/Lib/Vis/shared/scripts/GtpVisibility.sln	(revision 643)
@@ -6,4 +6,15 @@
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GtpVisibility", "..\..\OnlineCullingCHC\scripts\GtpVisibility.vcproj", "{101A7691-74F3-48B4-96A3-CF35578F5900}"
 	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestCullingTerrain", "..\..\..\..\App\Demos\Vis\HillyTerrain\OGRE\TestCullingTerrain.vcproj", "{248F19A6-2FE0-4F5D-8928-E0EA10609887}"
+	ProjectSection(ProjectDependencies) = postProject
+		{80DECC17-BDDD-4412-8CF8-F7C1C17A7436} = {80DECC17-BDDD-4412-8CF8-F7C1C17A7436}
+		{101A7691-74F3-48B4-96A3-CF35578F5900} = {101A7691-74F3-48B4-96A3-CF35578F5900}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Plugin_VisibilitySceneManager", "..\..\OnlineCullingCHC\OGRE\scripts\Plugin_VisibilitySceneManager.vcproj", "{80DECC17-BDDD-4412-8CF8-F7C1C17A7436}"
+	ProjectSection(ProjectDependencies) = postProject
+		{101A7691-74F3-48B4-96A3-CF35578F5900} = {101A7691-74F3-48B4-96A3-CF35578F5900}
 	EndProjectSection
 EndProject
@@ -22,4 +33,12 @@
 		{101A7691-74F3-48B4-96A3-CF35578F5900}.Release.ActiveCfg = Release|Win32
 		{101A7691-74F3-48B4-96A3-CF35578F5900}.Release.Build.0 = Release|Win32
+		{248F19A6-2FE0-4F5D-8928-E0EA10609887}.Debug.ActiveCfg = Debug|Win32
+		{248F19A6-2FE0-4F5D-8928-E0EA10609887}.Debug.Build.0 = Debug|Win32
+		{248F19A6-2FE0-4F5D-8928-E0EA10609887}.Release.ActiveCfg = Release|Win32
+		{248F19A6-2FE0-4F5D-8928-E0EA10609887}.Release.Build.0 = Release|Win32
+		{80DECC17-BDDD-4412-8CF8-F7C1C17A7436}.Debug.ActiveCfg = Debug|Win32
+		{80DECC17-BDDD-4412-8CF8-F7C1C17A7436}.Debug.Build.0 = Debug|Win32
+		{80DECC17-BDDD-4412-8CF8-F7C1C17A7436}.Release.ActiveCfg = Release|Win32
+		{80DECC17-BDDD-4412-8CF8-F7C1C17A7436}.Release.Build.0 = Release|Win32
 	EndGlobalSection
 	GlobalSection(ExtensibilityGlobals) = postSolution
