Changeset 3228 in orxonox.OLD for orxonox/trunk
- Timestamp:
- Dec 20, 2004, 12:32:32 AM (20 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/camera.cc
r3225 r3228 76 76 bound entity's position on the track. 77 77 */ 78 void Camera::update _desired_place ()78 void Camera::updateDesiredPlace () 79 79 { 80 80 switch(cameraMode) … … 90 90 { 91 91 bound->get_lookat (&lookat); 92 orx->get _world()->calc_camera_pos (&lookat, &plFocus);92 orx->getWorld()->calcCameraPos (&lookat, &plFocus); 93 93 Quaternion *fr; 94 94 if(t < 20.0) … … 101 101 102 102 Vector op(1.0, 0.0, 0.0); 103 float angle = angle _deg(op, *start);103 float angle = angleDeg(op, *start); 104 104 printf("angle is: %f\n", angle); 105 105 … … 144 144 145 145 Vector ursp(0.0, 0.0, 0.0); 146 desired _place.r = /*plFocus.r -*/ ursp - res->apply(r);147 148 printf("desired place is: %f, %f, %f\n", desired _place.r.x, desired_place.r.y, desired_place.r.z);146 desiredPlace.r = /*plFocus.r -*/ ursp - res->apply(r); 147 148 printf("desired place is: %f, %f, %f\n", desiredPlace.r.x, desiredPlace.r.y, desiredPlace.r.z); 149 149 //plLastBPlace = *bound->get_placement(); 150 150 } … … 153 153 case SMOTH_FOLLOW: 154 154 { 155 Placement *plBound = bound->get _placement();155 Placement *plBound = bound->getPlacement(); 156 156 Location lcBound; 157 157 if(bound != null) 158 158 { 159 bound->get _lookat(&lcBound);159 bound->getLookat(&lcBound); 160 160 Vector vDirection(0.0, 0.0, 1.0); 161 161 vDirection = plBound->w.apply(vDirection); 162 desired _place.r = (vDirection * ((lcBound.dist-10.0)/* / l*/)) + Vector(0,0,5.0);162 desiredPlace.r = (vDirection * ((lcBound.dist-10.0)/* / l*/)) + Vector(0,0,5.0); 163 163 } 164 164 break; … … 173 173 Vector eclipticOffset(0.0, 0.0, 5.0); 174 174 vDirection = plBound->w.apply(vDirection); 175 desired _place.r = plBound->r - vDirection*10 + eclipticOffset;175 desiredPlace.r = plBound->r - vDirection*10 + eclipticOffset; 176 176 } 177 177 break; … … 182 182 if( bound != NULL && world != NULL ) 183 183 { 184 bound->get _lookat (&lookat);185 world->calc _camera_pos (&lookat, &desired_place);184 bound->getLookat (&lookat); 185 world->calcCameraPos (&lookat, &desiredPlace); 186 186 } 187 187 else 188 188 { 189 desired _place.r = Vector (0,0,0);190 desired _place.w = Quaternion ();189 desiredPlace.r = Vector (0,0,0); 190 desiredPlace.w = Quaternion (); 191 191 } 192 192 break; … … 265 265 if( plc == NULL) 266 266 { 267 actual _place = desired_place;267 actualPlace = desiredPlace; 268 268 //printf("Camera|jump: camer@ %f, %f, %f\n\n", actual_place.r.x, actual_place.r.y, actual_place.r.z); 269 269 } 270 270 else 271 271 { 272 desired _place = *plc;273 actual _place = *plc;272 desiredPlace = *plc; 273 actualPlace = *plc; 274 274 } 275 275 } -
orxonox/trunk/src/camera.h
r3225 r3228 27 27 WorldEntity* bound; //!< the WorldEntity the Camera is bound to 28 28 Placement actual_place; //!< the Camera's current position 29 Placement desired _place; //!< where the Camera should be according to calculations29 Placement desiredPlace; //!< where the Camera should be according to calculations 30 30 World* world; 31 31 … … 54 54 CAMERA_MODE cameraMode; //!< saves the camera mode: how the camera follows the entity 55 55 56 void update _desired_place ();56 void updateDesiredPlace (); 57 57 58 58 public: -
orxonox/trunk/src/vector.cc
r3004 r3228 203 203 \return the angle between the vectors in radians 204 204 */ 205 float angle _rad (const Vector& v1, const Vector& v2)205 float angleRad (const Vector& v1, const Vector& v2) 206 206 { 207 207 return acos( v1 * v2 / (v1.len() * v2.len())); … … 215 215 \return the angle between the vectors in degrees 216 216 */ 217 float angle _deg (const Vector& v1, const Vector& v2)217 float angleDeg (const Vector& v1, const Vector& v2) 218 218 { 219 219 float f; … … 714 714 \return the rotated vector 715 715 */ 716 Vector rotate _vector( const Vector& v, const Rotation& r)716 Vector rotateVector( const Vector& v, const Rotation& r) 717 717 { 718 718 Vector t; … … 745 745 \return the distance between the Line and the point 746 746 */ 747 float Line::distance _point (const Vector& v) const747 float Line::distancePoint (const Vector& v) const 748 748 { 749 749 Vector d = v-r; … … 815 815 \param l: a line 816 816 */ 817 Vector Plane::intersect _line (const Line& l) const817 Vector Plane::intersectLine (const Line& l) const 818 818 { 819 819 if (n.x*l.a.x+n.y*l.a.y+n.z*l.a.z == 0.0) return Vector(0,0,0); … … 827 827 \return the distance between the plane and the point (can be negative) 828 828 */ 829 float Plane::distance _point (const Vector& p) const829 float Plane::distancePoint (const Vector& p) const 830 830 { 831 831 float l = n.len(); … … 839 839 \return 0 if the point is contained within the Plane, positive(negative) if the point is in the positive(negative) semi-space of the Plane 840 840 */ 841 float Plane::locate _point (const Vector& p) const841 float Plane::locatePoint (const Vector& p) const 842 842 { 843 843 return (n.dot(p) + k); -
orxonox/trunk/src/vector.h
r3224 r3228 40 40 }; 41 41 42 float angle _deg (const Vector& v1, const Vector& v2);43 float angle _rad (const Vector& v1, const Vector& v2);42 float angleDeg (const Vector& v1, const Vector& v2); 43 float angleRad (const Vector& v1, const Vector& v2); 44 44 45 45 //! Quaternion … … 98 98 99 99 //!< Apply a rotation to a vector 100 Vector rotate _vector( const Vector& v, const Rotation& r);100 Vector rotateVector( const Vector& v, const Rotation& r); 101 101 102 102 //! 3D line … … 118 118 119 119 float distance (const Line& l) const; 120 float distance _point (const Vector& v) const;120 float distancePoint (const Vector& v) const; 121 121 Vector* footpoints (const Line& l) const; 122 122 float len () const; … … 144 144 ~Plane () {} 145 145 146 Vector intersect _line (const Line& l) const;147 float distance _point (const Vector& p) const;148 float locate _point (const Vector& p) const;146 Vector intersectLine (const Line& l) const; 147 float distancePoint (const Vector& p) const; 148 float locatePoint (const Vector& p) const; 149 149 }; 150 150
Note: See TracChangeset
for help on using the changeset viewer.