Free Electron
HoudiniPrimBase.h
Go to the documentation of this file.
1 /* Copyright (C) 2003-2021 Free Electron Organization
2  Any use of this software requires a license. If a valid license
3  was not distributed with this file, visit freeelectron.org. */
4 
5 /** @file */
6 
7 //* derived from Houndini sample: PrimBase_Base
8 
9 #ifndef __houdini_HoudiniPrimBase_h__
10 #define __houdini_HoudiniPrimBase_h__
11 
12 namespace fe
13 {
14 namespace ext
15 {
16 
17 /**************************************************************************//**
18  @brief Houdini GEO_Primitive with unneccesary pure virtuals filled in
19 
20  @ingroup houdini
21 *//***************************************************************************/
22 class HoudiniPrimBase: public GEO_PrimNull
23 {
24  public:
25  HoudiniPrimBase(GA_Detail* d,
26  GA_Offset offset=GA_INVALID_OFFSET):
27  GEO_PrimNull(d, offset) {}
28 
29  HoudiniPrimBase(const GA_MergeMap& map,
30  GA_Detail& detail,
31  GA_Offset offset,
32  const HoudiniPrimBase& src):
33  GEO_PrimNull(&detail,offset) {}
34 
35 virtual ~HoudiniPrimBase(void) {}
36 
37 /* provided by GEO_PrimNull:
38 
39 virtual bool isDegenerate(void) const
40  { return FALSE; }
41 virtual int getBBox(UT_BoundingBox* bbox) const
42  { return 0; }
43 virtual void reverse(void) {}
44 virtual UT_Vector3 computeNormal(void) const
45  { return UT_Vector3(0.0,1.0,0.0); }
46 virtual void copyPrimitive(const GEO_Primitive* src) {}
47 virtual void copyUnwiredForMerge(const GA_Primitive *src,
48  const GA_MergeMap& map) {}
49 virtual GA_Size getVertexCount() const
50  { return 0; }
51 virtual GA_Offset getVertexOffset(GA_Size index) const
52  { return 0; }
53 virtual int detachPoints(GA_PointGroup &grp)
54  { return 0; }
55 virtual GA_DereferenceStatus dereferencePoint(GA_Offset point,
56  bool dry_run=false)
57  { return isDegenerate()?
58  GA_DEREFERENCE_DEGENERATE:
59  GA_DEREFERENCE_FAIL; }
60 virtual GA_DereferenceStatus dereferencePoints(
61  const GA_RangeMemberQuery &pt_q,
62  bool dry_run=false)
63  { return isDegenerate()?
64  GA_DEREFERENCE_DEGENERATE:
65  GA_DEREFERENCE_FAIL; }
66 virtual
67 const GA_PrimitiveJSON* getJSON() const
68  { return NULL; }
69 virtual void swapVertexOffsets(const GA_Defragment& defrag)
70  {}
71 virtual bool evaluatePointRefMap(GA_Offset result_vtx,
72  GA_AttributeRefMap& hlist,
73  fpreal u,fpreal v,uint du,uint dv) const
74  { return false; }
75 */
76 
77 virtual int64 getMemoryUsage() const
78  { return 0; }
79 
80 virtual void countMemory(UT_MemoryCounter& counter) const
81  {}
82 
83 virtual void normal(NormalComp& output) const {}
84 
85 virtual GEO_Primitive* convert(GEO_ConvertParms &parms,
86  GA_PointGroup *usedpts=0)
87  { return NULL; }
88 
89 virtual GEO_Primitive* convertNew(GEO_ConvertParms &parms)
90  { return NULL; }
91 
92 };
93 
94 } /* namespace ext */
95 } /* namespace fe */
96 
97 #endif /* __houdini_HoudiniPrimBase_h__ */
kernel
Definition: namespace.dox:3
Houdini GEO_Primitive with unneccesary pure virtuals filled in.
Definition: HoudiniPrimBase.h:22