/[usata]/usata2/src/math/vector.hpp
ViewVC logotype

Diff of /usata2/src/math/vector.hpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by Descender, Fri Dec 31 05:14:41 2004 UTC revision 1.7 by Descender, Tue Jan 4 13:15:56 2005 UTC
# Line 20  Line 20 
20    
21  namespace usata  namespace usata
22  {  {
23            /*! \defgroup math Mathematics */
24    
25            //! \brief Mathematical classes and functions
26          namespace math          namespace math
27          {          {
28    
29                    //! \ingroup math
30                  //! \brief Homogeneous 3D vector                  //! \brief Homogeneous 3D vector
31                    //! \todo Convert to an expression template implementation.
32                  //! \param T Component type.                  //! \param T Component type.
33                  template <typename T>                  template <typename T>
34                  class Vector4                  class Vector4
# Line 56  namespace usata Line 61  namespace usata
61    
62                          //! \brief Index operator                          //! \brief Index operator
63                          //! \param index Index of component.                          //! \param index Index of component.
64                          T                          //! \return reference to component.
65                            T&
66                          operator[] (int index) const                          operator[] (int index) const
67                          {                          {
68                                  return v[index];                                  return v[index];
# Line 210  namespace usata Line 216  namespace usata
216    
217                          //! \brief Returns dot product                          //! \brief Returns dot product
218                          //! \param[in] rhs Right operand.                          //! \param[in] rhs Right operand.
219                            //! \return Dot product.
220                          T                          T
221                          dot(const Vector4& rhs) const                          dot(const Vector4& rhs) const
222                          {                          {
# Line 221  namespace usata Line 228  namespace usata
228    
229                          //! \brief Returns cross product                          //! \brief Returns cross product
230                          //! \param[in] rhs Right operand.                          //! \param[in] rhs Right operand.
231                            //! \return Cross product.
232                          T                          T
233                          cross(const Vector4& rhs) const                          cross(const Vector4& rhs) const
234                          {                          {
# Line 242  namespace usata Line 250  namespace usata
250                          }                          }
251    
252                          //! \brief Returns magnitude                          //! \brief Returns magnitude
253                            //! \return Magnitude.
254                          T                          T
255                          length() const                          length() const
256                          {                          {

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26