Changeset 7323 for code/branches/doc/src/libraries/util/Math.cc
- Timestamp:
- Sep 2, 2010, 3:16:08 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/doc/src/libraries/util/Math.cc
r7291 r7323 91 91 @param mydirection My viewing direction 92 92 @param otherposition The position of the other object 93 @return The angle 93 @return The angle in radian 94 94 95 95 Examples: 96 If the other object is exactly in front of me, the function returns 0.97 If the other object is exactly behind me, the function returns pi.98 If the other object is exactly right/left to me (or above/below), the function returns pi/2.96 - If the other object is exactly in front of me, the function returns 0. 97 - If the other object is exactly behind me, the function returns pi. 98 - If the other object is exactly right/left to me (or above/below), the function returns pi/2. 99 99 */ 100 100 float getAngle(const orxonox::Vector3& myposition, const orxonox::Vector3& mydirection, const orxonox::Vector3& otherposition) … … 117 117 118 118 Examples: 119 If the other object is exactly in front of me, the function returns Vector2(0, 0).120 If the other object is exactly at my left, the function returns Vector2(-1, 0).121 If the other object is exactly at my right, the function returns Vector2(1, 0).122 If the other object is only a bit at my right, the function still returns Vector2(1, 0).123 If the other object is exactly above me, the function returns Vector2(0, 1).119 - If the other object is exactly in front of me, the function returns <tt>Vector2(0, 0)</tt>. 120 - If the other object is exactly at my left, the function returns <tt>Vector2(-1, 0)</tt>. 121 - If the other object is exactly at my right, the function returns <tt>Vector2(1, 0)</tt>. 122 - If the other object is only a bit at my right, the function still returns <tt>Vector2(1, 0)</tt>. 123 - If the other object is exactly above me, the function returns <tt>Vector2(0, 1)</tt>. 124 124 */ 125 125 orxonox::Vector2 get2DViewdirection(const orxonox::Vector3& myposition, const orxonox::Vector3& mydirection, const orxonox::Vector3& myorthonormal, const orxonox::Vector3& otherposition) … … 157 157 158 158 Examples: 159 If the other object is exactly in front of me, the function returns Vector2(0, 0).160 If the other object is exactly at my left, the function returns Vector2(-0.5, 0).161 If the other object is exactly at my right, the function returns Vector2(0.5, 0).162 If the other object is only a bit at my right, the function still returns Vector2(0.01, 0).163 If the other object is exactly above me, the function returns Vector2(0, 0.5).159 - If the other object is exactly in front of me, the function returns <tt>Vector2(0, 0)</tt>. 160 - If the other object is exactly at my left, the function returns <tt>Vector2(-0.5, 0)</tt>. 161 - If the other object is exactly at my right, the function returns <tt>Vector2(0.5, 0)</tt>. 162 - If the other object is only a bit at my right, the function still returns <tt>Vector2(0.01, 0)</tt>. 163 - If the other object is exactly above me, the function returns <tt>Vector2(0, 0.5)</tt>. 164 164 */ 165 165 orxonox::Vector2 get2DViewcoordinates(const orxonox::Vector3& myposition, const orxonox::Vector3& mydirection, const orxonox::Vector3& myorthonormal, const orxonox::Vector3& otherposition) … … 220 220 } 221 221 222 /** 223 @brief Returns a unique number. This function will never return the same value twice. 224 */ 222 225 unsigned long getUniqueNumber() 223 226 {
Note: See TracChangeset
for help on using the changeset viewer.