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);
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 protected:
38  GA_ROHandleS mySrcName, myDstName;
39 
42  const GU_Detail *mySrcGdp, *myDstGdp;
43 
44  // These are cached references into dst.
47 };
48 
49 #endif
50 
const GU_Detail * mySrcGdp
Definition: GU_PointMatch.h:42
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:211
const GU_Detail::AttribSingleValueLookupTable * myLutId
Definition: GU_PointMatch.h:45
GA_AttributeOwner myDict
Definition: GU_PointMatch.h:40
GA_Size GA_Offset
Definition: GA_Types.h:617
GA_ROHandleS mySrcName
Definition: GU_PointMatch.h:38
GA_ROHandleI mySrcId
Definition: GU_PointMatch.h:37
#define GU_API
Definition: GU_API.h:12
GA_Size myNumDstIndices
Definition: GU_PointMatch.h:41
GA_Size GA_Index
Define the strictness of GA_Offset/GA_Index.
Definition: GA_Types.h:611
GLenum GLenum dst
Definition: glcorearb.h:1792
GA_AttributeOwner
Definition: GA_Types.h:33
Read-only handle for string attribute data.
Definition: GA_Handle.h:756
const GU_Detail::AttribSingleValueLookupTable * myLutName
Definition: GU_PointMatch.h:46
GLenum src
Definition: glcorearb.h:1792