Index: /GTP/trunk/Lib/Vis/Preprocessing/scripts/Preprocessor.vcproj
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/scripts/Preprocessor.vcproj	(revision 1097)
+++ /GTP/trunk/Lib/Vis/Preprocessing/scripts/Preprocessor.vcproj	(revision 1099)
@@ -158,4 +158,7 @@
 			</File>
 			<File
+				RelativePath="..\src\FlexibleHeap.h">
+			</File>
+			<File
 				RelativePath="..\src\glInterface.h">
 			</File>
@@ -502,263 +505,4 @@
 				RelativePath="..\src\X3dParserXerces.h">
 			</File>
-			<Filter
-				Name="mixkit"
-				Filter="">
-				<File
-					RelativePath="..\src\mixkit\getopt.c">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\getopt.h">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\getopt1.c">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\mixio.h">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\mixmops.cxx">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\mixmops.h">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\mixmsg.cxx">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\mixmsg.h">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\mixvops.h">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxArcball.cxx">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxArcball.h">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxAsp.cxx">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxAsp.h">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxBlock.h">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxBlock2.h">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxBlock3.h">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxBlockModel.cxx">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxBlockModel.h">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxCamera.cxx">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxCamera.h">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxCmdParser.cxx">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxCmdParser.h">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxDynBlock.h">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxEdgeFilter.cxx">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxEdgeFilter.h">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxGeom3D.cxx">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxGeom3D.h">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxGeoPrims.h">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxGL.h">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxGLDebug.cxx">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxGLPane.cxx">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxGLPane.h">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxGLUtils.cxx">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxGLUtils.h">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxHeap.cxx">
-					<FileConfiguration
-						Name="Debug|Win32">
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)/$(InputName)1.obj"/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release|Win32">
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)/$(InputName)1.obj"/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxHeap.h">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxLineModel.cxx">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxManipulator.h">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxMat2.cxx">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxMat2.h">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxMat3-jacobi.cxx">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxMat3.cxx">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxMat3.h">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxMat4-jacobi.cxx">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxMat4.cxx">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxMat4.h">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxMath.h">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxMatrix.cxx">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxMatrix.h">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxPropSlim.cxx">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxPropSlim.h">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxQMetric.cxx">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxQMetric.h">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxQMetric2.cxx">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxQMetric2.h">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxQMetric3.cxx">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxQMetric3.h">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxQSlim.cxx">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxQSlim.h">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxQVis3.cxx">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxRaster-tiff.cxx">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxRaster.cxx">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxRaster.h">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxSMF.cxx">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxSMF.h">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxStack.h">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxStdModel.cxx">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxStdModel.h">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxStdPane.cxx">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxStdPane.h">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxStdRender.cxx">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxStdSlim.cxx">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxStdSlim.h">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxTimer.cxx">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxTimer.h">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxTriProject.cxx">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxVec2.h">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxVec3.h">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxVec4.h">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\MxVector.h">
-				</File>
-				<File
-					RelativePath="..\src\mixkit\stdmix.h">
-				</File>
-			</Filter>
 		</Filter>
 		<Filter
@@ -798,4 +542,263 @@
 			<File
 				RelativePath="..\include\ViewCell.h">
+			</File>
+		</Filter>
+		<Filter
+			Name="mixkit"
+			Filter="">
+			<File
+				RelativePath="..\src\mixkit\getopt.c">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\getopt.h">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\getopt1.c">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\mixio.h">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\mixmops.cxx">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\mixmops.h">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\mixmsg.cxx">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\mixmsg.h">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\mixvops.h">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxArcball.cxx">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxArcball.h">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxAsp.cxx">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxAsp.h">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxBlock.h">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxBlock2.h">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxBlock3.h">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxBlockModel.cxx">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxBlockModel.h">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxCamera.cxx">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxCamera.h">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxCmdParser.cxx">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxCmdParser.h">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxDynBlock.h">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxEdgeFilter.cxx">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxEdgeFilter.h">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxGeom3D.cxx">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxGeom3D.h">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxGeoPrims.h">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxGL.h">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxGLDebug.cxx">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxGLPane.cxx">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxGLPane.h">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxGLUtils.cxx">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxGLUtils.h">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxHeap.cxx">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						ObjectFile="$(IntDir)/$(InputName)1.obj"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						ObjectFile="$(IntDir)/$(InputName)1.obj"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxHeap.h">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxLineModel.cxx">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxManipulator.h">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxMat2.cxx">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxMat2.h">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxMat3-jacobi.cxx">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxMat3.cxx">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxMat3.h">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxMat4-jacobi.cxx">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxMat4.cxx">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxMat4.h">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxMath.h">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxMatrix.cxx">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxMatrix.h">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxPropSlim.cxx">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxPropSlim.h">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxQMetric.cxx">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxQMetric.h">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxQMetric2.cxx">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxQMetric2.h">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxQMetric3.cxx">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxQMetric3.h">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxQSlim.cxx">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxQSlim.h">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxQVis3.cxx">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxRaster-tiff.cxx">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxRaster.cxx">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxRaster.h">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxSMF.cxx">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxSMF.h">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxStack.h">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxStdModel.cxx">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxStdModel.h">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxStdPane.cxx">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxStdPane.h">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxStdRender.cxx">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxStdSlim.cxx">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxStdSlim.h">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxTimer.cxx">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxTimer.h">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxTriProject.cxx">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxVec2.h">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxVec3.h">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxVec4.h">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\MxVector.h">
+			</File>
+			<File
+				RelativePath="..\src\mixkit\stdmix.h">
 			</File>
 		</Filter>
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/VspOspTree.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/VspOspTree.cpp	(revision 1097)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/VspOspTree.cpp	(revision 1099)
@@ -30,5 +30,6 @@
 int VspTree::sFrontAndBackId = 0;
 
-
+VspTree *VspTree::VspSplitCandidate::sVspTree = NULL;
+OspTree *OspTree::OspSplitCandidate::sOspTree = NULL;
 
 // pvs penalty can be different from pvs size
@@ -442,4 +443,7 @@
 								  AxisAlignedBox3 *forcedBoundingBox) 
 {
+	// store pointer to this tree
+	VspSplitCandidate::sVspTree = this;
+
 	mVspStats.nodes = 1;
 	
@@ -574,12 +578,12 @@
 	
 		//-- push the new split candidates on the queue
-		VspSplitCandidate *frontCandidate = new VspSplitCandidate();
-		VspSplitCandidate *backCandidate = new VspSplitCandidate();
-
-		EvalSplitCandidate(tFrontData, *frontCandidate);
-		EvalSplitCandidate(tBackData, *backCandidate);
-
-		tQueue.push(frontCandidate);
-		tQueue.push(backCandidate);
+		VspSplitCandidate *frontCandidate = new VspSplitCandidate(tFrontData);
+		VspSplitCandidate *backCandidate = new VspSplitCandidate(tBackData);
+
+		EvalSplitCandidate(*frontCandidate);
+		EvalSplitCandidate(*backCandidate);
+
+		tQueue.Push(frontCandidate);
+		tQueue.Push(backCandidate);
 
 		// delete old leaf node
@@ -634,20 +638,19 @@
 
 
-void VspTree::EvalSplitCandidate(VspTraversalData &tData,
-								 VspSplitCandidate &splitCandidate)
+void VspTree::EvalSplitCandidate(VspSplitCandidate &splitCandidate)
 {
 	float frontProb;
 	float backProb;
 	
-	VspLeaf *leaf = dynamic_cast<VspLeaf *>(tData.mNode);
+	VspLeaf *leaf = dynamic_cast<VspLeaf *>(splitCandidate.mParentData.mNode);
 	
 	// compute locally best split plane
 	const bool success = 
-		SelectSplitPlane(tData, splitCandidate.mSplitPlane,	frontProb, backProb);
+		SelectSplitPlane(splitCandidate.mParentData, splitCandidate.mSplitPlane, frontProb, backProb);
 
 	// compute global decrease in render cost
-	splitCandidate.mPriority = EvalRenderCostDecrease(splitCandidate.mSplitPlane, tData);
-	splitCandidate.mParentData = tData;
-	splitCandidate.mMaxCostMisses = success ? tData.mMaxCostMisses : tData.mMaxCostMisses + 1;
+	const float priority = EvalRenderCostDecrease(splitCandidate.mSplitPlane, splitCandidate.mParentData);
+	splitCandidate.SetPriority(priority);
+	splitCandidate.mMaxCostMisses = success ? splitCandidate.mParentData.mMaxCostMisses : splitCandidate.mParentData.mMaxCostMisses + 1;
 
 	//Debug << "p: " << tData.mNode << " depth: " << tData.mDepth << endl;
@@ -2539,11 +2542,6 @@
 
 OspTree::OspTree():
-mRoot(NULL)
-#if TODO
-mOutOfBoundsCell(NULL),
-mStoreRays(false),
-mUseRandomAxis(false),
+mRoot(NULL),
 mTimeStamp(1)
-#endif
 {
 #if TODO
@@ -2751,12 +2749,12 @@
 			
 		//-- push the new split candidates on the queue
-		OspSplitCandidate *frontCandidate = new OspSplitCandidate();
-		OspSplitCandidate *backCandidate = new OspSplitCandidate();
-
-		EvalSplitCandidate(tFrontData, *frontCandidate);
-		EvalSplitCandidate(tBackData, *backCandidate);
-
-		tQueue.push(frontCandidate);
-		tQueue.push(backCandidate);
+		OspSplitCandidate *frontCandidate = new OspSplitCandidate(tFrontData);
+		OspSplitCandidate *backCandidate = new OspSplitCandidate(tBackData);
+
+		EvalSplitCandidate(*frontCandidate);
+		EvalSplitCandidate(*backCandidate);
+
+		tQueue.Push(frontCandidate);
+		tQueue.Push(backCandidate);
 
 		// delete old leaf node
@@ -2779,21 +2777,19 @@
 
 
-void OspTree::EvalSplitCandidate(OspTraversalData &tData,
-								 OspSplitCandidate &splitCandidate)
+void OspTree::EvalSplitCandidate(OspSplitCandidate &splitCandidate)
 {
 	float frontProb;
 	float backProb;
 	
-	KdLeaf *leaf = dynamic_cast<KdLeaf *>(tData.mNode);
+	KdLeaf *leaf = dynamic_cast<KdLeaf *>(splitCandidate.mParentData.mNode);
 
 	// compute locally best split plane
 	const bool success = 
-		SelectSplitPlane(tData, splitCandidate.mSplitPlane,	frontProb, backProb);
+		SelectSplitPlane(splitCandidate.mParentData, splitCandidate.mSplitPlane, frontProb, backProb);
 
 	//TODO
 	// compute global decrease in render cost
-	splitCandidate.mPriority = EvalRenderCostDecrease(splitCandidate.mSplitPlane, tData);
-	splitCandidate.mParentData = tData;
-	splitCandidate.mMaxCostMisses = success ? tData.mMaxCostMisses : tData.mMaxCostMisses + 1;
+	splitCandidate.SetPriority(EvalRenderCostDecrease(splitCandidate.mSplitPlane, splitCandidate.mParentData));
+	splitCandidate.mMaxCostMisses = success ? splitCandidate.mParentData.mMaxCostMisses : splitCandidate.mParentData.mMaxCostMisses + 1;
 }
 
@@ -3263,4 +3259,7 @@
 								  AxisAlignedBox3 *forcedBoundingBox) 
 {
+	// store pointer to this tree
+	OspSplitCandidate::sOspTree = this;
+
 	mOspStats.nodes = 1;
 	
@@ -3331,7 +3330,7 @@
 SplitCandidate *HierarchyManager::NextSplitCandidate()
 {
-	SplitCandidate *splitCandidate = mTQueue.top();
+	SplitCandidate *splitCandidate = static_cast<SplitCandidate *>(mTQueue.Top());
 	//Debug << "priority: " << splitCandidate->GetPriority() << endl;
-	mTQueue.pop();
+	mTQueue.Pop();
 
 	return splitCandidate;
@@ -3398,8 +3397,8 @@
 
 	// compute first split candidate
-	VspTree::VspSplitCandidate *splitCandidate = new VspTree::VspSplitCandidate();
-    mVspTree.EvalSplitCandidate(vData, *splitCandidate);
-
-	mTQueue.push(splitCandidate);
+	VspTree::VspSplitCandidate *splitCandidate = new VspTree::VspSplitCandidate(vData);
+    mVspTree.EvalSplitCandidate(*splitCandidate);
+
+	mTQueue.Push(splitCandidate);
 
 
@@ -3427,8 +3426,8 @@
 
 	// compute first split candidate
-	OspTree::OspSplitCandidate *oSplitCandidate = new OspTree::OspSplitCandidate();
-    mOspTree.EvalSplitCandidate(oData, *oSplitCandidate);
-
-	mTQueue.push(splitCandidate);
+	OspTree::OspSplitCandidate *oSplitCandidate = new OspTree::OspSplitCandidate(oData);
+    mOspTree.EvalSplitCandidate(*oSplitCandidate);
+
+	mTQueue.Push(splitCandidate);
 }
 
@@ -3488,5 +3487,5 @@
 
 		//-- subdivide leaf node
-		//-- either a object space or view space split
+		//-- we have either a object space or view space split
 		if (splitCandidate->Type() == SplitCandidate::VIEW_SPACE)
 		{
@@ -3515,9 +3514,9 @@
 bool HierarchyManager::FinishedConstruction()
 {
-	return mTQueue.empty();
-}
-
-
-void HierarchyManager::RepairQueue()
+	return mTQueue.Empty();
+}
+
+
+void HierarchyManager::RepairQueue(const vector<SplitCandidate *> &dirtyList)
 {
 	// TODO
@@ -3535,20 +3534,22 @@
 	// (explicit data structure, binary tree)
 	// *) inserting and removal is efficient
-	// *) search is not efficient => store pointer to queue element with each
+	// *) search is not efficient => store queue position with each
 	// split candidate
 
-	vector<SplitCandidate *> candidates;
-
-	while (!mTQueue.empty())
-	{
-		SplitCandidate *candidate = mTQueue.top();
-		mTQueue.pop();
-
-		candidates.push_back(candidate);
-	}
-
-	// Reinsert
-
-}
-
-}
+	vector<SplitCandidate *>::const_iterator sit, sit_end = dirtyList.end();
+
+	for (sit = dirtyList.begin(); sit != sit_end; ++ sit)
+	{
+		SplitCandidate* sc = *sit;
+
+		mTQueue.Erase(sc);
+
+		// reevaluate
+		sc->EvalPriority();
+
+		// reinsert
+		mTQueue.Push(sc);
+	}
+}
+
+}
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/VspOspTree.h
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/VspOspTree.h	(revision 1097)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/VspOspTree.h	(revision 1099)
@@ -10,5 +10,5 @@
 #include "RayInfo.h"
 #include "gzstream.h"
-#include "mixkit/MxHeap.h"
+#include "FlexibleHeap.h"
 
 
@@ -48,5 +48,5 @@
 /** Candidate for a view space / object space split.
 */
-class SplitCandidate: public MxHeapable
+class SplitCandidate: public Heapable
 {  
 public:
@@ -62,12 +62,7 @@
 
 	/// priority of this split
-	float mPriority;
-	
-	/// pointers used for building up heap
-	SplitCandidate *mParent;
-	SplitCandidate *mLeft;
-	SplitCandidate *mRight;
-
-	SplitCandidate(): mPriority(0) 
+	//float mPriority;
+	
+	SplitCandidate()
 	{};
 
@@ -75,17 +70,6 @@
 	{}
 
+	virtual void EvalPriority() = 0;
 	virtual int Type() const = 0;
-
-	/** Returns cost of the traversal data.
-	*/
-	float GetPriority() const
-	{
-		return mPriority;
-	}
-
-	/*friend bool operator<(const SplitCandidate &a, const SplitCandidate &b)
-	{
-		return a.GetPriority() < b.GetPriority();
-	}*/
 };
 
@@ -462,26 +446,11 @@
 
 
+#if 0
 typedef std::priority_queue<SplitCandidate *, 
 							std::vector<SplitCandidate *>, 
 							GtPriority<std::vector<SplitCandidate *>::value_type> > SplitQueue;
-
-#if TODO
-/** candidate for a view space split
-*/
-class OspSplitCandidate: public SplitCandidate
-{  
-	/// parent data
-	OspTraversalData mParentData;
-		
-	VspOspSplitCandidate(): mRenderCost(0) 
-	{};
-
-	int Type() const { return OSP_CANDIDATE; } 
-
-	VspOspSplitCandidate(const AxisAlignedPlane &plane, const VspOspTraversalData &tData): 
-	mSplitPlane(plane), mParentData(tData), mRenderCost(0)
-	{}
-};
 #endif
+
+typedef FlexibleHeap<SplitCandidate *> SplitQueue;
 
 /** View Space Partitioning tree.
@@ -588,11 +557,17 @@
 	{  
 	public:
+		static VspTree* sVspTree;
 		/// parent data
 		VspTraversalData mParentData;
 		
-		VspSplitCandidate()
+		VspSplitCandidate(const VspTraversalData &tData): mParentData(tData)
 		{};
 
 		int Type() const { return VIEW_SPACE; }
+
+		void EvalPriority()
+		{
+			sVspTree->EvalSplitCandidate(*this);	
+		}
 
 		VspSplitCandidate(const AxisAlignedPlane &plane, const VspTraversalData &tData): 
@@ -796,5 +771,5 @@
 	/** Evaluates candidate for splitting.
 	*/
-	void EvalSplitCandidate(VspTraversalData &tData, VspSplitCandidate &splitData);
+	void EvalSplitCandidate(VspSplitCandidate &splitData);
 
 	/** Evaluates render cost decrease of next split.
@@ -1206,11 +1181,18 @@
 	{  
 	public:
+		static OspTree* sOspTree;
+
 		/// parent data
 		OspTraversalData mParentData;
 		
-		OspSplitCandidate()
+		OspSplitCandidate(const OspTraversalData &tData): mParentData(tData)
 		{};
 
 		int Type() const { return VIEW_SPACE; }
+	
+		void EvalPriority()
+		{
+			sOspTree->EvalSplitCandidate(*this);	
+		}
 
 		OspSplitCandidate(const AxisAlignedPlane &plane, const OspTraversalData &tData): 
@@ -1376,5 +1358,5 @@
 	/** Evaluates candidate for splitting.
 	*/
-	void EvalSplitCandidate(OspTraversalData &tData, OspSplitCandidate &splitData);
+	void EvalSplitCandidate(OspSplitCandidate &splitData);
 
 	/** Computes priority of the traversal data and stores it in tData.
@@ -1706,5 +1688,5 @@
 	SplitCandidate *NextSplitCandidate();
 
-	void RepairQueue();
+	void RepairQueue(const vector<SplitCandidate *> &dirtyList);
 
 	AxisAlignedBox3 mBoundingBox;
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/MyHeap.h
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/MyHeap.h	(revision 1099)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/MyHeap.h	(revision 1099)
@@ -0,0 +1,74 @@
+#ifndef MYHEAP_H
+#define MYHEAP_H
+
+#include <vector>
+
+/** This class implementas a heap  for
+	use as a priority queue.
+
+	The class aditionally implements efficient remove
+	of arbitrary elements.
+*/
+
+namespace GtpVisibilityPreprocessor {
+
+const static int NOT_IN_HEAP = -100;
+
+class Heapable
+{
+public:
+    Heapable() { NotInHeap(); HeapKey(0.0f); }
+
+    inline bool IsInHeap() { return mPosition != NOT_IN_HEAP; }
+    inline void NotInHeap() { mPosition = NOT_IN_HEAP; }
+    inline int GetHeapPos() { return mPosition; }
+    inline void SetHeapPos(int t) { mPosition = t; }
+
+    inline void  HeapKey(float k) { mPriority = k; }
+    inline float HeapKey() const  { return mPriority; }
+
+protected:
+
+    float mPriority;
+    int mPosition;
+};
+
+
+class MyHeap
+{
+public:
+    MyHeap() { }
+    MyHeap(unsigned int n) : mBuffer(n) { }
+
+    void Push(Heapable *t) { Push(t, t->HeapKey()); }
+    void Push(Heapable *, float);
+    bool Update(Heapable *t) { return Update(t, t->HeapKey()); }
+    bool Update(Heapable *, float);
+
+    unsigned int Size() const { return (unsigned int)mBuffer.size(); }
+	bool Empty() const {return mBuffer.empty(); }
+    Heapable       *Item(unsigned int i)       { return mBuffer[i]; }
+    const Heapable *Item(unsigned int i) const { return mBuffer[i]; }
+    Heapable *Pop();
+	Heapable *Top() { return (mBuffer.empty() ? (Heapable *)NULL : mBuffer.front()); }
+    Heapable *Erase(Heapable *);
+
+protected:
+
+    void Place(Heapable *x, unsigned int i);
+    void Swap(unsigned int i, unsigned int j);
+
+    unsigned int Parent(unsigned int i) { return (i-1)/2; }
+    unsigned int Left(unsigned int i) { return 2*i+1; }
+    unsigned int Right(unsigned int i) { return 2*i+2; }
+
+    void UpHeap(unsigned int i);
+    void DownHeap(unsigned int i);
+
+	std::vector<Heapable* > mBuffer;
+};
+
+}
+
+// MYHEAP_H
+#endif
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/MyHeap.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/MyHeap.cpp	(revision 1099)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/MyHeap.cpp	(revision 1099)
@@ -0,0 +1,152 @@
+#include "MyHeap.h"
+
+
+namespace GtpVisibilityPreprocessor {
+
+
+/*****************************************************************************/
+/*                         MyHeap implementation                             *
+/*****************************************************************************/
+
+
+
+inline void MyHeap::Place(Heapable *x, unsigned int i)
+{
+    mBuffer[i] = x;
+    x->SetHeapPos(i);
+}
+
+
+void MyHeap::Swap(unsigned int i, unsigned int j)
+{
+    Heapable *tmp = mBuffer[i];
+
+    Place(mBuffer[j], i);
+    Place(tmp, j);
+}
+
+
+void MyHeap::UpHeap(unsigned int i)
+{
+    Heapable *moving = mBuffer[i];
+    unsigned int index = i;
+    unsigned int p = Parent(i);
+
+    while ((index > 0) && (moving->SetPriority() > mBuffer[p]->SetPriority()))
+    {
+		Place(mBuffer[p], index);
+		index = p;
+		p = Parent(p);
+    }
+
+    if (index != i)
+	{
+		Place(moving, index);
+	}
+}
+
+
+void MyHeap::DownHeap(unsigned int i)
+{
+    Heapable *moving = mBuffer[i];
+
+    unsigned int index = i;
+    unsigned int l = Left(i);
+    unsigned int r = Right(i);
+    unsigned int largest;
+
+	while (l < (int)mBuffer.size())
+	{
+		if ((r < (unsigned int)mBuffer.size()) && (mBuffer[l]->SetPriority() < mBuffer[r]->SetPriority()))
+			largest = r;
+		else 
+			largest = l;
+
+		if (moving->SetPriority() < mBuffer[largest]->SetPriority())
+		{
+			Place(mBuffer[largest], index);
+			index = largest;
+			l = Left(index);
+			r = Right(index);
+		}
+		else
+		{
+			break;
+		}
+	}
+
+    if (index != i)
+	{
+		Place(moving, index);
+	}
+}
+
+
+void MyHeap::Push(Heapable *t, float v)
+{
+    t->SetPriority(v);
+
+	unsigned int i = (unsigned int)mBuffer.size();
+
+	t->SetHeapPos(i);
+	mBuffer.push_back(t);
+    
+    UpHeap(i);
+}
+
+
+bool MyHeap::Update(Heapable *t, float v)
+{
+    if (t->IsInHeap())
+		return false;
+
+    t->SetPriority(v);
+
+    unsigned int i = t->GetHeapPos();
+
+    if ((i > 0) && (v > mBuffer[Parent(i)]->SetPriority()))
+		UpHeap(i);
+    else
+		DownHeap(i);
+
+	return true;
+}
+
+
+Heapable *MyHeap::Pop()
+{
+    if (mBuffer.empty()) 
+		return NULL;
+
+    Swap(0, mBuffer.size() - 1);
+    
+	Heapable *dead = mBuffer.back();
+	mBuffer.pop_back();
+
+    DownHeap(0);
+    dead->NotInHeap();
+
+    return dead;
+}
+
+
+Heapable *MyHeap::Erase(Heapable *t)
+{
+    if (!t->IsInHeap()) 
+		return NULL;
+
+    int i = t->GetHeapPos();
+
+    Swap(i, mBuffer.size() - 1);
+
+	mBuffer.pop_back();
+    t->NotInHeap();
+
+    if (mBuffer[i]->SetPriority() < t->SetPriority())
+		DownHeap(i);
+	else
+		UpHeap(i);
+
+    return t;
+}
+}
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/FlexibleHeap.h
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/FlexibleHeap.h	(revision 1099)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/FlexibleHeap.h	(revision 1099)
@@ -0,0 +1,232 @@
+#ifndef FLEXIBLEHEAP_H
+#define FLEXIBLEHEAP_H
+
+#include <vector>
+
+using namespace std;
+
+namespace GtpVisibilityPreprocessor {
+
+const static int NOT_IN_HEAP = -100;
+
+/** This class implements an element for a heap.
+	Classes using the heap should be inherited from this class.
+*/
+class Heapable
+{
+public:
+	Heapable(): mPriority(0) { NotInHeap(); SetPriority(0.0f); }
+
+	inline bool IsInHeap() { return mPosition != NOT_IN_HEAP; }
+	inline void NotInHeap() { mPosition = NOT_IN_HEAP; }
+	inline int GetHeapPos() { return mPosition; }
+	inline void SetHeapPos(const int t) { mPosition = t; }
+
+	inline void  SetPriority(const float k) { mPriority = k; }
+	inline float GetPriority() const  { return mPriority; }
+
+protected:
+
+	float mPriority;
+	int mPosition;
+};
+
+
+/** This class implements a flexible heap for
+use as a priority queue.
+
+Unlike the stl priority_queue, the class allows access to all 
+elements. It implements efficient insertion routines and remove routines
+of arbitrary elements.
+*/
+template<typename T>
+class FlexibleHeap
+{
+public:
+	FlexibleHeap() { }
+	FlexibleHeap(const unsigned int n): mBuffer(n) { }
+
+	void Push(T t) { Push(t, t->GetPriority()); }
+	void Push(T t, const float priority);
+	bool Update(T t) { return Update(t, t->GetPriority()); }
+	bool Update(T t, const float priority);
+
+	unsigned int Size() const { return (unsigned int)mBuffer.size(); }
+	bool Empty() const {return mBuffer.empty(); }
+	T Item(const unsigned int i)       { return mBuffer[i]; }
+	const T Item(const unsigned int i) const { return mBuffer[i]; }
+	T Pop();
+	T Top() const { return (mBuffer.empty() ? (T)NULL : mBuffer.front()); }
+	/** Erases the element from the heap.
+	*/
+	T Erase(T);
+
+protected:
+
+	void Place(T x, const unsigned int i);
+	void Swap(const unsigned int i, const unsigned int j);
+
+	unsigned int Parent(const unsigned int i) const { return (i - 1) / 2; }
+	unsigned int Left(const unsigned int i) const { return 2 * i + 1; }
+	unsigned int Right(const unsigned int i) const { return 2 * i + 2; }
+
+	void UpHeap(const unsigned int i);
+	void DownHeap(const unsigned int i);
+
+	std::vector<T> mBuffer;
+};
+
+/*****************************************************************************/
+/*                         MyHeap implementation                             *
+/*****************************************************************************/
+
+template <typename T>
+inline void FlexibleHeap<T>::Place(T x, const unsigned int i)
+{
+	mBuffer[i] = x;
+	x->SetHeapPos(i);
+}
+
+
+template <typename T>
+void FlexibleHeap<T>::Swap(const unsigned int i, const unsigned int j)
+{
+	T tmp = mBuffer[i];
+
+	Place(mBuffer[j], i);
+	Place(tmp, j);
+}
+
+
+template <typename T>
+void FlexibleHeap<T>::UpHeap(const unsigned int i)
+{
+	T moving = mBuffer[i];
+	unsigned int index = i;
+	unsigned int p = Parent(i);
+
+	while ((index > 0) && (moving->GetPriority() > mBuffer[p]->GetPriority()))
+	{
+		Place(mBuffer[p], index);
+		index = p;
+		p = Parent(p);
+	}
+
+	if (index != i)
+	{
+		Place(moving, index);
+	}
+}
+
+template <typename T>
+void FlexibleHeap<T>::DownHeap(const unsigned int i)
+{
+	T moving = mBuffer[i];
+
+	unsigned int index = i;
+	unsigned int l = Left(i);
+	unsigned int r = Right(i);
+	unsigned int largest;
+
+	while (l < (int)mBuffer.size())
+	{
+		if ((r < (unsigned int)mBuffer.size()) && (mBuffer[l]->GetPriority() < mBuffer[r]->GetPriority()))
+			largest = r;
+		else 
+			largest = l;
+
+		if (moving->GetPriority() < mBuffer[largest]->GetPriority())
+		{
+			Place(mBuffer[largest], index);
+			index = largest;
+			l = Left(index);
+			r = Right(index);
+		}
+		else
+		{
+			break;
+		}
+	}
+
+	if (index != i)
+	{
+		Place(moving, index);
+	}
+}
+
+
+template <typename T>
+void FlexibleHeap<T>::Push(T t, const float v)
+{
+	t->SetPriority(v);
+
+	unsigned int i = (unsigned int)mBuffer.size();
+
+	t->SetHeapPos(i);
+	mBuffer.push_back(t);
+
+	UpHeap(i);
+}
+
+template <typename T>
+bool FlexibleHeap<T>::Update(T t, const float v)
+{
+	if (t->IsInHeap())
+		return false;
+
+	t->SetPriority(v);
+
+	const unsigned int i = t->GetHeapPos();
+
+	if ((i > 0) && (v > mBuffer[Parent(i)]->GetPriority()))
+		UpHeap(i);
+	else
+		DownHeap(i);
+
+	return true;
+}
+
+template <typename T>
+T FlexibleHeap<T>::Pop()
+{
+	if (mBuffer.empty()) 
+		return NULL;
+
+	Swap(0, mBuffer.size() - 1);
+
+	T dead = mBuffer.back();
+	mBuffer.pop_back();
+
+	DownHeap(0);
+	dead->NotInHeap();
+
+	return dead;
+}
+
+
+template <typename T>
+T FlexibleHeap<T>::Erase(T t)
+{
+	if (!t->IsInHeap()) 
+		return (T)NULL;
+
+	const int i = t->GetHeapPos();
+
+	Swap(i, (int)mBuffer.size() - 1);
+
+	mBuffer.pop_back();
+	t->NotInHeap();
+
+	if (mBuffer[i]->GetPriority() < t->GetPriority())
+		DownHeap(i);
+	else
+		UpHeap(i);
+
+	return t;
+}
+
+
+}
+
+// FLEXIBLEHEAP_H
+#endif
Index: P/trunk/Lib/Vis/Preprocessing/src/MxHeap.cxx
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/MxHeap.cxx	(revision 1097)
+++ 	(revision )
@@ -1,135 +1,0 @@
-/************************************************************************
-
-  Heap data structure
-
-  Copyright (C) 1998 Michael Garland.  See "COPYING.txt" for details.
-  
-  $Id: MxHeap.cxx,v 1.1 2002/09/24 16:53:54 wimmer Exp $
-
- ************************************************************************/
-
-//#include "stdmix.h"
-#include "MxHeap.h"
-
-
-////////////////////////////////////////////////////////////////////////
-//
-// Internal functions for manipulating the heap
-
-inline void MxHeap::place(MxHeapable *x, unsigned int i)
-{
-    ref(i) = x;
-    x->set_heap_pos(i);
-}
-
-void MxHeap::swap(unsigned int i, unsigned int j)
-{
-    MxHeapable *tmp = ref(i);
-
-    place(ref(j), i);
-    place(tmp, j);
-}
-
-void MxHeap::upheap(unsigned int i)
-{
-    MxHeapable *moving = ref(i);
-    uint index = i;
-    uint p = parent(i);
-
-    while( index>0 && moving->heap_key() > ref(p)->heap_key() )
-    {
-	place(ref(p), index);
-	index = p;
-	p = parent(p);
-    }
-
-    if( index != i )
-	place(moving, index);
-}
-
-void MxHeap::downheap(unsigned int i)
-{
-    MxHeapable *moving = ref(i);
-    uint index = i;
-    uint l = left(i);
-    uint r = right(i);
-    uint largest;
-
-    while( l<length() )
-    {
-	if( r<length() && ref(l)->heap_key() < ref(r)->heap_key() )
-	    largest = r;
-	else 
-	    largest = l;
-
-	if( moving->heap_key() < ref(largest)->heap_key() )
-	{
-	    place(ref(largest), index);
-	    index = largest;
-	    l = left(index);
-	    r = right(index);
-	}
-	else
-	    break;
-    }
-
-    if( index != i )
-	place(moving, index);
-}
-
-////////////////////////////////////////////////////////////////////////
-//
-// Exported interface to the heap
-//
-
-void MxHeap::insert(MxHeapable *t, float v)
-{
-    t->heap_key(v);
-
-    unsigned int i = add(t);
-    t->set_heap_pos(i);
-
-    upheap(i);
-}
-
-void MxHeap::update(MxHeapable *t, float v)
-{
-    SanityCheck( t->is_in_heap() );
-    t->heap_key(v);
-
-    unsigned int i = t->get_heap_pos();
-
-    if( i>0 && v>ref(parent(i))->heap_key() )
-	upheap(i);
-    else
-	downheap(i);
-}
-
-MxHeapable *MxHeap::extract()
-{
-    if( length() < 1 ) return NULL;
-
-    swap(0, length()-1);
-    MxHeapable *dead=drop();
-
-    downheap(0);
-    dead->not_in_heap();
-    return dead;
-}
-
-MxHeapable *MxHeap::remove(MxHeapable *t)
-{
-    if( !t->is_in_heap() ) return NULL;
-
-    int i = t->get_heap_pos();
-    swap(i, length()-1);
-    drop();
-    t->not_in_heap();
-
-    if( ref(i)->heap_key() < t->heap_key() )
-	downheap(i);
-    else
-	upheap(i);
-
-    return t;
-}
Index: P/trunk/Lib/Vis/Preprocessing/src/MxHeap.h
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/MxHeap.h	(revision 1097)
+++ 	(revision )
@@ -1,70 +1,0 @@
-#ifndef MXHEAP_INCLUDED // -*- C++ -*-
-#define MXHEAP_INCLUDED
-#if !defined(__GNUC__)
-#  pragma once
-#endif
-
-/************************************************************************
-
-  Heap
-
-  Copyright (C) 1998 Michael Garland.  See "COPYING.txt" for details.
-  
-  $Id: MxHeap.h,v 1.1 2002/09/24 16:53:54 wimmer Exp $
-
- ************************************************************************/
-
-//#include "MxDynBlock.h"
-typedef unsigned int uint;
-
-class MxHeapable
-{
-private:
-    float import;
-    int token;
-
-public:
-    MxHeapable() { not_in_heap(); heap_key(0.0f); }
-
-    inline bool is_in_heap() { return token != -47; }
-    inline void not_in_heap() { token = -47; }
-    inline int get_heap_pos() { return token; }
-    inline void set_heap_pos(int t) { token=t; }
-
-    inline void  heap_key(float k) { import=k; }
-    inline float heap_key() const  { return import; }
-};
-
-
-class MxHeap// : private MxDynBlock<MxHeapable *>
-{
-private:
-    void place(MxHeapable *x, unsigned int i);
-    void swap(unsigned int i, unsigned int j);
-
-    unsigned int parent(unsigned int i) { return (i-1)/2; }
-    unsigned int left(unsigned int i) { return 2*i+1; }
-    unsigned int right(unsigned int i) { return 2*i+2; }
-
-    void upheap(unsigned int i);
-    void downheap(unsigned int i);
-
-public:
-    MxHeap()/* : MxDynBlock<MxHeapable *>(8)*/ { }
-   // MxHeap(unsigned int n) : MxDynBlock<MxHeapable *>(n) { }
-
-    void insert(MxHeapable *t) { insert(t, t->heap_key()); }
-    void insert(MxHeapable *, float);
-    void update(MxHeapable *t) { update(t, t->heap_key()); }
-    void update(MxHeapable *, float);
-
-    unsigned int size() const { return length(); }
-    MxHeapable       *item(uint i)       { return ref(i); }
-    const MxHeapable *item(uint i) const { return ref(i); }
-    MxHeapable *extract();
-    MxHeapable *top() { return (length()<1 ? (MxHeapable *)NULL : raw(0)); }
-    MxHeapable *remove(MxHeapable *);
-};
-
-// MXHEAP_INCLUDED
-#endif
