File size: 5,142 Bytes
b6a38d7 |
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 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 |
# camera reference
## camera.Deactivate
Deactivate the current view camera.
void **camera.Deactivate**(int view)
int view
: set 1 for the first view. Set 0 to deactivate all the views.
## camera.GetAspect
int **camera.GetAspect**(int scale, [bool compute_real], [int view])
int view
: 1 by default. Used to specify a view when the game is played in a split screen mode.
int scale
: result is multiplied by this parameter
bool compute_real
: aspect is calculated from horizontal and vertical FOV
_returns_ int aspect
: aspect multiplied by the scale parameter
## camera.GetDirection
Returns camera direction vector with length 1024.
point **camera.GetDirection**([int view])
int view
: optional, set 1 for the first view.
## camera.GetDirection
Returns camera right vector with length 1024.
point **camera.GetDirection**([int view])
int view
: optional, set 1 for the first view.
## camera.GetDirection
Returns camera up vector with length 1024.
point **camera.GetDirection**([int view])
int view
: optional, set 1 for the first view.
## camera.GetFovX
Returns horizontal FOV in angular minutes.
int **camera.GetFovX**([int view])
int view
: optional, set 1 for the first view.
## camera.GetFovY
Returns vertical FOV in angular minutes.
int **camera.GetFovY**([int view])
int view
: optional, set 1 for the first view.
## camera.GetPitch
Returns camera pitch in angular minutes.
int **camera.GetPitch**([int view])
int view
: optional, set 1 for the first view.
## camera.GetViewArea
Returns the terrain area observed by the camera (a trapeze).
point point point point **camera.GetViewArea**()
_returns_ point left_top, point right_top, point right_bottom, point left_bottom
: The four corners of the camera trapeze.
_returns_ false, err
: err could be "no scene" or "math error".
## camera.GetViewCount
int **camera.GetViewCount**()
## camera.GetViewport
Return camera view render window box
box **camera.GetViewport**([int view])
int view
: 1 by default. Used to specify a view when the game is played in a split screen mode.
## camera.GetYaw
Returns camera yaw in angular minutes.
int **camera.GetYaw**([int view])
int view
: optional, set 1 for the first view
## camera.IsLocked
Returns if the camera is locked.
bool **camera.IsLocked**([int view])
int view
: optional, set 1 for the first view.
## camera.IsPointInView
Check if a game position is within the rendered view
bool **camera.IsPointInView**(int view, int margin, point pos)
int view
: 1 by default. Used to specify a view when the game is played in a split screen mode.
int margin
: shrink the viewport box with that value
point pos
: game position to check
## camera.Lock
Lock the current camera.
void **camera.Lock**([int view])
int view
: optional, set 1 for the first view.
## camera.SetAutoFovX
Specify auto adjustible FOV depend on the resolution aspect.
The FOV is linearly interpolated between minimal and maximal FOV depend on the current aspect.
For aspects lower than minimal aspect, horizontal FOV is fixed on the specified minimal FOV.
For aspects greater than maximal aspect, vertical FOV is fixed on the specified maximal FOV.
void **camera.SetAutoFovX**(int view, int time, int min_fovx, int min_resx, int min_resy, int max_fovx, int max_resx, int max_resy)
int view
: 1 by default. Used to specify a view when the game is played in a split screen mode.
int time
: the time (ms) to change the FOV.
int min_fovx
: horizontal FOV angle in minutes for the min aspect.
int min_resx
: min resolution aspect x.
int min_resy
: min resolution aspect y.
int max_fovx
: horizontal FOV angle in minutes for the max aspect.
int max_resx
: max resolution aspect x.
int max_resy
: max resolution aspect y.
## camera.SetFovX
Set horizontal FOV. (the vertical FOV will be auto adjusted depend on the aspect ratio)
void **camera.SetFovX**(int angle, int time, [int view])
int angle
: horizontal FOV angle in minutes.
int time
: the time (ms) to change the FOV.
int view
: optional, set 1 for the first view.
## camera.SetFovY
Set vertical FOV. (the horizontal FOV will be auto adjusted depend on the aspect ratio)
void **camera.SetFovY**(int angle, int time, [int view])
int angle
: vertical FOV angle in minutes.
int time
: the time (ms) to change the FOV.
int view
: optional, set 1 for the first view.
## camera.SetViewCount
void **camera.SetViewCount**(int count)
int count
: the number of views
## camera.SetViewport
Set camera view render window box
void **camera.SetViewport**([int view])
int view
: 1 by default. Used to specify a view when the game is played in a split screen mode.
## camera.Unlock
Unlock camera.
void **camera.Unlock**([int view])
int view
: optional, set 1 for the first view.
(insert footer.md.html here)
<link rel="stylesheet" type="text/css" href="Style.css" />
<!-- Markdeep: --><style class="fallback">body{visibility:hidden;white-space:pre;font-family:monospace}</style><script src="markdeep.min.js" charset="utf-8"></script><script>window.alreadyProcessedMarkdeep||(document.body.style.visibility="visible")</script> |