Free Electron
HoudiniPrimComponent.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: PrimSurface_Surface
8 
9 #ifndef __houdini_HoudiniPrimComponent_h__
10 #define __houdini_HoudiniPrimComponent_h__
11 
12 namespace fe
13 {
14 namespace ext
15 {
16 
17 /**************************************************************************//**
18  @brief Houdini primitive for generic Component
19 
20  @ingroup houdini
21 *//***************************************************************************/
23 {
24  public:
25  HoudiniPrimComponent(GA_Detail& d,
26  GA_Offset offset=GA_INVALID_OFFSET);
27 
28  HoudiniPrimComponent(const GA_MergeMap& map,
29  GA_Detail& detail,
30  GA_Offset offset,
31  const HoudiniPrimComponent& src);
32 
33 virtual ~HoudiniPrimComponent(void);
34 
35 virtual
36 const GA_PrimitiveDefinition& getTypeDef(void) const
37  { return *ms_pDefinition; }
38 
39 virtual void copyPrimitive(const GEO_Primitive* src);
40 virtual void copyOffsetPrimitive(const GEO_Primitive* src,
41  GA_Index basept);
42 virtual void copyUnwiredForMerge(const GA_Primitive *src,
43  const GA_MergeMap& map);
44 
45 static
46 const GA_PrimitiveTypeId& getTypeId(void)
47  { return ms_pDefinition->getId(); }
48 
49 static void registerMyself(GA_PrimitiveFactory* pFactory);
50 
51  void bind(sp<Component> a_spPayload)
52  { m_spPayload=a_spPayload; }
53 
54  sp<Component> payload(void) const { return m_spPayload; }
55 
56  protected:
57 
58  GA_DECLARE_INTRINSICS()
59 
60  private:
61 
62 static GA_PrimitiveDefinition* ms_pDefinition;
63 
64  sp<Component> m_spPayload;
65 };
66 
67 } /* namespace ext */
68 } /* namespace fe */
69 
70 #endif /* __houdini_HoudiniPrimComponent_h__ */
Houdini primitive for generic Component.
Definition: HoudiniPrimComponent.h:22
kernel
Definition: namespace.dox:3
Intrusive Smart Pointer.
Definition: src/core/ptr.h:53
Houdini GEO_Primitive with unneccesary pure virtuals filled in.
Definition: HoudiniPrimBase.h:22