K3dVector3Obj.h

Go to the documentation of this file.
00001 
00011 /***************************************************************************
00012  *   Copyright (C) 2007 by Jan Koci   *
00013  *   honza.koci@email.cz   *
00014  *   http://kengine.sourceforge.net/tutorial/
00015  *                                                                         *
00016  *   This program is free software; you can redistribute it and/or modify  *
00017  *   it under the terms of the GNU General Public License as published by  *
00018  *   the Free Software Foundation; either version 2 of the License, or     *
00019  *   (at your option) any later version.                                   *
00020  *                                                                         *
00021  *   This program is distributed in the hope that it will be useful,       *
00022  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00023  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00024  *   GNU General Public License for more details.                          *
00025  *                                                                         *
00026  *   You should have received a copy of the GNU General Public License     *
00027  *   along with this program; if not, write to the                         *
00028  *   Free Software Foundation, Inc.,                                       *
00029  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00030  ***************************************************************************/
00031 
00032 #pragma once
00033 
00034 #include "K3dVector3.h"
00035 
00036 class K3dVector3Obj: public K3dVector3
00037 {
00038                 int m_iId;      
00039         public:
00040                 K3dVector3Obj();
00041                 // Constructor set private vector
00042                 K3dVector3Obj ( const K3dVector3Obj & _rkV );
00043                 //      Constructor set vector from array
00044                 K3dVector3Obj ( const float _afVector[3] );
00045                 //      Constructor set vector from x, y, z values
00046                 K3dVector3Obj ( float _fX, float _fY, float _fZ );
00047                 // Constructor to set vector from unsigned char array
00048                 K3dVector3Obj ( const unsigned char _aucVector[3] );
00049                 ~K3dVector3Obj();
00050 
00052                 int &GetId()
00053                 {
00054                         return m_iId;
00055                 }
00056 
00058                 // Assignment operator
00060 
00061                 K3dVector3Obj& operator= ( const K3dVector3Obj& _rkV );
00062 
00064                 // Comparison operators
00066 
00067                 bool operator== ( const K3dVector3Obj &_rkV ) const;
00068                 bool operator!= ( const K3dVector3Obj &_rkV ) const;
00069                 bool operator< ( const K3dVector3Obj &_rkV ) const;
00070                 bool operator<= ( const K3dVector3Obj &_rkV ) const;
00071                 bool operator> ( const K3dVector3Obj &_rkV ) const;
00072                 bool operator>= ( const K3dVector3Obj &_rkV ) const;
00073                 // Compare arrays for comparison operators
00074                 int CompareArrays ( const K3dVector3Obj &_rkV ) const;
00075 
00076 
00078                 // Arithmetic operations
00080 
00081                 K3dVector3Obj operator+ ( const K3dVector3Obj &_rkV ) const;
00082                 K3dVector3Obj operator+ ( const float _fScalar ) const;
00083                 K3dVector3Obj operator- ( const K3dVector3Obj &_rkV ) const;
00084                 K3dVector3Obj operator- ( const float _fScalar ) const;
00085                 K3dVector3Obj operator- () const;
00086                 K3dVector3Obj operator* ( const K3dVector3Obj &_rkV ) const;
00087                 K3dVector3Obj operator* ( const float _fScalar ) const;
00088                 K3dVector3Obj operator/ ( const K3dVector3Obj &_rkV ) const;
00089                 K3dVector3Obj operator/ ( const float _fScalar ) const;
00090 
00091 
00093                 // Arithmetic updates
00095 
00096                 K3dVector3Obj& operator+= ( const K3dVector3Obj &_rkV );
00097                 K3dVector3Obj& operator+= ( const float _fScalar );
00098                 K3dVector3Obj& operator-= ( const K3dVector3Obj &_rkV );
00099                 K3dVector3Obj& operator-= ( const float _fScalar );
00100                 K3dVector3Obj& operator*= ( const K3dVector3Obj &_rkV );
00101                 K3dVector3Obj& operator*= ( const float _fScalar );
00102                 K3dVector3Obj& operator/= ( const K3dVector3Obj &_rkV );
00103                 K3dVector3Obj& operator/= ( const float _fScalar );
00104 };
00105 
00106 

Generated on Thu Aug 16 23:53:27 2007 for K3dEngine by  doxygen 1.5.0