HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GU_PrimPlane.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_PrimPlane.h (C++)
7  *
8  * COMMENTS:
9  * Header file for GU_PrimPlane class.
10  */
11 
12 #ifndef __GU_PrimPlane_h__
13 #define __GU_PrimPlane_h__
14 
15 #include "GU_API.h"
16 #include "GU_Detail.h"
17 #include <GEO/GEO_PrimPlane.h>
18 #include <UT/UT_Matrix4.h>
19 
21 class GA_PointGroup;
22 class GEO_ConvertParms;
23 class UT_MemoryCounter;
24 
26 {
27 public:
29 
31  GA_Offset ptoff; // use this point instead of yours
33 };
34 
36 {
37 protected:
38  /// NOTE: Primitives should not be deleted directly. They are managed
39  /// by the GA_PrimitiveList and the stash.
40  ~GU_PrimPlane() override {}
41 
42 public:
43  /// NOTE: This constructor should only be called via GU_PrimitiveFactory.
45  : GEO_PrimPlane(gdp, offset)
46  {}
47 
48  /// Report approximate memory usage.
49  int64 getMemoryUsage() const override;
50 
51  /// Count memory usage using a UT_MemoryCounter in order to count
52  /// shared memory correctly.
53  /// NOTE: This should always include sizeof(*this).
54  void countMemory(UT_MemoryCounter &counter) const override;
55 
56  const GA_PrimitiveDefinition &getTypeDef() const override
57  {
58  UT_ASSERT(theDefinition);
59  return *theDefinition;
60  }
61 
62  // Conversion Methods
64  GA_PointGroup *usedpts = 0) override;
66 
67  void normal(NormalComp &output) const override;
68  void normal(NormalCompD &output) const override;
69 
72 
73  int intersectRay(const UT_Vector3 &o,
74  const UT_Vector3 &d,
75  float tmax = 1E17F, float tol = 1E-12F,
76  float *distance = 0,
77  UT_Vector3 *pos = 0,
78  UT_Vector3 *nml = 0,
79  int accurate = 0,
80  float *u = 0, float *v = 0,
81  int ignoretrim = 1) const override;
82 
83 private:
84  static GA_PrimitiveDefinition *theDefinition;
85  friend class GU_PrimitiveFactory;
87 };
89 
90 #endif
const GLdouble * v
Definition: glcorearb.h:837
#define SYS_DEPRECATED_PUSH_DISABLE()
#define SYS_DEPRECATED_POP_DISABLE()
GU_PrimPlane(GU_Detail *gdp, GA_Offset offset=GA_INVALID_OFFSET)
NOTE: This constructor should only be called via GU_PrimitiveFactory.
Definition: GU_PrimPlane.h:44
~GU_PrimPlane() override
Definition: GU_PrimPlane.h:40
virtual int64 getMemoryUsage() const
Definition: GA_Primitive.h:209
#define GA_INVALID_OFFSET
Definition: GA_Types.h:694
virtual void normal(NormalComp &output) const =0
GA_Size GA_Offset
Definition: GA_Types.h:653
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:108
GLintptr offset
Definition: glcorearb.h:665
virtual void countMemory(UT_MemoryCounter &counter) const
long long int64
Definition: SYS_Types.h:116
#define GU_API
Definition: GU_API.h:14
GU_Detail * gdp
Definition: GU_PrimPlane.h:30
UT_Matrix4 xform
Definition: GU_PrimPlane.h:32
GA_API const UT_StringHolder parms
virtual int intersectRay(const UT_Vector3 &o, const UT_Vector3 &d, float tmax=1E17F, float tol=1E-12F, float *distance=0, UT_Vector3 *pos=0, UT_Vector3 *nml=0, int accurate=0, float *u=0, float *v=0, int ignoretrim=1) const
static GEO_PrimPlane * build(GA_Detail &detail, GA_Offset existing_ptoff=GA_INVALID_OFFSET)
Definition: GEO_PrimPlane.h:51
virtual GEO_Primitive * convert(GEO_ConvertParms &parms, GA_PointGroup *usedpts=0)=0
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:165
const GA_PrimitiveDefinition & getTypeDef() const override
Definition: GU_PrimPlane.h:56
Definition of a geometric primitive.
SIM_API const UT_StringHolder distance
virtual GEO_Primitive * convertNew(GEO_ConvertParms &parms)=0