Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Jun 12, 2005, 11:52:45 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: definition of the separation plane and partition of the vertex. some vector sVec3D modification

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

Legend:

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

    r4585 r4611  
    652652}
    653653
     654
     655/**
     656    \brief create a plane from anchor point and normal
     657    \param norm: normal vector
     658    \param p: anchor point
     659*/
     660Plane::Plane (Vector norm, sVec3D g)
     661{
     662  Vector p(g[0], g[1], g[2]);
     663  n = norm;
     664  k = -(n.x*p.x+n.y*p.y+n.z*p.z);
     665}
     666
     667
    654668/**
    655669   \brief returns the intersection point between the plane and a line
  • orxonox/trunk/src/lib/math/vector.h

    r4609 r4611  
    227227  Plane (Vector a, Vector b, Vector c);
    228228  Plane (Vector norm, Vector p);
     229  Plane (Vector norm, sVec3D p);
    229230  Plane (Vector n, float k) : n(n), k(k) {} //!< assignment constructor
    230231  Plane () : n(Vector(1,1,1)), k(0) {}
Note: See TracChangeset for help on using the changeset viewer.