Free Electron
GodotDraw.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 __godot_GodotDraw_h__
8 #define __godot_GodotDraw_h__
9 
10 namespace fe
11 {
12 namespace ext
13 {
14 
15 /**************************************************************************//**
16  @brief Draw to Godot ArrayMesh
17 
18  @ingroup godot
19 *//***************************************************************************/
20 class FE_DL_EXPORT GodotDraw: public DrawCommon
21 {
22  public:
23  GodotDraw(void);
24 virtual ~GodotDraw(void) {}
25 
26  //* as DrawI
27 
29 
30 virtual void drawPoints(const SpatialVector *vertex,
31  const SpatialVector *normal,U32 vertices,
32  BWORD multicolor,const Color *color,
33  sp<DrawBufferI> spDrawBuffer);
34 
36 
37 virtual void drawLines(const SpatialVector *vertex,
38  const SpatialVector *normal,U32 vertices,
39  StripMode strip,
40  BWORD multicolor,const Color *color,
41  BWORD multiradius,const Real *radius,
42  const Vector3i *element,U32 elementCount,
43  sp<DrawBufferI> spDrawBuffer);
44 
45 virtual void drawCurve(const SpatialVector *vertex,
46  const SpatialVector *normal,
47  const Real *radius,U32 vertices,
48  BWORD multicolor,const Color *color);
49 
51 
52 virtual void drawTriangles(const SpatialVector *vertex,
53  const SpatialVector *normal,
54  const Vector2 *texture,U32 vertices,
55  StripMode strip,BWORD multicolor,
56  const Color* color,
57  const Array<I32>* vertexMap,
58  const Array<I32>* hullPointMap,
59  const Array<Vector4i>* hullFacePoint,
60  sp<DrawBufferI> spDrawBuffer);
61 
62  //* Godot specific
63  sp<SurfaceAccessibleGodotMesh> surfaceAccessibleGodotMesh(void)
64  { return m_spGodotMesh; }
65  void setSurfaceAccessibleGodotMesh(
66  sp<SurfaceAccessibleGodotMesh> a_spGodotMesh)
67  { m_spGodotMesh=a_spGodotMesh; }
68 
69  private:
70  void drawPolygons(const SpatialVector *vertex,
71  const SpatialVector *normal,U32 vertices,
72  StripMode strip,BWORD multicolor,
73  const Color *color,BWORD openPoly);
74 
75  sp<SurfaceAccessibleGodotMesh> m_spGodotMesh;
76 
77  Ref<SpatialMaterial> m_refMaterial;
78  Ref<SurfaceTool> m_refSurfaceTool;
79 };
80 
81 } /* namespace ext */
82 } /* namespace fe */
83 
84 #endif /* __godot_GodotDraw_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 to Godot ArrayMesh.
Definition: GodotDraw.h:20