HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GU_PointMatch.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_PointMatch.h ( GU Library, C++)
7  *
8  * COMMENTS:
9  * Provides a structure to match offsets between two details.
10  */
11 
12 #ifndef __GU_PointMatch__
13 #define __GU_PointMatch__
14 
15 #include "GU_API.h"
16 #include <GA/GA_Types.h>
17 #include <GA/GA_Handle.h>
18 #include "GU_Detail.h"
19 
21 {
22 public:
23  /// Initialize a lookup from src to dst on the given dictionary.
24  /// The idname attribute will be matched if it is a string or integer,
25  /// if not found in both it will match by raw index.
26  /// dst must remain unchanged as we stash LUT pointers built by it.
27  GU_PointMatch(GA_AttributeOwner dict, const GU_Detail *src, const GU_Detail *dst, const char *idname, const char *dstidname = 0);
28 
29  /// Given offset in src, return correspnding offset in dst, or
30  /// GA_INVALID_OFFSET if none exists
31  GA_Offset matchOffset(GA_Offset srcoff) const;
32  /// Given index in src, return correspnding index in dst, or
33  /// GA_INVALID_INDEX if none exists
34  GA_Index matchIndex(GA_Index srcindex) const;
35 
36  /// Determine if any fallback macthing was done or if this is a
37  /// fully specified match.
38  bool fallbackUsed() const;
39 
40 protected:
42  GA_ROHandleS mySrcName, myDstName;
43 
46  const GU_Detail *mySrcGdp, *myDstGdp;
47 
48  // These are cached references into dst.
51 };
52 
53 #endif
54 
const GU_Detail * mySrcGdp
Definition: GU_PointMatch.h:46
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:236
const GU_Detail::AttribSingleValueLookupTable * myLutId
Definition: GU_PointMatch.h:49
GA_AttributeOwner myDict
Definition: GU_PointMatch.h:44
GA_Size GA_Offset
Definition: GA_Types.h:646
GA_ROHandleS mySrcName
Definition: GU_PointMatch.h:42
GA_ROHandleI mySrcId
Definition: GU_PointMatch.h:41
#define GU_API
Definition: GU_API.h:14
GA_Size myNumDstIndices
Definition: GU_PointMatch.h:45
GA_Size GA_Index
Define the strictness of GA_Offset/GA_Index.
Definition: GA_Types.h:640
GLenum GLenum dst
Definition: glcorearb.h:1793
GA_AttributeOwner
Definition: GA_Types.h:35
const GU_Detail::AttribSingleValueLookupTable * myLutName
Definition: GU_PointMatch.h:50
GLenum src
Definition: glcorearb.h:1793