Free Electron
StratumDrawPoly.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 __terrain_StratumDrawPoly_h__
8 #define __terrain_StratumDrawPoly_h__
9 namespace fe
10 {
11 namespace ext
12 {
13 
14 /**************************************************************************//**
15  @brief Draw a terrain using a faceted surface
16 
17  @ingroup terrain
18 *//***************************************************************************/
19 class FE_DL_EXPORT StratumDrawPoly: virtual public StratumDrawI,
20  public Initialize<StratumDrawPoly>
21 {
22  public:
23  StratumDrawPoly(void);
24 virtual ~StratumDrawPoly(void);
25  void initialize(void);
26 
27  //* As StratumDrawI
28 virtual void bind(sp<DrawI> spDrawI) { m_spDrawI=spDrawI; }
29 virtual void recenter(const SpatialVector& center) { m_center=center; }
30 virtual void draw(const sp<StratumI>& rspStratumI);
31 virtual void assignVisibility(sp<RecordGroup>& rspRecordGroup);
32 
33  protected:
34 virtual void drawSurface(void);
35 
36  sp<DrawI> m_spDrawI;
37  sp<DrawMode> m_spWireframe;
38 
39  SpatialVector m_center;
40  Real m_size;
41  U32 m_vertices;
42  U32 m_probeStep;
43 
44  SpatialVector* m_pFieldVert;
45  SpatialVector* m_pFieldNorm;
46  Color* m_pFieldColor;
47 
48  SpatialVector* m_pVertex;
49  SpatialVector* m_pNormal;
50  Color* m_pColor;
51 
52  sp<SelectorI> m_spSelector;
53  sp<RecordGroup> m_spProbeGroup;
54  sp<RecordGroup> m_spVisibilityGroup;
55  sp<Scope> m_spScope;
56 
57  Operator m_selectOp;
58  RecordArrayView<Sphere> m_sphereRAV;
59 };
60 
61 } /* namespace ext */
62 } /* namespace fe */
63 
64 #endif /* __terrain_StratumDrawPoly_h__ */
virtual void recenter(const SpatialVector &center)
Specify a center of interest.
Definition: StratumDrawPoly.h:29
Draw a terrain.
Definition: StratumDrawI.h:19
kernel
Definition: namespace.dox:3
Draw a terrain using a faceted surface.
Definition: StratumDrawPoly.h:19
Per-class participation in the Initialized <> mechanism.
Definition: Initialized.h:117
Special vector for color (RGBA)
Definition: Color.h:21
RecordView Iteration over a RecordArray.
Definition: RecordArrayView.h:37
virtual void bind(sp< DrawI > spDrawI)
Choose a drawing implementation.
Definition: StratumDrawPoly.h:28
Operator RecordView.
Definition: Operator.h:22