Changeset 1768 for GTP/trunk/Lib/Vis/Preprocessing/src/AxisAlignedBox3.cpp
- Timestamp:
- 11/20/06 09:15:28 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/AxisAlignedBox3.cpp
r1715 r1768 1719 1719 1720 1720 Vector3 vtx; 1721 1722 ////////////// 1721 1723 //-- compute classification of vertices 1724 1722 1725 for (int i = 0; i < 8; ++i) 1723 1726 { … … 1732 1735 } 1733 1736 1737 /////////// 1734 1738 //-- find intersections 1739 1735 1740 if (onFrontSide && onBackSide) 1736 1741 { … … 1756 1761 { 1757 1762 Vector3 centerOfMass(0); 1763 1758 1764 int i; 1759 1765 // compute center of mass … … 1764 1770 1765 1771 vector<VertexData> vertexData; 1766 1767 1772 Vector3 refVec = Normalize(centerOfMass - planePoly->mVertices[0]); 1768 1773 1769 1774 // compute angle to reference point 1770 1775 for (i = 1; i < (int)planePoly->mVertices.size(); ++ i) 1771 1776 { 1772 1777 float angle = 1773 1778 Angle(refVec, centerOfMass - planePoly->mVertices[i], plane.mNormal); 1774 1779 1775 1780 vertexData.push_back(VertexData(planePoly->mVertices[i], angle)); 1776 1781 } 1777 1782 1778 1783 std::stable_sort(vertexData.begin(), vertexData.end());
Note: See TracChangeset
for help on using the changeset viewer.