Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

SVertex3d.h

Go to the documentation of this file.
00001 /*
00002 
00003 AmnesiaEngine
00004 Copyright (c) 2006 John DiSanti.
00005 
00006 Permission is hereby granted, free of charge,
00007 to any person obtaining a copy of this software and associated
00008 documentation files (the "Software"), to deal in the Software
00009 without restriction, including without limitation the rights to
00010 use, copy, modify, merge, publish, distribute, sublicense,
00011 and/or sell copies of the Software, and to permit persons to
00012 whom the Software is furnished to do so, subject to the following
00013 conditions:
00014 
00015 The above copyright notice and this permission notice shall be included
00016 in all copies or substantial portions of the Software.
00017 
00018 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
00019 INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
00020 PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
00021 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
00022 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
00023 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00024 
00025 */
00026 
00027 #ifndef AMN_SVERTEX3D_H
00028 #define AMN_SVERTEX3D_H
00029 
00030 #include <stdlib.h>
00031 
00032 namespace amn
00033 {
00034         class SVertex3dMUV
00035         {
00036         public:
00037                 SVertex3dMUV()
00038                 {
00039                 }
00040                 SVertex3dMUV(const SVertex3dMUV& copy)
00041                 {
00042                         memcpy(this, &copy, sizeof(SVertex3dMUV));
00043                 }
00044 
00045                 struct
00046                 {
00047                         void set(float a, float b, float c) {x = a; y = b; z = c;}
00048                         float x, y, z;
00049                 }pos;
00050                 struct
00051                 {
00052                         void set(int pair, float a, float b) {u[pair] = a; v[pair] = b;}
00053                         float u[8], v[8];
00054                 }uv;
00055                 struct
00056                 {
00057                         void set(float a, float b, float c) {x = a; y = b; z = c;}
00058                         float x, y, z;
00059                 }normal;
00060         };
00061 
00062         class SVertex3d
00063         {
00064         public:
00065                 SVertex3d()
00066                 {
00067                 }
00068                 SVertex3d(const SVertex3d& copy)
00069                 {
00070                         memcpy(this, &copy, sizeof(SVertex3d));
00071                 }
00072 
00073                 struct
00074                 {
00075                         void set(float a, float b, float c) {x = a; y = b; z = c;}
00076                         float x, y, z;
00077                 }pos;
00078                 struct
00079                 {
00080                         void set(float a, float b) {u = a; v = b;}
00081                         float u, v;
00082                 }uv;
00083                 struct
00084                 {
00085                         void set(float a, float b, float c) {x = a; y = b; z = c;}
00086                         float x, y, z;
00087                 }normal;
00088         };
00089 };
00090 
00091 #endif//AMN_SVERTEX3D_H
00092 
00093 /* End of File */

Generated on Wed Feb 1 22:23:26 2006 for AmnesiaEngine by  doxygen 1.4.2