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

sglVertStruct.hpp

00001 /*****************************************************************************
00002  * SGL: A Scene Graph Library
00003  *
00004  * Copyright (C) 1997-2001  Scott McMillan   All Rights Reserved.
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Library General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2 of the License, or (at your option) any later version.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Library General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Library General Public
00017  * License along with this library; if not, write to the Free
00018  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00019  *****************************************************************************
00020  *     File: sglVertStruct.hpp
00021  *  Project: obj loader/stripifier/morphing
00022  *  Created: 17 July 1997
00023  *  Summary: vertStruct objects
00024  *****************************************************************************/
00025 
00026 #ifndef __SGL_VERT_STRUCT_HPP
00027 #define __SGL_VERT_STRUCT_HPP
00028 
00029 #include <sgldb.h>
00030 
00031 //============================================================================
00032 
00034 class SGLDB_DLL_API sglVertStructV
00035 {
00036 public:
00038    unsigned int vi;
00039 
00040    unsigned int hash() {return vi;}
00041    unsigned int edgeHash() {return vi;}
00042    static bool hasNormals() {return false;}
00043    unsigned int getNormal() {return UINT_MAX;}
00044    void setNormal(unsigned int) {};
00045 };
00046 
00047 //============================================================================
00048 
00050 class SGLDB_DLL_API sglVertStructVC
00051 {
00052 public:
00054    unsigned int vi;
00056    unsigned int ci;
00057 
00058    unsigned int hash() {return vi;}
00059    unsigned int edgeHash() {return vi + ci;}
00060    static bool hasNormals() {return false;}
00061    unsigned int getNormal() {return UINT_MAX;}
00062    void setNormal(unsigned int) {};
00063 };
00064 
00065 //============================================================================
00066 
00068 class SGLDB_DLL_API sglVertStructVN
00069 {
00070 public:
00072    unsigned int vi;
00074    unsigned int ni;
00075 
00076    unsigned int hash() {return vi;}
00077    unsigned int edgeHash() {return vi + ni;}
00078    static bool hasNormals() {return true;}
00079    unsigned int getNormal() {return ni;}
00080    void setNormal(unsigned int n) {ni = n;}
00081 };
00082 
00083 //============================================================================
00084 
00086 class SGLDB_DLL_API sglVertStructVNC
00087 {
00088 public:
00090    unsigned int vi;
00092    unsigned int ni;
00094    unsigned int ci;
00095 
00096    unsigned int hash() {return vi;}
00097    unsigned int edgeHash() {return vi + ni + ci;}
00098    static bool hasNormals() {return true;}
00099    unsigned int getNormal() {return ni;}
00100    void setNormal(unsigned int n) {ni = n;}
00101 };
00102 
00103 //============================================================================
00104 
00106 class SGLDB_DLL_API sglVertStructVT
00107 {
00108 public:
00110    unsigned int vi;
00112    unsigned int ti;
00113 
00114    unsigned int hash() {return vi;}
00115    unsigned int edgeHash() {return vi + ti;}
00116    static bool hasNormals() {return false;}
00117    unsigned int getNormal() {return UINT_MAX;}
00118    void setNormal(unsigned int) {};
00119 };
00120 
00121 //============================================================================
00122 
00124 class SGLDB_DLL_API sglVertStructVTC
00125 {
00126 public:
00128    unsigned int vi;
00130    unsigned int ti;
00132    unsigned int ci;
00133 
00134    unsigned int hash() {return vi;}
00135    unsigned int edgeHash() {return vi + ti + ci;}
00136    static bool hasNormals() {return false;}
00137    unsigned int getNormal() {return UINT_MAX;}
00138    void setNormal(unsigned int) {};
00139 };
00140 
00141 //============================================================================
00142 
00144 class SGLDB_DLL_API sglVertStructVNT
00145 {
00146 public:
00148    unsigned int vi;
00150    unsigned int ni;
00152    unsigned int ti;
00153 
00154    unsigned int hash() {return vi;}
00155    unsigned int edgeHash() {return vi + ni + ti;}
00156    static bool hasNormals() {return true;}
00157    unsigned int getNormal() {return ni;}
00158    void setNormal(unsigned int n) {ni = n;}
00159 };
00160 
00161 //============================================================================
00162 
00164 class SGLDB_DLL_API sglVertStructVNTC
00165 {
00166 public:
00168    unsigned int vi;
00170    unsigned int ni;
00172    unsigned int ti;
00174    unsigned int ci;
00175 
00176    unsigned int hash() {return vi;}
00177    unsigned int edgeHash() {return vi + ni + ti + ci;}
00178    static bool hasNormals() {return true;}
00179    unsigned int getNormal() {return ni;}
00180    void setNormal(unsigned int n) {ni = n;}
00181 };
00182 
00183 //============================================================================
00184 
00185 
00186 
00187 SGLDB_DLL_API
00188 ostream& operator<<(ostream& ostrm, const sglVertStructVNTC& vert);
00189 
00190 SGLDB_DLL_API
00191 ostream& operator<<(ostream& ostrm, const sglVertStructVNT& vert);
00192 
00193 SGLDB_DLL_API
00194 ostream& operator<<(ostream& ostrm, const sglVertStructVNC& vert);
00195 
00196 SGLDB_DLL_API
00197 ostream& operator<<(ostream& ostrm, const sglVertStructVN& vert);
00198 
00199 SGLDB_DLL_API
00200 ostream& operator<<(ostream& ostrm, const sglVertStructVTC& vert);
00201 
00202 SGLDB_DLL_API
00203 ostream& operator<<(ostream& ostrm, const sglVertStructVT& vert);
00204 
00205 SGLDB_DLL_API
00206 ostream& operator<<(ostream& ostrm, const sglVertStructVC& vert);
00207 
00208 SGLDB_DLL_API
00209 ostream& operator<<(ostream& ostrm, const sglVertStructV& vert);
00210 
00211 SGLDB_DLL_API
00212 bool operator==(const sglVertStructV& lhs, const sglVertStructV& rhs);
00213 
00214 SGLDB_DLL_API
00215 bool operator==(const sglVertStructVC& lhs, const sglVertStructVC& rhs);
00216 
00217 SGLDB_DLL_API
00218 bool operator==(const sglVertStructVN& lhs, const sglVertStructVN& rhs);
00219 
00220 SGLDB_DLL_API
00221 bool operator==(const sglVertStructVNC& lhs, const sglVertStructVNC& rhs);
00222 
00223 SGLDB_DLL_API
00224 bool operator==(const sglVertStructVT& lhs, const sglVertStructVT& rhs);
00225 
00226 SGLDB_DLL_API
00227 bool operator==(const sglVertStructVTC& lhs, const sglVertStructVTC& rhs);
00228 
00229 SGLDB_DLL_API
00230 bool operator==(const sglVertStructVNT& lhs, const sglVertStructVNT& rhs);
00231 
00232 SGLDB_DLL_API
00233 bool operator==(const sglVertStructVNTC& lhs, const sglVertStructVNTC& rhs);
00234 
00235 #endif

Generated at Mon Jul 1 18:00:06 2002 for SGL by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001