summaryrefslogtreecommitdiff
path: root/Runtime/Terrain/ScriptBindings/WindZoneBindings.txt
blob: b9e98eac3c63dbf336f0dcc3099af60b1315c380 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
C++RAW
#include "UnityPrefix.h"
#include "Runtime/Terrain/Heightmap.h"
#include "Runtime/Filters/Mesh/LodMesh.h"
#include "Runtime/Terrain/DetailDatabase.h"
#include "Runtime/Terrain/SplatDatabase.h"
#include "Runtime/Terrain/TerrainData.h"
#include "Runtime/Terrain/TerrainInstance.h"
#include "Runtime/Mono/MonoBehaviour.h"
#include "Runtime/BaseClasses/GameObject.h"
#include "Runtime/Terrain/TerrainRenderer.h"
#include "Runtime/Camera/Light.h"
#include "Runtime/Terrain/DetailRenderer.h"
#include "Runtime/Terrain/ImposterRenderTexture.h"
#include "Runtime/Terrain/TreeRenderer.h"
#include "Runtime/Terrain/Wind.h"
#include "Runtime/Terrain/Tree.h"
#include "Runtime/Scripting/ScriptingUtility.h"
#include "Runtime/Scripting/ScriptingExportUtility.h"

using namespace Unity;
using namespace std;

CSRAW

#if ENABLE_TERRAIN

using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Collections;
using System.Collections.Generic;

namespace UnityEngine
{

/// Modes a Wind Zone can have, either Spherical or Directional
/// You can have more than one Spherical Wind Zone in a scene, but it does not make much
/// sense to have more than one Directional Wind Zone in your scene as it affects
/// the whole scene. This Wind Zone Mode is used by the WindZone.mode member.
CONDITIONAL ENABLE_TERRAIN
ENUM internal WindZoneMode 
	/// Wind zone only has an effect inside the radius, and has a falloff from the center towards the edge.
	CONVERTEXAMPLE
	BEGIN EX
	// Creates a Directional Wind Zone that blows wind up.
	
	function Start() {
	//	var wind : WindZone = gameObject.AddComponent(WindZone);
	//	wind.mode = WindZoneMode.Directional;
	//	transform.rotation = Quaternion.LookRotation(Vector3.up);
	}
	END EX
	///
	Directional = 0, 
	/// Wind zone affects the entire scene in one direction.
	CONVERTEXAMPLE
	BEGIN EX
	// Creates a Spherical Wind Zone.

	function Start() {
	//	var wind : WindZone = gameObject.AddComponent(WindZone);
	//	wind.mode = WindZoneMode.Spherical;
	}
	END EX
	///
	Spherical = 1
END

/// Wind Zones add realism to the trees you create by making them wave their branches and leaves as if blown by the wind.
///
/// __Note:__ This only works with trees created by the tree creator.
CSRAW
CONDITIONAL ENABLE_TERRAIN
CLASS internal WindZone : Component

	/// Defines the type of wind zone to be used (Spherical or Directional).
	CONVERTEXAMPLE
	BEGIN EX
	// Creates a Directional Wind Zone.
	
	function Start() {
	//	var wind : WindZone = gameObject.AddComponent(WindZone);
	//	wind.mode = WindZoneMode.Directional;
	}
	END EX
	///
	AUTO_PROP WindZoneMode mode GetMode SetMode

	/// Radius of the Spherical Wind Zone (only active if the WindZoneMode is set to Spherical).
	CONVERTEXAMPLE
	BEGIN EX
	// Creates a Spherical Wind Zone and sets its radius to 10.
	
	function Start() {
	//	var wind : WindZone = gameObject.AddComponent(WindZone);
	//	wind.mode = WindZoneMode.Spherical;
	//	wind.radius = 10;
	}
	END EX
	///
	AUTO_PROP float radius GetRadius SetRadius

	/// The primary wind force.
	/// It produces a softly changing wind Pressure.
	CONVERTEXAMPLE
	BEGIN EX
	// Creates a wind zone with the effect of a helicopter passing by
	// Just place this into an empty game object and move it over a tree
	
	function Start() {
	//	var wind : WindZone = gameObject.AddComponent(WindZone);
	//	wind.mode = WindZoneMode.Spherical;
	//	wind.radius = 10.0;
	//	wind.windMain = 3.0;
	//	wind.windTurbulence = 0.5;
	//	wind.windPulseMagnitude = 2.0;
	//	wind.windPulseFrequency = 0.01;
	}
	END EX
	///
	AUTO_PROP float windMain GetWindMain SetWindMain

	/// The turbulence wind force.
	/// Produces a rapidly changing wind pressure.
	CONVERTEXAMPLE
	BEGIN EX
	// Creates a wind zone to produce a softly changing general wind
	// Just place this into an empty game object
	
	function Start() {
	//	var wind : WindZone = gameObject.AddComponent(WindZone);
	//	wind.mode = WindZoneMode.Directional;
	//	wind.windMain = 0.70;
	//	wind.windTurbulence = 0.1;
	//	wind.windPulseMagnitude = 2.0;
	//	wind.windPulseFrequency = 0.25;
	}
	END EX
	///
	AUTO_PROP float windTurbulence GetWindTurbulence SetWindTurbulence

	/// Defines ow much the wind changes over time.
	CONVERTEXAMPLE
	BEGIN EX
	// Creates a wind zone with the effect of a helicopter passing by
	// Just place this into an empty game object and move it over a tree
	
	function Start() {
	//	var wind : WindZone = gameObject.AddComponent(WindZone);
	//	wind.mode = WindZoneMode.Spherical;
	//	wind.radius = 10.0;
	//	wind.windMain = 3.0;
	//	wind.windTurbulence = 0.5;
	//	wind.windPulseMagnitude = 2.0;
	//	wind.windPulseFrequency = 0.01;
	}
	END EX
	///
	AUTO_PROP float windPulseMagnitude GetWindPulseMagnitude SetWindPulseMagnitude

	/// Defines the frequency of the wind changes.
	CONVERTEXAMPLE
	BEGIN EX
	// Creates a wind zone to produce a softly changing general wind
	// Just place this into an empty game object
	
	function Start() {
	//	var wind : WindZone = gameObject.AddComponent(WindZone);
	//	wind.mode = WindZoneMode.Directional;
	//	wind.windMain = 0.70;
	//	wind.windTurbulence = 0.1;
	//	wind.windPulseMagnitude = 2.0;
	//	wind.windPulseFrequency = 0.25;
	}
	END EX
	///
	AUTO_PROP float windPulseFrequency GetWindPulseFrequency SetWindPulseFrequency
END

CSRAW
}
#endif // ENABLE_TERRAIN