Free Electron
MayaDraw.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 __maya_MayaDraw_h__
8 #define __maya_MayaDraw_h__
9 
10 namespace fe
11 {
12 namespace ext
13 {
14 
15 /**************************************************************************//**
16  @brief Draw into Maya MFnMesh
17 
18  @ingroup maya
19 *//***************************************************************************/
20 class FE_DL_EXPORT MayaDraw:
21  public DrawCommon,
22  public CastableAs<MayaDraw>
23 {
24  public:
25  MayaDraw(void):
26  m_pFnMesh(NULL) {}
27 virtual ~MayaDraw(void)
28  {
29  if(m_pFnMesh)
30  {
31  delete m_pFnMesh;
32  }
33  }
34 
35  //* as DrawI
36 
38 
39 virtual void drawPoints(const SpatialVector *vertex,
40  const SpatialVector *normal,U32 vertices,
41  BWORD multicolor,const Color *color,
42  sp<DrawBufferI> spDrawBuffer);
43 
45 
46 virtual void drawLines(const SpatialVector *vertex,
47  const SpatialVector *normal,U32 vertices,
48  StripMode strip,
49  BWORD multicolor,const Color *color,
50  BWORD multiradius,const Real *radius,
51  const Vector3i *element,U32 elementCount,
52  sp<DrawBufferI> spDrawBuffer);
53 
54  //* Maya specific
55  void setMeshData(const MDataHandle a_meshData)
56  {
57  m_meshData=a_meshData;
58 
59  if(m_pFnMesh)
60  {
61  delete m_pFnMesh;
62  }
63  m_pFnMesh=new MFnMesh(m_meshData.asMesh());
64 
65  }
66 const MDataHandle meshData(void)
67  { return m_meshData; }
68 
69  private:
70  MDataHandle m_meshData;
71  MFnMesh* m_pFnMesh;
72 };
73 
74 } /* namespace ext */
75 } /* namespace fe */
76 
77 #endif /* __maya_MayaDraw_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
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 Maya MFnMesh.
Definition: MayaDraw.h:20
Per-class participation non-RTTI fallback dynamic casting mechanism.
Definition: Castable.h:192