File size: 4,808 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 |
# cameraRTS reference
## cameraRTS.Activate
Activates the RTS camera.
void **cameraRTS.Activate**(int view)
int view
: set 1 for the first view. Set 0 to activate all the views.
## cameraRTS.GetEye
Returns the camera position.
This position is futher modified by the zoom. To get the real camera pos use cameraRTS.GetFramePosLookAt().
point **cameraRTS.GetEye**([int view])
int view
: optional, set 1 for the first view.
_returns_ point
: camera position or InvalidPos() on error
## cameraRTS.GetFramePosLookAt
Return the exact camera position and look-at (position returned by camera.GetPos() is futher modified by the zoom)
point point **cameraRTS.GetFramePosLookAt**()
_returns_ point pos, point look_at
: position and look-at position of the camera.
## cameraRTS.GetHeight
Returns the camera current height above the 'look at' position.
int **cameraRTS.GetHeight**()
## cameraRTS.GetLookAt
Returns the camera look-at position
point **cameraRTS.GetLookAt**()
_returns_ point
: camera look-at position
## cameraRTS.GetLookatDist
Returns the camera current look at ditance.
int **cameraRTS.GetLookatDist**()
## cameraRTS.GetPitch
Returns the camera pitch in degrees.
int int **cameraRTS.GetPitch**()
_returns_ int pitch
: pitch
## cameraRTS.GetPitchInterval
Returns the camera minimal and maximal pitch above the ground.
int int **cameraRTS.GetPitchInterval**()
_returns_ int min, int max
: minimal and maximal pitch
## cameraRTS.GetPosLookAt
Returns camera position and 'look at' position of the camera.
This position is futher modified by the zoom. To get the real camera pos use cameraRTS.GetFramePosLookAt().
void **cameraRTS.GetPosLookAt**([int view])
int view
: optional, set 1 for the first view
_returns_ point pos, point look_at
: camera position and 'look at' point
## cameraRTS.GetProperties
Returns the camera properties in a table
table **cameraRTS.GetProperties**(int view)
int view
: set 1 for the first view
## cameraRTS.GetYaw
Returns the camera yaw in degrees
int **cameraRTS.GetYaw**()
## cameraRTS.GetYawRestore
Get the current YawRestore mode of the camera
bool **cameraRTS.GetYawRestore**()
## cameraRTS.GetZoom
Changes the current zoom
int **cameraRTS.GetZoom**()
## cameraRTS.IsActive
Check if the RTS person camera is active.
bool **cameraRTS.IsActive**()
## cameraRTS.IsMoving
Return if the camera is moving
bool **cameraRTS.IsMoving**()
## cameraRTS.IsOrbiting
Return if the camera is orbiting
bool **cameraRTS.IsOrbiting**()
## cameraRTS.SetCamera
Set camera position and 'look at' point
void **cameraRTS.SetCamera**(point pos, point look_at, [int time], [int easing])
point pos
: new position of the camera.
point look_at
: new look at position of the camera.
int time
: time (ms) to interpolate to the new camera
int easing
: interpolation easing parameter, see GetEasingIndex()
## cameraRTS.SetCameraPrecise
Set camera position and 'look at' point
void **cameraRTS.SetCameraPrecise**(point pos, point look_at, [int time])
point pos
: new position of the camera multiplied by 1000.
point look_at
: new look at position of the camera multiplied by 1000.
int time
: time (ms) to interpolate to the new camera
## cameraRTS.SetPitch
Rotate camera on specified degrees
void **cameraRTS.SetPitch**(int pitch, [[int time], int view])
int pitch
: degrees
int time
: time (ms) to interpolate to the new camera
## cameraRTS.SetProperties
Sets camera properties from a given table
void **cameraRTS.SetProperties**(int view, table properties)
int view
: set 1 for the first view
table prop
: may contain the following fields:
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 - yaw restore.
## cameraRTS.SetYaw
Rotate camera on specified degrees
void **cameraRTS.SetYaw**(int yaw, [[int time], int view])
int yaw
: degrees
int time
: time (ms) to interpolate to the new camera
## cameraRTS.SetYawRestore
Set the YawRestore mode of the camera. (the camera yaw is restored to 0)
void **cameraRTS.SetYawRestore**(bool restore)
bool restore
: enable or disable that mode
## cameraRTS.SetZoom
Returns the current zoom
void **cameraRTS.SetZoom**(int zoom, [[int time], int view])
int time
: time (ms) to interpolate to the new zoom
(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> |