source: trunk/vizservers/nanovis/Vector4.h @ 749

Last change on this file since 749 was 226, checked in by mmc, 15 years ago
  • Added code for Wei's visualization server.
  • Fixed the energyLevels widget so that it doesn't barf when the user attempts to download its contents.
File size: 1.1 KB
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) 2004-2006  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
18class Vector4 
19{
20public:
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
37#endif
Note: See TracBrowser for help on using the repository browser.