| | # 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" /> |
| | <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> |