Free Electron
HoudiniDraw.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 #ifndef __houdini_HoudiniDraw_h__
8 #define __houdini_HoudiniDraw_h__
9 
10 namespace fe
11 {
12 namespace ext
13 {
14 
15 /**************************************************************************//**
16  @brief Draw into Houdini GU_Detail (gdp)
17 
18  @ingroup houdini
19 *//***************************************************************************/
20 class FE_DL_EXPORT HoudiniDraw:
21  public DrawCommon,
22  public CastableAs<HoudiniDraw>
23 {
24  public:
25  HoudiniDraw(void): m_pGdp(NULL) {}
26 virtual ~HoudiniDraw(void) {}
27 
28  //* as DrawI
29 
31 
32 virtual void drawPoints(const SpatialVector *vertex,
33  const SpatialVector *normal,U32 vertices,
34  BWORD multicolor,const Color *color,
35  sp<DrawBufferI> spDrawBuffer);
36 
38 
39 virtual void drawLines(const SpatialVector *vertex,
40  const SpatialVector *normal,U32 vertices,
41  StripMode strip,
42  BWORD multicolor,const Color *color,
43  BWORD multiradius,const Real *radius,
44  const Vector3i *element,U32 elementCount,
45  sp<DrawBufferI> spDrawBuffer);
46 
48 
49 virtual void drawTriangles(const SpatialVector *vertex,
50  const SpatialVector *normal,
51  const Vector2 *texture,U32 vertices,
52  StripMode strip,BWORD multicolor,
53  const Color* color,
54  const Array<I32>* vertexMap,
55  const Array<I32>* hullPointMap,
56  const Array<Vector4i>* hullFacePoint,
57  sp<DrawBufferI> spDrawBuffer);
58 
59  //* Houdini specific
60 
61  void setGdp(GU_Detail* a_pGdp) { m_pGdp=a_pGdp; }
62  GU_Detail* gdp(void) { return m_pGdp; }
63 
64  private:
65  void drawPolygons(const SpatialVector *vertex,
66  const SpatialVector *normal,U32 vertices,
67  StripMode strip,BWORD multicolor,
68  const Color *color,BWORD openPoly);
69 
70  GU_Detail* m_pGdp;
71 };
72 
73 } /* namespace ext */
74 } /* namespace fe */
75 
76 #endif /* __houdini_HoudiniDraw_h__ */
virtual void drawPoints(const SpatialVector *vertex, const SpatialVector *normal, U32 vertices, BWORD multicolor, const Color *color)
Draw points vertex[vertices].
Definition: DrawCommon.cc:222
Drawing functions not specific to the graphics language.
Definition: DrawCommon.h:32
kernel
Definition: namespace.dox:3
StripMode
Format of vertices for tri-stripping.
Definition: DrawI.h:26
virtual void drawTriangles(const SpatialVector *vertex, const SpatialVector *normal, const Vector2 *texture, U32 vertices, StripMode strip, BWORD multicolor, const Color *color)
Draw triangles.
Definition: DrawCommon.cc:257
Special vector for color (RGBA)
Definition: Color.h:21
virtual void drawLines(const SpatialVector *vertex, const SpatialVector *normal, U32 vertices, StripMode strip, BWORD multicolor, const Color *color)
Draw lines.
Definition: DrawCommon.cc:238
Intrusive Smart Pointer.
Definition: src/core/ptr.h:53
Draw into Houdini GU_Detail (gdp)
Definition: HoudiniDraw.h:20
Per-class participation non-RTTI fallback dynamic casting mechanism.
Definition: Castable.h:192