Changeset 1832 for GTP/trunk/Lib/Vis/Preprocessing/src/Vector3.cpp
- Timestamp:
- 11/30/06 16:17:35 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/Vector3.cpp
r1715 r1832 211 211 212 212 float cosTheta = 1.0f - 2*r1; 213 214 215 216 217 218 213 float sinTheta = sqrt(1 - sqr(cosTheta)); 214 float fi = 2.0f*M_PI*r2; 215 216 Vector3 dir(sinTheta*sin(fi), 217 cosTheta, 218 sinTheta*cos(fi)); 219 219 220 220 return dir;
Note: See TracChangeset
for help on using the changeset viewer.