![]() |
Public API Reference |
00001 /* 00002 Copyright (C) 2002 by Mårten Svanfeldt 00003 Written by Mårten Svanfeldt 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License as published by the Free Software Foundation; either 00008 version 2 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Library General Public License for more details. 00014 00015 You should have received a copy of the GNU Library General Public 00016 License along with this library; if not, write to the Free 00017 Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00018 */ 00019 00020 #ifndef __CS_IVIDEO_EFVECTOR4_H__ 00021 #define __CS_IVIDEO_EFVECTOR4_H__ 00022 00031 #include "csgeom/vector3.h" 00032 #include "csgfx/rgbpixel.h" 00033 00037 struct csEffectVector4 00038 { 00040 float x; 00042 float y; 00044 float z; 00046 float w; 00047 00049 csEffectVector4() {x=0.0f;y=0.0f;z=0.0f;w=1.0f;} 00051 csEffectVector4(float value) { x=value; y=value; z=value; w=1.0f;} 00053 csEffectVector4(float _x, float _y,float _z) { x=_x; y=_y; z=_z; w=1.0f;} 00055 csEffectVector4(float _x, float _y,float _z,float _w) { x=_x; y=_y; z=_z; w=_w;} 00057 csEffectVector4(const csVector3 &vec) { x=vec.x; y = vec.y; z = vec.z; w=1.0f;} 00059 csEffectVector4(const csRGBpixel &color) {x=color.red; y=color.green; z=color.blue; w=color.alpha;} 00061 csEffectVector4(const csEffectVector4 &vec){ x=vec.x; y = vec.y; z = vec.z; w=vec.w;} 00062 }; 00063 00066 #endif // __CS_IVIDEO_EFVECTOR4_H__