Linux multi-monitor fullscreen support
[ryzomcore.git] / nel / tools / 3d / object_viewer / vegetable_edit_tools.h
blob725b4bb0e856287c3fc181580331d7509640ca82
1 // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
2 // Copyright (C) 2010 Winch Gate Property Limited
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 #ifndef NL_VEGETABLE_EDIT_TOOLS_H
18 #define NL_VEGETABLE_EDIT_TOOLS_H
20 #if _MSC_VER > 1000
21 #pragma once
22 #endif // _MSC_VER > 1000
23 // range_selector.h : header file
27 #include "nel/misc/types_nl.h"
28 #include "editable_range.h"
29 #include "vegetable_refresh.h"
32 // ***************************************************************************
33 // Defaults Sliders ranges.
34 #define NL_VEGETABLE_EDIT_DEFAULT_MAX_DENSITY 50.f
36 // General Frequence
37 #define NL_VEGETABLE_FREQ_RANGE_MIN 0.0001f
38 #define NL_VEGETABLE_FREQ_RANGE_MAX 1.f
39 #define NL_VEGETABLE_FREQ_DEFAULT 0.1f
40 // Density
41 #define NL_VEGETABLE_DENSITY_ABS_RANGE_MIN -10.f
42 #define NL_VEGETABLE_DENSITY_ABS_RANGE_MAX 10.f
43 #define NL_VEGETABLE_DENSITY_RAND_RANGE_MIN 0.f
44 #define NL_VEGETABLE_DENSITY_RAND_RANGE_MAX 10.f
45 #define NL_VEGETABLE_DENSITY_ABS_DEFAULT 0.f
46 #define NL_VEGETABLE_DENSITY_RAND_DEFAULT 0.25f
47 // BendPhase
48 #define NL_VEGETABLE_BENDPHASE_RANGE_MIN 0.f
49 #define NL_VEGETABLE_BENDPHASE_RANGE_MAX 2.f
50 #define NL_VEGETABLE_BENDPHASE_ABS_DEFAULT 0.f
51 #define NL_VEGETABLE_BENDPHASE_RAND_DEFAULT 2.f
52 // BendFactor
53 #define NL_VEGETABLE_BENDFACTOR_RANGE_MIN 0.f
54 #define NL_VEGETABLE_BENDFACTOR_RANGE_MAX 1.f
55 #define NL_VEGETABLE_BENDFACTOR_ABS_DEFAULT 0.5f
56 #define NL_VEGETABLE_BENDFACTOR_RAND_DEFAULT 0.5f
57 // ColorNoise
58 #define NL_VEGETABLE_COLOR_RANGE_MIN -1.f
59 #define NL_VEGETABLE_COLOR_RANGE_MAX 3.f
60 #define NL_VEGETABLE_COLOR_ABS_DEFAULT -1.f
61 #define NL_VEGETABLE_COLOR_RAND_DEFAULT 3.f
62 // Scale
63 #define NL_VEGETABLE_SCALE_RANGE_MIN 0.f
64 #define NL_VEGETABLE_SCALE_RANGE_MAX 1.f
65 #define NL_VEGETABLE_SCALE_ABS_DEFAULT 0.5f
66 #define NL_VEGETABLE_SCALE_RAND_DEFAULT 0.5f
67 // Rotate
68 #define NL_VEGETABLE_ROTATE_RANGE_MIN -90.f
69 #define NL_VEGETABLE_ROTATE_RANGE_MAX 90.f
70 #define NL_VEGETABLE_ROTATEX_ABS_DEFAULT -20.f
71 #define NL_VEGETABLE_ROTATEX_RAND_DEFAULT 40.f
72 #define NL_VEGETABLE_ROTATEY_ABS_DEFAULT 0.f
73 #define NL_VEGETABLE_ROTATEY_RAND_DEFAULT 0.f
74 #define NL_VEGETABLE_ROTATEZ_ABS_DEFAULT 0.f
75 #define NL_VEGETABLE_ROTATEZ_RAND_DEFAULT 3000.f
76 #define NL_VEGETABLE_ROTATEZ_FREQ_DEFAULT 10.f
77 // BendFreq
78 #define NL_VEGETABLE_BENDFREQ_RANGE_MIN 0.f
79 #define NL_VEGETABLE_BENDFREQ_RANGE_MAX 4.f
83 // ***************************************************************************
84 /**
85 * An edition of a float with a pointer to him
86 * \author Lionel Berenguier
87 * \author Nevrax France
88 * \date 2001
90 class CDirectEditableRangeFloat : public CEditableRangeFloat
92 public:
93 // Approximate Height of this control
94 enum {ControlHeight= 34};
96 public:
98 // ctor.
99 CDirectEditableRangeFloat(const std::string &id, float defaultMin, float defaultMax, const std::string &title);
101 // Init the dialog, and the static text.
102 virtual void init(uint32 x, uint32 y, CWnd *pParent);
104 // Set our pointer to the float, and update view.
105 void setFloat(float *value, IVegetableRefresh *vegetRefresh);
107 // if false, nothgin will be written to the Float.
108 void enableWrite(bool enb);
110 // *****************
111 private:
113 // Our easy wrapper.
114 class CDirectFloatWrapper : public IPSWrapperFloat
116 public:
117 CDirectFloatWrapper()
119 Value= NULL;
120 WriteEnabled= true;
123 float *Value ;
124 IVegetableRefresh *VegetableRefresh;
125 bool WriteEnabled;
126 float get(void) const;
127 void set(const float &f);
130 CDirectFloatWrapper _Wrapper;
133 // Our Caption
134 std::string _Title;
135 CStatic _StaticText;
140 #endif // NL_VEGETABLE_EDIT_TOOLS_H
142 /* End of vegetable_edit_tools.h */