File size: 11,937 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 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 |
--- Camera control functions.
-- The engine supports different camera controllers, each possibly having a different Lua interface.
-- There are several general functions that work for all cameras - these are Lock, Unlock, IsLocked and GetPos.
-- The different cameras are activated by calling the 'Activate' functions of the camera namespace, e.g. 'CameraRTS.Activate()'.
-- The only other function present in each specific camera is 'IsActive'.
-- The camera specific for each game should be activated in 'gameautorun.lua'.
--- Returns the camera position.
-- @cstyle point camera.GetPos().
-- @return point.
function camera.GetPos()
end
--- Returns the camera position.
-- @cstyle point camera.GetEye().
-- @return point.
function camera.GetEye()
end
--- Returns the camera yaw in minutes.
-- @cstyle int camera.GetYaw().
-- @return int.
function camera.GetYaw()
end
--- Returns the camera pitch in minutes.
-- @cstyle int camera.GetPitch().
-- @return int.
function camera.GetPitch()
end
--- Returns the direction of the camera is looking.
-- @cstyle point camera.GetDirection().
-- @return point.
function camera.GetDirection()
end
--- Disallows camera movement.
-- @cstyle void camera.Lock().
-- @return void.
function camera.Lock(view)
end
--- Allows camera movement.
-- @cstyle void camera.Unlock().
-- @return void.
function camera.Unlock(view)
end
--- Returns if the camera can move.
-- @cstyle bool camera.IsLocked().
-- @return bool.
function camera.IsLocked(view)
end
--- Returns the terrain area observed by the camera (a trapeze).
-- @cstyle pt, pt, pt, pt camera.GetViewArea().
-- @return pt, pt, pt, pt. The four corners of the camera trapeze: left_top, right_top, right_bottom, left_bottom
function camera.GetViewArea()
end
--- Activates the fly the camera.
-- @cstyle void cameraFly.Activate(view).
-- @return void.
function cameraFly.Activate(view)
end
--- Returns if the camera is active.
-- @cstyle bool camera.IsActive().
-- @return bool.
function cameraFly.IsActive()
end
--- Set camera position and 'look at' point instantly.
-- @cstyle void cameraFly.SetCamera(point pos, point look_at).
-- @param pos point; new position of the camera.
-- @param look_at point; new look-at point of the camera.
-- @return void.
function cameraFly.SetCamera(pos, look_at)
end
--- Disables the change of s_CameraFly_LeftStickMovesFlat/s_CameraFly_RightStickYMovesUpDown when LT-B/RT-B is pressed.
-- @cstyle void cameraFly.DisableStickMovesChange().
-- @return void.
function cameraFly.DisableStickMovesChange()
end
--- Enables the change of s_CameraFly_LeftStickMovesFlat/s_CameraFly_RightStickYMovesUpDown when LT-B/RT-B is pressed.
-- @cstyle void cameraFly.EnableStickMovesChange().
-- @return void.
function cameraFly.EnableStickMovesChange()
end
--- Activates the 3rd person camera.
-- @cstyle void camera3p.Activate(view).
-- @return void.
function camera3p.Activate(view)
end
--- Returns if the 3rd person camera is active.
-- @cstyle bool camera3p.IsActive().
-- @return bool.
function camera3p.IsActive()
end
--- Changes the camera 'look at' position smoothly for the specified time.
-- @cstyle void camera3p.SetLookAt(point lookat_pos, int time).
-- @param lookat_pos point.
-- @param time int.
-- @return void.
function camera3p.SetLookAt(lookat_pos, time)
end
--- Changes the camera 'look at' position smoothly for the specified time; the position is in x10 resolution.
-- @cstyle void camera3p.SetLookAtPrecise(point lookat_pos, int time).
-- @param lookat_pos point.
-- @param time int.
-- @return void.
function camera3p.SetLookAtPrecise(lookat_pos, time)
end
--- Returns the camera 'look at' position.
-- @cstyle point camera3p.GetLookAt().
-- @return point.
function camera3p.GetLookAt()
end
--- Changes the position of the camera smoothly for the specified time.
-- @cstyle void camera3p.SetEye(point eye_pos, int time).
-- @param eye_pos point.
-- @param time int.
-- @return void.
function camera3p.SetEye(eye_pos, time)
end
--- Changes the position of the camera smoothly for the specified time; the position is in x10 resolution.
-- @cstyle void camera3p.SetEyePrecise(point eye_pos, int time).
-- @param eye_pos point.
-- @param time int.
-- @return void.
function camera3p.SetEyePrecise(eye_pos, time)
end
--- Returns the camera position.
-- @cstyle point camera3p.GetEye().
-- @return point.
function camera3p.GetEye()
end
--- Changes the roll of the camera smoothly for the specified time.
-- @cstyle void camera3p.SetRoll(int roll, int time).
-- @param roll int angle in minutes.
-- @param time int.
-- @return void.
function camera3p.SetRoll(roll, time)
end
--- Returns the camera roll in minutes.
-- @cstyle int camera3p.GetRoll().
-- @return int.
function camera3p.GetRoll()
end
--- Returns the camera yaw in minutes.
-- @cstyle int camera3p.GetYaw().
-- @return int.
function camera3p.GetYaw()
end
--- Returns the camera pitch in minutes.
-- @cstyle int camera3p.GetPitch().
-- @return int.
function camera3p.GetPitch()
end
--- Changes the offset of the camera 'look at' position smoothly for the specified REAL time;.
-- the offset is added to the position set by SetLookAt to calculate the final camera 'look at' position.
-- @cstyle void camera3p.SetLookAtOffset(point lookat_pos_offset, int time).
-- @usage The offsets members are intended for use in camera effects which are independent on the main camera logic(see camera shake).
-- @param lookat_pos_offset point.
-- @param time int.
-- @return void.
function camera3p.SetLookAtOffset(lookat_pos_offset, time)
end
--- Returns the offset of the camera 'look at' position.
-- @cstyle point camera3p.GetEye().
-- @return point.
function camera3p.GetLookAtOffset()
end
--- Changes the offset of the camera position smoothly for the specified time;.
-- the offset is added to the position set by SetEye to calculate the final camera eye position.
-- @cstyle void camera3p.SetLookAtOffset(point eye_offset, int time).
-- @usage The offsets members are intended for use in camera effects which are independent on the main camera logic(see camera shake).
-- @param eye_offset point.
-- @param time int.
-- @return void.
function camera3p.SetEyeOffset(eye_offset, time)
end
--- Returns the offset of the camera position.
-- @cstyle point camera3p.GetEye().
-- @return point.
function camera3p.GetEyeOffset()
end
--- Changes the offset of the camera roll smoothly for the specified REAL time;.
-- the offset is added to the value set by SetRoll to calculate the final camera roll angle.
-- @cstyle void camera3p.SetRollOffset(int roll_offset, int time).
-- @usage The offsets members are intended for use in camera effects which are independent on the main camera logic(see camera shake).
-- @param roll_offset int angle in minutes.
-- @param time int.
-- @return void.
function camera3p.SetRollOffset(roll_offset, time)
end
--- Returns the offset of the camera roll in minutes.
-- @cstyle int camera3p.GetEye().
-- @return int.
function camera3p.GetRollOffset()
end
--- Activates the RTS camera.
-- @cstyle void cameraRTS.Activate(view).
-- @return void.
function cameraRTS.Activate(view)
end
--- Returns whether the RTS camera is active.
-- @cstyle bool cameraRTS.IsActive().
-- @return bool.
function cameraRTS.IsActive()
end
--- Sets camera properties from a given table; the table may contain the following fields.
-- MinHeight, MaxHeight - sets the min and max height of the camera.
-- HeightInertia - the larger the number, the faster the camera height comes to rest when changed.
-- MoveSpeedNormal, MoveSpeedFast - normal and fast camera movement speed; fast is used when Ctrl is pressed.
-- RotateSpeed - the camera rotation speed.
-- LookatDist - 2D distance from the camera position to the 'look at' point.
-- CameraYawRestore - 0 to toogle yaw restore off, 1 to toggle it on.
-- UpDownSpeed - the speed the camera moves vertically.
-- @cstyle void cameraRTS.SetProperties(view, table prop).
-- @return void.
function cameraRTS.SetProperties(view, prop)
end
--- Set the YawRestore flag of the camera.
-- @cstyle void cameraRTS.SetYawRestore(bool bRestore).
-- @param bRestore bool true to enable or false to disable.
-- @return void.
function cameraRTS.SetYawRestore(bRestore)
end
--- Return current YawRestore flag of the camera.
-- @cstyle bool cameraRTS.GetYawRestore().
-- @return bool.
function cameraRTS.GetYawRestore()
end
--- Set camera position and orientation instantly or gradually over time; gradual transition requires the camera to be locked beforehand.
-- @cstyle void SetCamera(point pos, point lookat, int time).
-- @param pos point new position of the camera.
-- @param lookat point new look-at point of the camera.
-- @param time int (optional) time for adjusting the camera to the new position and look-at point.
-- @param easingType string the type of easing to use (see list in const.Easing: Linear, SinIn, SinOut, SinInOut, CubicIn, CubicOut, CubicInOut, QuinticIn, QuinticOut, QuinticInOut, etc.)
-- @return void.
function cameraRTS.SetCamera(pos, lookat, time, easingType)
end
--- Set PRECISELY camera position and orientation instantly or gradually over time; gradual transition requires the camera to be locked beforehand. Precisely means that position and orientation are multiplied by 1000 for some interpolation reasons(like in the camera editor rendering). The parameters are divided by 1000 right before setting them in the engine.
-- @cstyle void SetCameraPrecise(point pos, point lookat, int time).
-- @param pos; new precise(*1000) position of the camera.
-- @param lookat; new precise(*1000) look-at point of the camera.
-- @param time int (optional) time for adjusting the camera to the new position and look-at point.
-- @return void.
function cameraRTS.SetCameraPrecise(pos, lookat, time)
end
--- Returns camera position and 'look at' point.
-- @cstyle point,point cameraRTS.GetPosLookAt().
-- @return point,point.
function cameraRTS.GetPosLookAt()
end
--- Returns camera position.
-- @cstyle point cameraRTS.GetPos().
-- @return point.
function cameraRTS.GetPos()
end
--- Returns camera 'look at' point.
-- @cstyle point GetLookAt().
-- @return point.
function cameraRTS.GetLookAt()
end
--- Sets mouse invertion for camera rotation; independent for x and y.
-- @cstyle void InvertMouse(bool inv_x, bool inv_y).
-- @param inv_x bool.
-- @param inv_y bool.
-- @return void.
function cameraRTS.InvertMouse(inv_x, inv_y)
end
--- Returns the camera minimal and maximal pitch above the ground.
-- @cstyle int, int GetPitchInterval().
-- @return int, int; minimal and maximal pitch.
function cameraRTS.GetPitchInterval()
end
--- Returns the camera current height above the 'look at' position.
-- @cstyle int GetHeight().
-- @return int.
function cameraRTS.GetHeight()
end
--- Returns the camera current look at ditance.
-- @cstyle int GetLookatDist().
-- @return int.
function cameraRTS.GetLookatDist()
end
--- Returns the camera yaw in degrees (the angle around the vertical axis).
-- @cstyle int GetYaw().
-- @return int.
function cameraRTS.GetYaw()
end
--- Returns the current zoom
-- @cstyle int GetZoom().
-- @return int; curent zoom value
function cameraRTS.GetZoom()
end
--- Changes the current zoom
-- @cstyle void SetZoom(int zoom, int time).
-- @param zoom int.
-- @param time int.
-- @return void.
function cameraRTS.SetZoom()
end
--- Activates the 3D Studio MAX camera.
-- @cstyle void cameraMax.Activate(view).
-- @return void.
function cameraMax.Activate(view)
end
--- Returns if the 3D Studio MAX camera is active.
-- @cstyle bool cameraMax.IsActive().
-- @return bool.
function cameraMax.IsActive()
end
--- Set camera position and 'look at' point instantly.
-- @cstyle void cameraMax.SetCamera(point pos, point look_at).
-- @param pos point; new position of the camera.
-- @param look_at point; new look-at point of the camera.
-- @return void.
function cameraMax.SetCamera(pos, look_at)
end
|