Free Electron
StratumWave.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_StratumWave_h__
8 #define __terrain_StratumWave_h__
9 namespace fe
10 {
11 namespace ext
12 {
13 
14 #define WAVE_SAMPLES 100 //* reusable space vs new()
15 
16 /**************************************************************************//**
17  @brief Elevation using waves
18 
19  @ingroup terrain
20 *//***************************************************************************/
21 class FE_DL_EXPORT StratumWave: public StratumPlane
22 {
23  public:
24  StratumWave(void) {}
25 virtual ~StratumWave(void) {}
26 
27  //* As StratumI
28 virtual Real height(Real x,Real y) const;
29 virtual SpatialVector normal(Real x,Real y) const;
30 
31 virtual void sample(Real startx,Real starty,Real incx,Real incy,
32  U32 vertx,U32 verty,
33  SpatialVector* pVertex,SpatialVector* pNormal);
34  private:
35  Real m_sinxBuffer[WAVE_SAMPLES];
36  Real m_sinyBuffer[WAVE_SAMPLES];
37  Real m_cosxBuffer[WAVE_SAMPLES];
38  Real m_cosyBuffer[WAVE_SAMPLES];
39 };
40 
41 } /* namespace ext */
42 } /* namespace fe */
43 
44 #endif /* __terrain_StratumWave_h__ */
Flat Elevation.
Definition: StratumPlane.h:19
kernel
Definition: namespace.dox:3
Elevation using waves.
Definition: StratumWave.h:21