Line  

1  /*


2  * 


3  * Vector4.h: Vector4 class


4  *


5  * ======================================================================


6  * AUTHOR: Wei Qiao <qiaow@purdue.edu>


7  * Purdue Rendering and Perceptualization Lab (PURPL)


8  *


9  * Copyright (c) 20042006 Purdue Research Foundation


10  *


11  * See the file "license.terms" for information on usage and


12  * redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.


13  * ======================================================================


14  */


15  #ifndef _VECTOR4_H_


16  #define _VECTOR4_H_


17 


18  class Vector4


19  {


20  public:


21  float x, y, z, w;


22 


23  Vector4();


24  Vector4(float _x, float _y, float _z, float _w);


25  ~Vector4();


26 


27  void perspective_devide();


28  void print();


29  Vector4 operator +(Vector4 &op2); //plus


30  Vector4 operator (Vector4 &op2); //minus


31  float operator *(Vector4 &op2); //dot product


32  Vector4 operator*(float op2); //mul per component


33  Vector4 operator/(float op2); //mul per component


34  void operator <(Vector4 &op2); //assign


35 


36  void set(float x1, float y1, float z1, float w1);


37  };


38 


39  #endif


Note: See
TracBrowser
for help on using the repository browser.