Commits

Suyang Dong committed f8bbd01 Draft

Polished Comments

Comments (0)

Files changed (17)

Aurora/BuildingDamage.h

 /************************************************************************\
 
-  Copyright 2012 The University of Michigan.
-  All Rights Reserved.
+Copyright 2012 The University of Michigan.
+All Rights Reserved.
 
-  Permission to use, copy, modify and distribute this software
-  and its documentation for educational, research and non-profit
-  purposes, without fee, and without a written agreement is
-  hereby granted, provided that the above copyright notice and
-  the following paragraph appear in all copies.
+Permission to use, copy, modify and distribute this software
+and its documentation for educational, research and non-profit
+purposes, without fee, and without a written agreement is
+hereby granted, provided that the above copyright notice and
+the following paragraph appear in all copies.
 
-  THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF MICHIGAN "AS IS" AND 
-  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
-  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF MICHIGAN
-  OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-  
-  Authors:
+THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF MICHIGAN "AS IS" AND 
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF MICHIGAN
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-			Suyang Dong
-            Laboratory for Interactive Visualization in Engineering (LIVE)
-			Department of Civil and Environmental Engineering
-            2350 Hayward Street, Suite 2340 GG Brown Building
-            University of Michigan
-            Ann Arbor, MI 48109-2125
-			Phone:    (734)763-2148
-			EMail:    dsuyang@umich.edu
-			WWW site: http://pathfinder.engin.umich.edu
-            
-			Vineet R. Kamat
-            Laboratory for Interactive Visualization in Engineering (LIVE)
-			Department of Civil and Environmental Engineering
-            2350 Hayward Street, Suite 2340 GG Brown Building
-            University of Michigan
-            Ann Arbor, MI 48109-2125
-            Phone:    (734)764-4325
-			EMail:    vkamat@umich.edu
-			WWW site: http://pathfinder.engin.umich.edu
+Authors:
+
+Suyang Dong
+Laboratory for Interactive Visualization in Engineering (LIVE)
+Department of Civil and Environmental Engineering
+2350 Hayward Street, Suite 2340 GG Brown Building
+University of Michigan
+Ann Arbor, MI 48109-2125
+Phone:    (734)763-2148
+EMail:    dsuyang@umich.edu
+WWW site: http://pathfinder.engin.umich.edu
+
+Vineet R. Kamat
+Laboratory for Interactive Visualization in Engineering (LIVE)
+Department of Civil and Environmental Engineering
+2350 Hayward Street, Suite 2340 GG Brown Building
+University of Michigan
+Ann Arbor, MI 48109-2125
+Phone:    (734)764-4325
+EMail:    vkamat@umich.edu
+WWW site: http://pathfinder.engin.umich.edu
 
 \************************************************************************/
 
 #define USE_OPIMIZATION	// uncomment this if you want NO 1st and 2nd criteria opimization
 #define USE_UNIFIED_SHIFT // assume there is only one X, Y shift in one floor
 using namespace std;
-//! store the building spatial information and edge, corner detection results
+//! Store the building spatial information and edge, corner detection results.
 /*!
-	provides interface for accessing spatial building information 
-	and edge, corner detection results
+Provide interface for accessing the spatial building information 
+and the edge, corner detection results.
 */
 class CBuildingDamage
 {
 public:
-	//! a constructor 
+	//! A constructor.
 	/*!
-		\param useModel use the existing damaged building model or create a new damaged one with uniform distribution
-		\param shakeDev interval of the uniform distribution
+	\param useModel Use the existing damaged building model or create a new damaged one with uniform distribution.
+	\param shakeDev Interval of the uniform distribution.
 	*/
 	CBuildingDamage(bool useModel, float shakeDev = 0.08);
 	~CBuildingDamage(void);
-	//! get camera projection matrix when observing story at tripodPos (0 - 7)
+	//! Get the camera projection matrix when observing story at tripodPos (0 - 7).
 	inline double*			getProjMat(size_t cornerPos, size_t story){return m_projMatVec[cornerPos][story-1];}
-	//! get 2D corner estimated result reference for story observed at tripodPos (0 - 7)
+	//! Get the 2D corner estimated result reference for story observed at tripodPos (0 - 7).
 	inline osg::Vec2d&	getDetCorner2D(size_t tripodPos, size_t story){return m_detectedCorner2D[tripodPos][story-1];}
-	//! get 3D corner estimated result reference for story at cornerPos (0 - 3)
+	//! Get the 3D corner estimated result reference for story at cornerPos (0 - 3).
 	inline osg::Vec3d&	getDetCorner3D(size_t cornerPos, size_t story){return m_detectedCorner3D[cornerPos][story-1];}
-	//! get detected edge end points reference centered at story observed at tripodPos (0 - 7)
+	//! Get the detected edge end points reference centered at story observed at tripodPos (0 - 7).
 	inline osg::Vec4d&	getDetEdge(size_t tripodPos, size_t story){return m_detectedEdge[tripodPos][story-1];}
-	//! get the accuracy indcator, whether the estimation results satisfy selection requirements, for story at cornerPos (0 - 3)
-	/*! sa selectEstimation in driftEstimate.h */
+	//! Get the accuracy indcator, whether the estimation results satisfy the selection requirements, for story at cornerPos (0 - 3).
+	/*! \sa selectEstimation in driftEstimate.h */
 	inline short&			getAccuracyIndicator(size_t cornerPos, size_t story){return m_accuracyIndicator[cornerPos][story-1];}
-	//! get 3D corner shift to its undamaged position for story at cornerPos (0 - 3)
+	//! Get the 3D corner shift to its undamaged position for story at cornerPos (0 - 3).
 	inline osg::Vec3d&	getDetShift3D(size_t cornerPos, size_t story){return m_detectedShift3D[cornerPos][story-1];}
-	//! get 3D position of tripod at pos (0 - 7)
+	//! Get the 3D position of tripod at pos (0 - 7).
 	inline osg::Vec3d		getTripodPos(int pos){if (pos < 8) return m_tripodPos[pos]; else return osg::Vec3(0.f, 0.f, 0.f);}
 
-	//! create the building model and store the model 
+	//! Create the building model and store the model.
 	inline osg::Group* getOrCreateBuildingModel()
-		{return m_buildingModel->getOrCreateBuildingModel(m_bUseExistingModel);}
-	//! get the building model vertex before damage at cornerPos (0 - 3) and story
+	{return m_buildingModel->getOrCreateBuildingModel(m_bUseExistingModel);}
+	//! Get the building model vertex before damage at cornerPos (0 - 3) and story.
 	inline const osg::Vec3d getBuildingVerticesBeforeDamage(size_t cornerPos, size_t story)
-		{return m_buildingModel->getBuildingVerticesBeforeDamage(cornerPos, story);}
-	//! get the building model vertex after damage at cornerPos (0 - 3) and story
+	{return m_buildingModel->getBuildingVerticesBeforeDamage(cornerPos, story);}
+	//! Get the building model vertex after damage at cornerPos (0 - 3) and story.
 	inline const osg::Vec3d getBuildingVerticesAfterDamage(size_t cornerPos, size_t story)
-		{return m_buildingModel->getBuildingVerticesAfterDamage(cornerPos, story);}
-	//! get the model matrix node under which tripod geode is attached
+	{return m_buildingModel->getBuildingVerticesAfterDamage(cornerPos, story);}
+	//!Get the transform node under which tripod geode is attached.
 	inline osg::PositionAttitudeTransform* getTripodNode()
-		{return m_buildingModel->getTripodNode();}
-	//! get the model matrix node under which camera geode is attached
+	{return m_buildingModel->getTripodNode();}
+	//! Get the transform node under which camera geode is attached.
 	inline osg::PositionAttitudeTransform* getCameraNode()
-		{return m_buildingModel->getCameraNode();}
-	//! get the node under which both damaged and undamaged building node is attached
+	{return m_buildingModel->getCameraNode();}
+	//! Get the switch node under which both damaged and undamaged building node is attached.
 	inline const osg::Switch* getBuildingModelOnly()
-		{return m_buildingModel->getBuildingModelOnly();};
+	{return m_buildingModel->getBuildingModelOnly();};
 protected:
-	//! whether to use existing model instead of creating a new one
+	//! Whether to use the existing model instead of creating a new one.
 	bool m_bUseExistingModel;
-	//! the uniform support range of the model drifted vertices
+	//! The uniform support range of the model drifted vertices.
 	float m_shakeDev;
-	//! the building model of both before and after the damage
+	//! The building model of both before and after the damage.
 	CBuildingModel* m_buildingModel;
-	//! storing the camera projection matrix
+	//! Store the camera projection matrix.
 	vector<vector<double*> > m_projMatVec;
-	//! storing the estimated 2D corner after the damage
+	//! Store the estimated 2D corner after the damage.
 	vector<vector<osg::Vec2d> > m_detectedCorner2D;
-	//! storing the estiamted 3D corner after the damage.
+	//! Store the estiamted 3D corner after the damage.
 	vector<vector<osg::Vec3d> > m_detectedCorner3D;
-	//! storing the detected 2D edge endpoint
+	//! Store the detected 2D edge endpoint.
 	vector<vector<osg::Vec4d> >m_detectedEdge;
-	//! indicate whether the result is from the 2nd or the 1st crieteria.
-	/*! true indicates from 1st ceriteria, false is from 2nd. 
-	 basically useless when counting for instrument error */
+	//! Indicate whether the result is from the 1st or the 2nd crieteria.
+	/*! True indicates results generated by the 1st criteria, false if from the 2nd criteria. 
+	Basically useless when counting for instrument error. */
 	vector<vector<short > > m_accuracyIndicator;
-	//! record the shift of each corner, this is designed for the unified X,Y shift in one floor
-	/*! take the average if both sides measurement quality is ture (m_accuracyIndicator is 1) */
+	//! Record the shift of each corner, this is designed for the unified X,Y shift in one floor.
+	/*! Store the average value if both sides measurement quality is ture (m_accuracyIndicator is 1). */
 	vector<vector<osg::Vec3d> > m_detectedShift3D;
-	//! tripod position
+	//! The tripod position.
 	vector<osg::Vec3> m_tripodPos;
 };
 

Aurora/BuildingModel.cpp

 
 // shake the model / cause damage
 bool gShaking;
-//! switch between the damaged/undamaged model
+//! Switch between the damaged/undamaged model.
 /*!
-	CBuildingNodeCallback turn on/off the damaged 
-	and undamaged building model
+	CBuildingNodeCallback turns on/off the damaged 
+	and undamaged building model.
 */
 class CBuildingNodeCallback : public osg::NodeCallback 
 {
 public:
-	//! a constructor
+	//! A default constructor.
 	CBuildingNodeCallback(){};
-	//! a overloaded operator to turn on/off between two models
+	//! An overloaded operator to turn on/off between the two models.
 	virtual void operator() (osg::Node* node, osg::NodeVisitor* nv)
 	{
 		osg::Switch* buildingModel = dynamic_cast<osg::Switch*>(node);
 	}// if( ! bUseModel)
 
 	m_buildingAndCameraModel->addChild(createOrSetTripod(osg::Vec3d(WALL_LENGTH+15, -10.f, 0.f)));
-	m_buildingAndCameraModel->addChild(createOrSetCamera(osg::Vec3d(WALL_LENGTH+15, -10.f, 3.0f)));
+	m_buildingAndCameraModel->addChild(createOrSetCamera(osg::Vec3d(WALL_LENGTH+14.5, -9.8, 3.0f)));
 	osg::BoundingSphere bs(osg::Vec3(0.0f,0.0f,0.0f),1.0f);
     bs = m_buildingAndCameraModel->getBound();    
 

Aurora/BuildingModel.h

 	EAST
 };
 
-//! texture coordinate associated with each vertex of the building
+//! Texture coordinate associated with each vertex of the building.
 struct TexCoord {
 	TexCoord(float x, float y):_x(x), _y(y){};
 	float _x; float _y;
 };
 
-//! construct the building (damaged and undamaged) model
+//! Construct the building (damaged and undamaged) model.
 /*!
-	construct the (damaged and undamaged) building model
+	Construct the (damaged and undamaged) building model,
 	as well as the roof, terrain, camera, tripod etc.
 */
 class CBuildingModel : public osg::Referenced
 public:
 	CBuildingModel(float shakeDev);
 	~CBuildingModel(void);
-	//! get the building model node, if not existing, then initialize the model node
+	//! Get the building model node. if it does not exist, then initialize the model node.
 	/*!
-		\param bUseModel use the existing damaged model (distribution model) or 
-		create a new one (with new distribution model)
+		\param bUseModel Use the existing damaged model (distribution model) or 
+		create a new one (with new distribution model).
 	*/
 	osg::Group* getOrCreateBuildingModel(bool bUseModel = true);
-	//! get the building model vertex before damage at cornerPos (0 - 3) and story
+	//! Get the building model vertex before damage at cornerPos (0 - 3) and story.
 	inline const osg::Vec3d getBuildingVerticesBeforeDamage(size_t cornerPos, size_t story)
 		{return m_buildingVerticesBeforeDamage[story][cornerPos];}
-	//! get the building model vertex after damage at cornerPos (0 - 3) and story
+	//! Get the building model vertex after damage at cornerPos (0 - 3) and story.
 	inline const osg::Vec3d getBuildingVerticesAfterDamage(size_t cornerPos, size_t story)
 		{return m_buildingVerticesAfterDamage[story][cornerPos];}
-	//! get the model matrix node under which tripod geode is attached
+	//! Get the transform node under which the tripod geode is attached.
 	inline osg::PositionAttitudeTransform* getTripodNode(){return m_tripod.get();}
-	//! get the model matrix node under which camera geode is attached
+	//! Get the transform node under which the camera geode is attached.
 	inline osg::PositionAttitudeTransform* getCameraNode(){return m_camera.get();}
-	//! get the node under which both damaged and undamaged building node is attached
+	//! Get the node under which both damaged and undamaged building node are attached.
 	inline const osg::Switch* getBuildingModelOnly(){return m_buildingModel.get();};
 protected:
-	//! Model node and its satellites-like camera node and tripod node
+	//! The model node and its satellites-like camera node and tripod node.
 	osg::ref_ptr<osg::Group> m_buildingAndCameraModel;
-	//! building model node and the terrain node.
+	//! The building model node and the terrain node.
 	osg::ref_ptr<osg::Switch> m_buildingModel;
-	//! building model node before damage
+	//! The building model node before damage.
 	osg::ref_ptr<osg::Group> m_buildingModelBeforeDamage;
-	//! building model node after damage
+	//! The building model node after damage.
 	osg::ref_ptr<osg::Group> m_buildingModelAfterDamage;
-	//! texture coords of the North/South faces
+	//! The texture coords of the North/South faces.
 	vector<TexCoord> m_NSTexCoords;
-	//! texture coords of the East/West faces
+	//! The texture coords of the East/West faces.
 	vector<TexCoord> m_WETexCoords;
-	//! texture of the South/North face
+	//! The texture of the South/North face.
 	osg::ref_ptr<osg::Texture> m_nsTexture;
-	//! texture of the East/WEst face
+	//! The texture of the East/WEst face.
 	osg::ref_ptr<osg::Texture> m_ewTexture;
-	//! store the vertex coordinate of the building
-	/*! 11 layers, and 4 points each layer before damage */
+	//! Store the vertex coordinate of the building.
+	/*! 11 layers, and 4 points each layer before damage. */
 	vector<vector<osg::Vec3d> > m_buildingVerticesBeforeDamage;
-	//! store the vertex coordinate of the building
-	/*! 11 layers, and 4 points each layer before damage */
+	//! Store the vertex coordinate of the building.
+	/*! 11 layers, and 4 points each layer after damage. */
 	vector<vector<osg::Vec3d> > m_buildingVerticesAfterDamage;
-	//! the uniform distribution interval of the model drifted vertices
+	//! The uniform distribution interval of the model drifted vertices.
 	float m_shakeDev;
 
-	//! random variables genearater's seed
+	//! The random variables genearater's seed.
 	boost::lagged_fibonacci607 rng;
-	//! model matrix node of the tripod node
+	//! The transform node above the tripod node.
 	osg::ref_ptr<osg::PositionAttitudeTransform> m_tripod;
-	//! model matrix node of the camera node
+	//! The transform node above the camera node.
 	osg::ref_ptr<osg::PositionAttitudeTransform> m_camera;
-	//! terrain genode
+	//! The terrain geometry node.
 	osg::ref_ptr<osg::Geode> m_terrain;
-	//! undamaged roof node associated with undamaged building model
+	//! The undamaged roof node associated with the undamaged building model.
 	osg::ref_ptr<osg::Geode> m_soundRoof;
-	//! damaged roof node associated with damaged building model
+	//! The damaged roof node associated with the damaged building model.
 	osg::ref_ptr<osg::Geode> m_damagedRoof;
-	//! create the building model node with exsiting damaged model or create a new one with different uniform distribution
+	//! Create the building model node with the exsiting damaged model or create a new one with different uniform distribution value.
 	osg::Group* createBuildingModel(bool bUseExistingModel = true);
-	//! create one story at storyIndex
+	//! Create one story at storyIndex.
 	osg::Group* createStory(int storyIndex, bool damage = false);
-	//! create terrain geode if not exist, return the geode
+	//! Create the terrain geode if not exist, and return the geode.
 	osg::Geode* createOrSetTerrain();
-	//! create undamaged roof geode if not exist, return the geode
+	//! Create the undamaged roof geode if not exist, and return the geode.
 	osg::Geode* createOrSetSoundRoof();
-	//! create damaged roof geode if not exist, return the geode
+	//! Create the damaged roof geode if not exist, and return the geode.
 	osg::Geode* createOrSetDamagedRoof();
-	//! create a wall at the direction of face at storyIndex
+	//! Create a wall at the direction of the face at storyIndex.
 	osg::Geode* createWall(wallFace face, int storyIndex, bool damage = false);
-	//! set the probablistic (uniform) drift for each vertex on each layer
+	//! Set the probablistic (uniform) drift for each vertex on each layer.
 	void generateLayerVertexProbablistically(osg::Vec3d& sw,
 		osg::Vec3d& se, osg::Vec3d& ne, osg::Vec3d& nw, int storyIndex);
-	//! load texture coordinates for walls
+	//! Load the texture coordinates for walls.
 	void readTexCoords();
-	//! load texture images for walls
+	//! Load the texture images for walls.
 	void configTexture();
-	//! create building model before and after damage programablly.
+	//! Create the building model before and after damage programablly.
 	void configBuildingVertex();
-	//! load tripod model
+	//! Load the tripod model.
 	osg::PositionAttitudeTransform* createOrSetTripod(osg::Vec3d);
-	//! load camera model
+	//! Load the camera model.
 	osg::PositionAttitudeTransform* createOrSetCamera(osg::Vec3d);
 };
 

Aurora/FirstPersonViewHandler.h

 extern std::string getDataPath();
 using namespace cimg_library;
 class CViewOrganizer;
-//! Take snapshot of the first person view
+//! Take snapshot of the first person view.
 /*!
 	CSnapshot reads the pixel buffer of the first person view
-	and sharpen the image for later on edge detection 
+	and sharpen the image for theedge detection later on.
 */
 class CSnapshot : public osg::Camera::DrawCallback
 {
 	 
 	void needNewSnapShotImage(){m_snapImageNeeded = true;}
 
-	//! whether to take a screenshot of the first person view
+	//! Whether to take a screenshot of the first person view.
 	mutable bool	m_snapImageNeeded;
 protected:
-	//! reference of snapshot image of the first person view
+	//! Reference of snapshot image of the first person view.
 	osg::Image& m_snapImage;
-	//! overloaded operator to read first person view and sharpen it
+	//! The overloaded operator to read first person view and sharpen it.
 	virtual void operator() (osg::RenderInfo& renderInfo) const
 	{
 		if(!m_snapImageNeeded) return;
 	}
 };
 
-//! View handler of the first person view
+//! View handler of the first person view.
 /*!
-	Control the position and orientation of the camera
+	Control the position and orientation of the camera.
 */
 class CFirstPersonViewHandler :
 	public osgGA::GUIEventHandler
 {
 	CBuildingDamage& m_buildingDamage;
-	//! the index of the corner from 0 to 7
+	//! The index of the corner from 0 to 7.
 	int m_pos;
-	//! the story level of the building, 10 in total, don't worry about the base
+	//! The story level of the building, 10 in total, don't worry about the base.
 	int m_story;
-	//! the next page_up/down increase/decrease story or pos value
+	//! The next page_up/down increase/decrease story or pos value.
 	bool m_bStoryIncrease;
-	//! changing the viewing matrix if the target(story or corner) has changed
+	//! Change the viewing matrix if the target(story or corner) has changed.
 	bool m_bTargetChanged;
-	//! if a new snapshot is taken, this message is captured by the photoViewHandler 
+	//! If a new snapshot is taken, this message is captured by the photoViewHandler.
 	bool m_bNewPhotoTaken;
-	//! reference to snapshot of the first person view
+	//! Reference to snapshot of the first person view.
 	CSnapshot& m_snapshot;
-	//! referece to pause/resume the automatic detection
+	//! Referece to pause/resume the automatic detection.
 	bool& m_bProceed;
 
 public:
-	//! a constructor
+	//! A constructor.
 	/*!
-		\param buildingDamage reference to CBuildingDamage where building spatial information is stored 
-		\param snapshot refrence to the snapshot of the first person view
-		\param m_bProceed reference to pause/resume switch of the auto detection 
+		\param buildingDamage Reference to CBuildingDamage where the building spatial information is stored.
+		\param snapshot Refrence to the snapshot of the first person view.
+		\param m_bProceed Reference to pause/resume switch of the auto detection.
 	*/
 	CFirstPersonViewHandler(CBuildingDamage& buildingDamage,
 		CSnapshot& snapshot, 
 	inline int getCurrentPos() const{return m_pos;}
 	inline int getCurrentStory() const{return m_story;}
 	inline osg::Vec3d getCurrentTripodPos() const{return m_buildingDamage.getTripodPos(m_pos);}
-	//! if calling this function, it will change the value to false if it is true, otherwise no change
+	//! Change the value to false if the value is true, otherwise no change.
 	inline bool checkNewPhotoTaken(){if (m_bNewPhotoTaken) {m_bNewPhotoTaken = !m_bNewPhotoTaken; 
 		return true;} else return false;}
-	//! overloaded handler to control the orientation, location of the camera
+	//! The overloaded handler to control the orientation, location of the camera.
 	bool handle(const osgGA::GUIEventAdapter& ea, 
 									 osgGA::GUIActionAdapter& aa);
 };

Aurora/PhotoViewHandler.h

 class CFirstPersonViewHandler;
 class CBuildingDamage;
 
-//! Take snapshot of a specified area of Photo View
+//! Take snapshots of a specified area of Photo View.
 /*!
 	CMagnifyShot reads the pixel buffer of the Photo View
 	with specified size into an snapshot image and updates 
-	the texture it is associated with. 
+	the texture with which it is associated.
 */
 class CMagnifyShot : public osg::Camera::DrawCallback
 {
 public:
-	//! A constructor
+	//! A constructor.
 	/*! 
-		\param image the snapshot to which the reading pixel buffer is copy
+		\param image The snapshot to which the reading pixel buffer is coped.
 	*/
 	CMagnifyShot(osg::Image& image):
 	  m_snapImage(image),  m_bMagnifiedImageNeeded(true){};
 	 ~CMagnifyShot(void){};
 
 public: 
-	//! set the x coordinate of the original point of copying area
+	//! Set the x coordinate of the original point of copying area.
 	void setX(int x){_x = x;}
-	//! set the y coordinate of the original point of copying area
+	//! Set the y coordinate of the original point of copying area.
 	void setY(int y){_y = y;}
-	//! set the width of the copying area
+	//! Set the width of the copy area.
 	void setWidth(int width){_width = width;};
-	//! set the height of the copying area
+	//! Set the height of the copy area.
 	void setHeight(int height){_height = height;};
 protected:
-	//! reference of snapshot image
+	//! Reference to the snapshot image.
 	osg::Image& m_snapImage;
 	int _x, _y, _width, _height;
-	//! whether the user wants to take a screenshot
+	//! Whether the user wants to take a screenshot.
 	mutable bool	m_bMagnifiedImageNeeded;
 
-	//! overloaded operator to copy speficied area of pixel buffer 
+	//! The overloaded operator to copy speficied area of the pixel buffer 
 	//! into the snapshot. 
 	virtual void operator() (osg::RenderInfo& renderInfo) const
 	{
 	void needNewMagnifiedImage(){m_bMagnifiedImageNeeded = true;}
 };
 
-//! View handler of the eagle view 
+//! The view handler of the eagle view.
 /*!
-	Redraw the specified area of photo view in a magnified way 
+	Redraw the specified area of the photo view in a magnified way,
 	when the viewport of the eagle view is changed passively.
 */
 class CEagleViewHandler:
 	public osgGA::GUIEventHandler
 {
 protected:
-	//! previous viewport width of the eagle view
+	//! The previous viewport width of the eagle view.
 	int m_preViewportWidth;
-	//! previous viewport height of the eagle view
+	//! The previous viewport height of the eagle view.
 	int m_preViewportHeight;
 public:
 	CEagleViewHandler():m_preViewportWidth(0.f), m_preViewportHeight(0.f){};
 		~CEagleViewHandler(void){};
-	//! overloaded handler to change the size and viewport of the eagle view
+	//! The overloaded handler to change the size and viewport of the eagle view.
 	bool handle(const osgGA::GUIEventAdapter& ea, 
 									 osgGA::GUIActionAdapter& aa)
 	{
 	}
 };
 
-//! View handler of the photo view 
+//! The view handler of the photo view.
 /*!
-	view handler of the photo view where edge detection 
-	and corner estimation takes place
+	The view handler of the photo view where edge detection 
+	and corner estimation take place.
 */
 class CPhotoViewHandler :
 	public osgGA::GUIEventHandler
 protected:
 	CFirstPersonViewHandler& m_firstperson;
 	CBuildingDamage& m_buildingDamage;
-	//! reference of snapshot image of the first person view
+	//! Reference to the snapshot image of the first person view.
 	osg::Image& m_snapImage;
-	//! reference of magnifyShot responsible for taking the snapshot
+	//! Reference to the magnifyShot responsible for taking the snapshot.
 	CMagnifyShot& m_magnifyShot;
 	/*! 
-		previous viewport width of the photo view
-		WARNING: Don't change viewport if want to reconstruct
+		The previous viewport width of the photo view.
+		WARNING: Don't change viewport size, if the program is to reconstruct
 		all the corners as a whole at the end (that is pressing 5) or 
-		do error Analysis later on in errorAna.exe
+		do error Analysis later on in errorAna.exe.
 	*/
 	int m_preViewportWidth;
 	/*! 
-		previous viewport height of the photo view
-		WARNING: Don't change viewport if want to reconstruct
+		The previous viewport height of the photo view.
+		WARNING: Don't change viewport size, if the program is to reconstruct
 		all the corners as a whole at the end (that is pressing 5) or 
-		do error Analysis later on in errorAna.exe
+		do the error Analysis later on in errorAna.exe.
 	*/
 	int m_preViewportHeight;
-	//! current tripod position (can be from 0 ~ 7)
+	//! The current tripod position (can be from 0 ~ 7).
 	int m_curTripodPos;
-	//! current story being observed at the center of the photo view
+	//! The current story being observed at the center of the photo view.
 	int m_curStory;
-	//! an estimation value of the the gap between horizontal baseline and the actual edge
+	//! The estimation value of the the gap between the horizontal baseline and the actual edge.
 	double m_horShift;
-	//! x coordinate of the mouse click location
+	//! The x coordinate of the mouse click location.
 	float m_fLastX;
-	//! y coordinate fo the mouse click location
+	//! The y coordinate fo the mouse click location.
 	float m_fLastY;
-	//! the magnitude for enlarging the specified area in eagle view
+	//! The magnitude for enlarging the specified area in the eagle view.
 	float m_nExtraMagnifyScale;
-	//! whether necessary filtering work (bounding box filtering or right button selection) is done before drawing cross
+	//! Whether necessary filtering work (bounding box filtering or right button selection) is done before drawing cross.
 	bool m_bNeedFiltering;
-	//! uniform distribution
+	//! The uniform distribution value.
 	float m_fShakeInterval;
 	
-	//! \brief clear all detected lines by LSD, bounding box, and cross at the time 
-	//! when new snapshot of first person view is taken
 	/*! 
-		\param root root to which all deleted elements were attached 
+		\brief Clear all the detected lines by LSD, bounding box, and cross,
+	 when new snapshot of the first person view is taken.
+		\param root The root node to which all the deleted elements were attached.
 	*/
 	void clearDetectedLines(osg::Group& root);
-	//! \brief return 2D vertices of the horizontal or vertical baselines
+	//! \brief Return the 2D vertices of the horizontal or vertical baselines.
 	/*!
-		\param root root to which baseline is attached
-		\param name the node name of the baseline
-		\param order return the line in the order of minX, minY, maxX, and maxY if true
+		\param root The root node to which baseline is attached.
+		\param name The node name of the baseline.
+		\param order If true, return the line in the order of minX, minY, maxX, and maxY.
 	*/
 	osg::Vec4d getVertexOfOriginalBaseLine(osg::Group& root, const char* name, bool order = true);
-	//! \brief draw the cross at the place where vertical edge and horizontal baseline intersects
+	//! \brief Draw the cross at the place where vertical edge and horizontal baseline intersects
 	/* !
-		\param root the roor to which the cross geometry is attached
-		\param center the location of the cross
+		\param root The roor node to which the cross geometry is attached.
+		\param center The location of the cross.
 	*/
 	void drawCrossAtPoint(osg::Group& root, osg::Vec2d center);
-	//! \brief draw the horizontal baseline on the photo view based on the estimated shift
+	//! \brief Draw the horizontal baseline on the photo view based on the estimated shift.
 	/*! Because of the perpendicular shift to the horizontal baseline, there is a gap between the 
-		original baseline and actual horizontal edge. That is why we need to add estimated shift to compensate the gap.
-		\param root root to which the horizontal baseline is attached
-		\param height height of the viewport of the photo view
-		\param shift estimated perpendicular shift to the original horizontal baseline
+		original baseline and the actual horizontal edge. That is why we need to add the estimated shift to compensate the gap.
+		\param root The root node to which the horizontal baseline is attached.
+		\param height The height of the viewport of the photo view.
+		\param shift The estimated perpendicular shift to the original horizontal baseline.
 	*/
 	void drawHorizontalBaseline(osg::Group& root, int height, double shift);
-	//! \brief draw the original vertical baseline from the upper level to the lower level relative to the current story
+	//! \brief Draw the original vertical baseline from the upper level to the lower level relative to the current story.
 	/*!
-		\param root root to which the vertical baseline is attached
-		\param height height of the viewport of the photo view
+		\param root The root node to which the vertical baseline is attached.
+		\param height The height of the viewport of the photo view.
 	*/
 	void drawVerticalBaseline(osg::Group& root, int height);
 	
 	//! \brief resize/reallocate the magnify window based on the location of the left button push or  move
 	void resizeMagnifyWindow(int width, int height);
-	//! \brief estimate the corner coordinate by iteratively testing all possible perpendicular shift of the horizontal baseline 
-	//! to its original position
+
 	/*!
-		\param corner the position of the buildingc orner from 0 to 3
-		\param story the story of the building
-		\param view_height the height of the viewport of the photo view
-		\param bAccurate use accurate mode means shifting both ends of the baseline with 
-		different distance, inaccurate mode shift them with the same distance
+		\brief Estimate the corner coordinate by iteratively testing all possible perpendicular
+				shift of the horizontal baseline to its original position.
+		\param corner The position of the building corner from 0 to 3.
+		\param story The story of the building.
+		\param view_height The height of the viewport of the photo view.
+		\param bAccurate Use the accurate mode means shifting both ends of the baseline with 
+		different distance, the inaccurate mode shifting both ends with the same distance.
 	*/
 	void iterativeEstimate(int corner, int story, int view_height, bool bAccurate = false);
 public:
-	//! \brief a constructor
+	//! \brief A constructor.
 	/*!
-		\param buildingDamage acquiring and storing buiding information and detection results
-		\param firstperson to notify the changing observing target (story and corner)
-		\param image snapshot of the first person view
-		\param magnifyShot take photos of the specified area of photo view
+		\param buildingDamage Acquire and store the buiding information and detection results.
+		\param firstperson Notify the change of the observing target (story and corner).
+		\param image The snapshot of the first person view.
+		\param magnifyShot Take photos of the specified area of photo view.
 	*/
 	CPhotoViewHandler(CBuildingDamage& buildingDamage,
 		CFirstPersonViewHandler& firstperson,
 		float fShakeInterval
 	);
 	~CPhotoViewHandler(void);
-	//! \brief a overloaded handler for detecting vertical edge, searching horizontal baseline
-	//! and estimating the corner 3D coordinate with human interference
+	//! \brief The overloaded handler for detecting vertical edge, searching horizontal baseline
+	//! and estimating the corner 3D coordinate with human interference.
 	bool handle(const osgGA::GUIEventAdapter& ea, 
 									 osgGA::GUIActionAdapter& aa);
 };

Aurora/ThirdPersonViewHandler.h

 
 using namespace osgGA;
 
-//! View handler of the third person view
+//! The view handler of the third person view
 /*!
-	A overloaded trackballManipulator
+	A overloaded trackballManipulator.
 */
 class CThirdPersonViewHandler :
 	public osgGA::TrackballManipulator
 {
-	//! overloaded handler to manipulate the trackerball
+	//! Th overloaded handler to manipulate the trackerball.
 	virtual bool handle(const osgGA::GUIEventAdapter& ea,
 		osgGA::GUIActionAdapter& aa);
 	

Aurora/ViewOrganizer.cpp

Binary file modified.

Aurora/ViewOrganizer.h

 using namespace std;
 class CBuildingModel;
 
-//! Organizer of Multiple Views
+//! The organizer of multiple views.
 /*!
 	CViewOrganizer constructs all the views and attach funtional 
 	viewhandlers to them.
 class CViewOrganizer
 {
 public:
-	//! A constructor
+	//! A constructor.
 	/*! 
-		\param useModel whether to use existing damaged model or recreate a new one randomly
-		\param shakeDev the uniform distribution interval to create a new damaged model
-		\param thirdPersonView whether to show the third person view where user can maneuver the scene
-		\param playSpeed the playing speed in the auto detection mode
+		\param useModel Whether to use the existing damaged model or recreate a new one randomly.
+		\param shakeDev The uniform distribution interval to create a new damaged model.
+		\param thirdPersonView Whether to show the third person view where the user can maneuver the scene.
+		\param playSpeed The play speed in the auto detection mode.
 	*/
 	CViewOrganizer(bool useModel, float shakeDev = 0.04, bool thirdPersonView = false, int playSpeed = 7);
-	//! A destructor
+	//! A destructor.
 	~CViewOrganizer(void);
-	//! Construct all the views and viewhandlers
+	//! Construct all the views and viewhandlers.
 	void run();
 
 protected:
-	//! composite viewer that contains all the views 
+	//! The composite viewer that contains all the views.
 	osg::ref_ptr<osgViewer::CompositeViewer> viewer;		
-	//! pointer to the building information and damage detection results are stored
+	//! The pointer to the building information and the damage detection results are stored.
 	CBuildingDamage* m_pBuildingDamage;
-	//! snapshot of the first person view for updating texture pasted on photo view 
+	//! The snapshot of the first person view for updating the texture pasted on photo view.
 	osg::ref_ptr<osg::Image> m_snapImage;
-	//! snapshot of a certain zone of the photo view for updating texture pasted on magnify view
+	//! The snapshot of a certain zone of the photo view for updating the texture pasted on the magnify view.
 	osg::ref_ptr<osg::Image> m_magnifyImage;
-	//! step numbers for automatic detection
+	//! The step numbers for automatic detection.
 	int m_nStep; 
-	//! the play speed of the automatic detection mode
-	/*! if it is 0, it means using manual mode */
+	//! The play speed of the automatic detection mode.
+	/*! if it is 0, it means using the manual mode */
 	int m_nPlaySpeed;
-	//! pause or resume the automatic detection
+	//! Pause or resume the automatic detection.
 	/*! \sa FirstPersonViewHandler::m_bProceed */
 	bool m_bProceed;
-	//! whether to show third person view or not
+	//! Whether to show the third person view or not.
 	bool m_bShowThirdPersonView;
-	//! uniform distribution
+	//! The uniform distribution value.
 	float m_fShakeInterval;
 	
-	//! \brief create a quad with texture showing the snapshot of the first person view
+	//! \brief Create a quad with texture showing the snapshot of the first person view.
 	/*! 
-		\param image the snapshot image of the first person view
-		\param viewport the viewport of the photo view
+		\param image The snapshot image of the first person view.
+		\param viewport The viewport of the photo view.
 	*/
 	osg::Group* createSnapshotQuad(osg::Image* image, const osg::Viewport* viewport);
-    //! \brief create a quad with speicified texture
+    //! \brief Create a quad with the speicified texture.
 	/*!
-		\param image handler to the snapshot image
-		\param viewport the viewport of the magnified view
-		\param geodeName for searching purpose
+		\param image The handler to the snapshot image.
+		\param viewport The viewport of the magnified view.
+		\param geodeName The geode's name for searching purpose.
 	*/
 	osg::Group* createQuadView(osg::Image* image, const osg::Viewport* viewport,  const char* geodeName);
 

Aurora/driftEstimate.h

 #define STEP								0.01		// estimation step between [-SUPPORT, SUPPORT]
 
 using namespace std;
-//! store the drfit config that satisfy the XY error constratint.
+//! Store the drfit config that satisfy the XY error constratint.
 struct ErrorInfo {
 	osg::Vec2d shift;
 	osg::Vec2d cornerShift;
 	osg::Vec3d estimation;
 	osg::Vec3d error;
 };
-//! record the index of error info array to store the drift configs that minimizes XY and Z error
+//! Record the index of error info array to store the drift configs that minimizes XY and Z error.
 static int estimof1stCriteria;
-//! record the drift configs that minimizes the Z error.
+//! Record the drift configs that minimizes the Z error.
 static float estimXShiftof2ndCriteria, estimYShiftof2ndCriteria;
-//! the error of the estimated X, Y, Z coord 
-/*! assume the z coord doesn't change, (but the estimated Z does change 
-	due to detection and instrument uncertainty) */
+//! Record the error of the estimated X, Y, Z coord.
+/*! Assume the z coord doesn't change, (but the estimated Z does change 
+	due to detection and instrument uncertainty). */
 static float estimBestXYError, estimBestZError;
-//! the actual best (without bias) candidate the in all the iterating test
+//! The actual best (without bias) candidate the in all the iterating test.
 /*! Given the ground true drift, all the iteration results can be compared with it 
 	and the best candidate can thus be identified. Unlike estimBestXYError and estimBestZError,
-	it is chosen by the filter and thus contains bias*/
+	it is chosen by the filter and thus contains bias.*/
 static float actualBestXShift, actualBestYShift, actualBestXYError, actualBestZError;	
-//! record all the drift config that satisfy the XY error constraint. 
+//! Record all the drift config that satisfy the XY error constraint. 
 static vector<ErrorInfo> errorInfo;
 
 /*! 
 	\brief One iteration for one corner given the center and side trial shift. 
-			The estimated result is recorded if it pleases the filter
+	* 
+	* The estimated result is recorded if it pleases the filter.
 	\sa	selectEstimation(...)
 */
 inline void estimate(const Corner& actual, const Corner& original, const Corner& opt_sd1, const Corner& opt_sd2, osg::Vec4d edge1, osg::Vec4d edge2,
 }
 
 /*!
-	\brief Given all the qualifed/recorded candidate, either from first criteria (X, Y, Z) or the second criteria (only Z)
-			find out the best reconstructed corner TO THE ALGORITHM BELIEF 
+	\brief Given all the qualifed/recorded candidate, either from first criteria (X, Y, Z) or the second criteria (only Z),
+			find out the best reconstructed corner TO THE ALGORITHM BELIEF.
 	\sa estimate
-	\param	actual		ground true corner coordinate after damage
-	\param original		known corner coordinate before damage
-	\param opt_sd1	the chosen side corner on the left image (for connect horitzontal edge with the center corner)
-	\param opt_sd2	the chosen side corner on the right image (for connect horitzontal edge with the center corner)
-	\param edge1		detected vertical edge on the left image
-	\param edge2		detected vertical edge on the right image
-	\param xShift		center corner's perpendicular shift to the horizontal edge on the left image
-	\param yShift		center corner's perpendicular shift to the horizontal edge on the right image
-	\param xCornerShift	side corner's perpendicular shift to the horizontal edge on the left image
-	\param yCornerShift	side corner's perpendicular shift to the horizontal edge on the right image
-	\param proj1		camera projection matrix on the left image
-	\param proj2		camera projection matrix on the right image
-	\param imgHeight	viewport height
-	\param detectedCorner3D	reference to the detected corner 3D coordiante storage
-	\param detectedShift3D		reference to the detected corner 3D drift storage
-	\param accuracyIndicator		reference to the accuracy of the corner detection results (0 or 1, 1 implis good)
+	\param	actual		The ground true corner coordinate after damage.
+	\param original		The known corner coordinate before damage.
+	\param opt_sd1	The chosen side corner on the left image (for connect horitzontal edge with the center corner).
+	\param opt_sd2	The chosen side corner on the right image (for connect horitzontal edge with the center corner).
+	\param edge1		The detected vertical edge on the left image.
+	\param edge2		The detected vertical edge on the right image.
+	\param xShift		The center corner's perpendicular shift to the horizontal edge on the left image.
+	\param yShift		The center corner's perpendicular shift to the horizontal edge on the right image.
+	\param xCornerShift	The side corner's perpendicular shift to the horizontal edge on the left image.
+	\param yCornerShift	The side corner's perpendicular shift to the horizontal edge on the right image.
+	\param proj1		The camera projection matrix on the left image.
+	\param proj2		The camera projection matrix on the right image.
+	\param imgHeight	The viewport height.
+	\param detectedCorner3D	The reference to the detected corner 3D coordiante storage.
+	\param detectedShift3D		The reference to the detected corner 3D drift storage.
+	\param accuracyIndicator		The reference to the accuracy of the corner detection results (0 or 1, 1 implies good).
 
 */
 inline void selectEstimation(const Corner& actual, const Corner& original, const Corner& opt_sd1, const Corner& opt_sd2, 
 
 }
 /*! 
-	This approach accurately iterate through all the possible drift, for which
+	This approach approximately iterate through all the possible drift, for which
 	the center and side corner share the same tried drift.
 	 which is faster than the 'accurate' approach, without compromise on accuracy.
 	 \sa accurateEstimate(...)

Aurora/mathHelper.h

 /*********************************************************************************************************\
 
-  Copyright 2012 The University of Michigan.
-  All Rights Reserved.
+Copyright 2012 The University of Michigan.
+All Rights Reserved.
 
-  Permission to use, copy, modify and distribute this software
-  and its documentation for educational, research and non-profit
-  purposes, without fee, and without a written agreement is
-  hereby granted, provided that the above copyright notice and
-  the following paragraph appear in all copies.
+Permission to use, copy, modify and distribute this software
+and its documentation for educational, research and non-profit
+purposes, without fee, and without a written agreement is
+hereby granted, provided that the above copyright notice and
+the following paragraph appear in all copies.
 
-  THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF MICHIGAN "AS IS" AND 
-  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
-  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF MICHIGAN
-  OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-  
-  Authors:
+THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF MICHIGAN "AS IS" AND 
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF MICHIGAN
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-			Suyang Dong
-            Laboratory for Interactive Visualization in Engineering (LIVE)
-			Department of Civil and Environmental Engineering
-            2350 Hayward Street, Suite 2340 GG Brown Building
-            University of Michigan
-            Ann Arbor, MI 48109-2125
-			Phone:    (734)-763-2148
-			EMail:    dsuyang@umich.edu
-			WWW site: http://pathfinder.engin.umich.edu
-            
-			Vineet R. Kamat
-            Laboratory for Interactive Visualization in Engineering (LIVE)
-			Department of Civil and Environmental Engineering
-            2350 Hayward Street, Suite 2340 GG Brown Building
-            University of Michigan
-            Ann Arbor, MI 48109-2125
-            Phone:    (734)764-4325
-			EMail:    vkamat@umich.edu
-			WWW site: http://pathfinder.engin.umich.edu
+Authors:
+
+Suyang Dong
+Laboratory for Interactive Visualization in Engineering (LIVE)
+Department of Civil and Environmental Engineering
+2350 Hayward Street, Suite 2340 GG Brown Building
+University of Michigan
+Ann Arbor, MI 48109-2125
+Phone:    (734)-763-2148
+EMail:    dsuyang@umich.edu
+WWW site: http://pathfinder.engin.umich.edu
+
+Vineet R. Kamat
+Laboratory for Interactive Visualization in Engineering (LIVE)
+Department of Civil and Environmental Engineering
+2350 Hayward Street, Suite 2340 GG Brown Building
+University of Michigan
+Ann Arbor, MI 48109-2125
+Phone:    (734)764-4325
+EMail:    vkamat@umich.edu
+WWW site: http://pathfinder.engin.umich.edu
 
 \*********************************************************************************************************/
 
 Filename: <driftEstimate.h>
 --
 Description: This file <created on 12/1/2011
-	some math helper functions that can be used in both Aurora and errorAna>
+some math helper functions that can be used in both Aurora and errorAna>
 \*********************************************************************************************************/
 #ifndef ARQUAKE_MATH_HELPER_INCLUDE
 #define ARQUAKE_MATH_HELPER_INCLUDE
 enum EulerAngle { YAW, PITCH, ROLL};
 using namespace LSD;
 
-//! Contains the position information about each building corner at the key location
+//! Corner contains the position information about each building corner at the key location.
 struct Corner {
-	size_t quadrant;			//!< can be 0, 1, 2, 3 
-	size_t story;					//!< story level
-	osg::Vec3d coord;			//!< 3d coordinate
+	size_t quadrant;			//!< Can be 0, 1, 2, 3.
+	size_t story;					//!< Story level.
+	osg::Vec3d coord;			//!< 3d coordinate.
 public:
-	//! a constructor
+	//! A constructor.
 	Corner(size_t _quadrant, size_t _story, osg::Vec3d _coord) {quadrant = _quadrant;
-		story = _story, coord = _coord;}
-	//! a default constructor
+	story = _story, coord = _coord;}
+	//! A default constructor.
 	Corner() {quadrant = 0; story = 0; coord = osg::Vec3d(0.f, 0.f, 0.f);}
 };
 
-//! the region and coordinate where tripod is set up to observe the building
+//! The region and coordinate where tripod is set up to observe the building.
 struct Tripod {
-	size_t quadrant;			//!< can be 0, 1,2,3,4,5,6,7
-	osg::Vec3d coord;			//!< 3d	 coordinate
+	size_t quadrant;			//!< Can be 0, 1,2,3,4,5,6,7.
+	osg::Vec3d coord;			//!< 3d coordinate.
 public:
-	//! a constructor
+	//! A constructor.
 	Tripod(size_t _quadrant, osg::Vec3d _coord) {quadrant = _quadrant; coord = _coord;}
-	//! a default constructor
+	//! A default constructor.
 	Tripod(){quadrant = 0; coord = osg::Vec3d(0.f, 0.f, 0.f);}
 };
 
 
 static void error(char * msg)
 {
-  fprintf(stderr,"LSD Error: %s\n",msg);
-  exit(EXIT_FAILURE);
+	fprintf(stderr,"LSD Error: %s\n",msg);
+	exit(EXIT_FAILURE);
 }
 
 /*! 
-	\brief given the perpective matrix, convert the 3D corner to 2D corner
-	\param	cn		3D corner coordinate
-	\param	proj	camera projection matrix
-	\param imgHeight viewport height
+\brief Given the perpective matrix, convert the 3D corner to 2D corner.
+\param	cn		The 3D corner coordinate.
+\param	proj	The camera projection matrix.
+\param imgHeight The viewport height.
 */
 inline osg::Vec2d convert2ImgCoord(const Corner& cn, const double* proj, size_t imgHeight)
 {
 	osg::Vec2d imgCoord;
 	double x, y, h;
 	int a = proj[0];	int b = proj[1];	int c = proj[2];	int d = proj[3];
-			
+
 	x = proj[0]*cn.coord.x()	+ proj[1]*cn.coord.y() + proj[2]*cn.coord.z() + proj[3];
 	y = proj[4]*cn.coord.x() + proj[5]*cn.coord.y() + proj[6]*cn.coord.z() + proj[7];
 	h = proj[8]*cn.coord.x() + proj[9]*cn.coord.y() + proj[10]*cn.coord.z() + proj[11];
 }
 
 /*!
-	\brief shift the the center (ct) (facing the camera) and side corner (sd) 
-			(adjacent to the center corner) by specified drifting value
-	\param ct			center corner, the one on the edge at the middle of the photo view
-	\param sd			side corner, the one on the edge adjacent to the edge in the middel
-	\param ctDrift	the drifting distance of the center corner perpendicular to the horizontal baseline
-	\param sdDrift	the drifting distance of the side corner perpendicular to the horizontal baseline
+\brief Shift the center (ct) (facing the camera) and side corner (sd) 
+(adjacent to the center corner) by the specified drifting value.
+\param ct			The center corner, the one on the edge at the middle of the photo view.
+\param sd			The side corner, the one on the edge adjacent to the edge in the middel.
+\param ctDrift	The drifting distance of the center corner perpendicular to the horizontal baseline.
+\param sdDrift	The drifting distance of the side corner perpendicular to the horizontal baseline.
 */
 inline void driftCenterAndSideCorner(Corner& ct, Corner& sd, float ctDrift, float sdDrift)
 {
-	
+
 	// it is very bad that since the line is not culled by the view frutstum, if it is getting too far away from the frustum, 
 	// whose point of view is centerCorner, it is not projected correctly using the computer visioin projeciton matrix. 
 	// Therefore we want to shroten the distance between the sideCorner and the centerCorner
 }
 
 /*! 
-	\brief chose the corner that has lowest slope connected with the center corner
-	\param tripod	tripod position
-	\param	ct			center corner on the image
-	\param sd1		side corner on the left wall abut the edge in the middle
-	\param sd2		side corner on the right wall abut the edge in the middle
-	\param	proj		camera projection matrix
-	\param imgHeight viewport height
+\brief Chose the corner that has lowest slope connected with the center corner.
+\param tripod	The tripod position.
+\param	ct			The center corner on the image.
+\param sd1		The side corner on the left wall abut the edge in the middle.
+\param sd2		The side corner on the right wall abut the edge in the middle.
+\param	proj		The camera projection matrix.
+\param imgHeight The viewport height.
 */
 inline int selectOptSideCorner(const Tripod& tripod, const Corner& ct, const Corner& sd1, const Corner& sd2, 
 							   const double* proj, size_t imgHeight)
 		} else if (_sd1.coord.y() != ct.coord.y())  {
 			_sd1.coord[1] -= ((_sd1.coord.y() - ct.coord.y())*0.995);		
 		}
-		
+
 		double slope1, slope2;
 		slope1 = slope2 = 10000.0;
 		osg::Vec2d ct_2d	= convert2ImgCoord(ct, proj, imgHeight);
 		osg::Vec2d sd_2d	= convert2ImgCoord(sd1, proj, imgHeight);
-		
+
 		if(sd_2d.x() != ct_2d.x())
-				slope1 = abs((sd_2d.y()-ct_2d.y()) / (sd_2d.x()-ct_2d.x()));
+			slope1 = abs((sd_2d.y()-ct_2d.y()) / (sd_2d.x()-ct_2d.x()));
 
 		sd_2d = convert2ImgCoord(sd2, proj, imgHeight);
 		if(sd_2d.x() != ct_2d.x()) 
 }
 
 
-//! calculate distance between points on 2D plane
+//! Calculate the distance between two points on 2D plane.
 inline double calcDistanceBetweenPoints(osg::Vec2d& p1, osg::Vec2d& p2)
 {
 	return pow((p1.x()-p2.x()),2)+pow((p1.y()-p2.y()),2);
 }
 
 
-//! calculate the intersection between line1 and line2 on 2D plane
+//! Calculate the intersection between the line1 and the line2 on 2D plane.
 inline osg::Vec2d calcLineIntersection(osg::Vec4d line1, osg::Vec4d line2)
 {
 	osg::Vec2d intersection;
 	double A1 = y2 - y1;
 	double B1 = x1 - x2;
 	double C1 = A1*x1 + B1*y1;
-	
+
 	x1 = line2.x();
 	y1 = line2.y();
 	x2 = line2.z();
 	return intersection;
 }
 
-//! generate intensity from RGB image
+//! Generate intensity from the RGB image.
 inline double* generateImageDouble(unsigned char* rgbImage, int xsize, int ysize)
 {
-	  double* image;
+	double* image;
 
-	  //// check parameters 
-	  if( xsize == 0 || ysize == 0 ) error("new_image_double: invalid image size.");
+	//// check parameters 
+	if( xsize == 0 || ysize == 0 ) error("new_image_double: invalid image size.");
 
-	  //// get memory 
-	  image = (double *) calloc( (size_t) (xsize*ysize), sizeof(double) );
-	  if( image == NULL ) error("not enough memory.");
+	//// get memory 
+	image = (double *) calloc( (size_t) (xsize*ysize), sizeof(double) );
+	if( image == NULL ) error("not enough memory.");
 
-	  ////assign the value
-	  unsigned int size = xsize*ysize;
-	  for (size_t i = 0 ; i < size; i++) {
-		  image[i] = (rgbImage[i*3]+rgbImage[i*3+1]+rgbImage[i*3+2])/3.0;
-	  }
-	  return image;
+	////assign the value
+	unsigned int size = xsize*ysize;
+	for (size_t i = 0 ; i < size; i++) {
+		image[i] = (rgbImage[i*3]+rgbImage[i*3+1]+rgbImage[i*3+2])/3.0;
+	}
+	return image;
 }
 
 
 
 /*! 
-	\brief Given the possible shift of the corner, triangulate its estimasted 3D coordinates.
-	\param	ct			center corner on both image
-	\param sd1		side corner on the left image
-	\param	sd2		side corner on the right image
-	\param edge1	detected vertical edge on the left image
-	\param edge2	detected vertical edge on the right image
-	\param ctDrift	center corner shift: ctDrift.x is the perpendicular drift to the horizontal edge on the left, ctDrift.y is on the right
-	\param sdDrift	side corner shift: sdDrift.x is the perpendicular drift to the horizontal edge onthe left, ctDrift.y is on the right
-	\param proj1	camera projection matrix on the left image
-	\param proj2	camera projection matrix on the right image
-	\param imgHeight	viewport height
+\brief Given the possible shift of the corner, triangulate its estimasted 3D coordinates.
+\param	ct			The center corner on both image.
+\param sd1		The side corner on the left image.
+\param	sd2		The side corner on the right image.
+\param edge1	The detected vertical edge on the left image.
+\param edge2	The detected vertical edge on the right image.
+\param ctDrift	The center corner shift: ctDrift.x is the perpendicular drift to the horizontal edge on the left, ctDrift.y is on the right.
+\param sdDrift	The side corner shift: sdDrift.x is the perpendicular drift to the horizontal edge onthe left, ctDrift.y is on the right.
+\param proj1	The camera projection matrix on the left image.
+\param proj2	The camera projection matrix on the right image.
+\param imgHeight	The viewport height.
 */
 inline osg::Vec3d estimDriftCorner(const Corner& ct, Corner sd1, Corner sd2, osg::Vec4d edge1, osg::Vec4d edge2,
 								   osg::Vec2d ctDrift, osg::Vec2d sdDrift, 
 
 	double keypoint[3];
 	helper::triangulate(intersect1.x(), intersect1.y(), intersect2.x(), intersect2.y(),
-								proj1, proj2, keypoint);
+		proj1, proj2, keypoint);
 
 	osg::Vec3d estim(keypoint[0], keypoint[1], keypoint[2]);
 	return estim;
 
 
 /*!
-	\brief rotate the eye coordinate system around the axis of u, v or w. (eye coordinate axis)
-	\param vmat		modelview matrix in the OpenGL convention
-	\param type		rotate around a certain axis : YAW, PITCH, ROLL
-	\param angle	roate around the 'type' axis by angle
+\brief Rotate the eye coordinate system around the axis of u, v or w. (eye coordinate axis).
+\param vmat		The modelview matrix in the OpenGL convention.
+\param type		The rotate around a certain axis : YAW, PITCH, ROLL.
+\param angle	Roate around the 'type' axis by angle.
 */
 inline osg::Matrix manipRotationMat(const osg::Matrixd& vmat, EulerAngle type, float angle) 
 {
 	////////////////////////////////////////////////////////////////////
 	//// reconstruct the u, v, w (x, y, z) axis of the eye coordinate system
 	////////////////////////////////////////////////////////////////////
-	
+
 	osg::Vec3d f(center-eye);
 	f.normalize();
 	osg::Vec3d s(f^up);
 	s.normalize();
 	osg::Vec3d u(s^f);
 	u.normalize();
-	
+
 	////////////////////////////////////////////////////////////////////
 	//// rotate around the chosen axis
 	////////////////////////////////////////////////////////////////////
 		osg::Vec3d s_new = rotateMat.preMult(s);
 		osg::Vec3d f_new = rotateMat.preMult(f);
 		modelview.set(
-				s_new[0],     u[0],     -f_new[0],     0.0,
-				s_new[1],     u[1],     -f_new[1],     0.0,
-				s_new[2],     u[2],     -f_new[2],     0.0,
-				0.0,     0.0,     0.0,      1.0);	
+			s_new[0],     u[0],     -f_new[0],     0.0,
+			s_new[1],     u[1],     -f_new[1],     0.0,
+			s_new[2],     u[2],     -f_new[2],     0.0,
+			0.0,     0.0,     0.0,      1.0);	
 	} else if(type == PITCH) {
 
 		osg::Quat q(osg::inDegrees(angle), s);
 		osg::Vec3d u_new = rotateMat.preMult(u);
 		osg::Vec3d f_new = rotateMat.preMult(f);
 		modelview.set(
-				s[0],     u_new[0],     -f_new[0],     0.0,
-				s[1],     u_new[1],     -f_new[1],     0.0,
-				s[2],     u_new[2],     -f_new[2],     0.0,
-				0.0,     0.0,     0.0,      1.0);	
+			s[0],     u_new[0],     -f_new[0],     0.0,
+			s[1],     u_new[1],     -f_new[1],     0.0,
+			s[2],     u_new[2],     -f_new[2],     0.0,
+			0.0,     0.0,     0.0,      1.0);	
 	} else {
 
 		osg::Quat q(osg::inDegrees(angle), f);
 		osg::Vec3d s_new = rotateMat.preMult(s);
 		osg::Vec3d u_new = rotateMat.preMult(u);
 		modelview.set(
-				s_new[0],     u_new[0],     -f[0],     0.0,
-				s_new[1],     u_new[1],     -f[1],     0.0,
-				s_new[2],     u_new[2],     -f[2],     0.0,
-				0.0,     0.0,     0.0,      1.0);	
+			s_new[0],     u_new[0],     -f[0],     0.0,
+			s_new[1],     u_new[1],     -f[1],     0.0,
+			s_new[2],     u_new[2],     -f[2],     0.0,
+			0.0,     0.0,     0.0,      1.0);	
 	}
-	
+
 	modelview.preMultTranslate(-eye);
 	return modelview;
 
 }
 
 /*! 
-	\brief introduce intended error to yaw, pitch and roll ground true angle, 
-				to simulate the instrument uncertainty.
-	\param	C GPS ground true location
-	\param	R	electronic compass ground true orientation
-	\param locError introduced location error to C
-	\param oriError introduced orientation error to R
+\brief	Introduce intended error to yaw, pitch and roll ground true angle, 
+to simulate the instrument uncertainty.
+\param	C The GPS ground true location.
+\param	R	The electronic compass ground true orientation.
+\param locError The introduced location error to C.
+\param oriError The introduced orientation error to R.
 */
 
 inline void introducePoseError(double* C, double R[][3], osg::Vec3d locError, osg::Vec3d oriError)

data/model/VertAfterDamage.txt

 0	SE:	45.70000		0.00000		0.00000
 0	NE:	45.70000		30.50000		0.00000
 0	NW:	0.00000		30.50000		0.00000
-1	SW:	-0.03417		0.01434		5.33000
-1	SE:	45.66583		0.01173		5.33000
-1	NE:	45.72475		30.51173		5.33000
-1	NW:	0.02475		30.51434		5.33000
-2	SW:	-0.01481		0.00601		9.53000
-2	SE:	45.68519		0.00803		9.53000
-2	NE:	45.66935		30.50803		9.53000
-2	NW:	-0.03065		30.50601		9.53000
-3	SW:	-0.03996		-0.01592		13.73000
-3	SE:	45.66004		0.02274		13.73000
-3	NE:	45.68894		30.52274		13.73000
-3	NW:	-0.01106		30.48408		13.73000
-4	SW:	-0.00404		0.01748		17.93000
-4	SE:	45.69596		-0.02109		17.93000
-4	NE:	45.69559		30.47891		17.93000
-4	NW:	-0.00441		30.51748		17.93000
-5	SW:	0.00442		0.01677		22.13000
-5	SE:	45.70442		0.03862		22.13000
-5	NE:	45.70929		30.53862		22.13000
-5	NW:	0.00929		30.51677		22.13000
-6	SW:	-0.02558		0.02225		26.33000
-6	SE:	45.67442		0.01344		26.33000
-6	NE:	45.69411		30.51344		26.33000
-6	NW:	-0.00589		30.52225		26.33000
-7	SW:	-0.00144		-0.00689		30.53000
-7	SE:	45.69856		-0.02656		30.53000
-7	NE:	45.68069		30.47344		30.53000
-7	NW:	-0.01931		30.49311		30.53000
-8	SW:	-0.03885		0.02932		34.73000
-8	SE:	45.66115		-0.03386		34.73000
-8	NE:	45.66677		30.46614		34.73000
-8	NW:	-0.03323		30.52932		34.73000
-9	SW:	-0.01829		-0.02311		38.93000
-9	SE:	45.68171		0.00775		38.93000
-9	NE:	45.70006		30.50775		38.93000
-9	NW:	0.00006		30.47689		38.93000
-10	SW:	0.02042		0.02510		43.13000
-10	SE:	45.72042		-0.03901		43.13000
-10	NE:	45.71784		30.46099		43.13000
-10	NW:	0.01784		30.52510		43.13000
+1	SW:	0.68850		0.48744		5.33000
+1	SE:	46.38850		-0.42798		5.33000
+1	NE:	46.18882		30.07202		5.33000
+1	NW:	0.48882		30.98744		5.33000
+2	SW:	0.41579		-0.07993		9.53000
+2	SE:	46.11579		-0.69762		9.53000
+2	NE:	45.14600		29.80238		9.53000
+2	NW:	-0.55400		30.42007		9.53000
+3	SW:	0.63529		-0.76657		13.73000
+3	SE:	46.33529		-0.34067		13.73000
+3	NE:	46.24128		30.15933		13.73000
+3	NW:	0.54128		29.73343		13.73000
+4	SW:	-0.50566		-0.23863		17.93000
+4	SE:	45.19434		-0.17642		17.93000
+4	NE:	46.33572		30.32358		17.93000
+4	NW:	0.63572		30.26137		17.93000
+5	SW:	0.49157		0.06795		22.13000
+5	SE:	46.19157		0.39965		22.13000
+5	NE:	45.03678		30.89965		22.13000
+5	NW:	-0.66322		30.56795		22.13000
+6	SW:	-0.41360		-0.36352		26.33000
+6	SE:	45.28640		-0.36977		26.33000
+6	NE:	46.40568		30.13023		26.33000
+6	NW:	0.70568		30.13648		26.33000
+7	SW:	0.70822		0.39826		30.53000
+7	SE:	46.40822		0.00002		30.53000
+7	NE:	46.29442		30.50002		30.53000
+7	NW:	0.59442		30.89826		30.53000
+8	SW:	0.78973		-0.16704		34.73000
+8	SE:	46.48973		-0.57901		34.73000
+8	NE:	45.13915		29.92099		34.73000
+8	NW:	-0.56085		30.33296		34.73000
+9	SW:	0.61991		-0.50794		38.93000
+9	SE:	46.31991		0.72462		38.93000
+9	NE:	45.26879		31.22462		38.93000
+9	NW:	-0.43121		29.99206		38.93000
+10	SW:	0.70433		-0.10024		43.13000
+10	SE:	46.40433		-0.35519		43.13000
+10	NE:	45.04692		30.14481		43.13000
+10	NW:	-0.65308		30.39976		43.13000

data/model/afterDamageModel.osg

       }
       VertexArray Vec3dArray 4
       {
-        0.0204211249947548 0.025099677965045 43.1300048828125
-        45.7204211249948 -0.0390060618519783 43.1300048828125
-        45.7178426243365 30.460993938148 43.1300048828125
-        0.0178426243364811 30.525099677965 43.1300048828125
+        0.704334318637848 -0.100239314138889 43.1300048828125
+        46.4043343186379 -0.355191320180893 43.1300048828125
+        45.0469176292419 30.1448086798191 43.1300048828125
+        -0.653082370758057 30.3997606858611 43.1300048828125
       }
       TexCoordArray 0 Vec2dArray 4
       {
         {
           45.7 0 0
           0 0 0
-          -0.034170001745224 0.0143407620489597 5.32999992370605
-          45.6658299982548 0.0117340590804815 5.32999992370605
+          0.688504159450531 0.487440705299377 5.32999992370605
+          46.3885041594505 -0.42798313498497 5.32999992370605
         }
         TexCoordArray 0 Vec2dArray 4
         {
         {
           0 30.5 0
           45.7 30.5 0
-          45.7247475299984 30.5117340590805 5.32999992370605
-          0.0247475299984217 30.514340762049 5.32999992370605
+          46.1888184666634 30.072016865015 5.32999992370605
+          0.488818466663361 30.9874407052994 5.32999992370605
         }
         TexCoordArray 0 Vec2dArray 4
         {
         {
           0 0 0
           0 30.5 0
-          0.0247475299984217 30.514340762049 5.32999992370605
-          -0.034170001745224 0.0143407620489597 5.32999992370605
+          0.488818466663361 30.9874407052994 5.32999992370605
+          0.688504159450531 0.487440705299377 5.32999992370605
         }
         TexCoordArray 0 Vec2dArray 4
         {
         {
           45.7 0 0
           45.7 30.5 0
-          45.7247475299984 30.5117340590805 5.32999992370605
-          45.6658299982548 0.0117340590804815 5.32999992370605
+          46.1888184666634 30.072016865015 5.32999992370605
+          46.3885041594505 -0.42798313498497 5.32999992370605
         }
         TexCoordArray 0 Vec2dArray 4
         {
         }
         VertexArray Vec3dArray 4
         {
-          45.6658299982548 0.0117340590804815 5.32999992370605
-          -0.034170001745224 0.0143407620489597 5.32999992370605
-          -0.0148099390789866 0.00600940268486738 9.52999973297119
-          45.685190060921 0.00802558474242687 9.52999973297119
+          46.3885041594505 -0.42798313498497 5.32999992370605
+          0.688504159450531 0.487440705299377 5.32999992370605
+          0.415793776512146 -0.079928882420063 9.52999973297119
+          46.1157937765121 -0.697618842124939 9.52999973297119
         }
         TexCoordArray 0 Vec2dArray 4
         {
         }
         VertexArray Vec3dArray 4
         {
-          0.0247475299984217 30.514340762049 5.32999992370605
-          45.7247475299984 30.5117340590805 5.32999992370605
-          45.6693465847522 30.5080255847424 9.52999973297119
-          -0.030653415247798 30.5060094026849 9.52999973297119
+          0.488818466663361 30.9874407052994 5.32999992370605
+          46.1888184666634 30.072016865015 5.32999992370605
+          45.1459988474846 29.8023811578751 9.52999973297119
+          -0.554001152515411 30.4200711175799 9.52999973297119
         }
         TexCoordArray 0 Vec2dArray 4
         {
         }
         VertexArray Vec3dArray 4
         {
-          -0.034170001745224 0.0143407620489597 5.32999992370605
-          0.0247475299984217 30.514340762049 5.32999992370605
-          -0.030653415247798 30.5060094026849 9.52999973297119
-          -0.0148099390789866 0.00600940268486738 9.52999973297119
+          0.688504159450531 0.487440705299377 5.32999992370605
+          0.488818466663361 30.9874407052994 5.32999992370605
+          -0.554001152515411 30.4200711175799 9.52999973297119
+          0.415793776512146 -0.079928882420063 9.52999973297119
         }
         TexCoordArray 0 Vec2dArray 4
         {
         }
         VertexArray Vec3dArray 4
         {
-          45.6658299982548 0.0117340590804815 5.32999992370605
-          45.7247475299984 30.5117340590805 5.32999992370605
-          45.6693465847522 30.5080255847424 9.52999973297119
-          45.685190060921 0.00802558474242687 9.52999973297119
+          46.3885041594505 -0.42798313498497 5.32999992370605
+          46.1888184666634 30.072016865015 5.32999992370605
+          45.1459988474846 29.8023811578751 9.52999973297119
+          46.1157937765121 -0.697618842124939 9.52999973297119
         }
         TexCoordArray 0 Vec2dArray 4
         {
         }
         VertexArray Vec3dArray 4
         {
-          45.685190060921 0.00802558474242687 9.52999973297119
-          -0.0148099390789866 0.00600940268486738 9.52999973297119
-          -0.039964959025383 -0.0159174166619778 13.7299995422363
-          45.6600350409746 0.0227419566363096 13.7299995422363
+          46.1157937765121 -0.697618842124939 9.52999973297119
+          0.415793776512146 -0.079928882420063 9.52999973297119
+          0.635291337966919 -0.766567826271057 13.7299995422363
+          46.3352913379669 -0.340665608644485 13.7299995422363
         }
         TexCoordArray 0 Vec2dArray 4
         {
         }
         VertexArray Vec3dArray 4
         {
-          -0.030653415247798 30.5060094026849 9.52999973297119
-          45.6693465847522 30.5080255847424 9.52999973297119
-          45.6889392955229 30.5227419566363 13.7299995422363
-          -0.0110607044771314 30.484082583338 13.7299995422363
+          -0.554001152515411 30.4200711175799 9.52999973297119
+          45.1459988474846 29.8023811578751 9.52999973297119
+          46.2412780046463 30.1593343913555 13.7299995422363
+          0.541278004646301 29.7334321737289 13.7299995422363
         }
         TexCoordArray 0 Vec2dArray 4
         {
         }
         VertexArray Vec3dArray 4
         {
-          -0.0148099390789866 0.00600940268486738 9.52999973297119
-          -0.030653415247798 30.5060094026849 9.52999973297119
-          -0.0110607044771314 30.484082583338 13.7299995422363
-          -0.039964959025383 -0.0159174166619778 13.7299995422363
+          0.415793776512146 -0.079928882420063 9.52999973297119
+          -0.554001152515411 30.4200711175799 9.52999973297119
+          0.541278004646301 29.7334321737289 13.7299995422363
+          0.635291337966919 -0.766567826271057 13.7299995422363
         }
         TexCoordArray 0 Vec2dArray 4
         {
         }
         VertexArray Vec3dArray 4
         {
-          45.685190060921 0.00802558474242687 9.52999973297119
-          45.6693465847522 30.5080255847424 9.52999973297119
-          45.6889392955229 30.5227419566363 13.7299995422363
-          45.6600350409746 0.0227419566363096 13.7299995422363
+          46.1157937765121 -0.697618842124939 9.52999973297119
+          45.1459988474846 29.8023811578751 9.52999973297119
+          46.2412780046463 30.1593343913555 13.7299995422363
+          46.3352913379669 -0.340665608644485 13.7299995422363
         }
         TexCoordArray 0 Vec2dArray 4
         {
         }
         VertexArray Vec3dArray 4
         {
-          45.6600350409746 0.0227419566363096 13.7299995422363
-          -0.039964959025383 -0.0159174166619778 13.7299995422363
-          -0.00403667613863945 0.0174786932766438 17.9300003051758
-          45.6959633238614 -0.0210949312895536 17.9300003051758
+          46.3352913379669 -0.340665608644485 13.7299995422363
+          0.635291337966919 -0.766567826271057 13.7299995422363
+          -0.505656242370605 -0.238633215427399 17.9300003051758
+          45.1943437576294 -0.176416888833046 17.9300003051758
         }
         TexCoordArray 0 Vec2dArray 4
         {
         }
         VertexArray Vec3dArray 4
         {
-          -0.0110607044771314 30.484082583338 13.7299995422363
-          45.6889392955229 30.5227419566363 13.7299995422363
-          45.6955862979405 30.4789050687104 17.9300003051758
-          -0.00441370205953717 30.5174786932766 17.9300003051758
+          0.541278004646301 29.7334321737289 13.7299995422363
+          46.2412780046463 30.1593343913555 13.7299995422363
+          46.3357246041298 30.323583111167 17.9300003051758
+          0.635724604129791 30.2613667845726 17.9300003051758
         }
         TexCoordArray 0 Vec2dArray 4
         {
         }
         VertexArray Vec3dArray 4
         {
-          -0.039964959025383 -0.0159174166619778 13.7299995422363
-          -0.0110607044771314 30.484082583338 13.7299995422363
-          -0.00441370205953717 30.5174786932766 17.9300003051758
-          -0.00403667613863945 0.0174786932766438 17.9300003051758
+          0.635291337966919 -0.766567826271057 13.7299995422363
+          0.541278004646301 29.7334321737289 13.7299995422363
+          0.635724604129791 30.2613667845726 17.9300003051758
+          -0.505656242370605 -0.238633215427399 17.9300003051758
         }
         TexCoordArray 0 Vec2dArray 4
         {
         }
         VertexArray Vec3dArray 4
         {
-          45.6600350409746 0.0227419566363096 13.7299995422363
-          45.6889392955229 30.5227419566363 13.7299995422363
-          45.6955862979405 30.4789050687104 17.9300003051758
-          45.6959633238614 -0.0210949312895536 17.9300003051758
+          46.3352913379669 -0.340665608644485 13.7299995422363
+          46.2412780046463 30.1593343913555 13.7299995422363
+          46.3357246041298 30.323583111167 17.9300003051758
+          45.1943437576294 -0.176416888833046 17.9300003051758
         }
         TexCoordArray 0 Vec2dArray 4
         {
         }
         VertexArray Vec3dArray 4
         {
-          45.6959633238614 -0.0210949312895536 17.9300003051758
-          -0.00403667613863945 0.0174786932766438 17.9300003051758
-          0.00441775983199477 0.0167724415659904 22.1300010681152
-          45.704417759832 0.0386230014264584 22.1300010681152
+          45.1943437576294 -0.176416888833046 17.9300003051758
+          -0.505656242370605 -0.238633215427399 17.9300003051758
+          0.491565227508545 0.0679470673203468 22.1300010681152
+          46.1915652275085 0.399647057056427 22.1300010681152
         }
         TexCoordArray 0 Vec2dArray 4
         {
         }
         VertexArray Vec3dArray 4
         {
-          -0.00441370205953717 30.5174786932766 17.9300003051758
-          45.6955862979405 30.4789050687104 17.9300003051758
-          45.7092889042571 30.5386230014265 22.1300010681152
-          0.0092889042571187 30.516772441566 22.1300010681152
+          0.635724604129791 30.2613667845726 17.9300003051758
+          46.3357246041298 30.323583111167 17.9300003051758
+          45.0367763161659 30.8996470570564 22.1300010681152
+          -0.663223683834076 30.5679470673203 22.1300010681152
         }
         TexCoordArray 0 Vec2dArray 4
         {
         }
         VertexArray Vec3dArray 4
         {
-          -0.00403667613863945 0.0174786932766438 17.9300003051758
-          -0.00441370205953717 30.5174786932766 17.9300003051758
-          0.0092889042571187 30.516772441566 22.1300010681152
-          0.00441775983199477 0.0167724415659904 22.1300010681152
+          -0.505656242370605 -0.238633215427399 17.9300003051758
+          0.635724604129791 30.2613667845726 17.9300003051758
+          -0.663223683834076 30.5679470673203 22.1300010681152
+          0.491565227508545 0.0679470673203468 22.1300010681152
         }
         TexCoordArray 0 Vec2dArray 4
         {
         }
         VertexArray Vec3dArray 4
         {
-          45.6959633238614 -0.0210949312895536 17.9300003051758
-          45.6955862979405 30.4789050687104 17.9300003051758
-          45.7092889042571 30.5386230014265 22.1300010681152
-          45.704417759832 0.0386230014264584 22.1300010681152
+          45.1943437576294 -0.176416888833046 17.9300003051758
+          46.3357246041298 30.323583111167 17.9300003051758
+          45.0367763161659 30.8996470570564 22.1300010681152
+          46.1915652275085 0.399647057056427 22.1300010681152
         }
         TexCoordArray 0 Vec2dArray 4
         {
         }
         VertexArray Vec3dArray 4
         {
-          45.704417759832 0.0386230014264584 22.1300010681152
-          0.00441775983199477 0.0167724415659904 22.1300010681152
-          -0.0255754068493843 0.0222525466233492 26.3300018310547
-          45.6744245931506 0.0134433414787054 26.3300018310547
+          46.1915652275085 0.399647057056427 22.1300010681152
+          0.491565227508545 0.0679470673203468 22.1300010681152
+          -0.413595199584961 -0.363520681858063 26.3300018310547
+          45.286404800415 -0.369772344827652 26.3300018310547
         }
         TexCoordArray 0 Vec2dArray 4
         {
         }
         VertexArray Vec3dArray 4
         {
-          0.0092889042571187 30.516772441566 22.1300010681152
-          45.7092889042571 30.5386230014265 22.1300010681152
-          45.694112777058 30.5134433414787 26.3300018310547
-          -0.00588722294196486 30.5222525466233 26.3300018310547
+          -0.663223683834076 30.5679470673203 22.1300010681152
+          45.0367763161659 30.8996470570564 22.1300010681152
+          46.4056839466095 30.1302276551723 26.3300018310547
+          0.705683946609497 30.1364793181419 26.3300018310547
         }
         TexCoordArray 0 Vec2dArray 4
         {
         }
         VertexArray Vec3dArray 4
         {
-          0.00441775983199477 0.0167724415659904 22.1300010681152
-          0.0092889042571187 30.516772441566 22.1300010681152
-          -0.00588722294196486 30.5222525466233 26.3300018310547
-          -0.0255754068493843 0.0222525466233492 26.3300018310547
+          0.491565227508545 0.0679470673203468 22.1300010681152
+          -0.663223683834076 30.5679470673203 22.1300010681152
+          0.705683946609497 30.1364793181419 26.3300018310547
+          -0.413595199584961 -0.363520681858063 26.3300018310547
         }
         TexCoordArray 0 Vec2dArray 4
         {
         }
         VertexArray Vec3dArray 4
         {
-          45.704417759832 0.0386230014264584 22.1300010681152
-          45.7092889042571 30.5386230014265 22.1300010681152
-          45.694112777058 30.5134433414787 26.3300018310547
-          45.6744245931506 0.0134433414787054 26.3300018310547
+          46.1915652275085 0.399647057056427 22.1300010681152
+          45.0367763161659 30.8996470570564 22.1300010681152
+          46.4056839466095 30.1302276551723 26.3300018310547
+          45.286404800415 -0.369772344827652 26.3300018310547
         }
         TexCoordArray 0 Vec2dArray 4
         {
         }
         VertexArray Vec3dArray 4
         {
-          45.6744245931506 0.0134433414787054 26.3300018310547
-          -0.0255754068493843 0.0222525466233492 26.3300018310547
-          -0.00144340528640896 -0.00689467741176486 30.5300025939941
-          45.6985565947136 -0.0265607722103596 30.5300025939941
+          45.286404800415 -0.369772344827652 26.3300018310547
+          -0.413595199584961 -0.363520681858063 26.3300018310547
+          0.708216488361359 0.398262023925781 30.5300025939941
+          46.4082164883614 2.36950818361947e-005 30.5300025939941
         }
         TexCoordArray 0 Vec2dArray 4
         {
         }
         VertexArray Vec3dArray 4
         {
-          -0.00588722294196486 30.5222525466233 26.3300018310547
-          45.694112777058 30.5134433414787 26.3300018310547
-          45.6806874189526 30.4734392277896 30.5300025939941
-          -0.0193125810474157 30.4931053225882 30.5300025939941
+          0.705683946609497 30.1364793181419 26.3300018310547
+          46.4056839466095 30.1302276551723 26.3300018310547
+          46.294419002533 30.5000236950818 30.5300025939941
+          0.594419002532959 30.8982620239258 30.5300025939941
         }
         TexCoordArray 0 Vec2dArray 4
         {
         }
         VertexArray Vec3dArray 4
         {
-          -0.0255754068493843 0.0222525466233492 26.3300018310547
-          -0.00588722294196486 30.5222525466233 26.3300018310547
-          -0.0193125810474157 30.4931053225882 30.5300025939941
-          -0.00144340528640896 -0.00689467741176486 30.5300025939941
+          -0.413595199584961 -0.363520681858063 26.3300018310547
+          0.705683946609497 30.1364793181419 26.3300018310547
+          0.594419002532959 30.8982620239258 30.5300025939941
+          0.708216488361359 0.398262023925781 30.5300025939941
         }
         TexCoordArray 0 Vec2dArray 4
         {
         }
         VertexArray Vec3dArray 4
         {
-          45.6744245931506 0.0134433414787054 26.3300018310547
-          45.694112777058 30.5134433414787 26.3300018310547
-          45.6806874189526 30.4734392277896 30.5300025939941
-          45.6985565947136 -0.0265607722103596 30.5300025939941
+          45.286404800415 -0.369772344827652 26.3300018310547
+          46.4056839466095 30.1302276551723 26.3300018310547
+          46.294419002533 30.5000236950818 30.5300025939941
+          46.4082164883614 2.36950818361947e-005 30.5300025939941
         }
         TexCoordArray 0 Vec2dArray 4
         {
         }
         VertexArray Vec3dArray 4
         {
-          45.6985565947136 -0.0265607722103596 30.5300025939941
-          -0.00144340528640896 -0.00689467741176486 30.5300025939941
-          -0.0388476960361004 0.0293200276792049 34.7300033569336
-          45.6611523039639 -0.0338603369891644 34.7300033569336
+          46.4082164883614 2.36950818361947e-005 30.5300025939941
+          0.708216488361359 0.398262023925781 30.5300025939941
+          0.789732813835144 -0.16703636944294 34.7300033569336
+          46.4897328138351 -0.579006791114807 34.7300033569336
         }
         TexCoordArray 0 Vec2dArray 4
         {
         }
         VertexArray Vec3dArray 4
         {
-          -0.0193125810474157 30.4931053225882 30.5300025939941
-          45.6806874189526 30.4734392277896 30.5300025939941
-          45.6667689725757 30.4661396630108 34.7300033569336
-          -0.0332310274243355 30.5293200276792 34.7300033569336
+          0.594419002532959 30.8982620239258 30.5300025939941
+          46.294419002533 30.5000236950818 30.5300025939941
+          45.1391515851021 29.9209932088852 34.7300033569336
+          -0.560848414897919 30.3329636305571 34.7300033569336
         }
         TexCoordArray 0 Vec2dArray 4
         {
         }
         VertexArray Vec3dArray 4
         {
-          -0.00144340528640896 -0.00689467741176486 30.5300025939941
-          -0.0193125810474157 30.4931053225882 30.5300025939941
-          -0.0332310274243355 30.5293200276792 34.7300033569336
-          -0.0388476960361004 0.0293200276792049 34.7300033569336
+          0.708216488361359 0.398262023925781 30.5300025939941
+          0.594419002532959 30.8982620239258 30.5300025939941
+          -0.560848414897919 30.3329636305571 34.7300033569336
+          0.789732813835144 -0.16703636944294 34.7300033569336
         }
         TexCoordArray 0 Vec2dArray 4
         {
         }
         VertexArray Vec3dArray 4
         {
-          45.6985565947136 -0.0265607722103596 30.5300025939941
-          45.6806874189526 30.4734392277896 30.5300025939941
-          45.6667689725757 30.4661396630108 34.7300033569336
-          45.6611523039639 -0.0338603369891644 34.7300033569336
+          46.4082164883614 2.36950818361947e-005 30.5300025939941
+          46.294419002533 30.5000236950818 30.5300025939941
+          45.1391515851021 29.9209932088852 34.7300033569336
+          46.4897328138351 -0.579006791114807 34.7300033569336
         }
         TexCoordArray 0 Vec2dArray 4
         {
         }
         VertexArray Vec3dArray 4
         {
-          45.6611523039639 -0.0338603369891644 34.7300033569336
-          -0.0388476960361004 0.0293200276792049 34.7300033569336
-          -0.0182923749089241 -0.0231129638850689 38.930004119873
-          45.6817076250911 0.00774777680635452 38.930004119873
+          46.4897328138351 -0.579006791114807 34.7300033569336
+          0.789732813835144 -0.16703636944294 34.7300033569336
+          0.619906544685364 -0.507936894893646 38.930004119873
+          46.3199065446854 0.724620223045349 38.930004119873
         }
         TexCoordArray 0 Vec2dArray 4
         {
         }
         VertexArray Vec3dArray 4
         {
-          -0.0332310274243355 30.5293200276792 34.7300033569336
-          45.6667689725757 30.4661396630108 34.7300033569336
-          45.7000575799859 30.5077477768064 38.930004119873
-          5.75799858779646e-005 30.4768870361149 38.930004119873
+          -0.560848414897919 30.3329636305571 34.7300033569336
+          45.1391515851021 29.9209932088852 34.7300033569336
+          45.268794220686 31.2246202230453 38.930004119873
+          -0.431205779314041 29.9920631051064 38.930004119873
         }
         TexCoordArray 0 Vec2dArray 4
         {
         }
         VertexArray Vec3dArray 4
         {
-          -0.0388476960361004 0.0293200276792049 34.7300033569336
-          -0.0332310274243355 30.5293200276792 34.7300033569336
-          5.75799858779646e-005 30.4768870361149 38.930004119873
-          -0.0182923749089241 -0.0231129638850689 38.930004119873
+          0.789732813835144 -0.16703636944294 34.7300033569336
+          -0.560848414897919 30.3329636305571 34.7300033569336
+          -0.431205779314041 29.9920631051064 38.930004119873
+          0.619906544685364 -0.507936894893646 38.930004119873
         }
         TexCoordArray 0 Vec2dArray 4
         {
         }
         VertexArray Vec3dArray 4
         {
-          45.6611523039639 -0.0338603369891644 34.7300033569336
-          45.6667689725757 30.4661396630108 34.7300033569336
-          45.7000575799859 30.5077477768064 38.930004119873
-          45.6817076250911 0.00774777680635452 38.930004119873
+          46.4897328138351 -0.579006791114807 34.7300033569336
+          45.1391515851021 29.9209932088852 34.7300033569336
+          45.268794220686 31.2246202230453 38.930004119873
+          46.3199065446854 0.724620223045349 38.930004119873
         }
         TexCoordArray 0 Vec2dArray 4
         {
         }
         VertexArray Vec3dArray 4
         {
-          45.6817076250911 0.00774777680635452 38.930004119873
-          -0.0182923749089241 -0.0231129638850689 38.930004119873
-          0.0204211249947548 0.025099677965045 43.1300048828125
-          45.7204211249948 -0.0390060618519783 43.1300048828125
+          46.3199065446854 0.724620223045349 38.930004119873
+          0.619906544685364 -0.507936894893646 38.930004119873
+          0.704334318637848 -0.100239314138889 43.1300048828125
+          46.4043343186379 -0.355191320180893 43.1300048828125
         }
         TexCoordArray 0 Vec2dArray 4
         {
         }
         VertexArray Vec3dArray 4
         {
-          5.75799858779646e-005 30.4768870361149 38.930004119873
-          45.7000575799859 30.5077477768064 38.930004119873
-          45.7178426243365 30.460993938148 43.1300048828125
-          0.0178426243364811 30.525099677965 43.1300048828125
+          -0.431205779314041 29.9920631051064 38.930004119873
+          45.268794220686 31.2246202230453 38.930004119873
+          45.0469176292419 30.1448086798191 43.1300048828125
+          -0.653082370758057 30.3997606858611 43.1300048828125
         }
         TexCoordArray 0 Vec2dArray 4
         {
         }
         VertexArray Vec3dArray 4
         {
-          -0.0182923749089241 -0.0231129638850689 38.930004119873
-