HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GA_RTIPointComprehension.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_RTIPointComprehension.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_RTIPointComprehension i(geo, 32, GA_ATTRIB_VERTEX);
12  *
13  * The range of points used by primitive 14.
14  * GA_RTIPointComprehension 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_RTIPointComprehension__
21 #define __GA_RTIPointComprehension__
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  /// Compute the
43  const GA_Range &primlist,
44  GA_AttributeOwner what);
48  ~GA_RTIPointComprehension() override;
49 
50  /// @{
51  /// RangeTypeInterface implementation
52  GA_RangeTypeInterface *copy() const override;
53  bool isSplittable() const override { return false; }
54  bool isEmpty() const override;
55  GA_Size getMaxEntries() const override;
56  GA_Size getEntries() const override;
57  bool split(GA_RangeTypeInterface *list[2]) const override;
58  bool isEqual(const GA_RangeTypeInterface &src) const override;
59  void iterateCopy(GA_IteratorState &dest,
60  const GA_IteratorState &src) const override;
61  bool areTraversalDeletionsSafe() const override { return true; }
62  GA_Size getPageCount() const override { return -1; }
63  bool getPageElementRange(GA_Range &, GA_Size, GA_Size) const override
67  /// @}
68 private:
69  /// @{
70  /// RangeTypeInterface implementation
71  void singleRewind(GA_IteratorState &state) const override;
72  bool singleGet(const GA_IteratorState &state,
73  GA_Offset &value) const override;
74  void singleNext(GA_IteratorState &state) const override;
75  /// @}
76 
77  GA_OffsetList myOffsets;
78  GA_Offset myStart, myEnd;
79  GA_AttributeOwner myTargetType;
80 };
81 
82 #endif
virtual bool isEmpty() const =0
Check whether the range is empty.
bool isSplittable() const override
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.
bool areTraversalDeletionsSafe() const override
virtual bool split(GA_RangeTypeInterface *list[2]) const =0
GLuint start
Definition: glcorearb.h:474
GA_Offset getFirstOffsetInPage(GA_Size) const override
#define GA_API
Definition: GA_API.h:14
GLenum src
Definition: glcorearb.h:1792
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:234
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:640
GA_Offset getFirstOffsetInPageNonSplittable() const
Method which can be called for getFirstOffsetInPage()
GLuint GLuint end
Definition: glcorearb.h:474
GA_Size getPageCount() const override
Abstract implementation of a range.
bool getPageElementRange(GA_Range &, GA_Size, GA_Size) const override
virtual void singleNext(GA_IteratorState &state) const =0
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
GLsizei const GLfloat * value
Definition: glcorearb.h:823
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
Range of all points/vertices accessed by a range of primitives.
virtual bool isEqual(const GA_RangeTypeInterface &src) const =0