CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

efvector4.h

Go to the documentation of this file.
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 ()
00050   { x=0.0f;y=0.0f;z=0.0f;w=1.0f; }
00051 
00053   csEffectVector4 (float value)
00054   { x=value; y=value; z=value; w=1.0f; }
00055 
00057   csEffectVector4 (float _x, float _y,float _z)
00058   { x=_x; y=_y; z=_z; w=1.0f; }
00059 
00061   csEffectVector4 (float _x, float _y,float _z,float _w)
00062   { x=_x; y=_y; z=_z; w=_w; }
00063 
00065   csEffectVector4 (const csVector3 &vec)
00066   { x=vec.x; y = vec.y; z = vec.z; w=1.0f; }
00067 
00069   csEffectVector4 (const csRGBpixel &color)
00070   { x=color.red; y=color.green; z=color.blue; w=color.alpha; }
00071 
00073   csEffectVector4 (const csEffectVector4 &vec)
00074   { x=vec.x; y = vec.y; z = vec.z; w=vec.w; }
00075 };
00076 
00079 #endif // __CS_IVIDEO_EFVECTOR4_H__

Generated for Crystal Space by doxygen 1.2.14