Changeset 1415 for GTP/trunk/Lib/Vis/Preprocessing/src/AxisAlignedBox3.cpp
- Timestamp:
- 09/18/06 18:57:34 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/AxisAlignedBox3.cpp
r1047 r1415 2129 2129 AxisAlignedBox3 &back) const 2130 2130 { 2131 if ( (value >= mMin[axis]) && (value <= mMax[axis]))2131 if ((value >= mMin[axis]) && (value <= mMax[axis])) 2132 2132 { 2133 2133 front.mMin = mMin; front.mMax = mMax; … … 2139 2139 } 2140 2140 2141 2142 } 2141 2142 void AxisAlignedBox3::Scale(const float scale) 2143 { 2144 Vector3 newSize = Size()*(scale*0.5f); 2145 Vector3 center = Center(); 2146 mMin = center - newSize; 2147 mMax = center + newSize; 2148 } 2149 2150 2151 void AxisAlignedBox3::Scale(const Vector3 &scale) 2152 { 2153 Vector3 newSize = Size()*(scale*0.5f); 2154 Vector3 center = Center(); 2155 mMin = center - newSize; 2156 mMax = center + newSize; 2157 } 2158 2159 2160 void AxisAlignedBox3::Translate(const Vector3 &shift) 2161 { 2162 mMin += shift; 2163 mMax += shift; 2164 } 2165 2166 2167 }
Note: See TracChangeset
for help on using the changeset viewer.