Ignore:
Timestamp:
Nov 27, 2008, 9:55:08 AM (17 years ago)
Author:
Christian Neuen <neuen@…>
Children:
f5b58e
Parents:
a709c4
Message:

In vector a function for calculation of the vector-(cross-)product has been added.
In Boundary a new way for finding the non-convex boundary is implemented.
Currently problem with comparison of the return value of the map::find routine.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/vector.cpp

    ra709c4 r6b3826  
    115115};
    116116
     117
     118/** Calculates VectorProduct between this and another vector.
     119 *  -# returns the Product in place of vector from which it was initiated
     120 *  -# ATTENTION: Only three dim.
     121 *  \param *y array to vector with which to calculate crossproduct
     122 *  \return \f$ x \times y \f&
     123 */
     124void Vector::VectorProduct(const Vector *y)
     125{
     126  Vector tmp;
     127  tmp[0] = x[1]*y->x[2] - x[2]*y->x[1];
     128  tmp[1] = x[2]*y->x[0] - x[0]*y->x[2];
     129  tmp[2] = x[0]*y->x[1] - x[1]*Y->x[0];
     130  this->CopyVector(&tmp);
     131
     132};
     133
     134
    117135/** projects this vector onto plane defined by \a *y.
    118136 * \param *y array to normal vector of plane
     
    184202};
    185203
    186 /** Calculates the angle between this and another vector.
     204/** Calculates the angle between this and another vector. 
    187205 * \param *y array to second vector
    188206 * \return \f$\acos\bigl(frac{\langle x, y \rangle}{|x||y|}\bigr)\f$
Note: See TracChangeset for help on using the changeset viewer.