HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GA_RTIPrimitiveRef.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: GA_RTIPrimitiveRef.h ( GA Library, C++)
7  *
8  * COMMENTS: Define the range of points or vertices referenced by a primitive
9  *
10  * The range of vertices owned by primitive 32
11  * GA_RTIPrimitiveRef i(geo, 32, GA_ATTRIB_VERTEX);
12  *
13  * The range of points used by primitive 14.
14  * GA_RTIPrimitiveRef i(geo, 14, GA_ATTRIB_POINT);
15  *
16  * If a primitive refers to a point more than once, the point will be visited
17  * multiple times. Behavior is undefined if vertices are added or removed
18  * during traversal.
19  */
20 
21 #ifndef __GA_RTIPrimitiveRef__
22 #define __GA_RTIPrimitiveRef__
23 
24 #include "GA_API.h"
25 #include "GA_RTISingle.h"
26 #include "GA_Types.h"
27 
28 
29 class GA_Detail;
30 class GA_IndexMap;
31 class GA_IteratorState;
32 class GA_Primitive;
33 class GA_Range;
35 
36 
38 {
39 public:
40  GA_RTIPrimitiveRef(const GA_Detail &geo, GA_Offset prim,
41  GA_AttributeOwner what);
43  virtual ~GA_RTIPrimitiveRef();
44 
45  /// @{
46  /// RangeTypeInterface implementation
47  virtual GA_RangeTypeInterface *copy() const;
48  virtual bool isSplittable() const { return false; }
49  virtual bool isEmpty() const;
50  virtual GA_Size getMaxEntries() const;
51  virtual GA_Size getEntries() const;
52  virtual bool split(GA_RangeTypeInterface *list[2]) const;
53  virtual bool isEqual(const GA_RangeTypeInterface &src) const;
54  virtual void iterateDestroy(GA_IteratorState &state) const;
55  virtual void iterateCopy(GA_IteratorState &dest,
56  const GA_IteratorState &src) const;
57  virtual GA_Size getPageCount() const { return -1; }
58  virtual bool getPageElementRange(GA_Range &, GA_Size, GA_Size) const
62  /// @}
63 private:
64  /// @{
65  /// RangeTypeInterface implementation
66  virtual void singleRewind(GA_IteratorState &state) const;
67  virtual bool singleGet(const GA_IteratorState &state,
68  GA_Offset &value) const;
69  virtual void singleNext(GA_IteratorState &state) const;
70  /// @}
71 
72  const GA_IndexMap &mySourceMap;
73  const GA_Primitive *myPrimPtr;
74  GA_Offset myPrimitive;
75  GA_AttributeOwner myTargetType;
76  bool myValid;
77 };
78 
79 #endif
A class to manage an ordered array which has fixed offset handles.
Definition: GA_IndexMap.h:63
virtual bool isEmpty() const =0
Check whether the range is empty.
virtual GA_RangeTypeInterface * copy() const =0
Method to create a copy of this selection.
virtual bool singleGet(const GA_IteratorState &state, GA_Offset &value) const =0
virtual void iterateCopy(GA_IteratorState &dest, const GA_IteratorState &src) const =0
Copy iterator state. The dest state will not have been constructed.
virtual GA_Offset getFirstOffsetInPage(GA_Size) const
virtual bool split(GA_RangeTypeInterface *list[2]) const =0
virtual void iterateDestroy(GA_IteratorState &state) const
#define GA_API
Definition: GA_API.h:12
png_uint_32 i
Definition: png.h:2877
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:211
A range of elements in an index-map.
Definition: GA_Range.h:42
bool getPageElementRangeNonSplittable() const
Method which can be called for getPageElementRange()
GA_Size GA_Offset
Definition: GA_Types.h:617
GA_Offset getFirstOffsetInPageNonSplittable() const
Method which can be called for getFirstOffsetInPage()
virtual bool isSplittable() const
Abstract implementation of a range.
virtual void singleNext(GA_IteratorState &state) const =0
GLsizei const GLfloat * value
Definition: glcorearb.h:823
GA_AttributeOwner
Definition: GA_Types.h:33
virtual GA_Size getMaxEntries() const =0
Get an upper bound on the size of the range.
virtual void singleRewind(GA_IteratorState &state) const =0
virtual GA_Size getPageCount() const
Container class for all geometry.
Definition: GA_Detail.h:95
virtual GA_Size getEntries() const =0
Base class for ranges providing consolidation to contiguous blocks.
Definition: GA_RTISingle.h:31
virtual bool getPageElementRange(GA_Range &, GA_Size, GA_Size) const
virtual bool isEqual(const GA_RangeTypeInterface &src) const =0
GLenum src
Definition: glcorearb.h:1792