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 #include <GB/GB_AttributeRef.h> 00026 class GU_Detail; 00027 class GB_Attribute; 00028 00029 00030 class GU_API GU_DisplayAttribs { // Attribute offsets that we care about 00031 public: 00032 void resetOffsets(); 00033 void getOffsets(const GU_Detail *gdp, int allttribs = 1); 00034 00035 bool hasNormals() const 00036 { return ptNml.isValid() || vtxNml.isValid(); } 00037 // 00038 // Detail attributes 00039 // 00040 GB_AttributeRef detLOD; // Level of detail for the Detail 00041 GB_AttributeRef detCd; // Detail diffuse color/display color 00042 00043 // 00044 // Primitive attributes 00045 // 00046 GB_AttributeRef primCd; // Diffuse color / Display color 00047 GB_AttributeRef primAlpha; // Alpha 00048 GB_AttributeRef primLOD; // Level of detail 00049 GB_AttributeRef primShop; // SHOP offset (for OGL parameters) 00050 GB_AttributeRef primMaterial; // Material SHOP offset 00051 GB_AttributeRef primLit; // Should we light this primitive? 00052 00053 GB_Attribute *primShopAttrib; 00054 GB_Attribute *primMaterialAttrib; 00055 00056 // 00057 // Point attributes 00058 // 00059 GB_AttributeRef ptVel; // Velocity 00060 GB_AttributeRef ptUp; // Up vector 00061 GB_AttributeRef ptRot; // Rotation angle and axis 00062 GB_AttributeRef ptTrans; // Translation 00063 GB_AttributeRef ptPScale; // particle scale 00064 GB_AttributeRef ptPScale3; // particle scale (3-vector) 00065 GB_AttributeRef ptOrient; // instance orientation 00066 GB_AttributeRef ptNml; // Normal 00067 GB_AttributeRef ptTxt; // Texture 00068 GB_AttributeRef ptCd; // Point color 00069 GB_AttributeRef ptAlpha; // Point alpha 00070 GB_AttributeRef ptCom; // Point Center of Mass 00071 GB_AttributeRef ptTangent; // Tangent vector 00072 00073 // 00074 // Sprite related point attributes 00075 // 00076 GB_AttributeRef ptSpriteTxt; // Sprite texture 00077 GB_AttributeRef ptSpriteShop; // Sprite SHOP (for OGL parameters) 00078 GB_Attribute *ptSpriteShopAttrib; 00079 00080 // 00081 // Vertex attributes 00082 // 00083 GB_AttributeRef vtxTxt; // Vertex texture coords 00084 GB_AttributeRef vtxCd; // Vertex color 00085 GB_AttributeRef vtxNml; // Vertex normal 00086 GB_AttributeRef vtxAlpha; // Vertex alpha 00087 00088 // 00089 // Internal Capture Attributes (on tubes only) 00090 // 00091 GB_AttributeRef tubeCapture; 00092 00093 // 00094 // A flag to distinguish between a user-defined normal and an internal 00095 // normal. 00096 // 00097 unsigned isPtNmlInternal:1; 00098 }; 00099 00100 #endif
1.5.9