Free Electron
PlantSketch.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 __vegetation_PlantSketch_h__
8 #define __vegetation_PlantSketch_h__
9 
10 namespace fe
11 {
12 namespace ext
13 {
14 
15 /**************************************************************************//**
16  @brief Plant rendering cache
17 
18  @ingroup vegetation
19 *//***************************************************************************/
20 class FE_DL_EXPORT PlantSketch: virtual public SketchI,
21  public Initialize<PlantSketch>
22 {
23  public:
24  PlantSketch(void) {}
25  void initialize(void);
26 virtual ~PlantSketch(void);
27 
28 #ifdef FE_VEG_VIEWER
29 virtual void bind(sp<CameraControllerI> spCameraControllerI)
30  { m_spCameraControllerI=spCameraControllerI; }
31 #endif
32 
33 virtual void bind(sp<Component> spComponent);
34 virtual void draw(sp<DrawI> spDrawI);
35 
36 virtual SpatialTransform transform(void) const { return m_transform; }
37 virtual void setTransform(SpatialTransform a_transform)
38  { m_transform=a_transform; }
39 
40 virtual BWORD paused(void) const { return m_paused; }
41 virtual void setPaused(BWORD paused) { m_paused=paused; }
42 
43 virtual String stickForm(void) { return m_stickForm; }
44 virtual void setStickForm(String a_stickForm)
45  { m_stickForm=a_stickForm; }
46 
47 virtual String leafForm(void) { return m_leafForm; }
48 virtual void setLeafForm(String a_leafForm)
49  { m_leafForm=a_leafForm; }
50 
51  private:
52  SpatialTransform m_transform;
53 
54 #ifdef FE_VEG_VIEWER
55  sp<CameraControllerI> m_spCameraControllerI;
56 #endif
57 
58  sp<PlantModelI> m_spPlantModelI;
59  sp<DrawMode> m_spCylinderDrawMode;
60  sp<DrawMode> m_spLineDrawMode;
61  sp<DrawMode> m_spLeafDrawMode;
62  SpatialVector* m_pOldLines;
63  SpatialVector* m_pShadowLines;
64  SpatialVector* m_pLines;
65  SpatialVector* m_pLineNormals;
66  Real* m_pLineRadius;
67  BWORD m_paused;
68  String m_stickForm;
69  String m_leafForm;
70 
71  sp<Profiler> m_spProfiler;
72  sp<Profiler::Profile> m_spProfileStartup;
73  sp<Profiler::Profile> m_spProfileCamera;
74  sp<Profiler::Profile> m_spProfileIterate;
75  sp<Profiler::Profile> m_spProfileSpan;
76  sp<Profiler::Profile> m_spProfileLineNormals;
77  sp<Profiler::Profile> m_spProfileDetails;
78  sp<Profiler::Profile> m_spProfilePoints;
79  sp<Profiler::Profile> m_spProfileCylinders;
80  sp<Profiler::Profile> m_spProfileDrawCylinders;
81  sp<Profiler::Profile> m_spProfileShadows;
82  sp<Profiler::Profile> m_spProfileText;
83  sp<Profiler::Profile> m_spProfileLines;
84  sp<Profiler::Profile> m_spProfileLeaves;
85 };
86 
87 } /* namespace ext */
88 } /* namespace fe */
89 
90 #endif /* __vegetation_PlantSketch_h__ */
91 
Plant rendering cache.
Definition: PlantSketch.h:20
kernel
Definition: namespace.dox:3
Per-class participation in the Initialized <> mechanism.
Definition: Initialized.h:117
Automatically reference-counted string container.
Definition: String.h:128
Generic drawable object.
Definition: SketchI.h:22