HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GU_PrimTriStrip.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_PrimTriStrip.h ( GU Library, C++)
7  *
8  * COMMENTS: TriStrip utilitiy functions.
9  */
10 
11 #ifndef __GU_PrimTriStrip__
12 #define __GU_PrimTriStrip__
13 
14 #include "GU_API.h"
15 #include <GEO/GEO_PrimTriStrip.h>
16 #include "GU_Detail.h"
17 
18 class UT_MemoryCounter;
19 class GEO_ConvertParms;
20 
22 {
23 protected:
24  /// NOTE: Primitives should not be deleted directly. They are managed
25  /// by the GA_PrimitiveList and the stash.
26  virtual ~GU_PrimTriStrip() {}
27 
28 public:
29  /// NOTE: This constructor should only be called via GU_PrimitiveFactory.
31  : GEO_PrimTriStrip(gdp, offset)
32  {}
33 
34  /// Report approximate memory usage.
35  virtual int64 getMemoryUsage() const;
36 
37  /// Count memory usage using a UT_MemoryCounter in order to count
38  /// shared memory correctly.
39  /// NOTE: This should always include sizeof(*this).
40  virtual void countMemory(UT_MemoryCounter &counter) const;
41 
42  virtual const GA_PrimitiveDefinition &getTypeDef() const
43  {
44  UT_ASSERT(theDefinition);
45  return *theDefinition;
46  }
47 
48  // Conversion Methods
49  virtual GEO_Primitive *convert(GEO_ConvertParms &parms,
50  GA_PointGroup *usedpts = 0);
51  virtual GEO_Primitive *convertNew(GEO_ConvertParms &parms);
52 
53  // NOTE: For static member functions please call in the following
54  // manner. <ptrvalue> = GU_PrimTriStrip::<functname>
55  // i.e. partptr = GU_PrimTriStrip::build(params...);
56 
57  // Optional Build Method
58 
59  static GU_PrimTriStrip *build(GU_Detail *gdp, GA_Size numpts,
60  bool appendpts = true);
61 
62  virtual void normal(NormalComp &output) const;
63 
64 protected:
65 private:
66  static GA_PrimitiveDefinition *theDefinition;
67  friend class GU_PrimitiveFactory;
69 };
71 
72 #endif
73 
#define SYS_DEPRECATED_PUSH_DISABLE()
#define SYS_DEPRECATED_POP_DISABLE()
GU_PrimTriStrip(GU_Detail *gdp, GA_Offset offset=GA_INVALID_OFFSET)
NOTE: This constructor should only be called via GU_PrimitiveFactory.
virtual int64 getMemoryUsage() const
Definition: GA_Primitive.h:204
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:211
#define GA_INVALID_OFFSET
Definition: GA_Types.h:654
virtual void normal(NormalComp &output) const =0
GA_Size GA_Offset
Definition: GA_Types.h:617
long long int64
Definition: SYS_Types.h:100
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:102
virtual void countMemory(UT_MemoryCounter &counter) const
virtual ~GU_PrimTriStrip()
GLintptr offset
Definition: glcorearb.h:664
#define GU_API
Definition: GU_API.h:11
virtual const GA_PrimitiveDefinition & getTypeDef() const
A strip of triangles. The Nth triangle shares an edge with the previous.
virtual GEO_Primitive * convert(GEO_ConvertParms &parms, GA_PointGroup *usedpts=0)=0
Definition of a geometric primitive.
virtual GEO_Primitive * convertNew(GEO_ConvertParms &parms)=0