00001 /* 00002 * PROPRIETARY INFORMATION. This software is proprietary to 00003 * Side Effects Software Inc., and is not to be reproduced, 00004 * transmitted, or disclosed in any way without written permission. 00005 * 00006 * Produced by: 00007 * Mark Elendt 00008 * Side Effects Software Inc. 00009 * 20 Maud St. 00010 * Toronto, Ontario, M5V 2M5 00011 * Canada 00012 * 416-366-4607 00013 * 00014 * NAME: GU library (C++) 00015 * 00016 * COMMENTS: Attribute offsets. This builds a cache of attribute offsets 00017 * which is used instead of looking up all the time. 00018 * 00019 */ 00020 00021 #ifndef __GU_DisplayAttribs_h__ 00022 #define __GU_DisplayAttribs_h__ 00023 00024 #include "GU_API.h" 00025 class GU_Detail; 00026 class GB_Attribute; 00027 00028 00029 class GU_API GU_DisplayAttribs { // Attribute offsets that we care about 00030 public: 00031 void resetOffsets(); 00032 void getOffsets(const GU_Detail *gdp, int allttribs = 1); 00033 // 00034 // Detail attributes 00035 // 00036 int detLOD; // Level of detail for the Detail 00037 int detCd; // Detail diffuse color/display color 00038 00039 // 00040 // Primitive attributes 00041 // 00042 int primCd; // Diffuse color / Display color 00043 int primAlpha; // Alpha 00044 int primLOD; // Level of detail 00045 int primDopt; // Draw options 00046 int primShop; // SHOP offset (for OGL parameters) 00047 int primMaterial; // Material SHOP offset 00048 00049 GB_Attribute *primShopAttrib; 00050 GB_Attribute *primMaterialAttrib; 00051 00052 // 00053 // Point attributes 00054 // 00055 int ptVel; // Velocity 00056 int ptUp; // Up vector 00057 int ptRot; // Rotation angle and axis 00058 int ptTrans; // Translation 00059 int ptPScale; // particle scale 00060 int ptPScale3; // particle scale (3-vector) 00061 int ptOrient; // instance orientation 00062 int ptNml; // Normal 00063 int ptTxt; // Texture 00064 int ptCd; // Point color 00065 int ptAlpha; // Point alpha 00066 int ptCom; // Point Center of Mass 00067 int ptTangent; // Tangent vector 00068 00069 // 00070 // Sprite related point attributes 00071 // 00072 int ptSpriteTxt; // Sprite texture 00073 int ptSpriteShop; // Sprite SHOP (for OGL parameters) 00074 GB_Attribute *ptSpriteShopAttrib; 00075 00076 // 00077 // Vertex attributes 00078 // 00079 int vtxTxt; // Vertex texture coords 00080 int vtxCd; // Vertex color 00081 int vtxAlpha; // Vertex alpha 00082 00083 // 00084 // Internal Capture Attributes (on tubes only) 00085 // 00086 int tubeCapture; 00087 00088 // 00089 // A flag to distinguish between a user-defined normal and an internal 00090 // normal. 00091 // 00092 unsigned isPtNmlInternal:1; 00093 }; 00094 00095 #endif
1.5.9