Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4585 in orxonox.OLD for orxonox/trunk/src/lib/math


Ignore:
Timestamp:
Jun 10, 2005, 4:05:04 AM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: fixed the axis length bug

Location:
orxonox/trunk/src/lib/math
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/math/vector.cc

    r4578 r4585  
    675675}
    676676
     677
     678/**
     679   \brief returns the distance between the plane and a point
     680   \param p: a Point
     681   \return the distance between the plane and the point (can be negative)
     682 */
     683float Plane::distancePoint (const sVec3D& p) const
     684{
     685  Vector s(p[0], p[1], p[2]);
     686  float l = n.len();
     687  if( l == 0.0) return 0.0;
     688  return (n.dot(s) + k) / n.len();
     689}
     690
     691
    677692/**
    678693   \brief returns the side a point is located relative to a Plane
  • orxonox/trunk/src/lib/math/vector.h

    r4578 r4585  
    225225  Vector intersectLine (const Line& l) const;
    226226  float distancePoint (const Vector& p) const;
     227  float distancePoint (const sVec3D& p) const;
    227228  float locatePoint (const Vector& p) const;
    228229};
Note: See TracChangeset for help on using the changeset viewer.