HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GA_RTIPrimitiveComprehension.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_RTIPrimitiveComprehension.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_RTIPrimitiveComprehension i(geo, 32, GA_ATTRIB_VERTEX);
12  *
13  * The range of points used by primitive 14.
14  * GA_RTIPrimitiveComprehension 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.
18  */
19 
20 #ifndef __GA_RTIPrimitiveComprehension__
21 #define __GA_RTIPrimitiveComprehension__
22 
23 #include "GA_API.h"
24 #include "GA_RTISingle.h"
25 #include "GA_OffsetList.h"
26 #include "GA_Types.h"
27 
28 
29 class GA_Detail;
30 class GA_IteratorState;
31 class GA_Range;
33 
34 
35 /// @brief Range of all points/vertices accessed by a range of primitives
36 ///
37 /// @note This allocates an offset list of all elements.
39 {
40 public:
41  /// Specify true for @c keep_prim_order if you need the points/vertices
42  /// to be delivered in the order they're traversed by @c primlist.
44  const GA_Range &primlist,
45  GA_AttributeOwner what,
46  bool keep_prim_order);
51 
52  /// @{
53  /// RangeTypeInterface implementation
54  virtual GA_RangeTypeInterface *copy() const;
55  virtual bool isSplittable() const { return false; }
56  virtual bool isEmpty() const;
57  virtual GA_Size getMaxEntries() const;
58  virtual GA_Size getEntries() const;
59  virtual bool split(GA_RangeTypeInterface *list[2]) const;
60  virtual bool isEqual(const GA_RangeTypeInterface &src) const;
61  virtual void iterateCopy(GA_IteratorState &dest,
62  const GA_IteratorState &src) const;
63  virtual bool areTraversalDeletionsSafe() const { return true; }
64  virtual GA_Size getPageCount() const { return -1; }
65  virtual bool getPageElementRange(GA_Range &, GA_Size, GA_Size) const
69  /// @}
70 private:
71  /// @{
72  /// RangeTypeInterface implementation
73  virtual void singleRewind(GA_IteratorState &state) const;
74  virtual bool singleGet(const GA_IteratorState &state,
75  GA_Offset &value) const;
76  virtual void singleNext(GA_IteratorState &state) const;
77  /// @}
78 
79  GA_OffsetList myOffsets;
80  GA_AttributeOwner myTargetType;
81 };
82 
83 #endif
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 bool split(GA_RangeTypeInterface *list[2]) const =0
GLuint start
Definition: glcorearb.h:474
#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()
GLuint GLuint end
Definition: glcorearb.h:474
virtual bool areTraversalDeletionsSafe() const
Abstract implementation of a range.
Range of all points/vertices accessed by a range of primitives.
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 bool getPageElementRange(GA_Range &, GA_Size, GA_Size) const
virtual void singleRewind(GA_IteratorState &state) const =0
virtual GA_Offset getFirstOffsetInPage(GA_Size) const
Container class for all geometry.
Definition: GA_Detail.h:96
virtual GA_Size getEntries() const =0
Base class for ranges providing consolidation to contiguous blocks.
Definition: GA_RTISingle.h:31
virtual bool isEqual(const GA_RangeTypeInterface &src) const =0
GLenum src
Definition: glcorearb.h:1792