HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GU_DisplayAttribs.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: GU library (C++)
7  *
8  * COMMENTS: Attribute offsets. This builds a cache of attribute offsets
9  * which is used instead of looking up all the time.
10  *
11  */
12 
13 #ifndef __GU_DisplayAttribs_h__
14 #define __GU_DisplayAttribs_h__
15 
16 #include "GU_API.h"
17 #include <GA/GA_AttributeRef.h>
18 class GU_Detail;
19 class GA_Attribute;
20 
21 // Attribute offsets that we care about
23 {
24 public:
25  void resetOffsets();
26  void getOffsets(const GU_Detail *gdp, int allttribs = 1);
27 
28  bool hasNormals() const
29  { return ptNml.isValid() || vtxNml.isValid(); }
30 //
31 // Detail attributes
32 //
33  GA_ROAttributeRef detLOD; // Level of detail for the Detail
34  GA_ROAttributeRef detCd; // Detail diffuse color/display color
35 
36 //
37 // Primitive attributes
38 //
39  GA_ROAttributeRef primCd; // Diffuse color / Display color
41  GA_ROAttributeRef primLOD; // Level of detail
42  GA_ROAttributeRef primShop; // SHOP offset (for OGL parameters)
43  GA_ROAttributeRef primMaterial; // Material SHOP offset
44  GA_ROAttributeRef primLit; // Should we light this primitive?
45 
48 
49 //
50 // Point attributes
51 //
52  GA_ROAttributeRef ptVel; // Velocity
53  GA_ROAttributeRef ptUp; // Up vector
54  GA_ROAttributeRef ptRot; // Rotation angle and axis
55  GA_ROAttributeRef ptTrans; // Translation
57  GA_ROAttributeRef ptPScale; // particle scale
58  GA_ROAttributeRef ptPScale3; // particle scale (3-vector)
59  GA_ROAttributeRef ptOrient; // instance orientation
62  GA_ROAttributeRef ptCd; // Point color
63  GA_ROAttributeRef ptAlpha; // Point alpha
64  GA_ROAttributeRef ptCom; // Point Center of Mass
65  GA_ROAttributeRef ptTangent; // Tangent vector
66 
67 //
68 // Sprite related point attributes
69 //
70  GA_ROAttributeRef ptSpriteTxt; // Sprite texture
71  GA_ROAttributeRef ptSpriteShop; // Sprite SHOP (for OGL parameters)
73 
74 //
75 // Vertex attributes
76 //
77  GA_ROAttributeRef vtxTxt; // Vertex texture coords
78  GA_ROAttributeRef vtxCd; // Vertex color
79  GA_ROAttributeRef vtxNml; // Vertex normal
80  GA_ROAttributeRef vtxAlpha; // Vertex alpha
81 
82 //
83 // Internal Capture Attributes (on tubes only)
84 //
86 
87 //
88 // A flag to distinguish between a user-defined normal and an internal
89 // normal.
90 //
91  unsigned isPtNmlInternal:1;
92 };
93 
94 #endif
Definition of a geometry attribute.
Definition: GA_Attribute.h:198
GA_ROAttributeRef tubeCapture
GA_ROAttributeRef primMaterial
GA_ROAttributeRef ptPivot
GA_ROAttributeRef ptNml
GA_ROAttributeRef primAlpha
GA_ROAttributeRef primLit
GA_ROAttributeRef ptCom
GA_ROAttributeRef primShop
GA_ROAttributeRef detLOD
GA_ROAttributeRef ptTrans
const GA_Attribute * ptSpriteShopAttrib
const GA_Attribute * primShopAttrib
GA_ROAttributeRef ptTangent
GA_ROAttributeRef vtxAlpha
const GA_Attribute * primMaterialAttrib
GA_ROAttributeRef ptRot
GA_ROAttributeRef ptVel
GA_ROAttributeRef ptOrient
GA_ROAttributeRef ptAlpha
This class provides a way to manage a reference to an attribute permitting Read-Only access...
GA_ROAttributeRef vtxCd
GA_ROAttributeRef ptSpriteShop
bool hasNormals() const
GA_ROAttributeRef ptCd
GA_ROAttributeRef detCd
#define GU_API
Definition: GU_API.h:14
GA_ROAttributeRef vtxNml
GA_ROAttributeRef ptTxt
GA_ROAttributeRef ptPScale3
GA_ROAttributeRef ptPScale
GA_ROAttributeRef primLOD
GA_ROAttributeRef vtxTxt
GA_ROAttributeRef ptSpriteTxt
GA_ROAttributeRef primCd
GA_ROAttributeRef ptUp