123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- class Camera extends Entity
- {
- /**
- \brief Returns active Camera instance (note: player's camera is not Camera instance - thus it return null)
- \return Camera \p active Camera instance
- */
- static proto native Camera GetCurrentCamera();
- /**
- \brief Returns FOV of current camera object
- \return float \p FOV of current camera object
- */
- static proto native float GetCurrentFOV();
- /**
- \brief Interpolation between camera instances (current camera becomes targetCamera at the end of interpolation)
- \param targetCamera \p to which camera we want to interpolate
- \param time \p true interpolation time
- \param type \p
- 0 = without dynamics
- 1 = first half - acceleration, second half deceleration
- 2 = first third - acceleration, second third - linear movement, last third - deceleration
- */
- static proto native void InterpolateTo(Camera targetCamera, float time, int type);
-
- /**
- Checks if the current interpolation reached it's end
- */
- static proto native bool IsInterpolationComplete();
- /*!
- set near plane of camera
- \param nearPlane clamped internally to 0.01m
- */
- proto native void SetNearPlane(float nearPlane);
- /*!
- get near plane of camera
- */
- proto native float GetNearPlane();
- /**
- \brief Sets this camera as active
- */
- proto native void SetActive(bool active);
-
- /**
- \brief Enables the smoothing in interpolation
- */
- proto native void EnableSmooth(bool enable);
-
- /**
- Performs cleanup. Important to call when interpolation run is finished.
- */
- proto native void StopInterpolation();
- /**
- \brief Is this camera active?
- \return bool \p true if this camera is active
- */
- proto native bool IsActive();
-
- /**
- \brief Field of View settings
- \param fov \p FOV angle in radians
- */
- proto native void SetFOV(float fov);
- /**
- \brief Depth of Field settings
- \param distance \p DOF distance parameter
- \param blur \p DOF blur parameter
- */
- proto native void SetFocus(float distance, float blur);
- /**
- \brief Orientation change by lookAt point
- \param targetPos \p where to look at
- */
- proto native void LookAt(vector targetPos);
- };
- //-----------------------------------------------------------------------------
- class FreeDebugCamera extends Camera
- {
- /**
- \brief Returns reference to FreeDebugCamera (it's singleton, thus only one instance is present)
- \return FreeDebugCamera \p reference to FreeDebugCamera instance
- */
- static proto native FreeDebugCamera GetInstance();
-
- /**
- \brief Sets cameras freeze state
- \param freezed \p true = don't allow camera movement
- */
- proto native void SetFreezed(bool freezed);
- /**
- \brief Returns if camera is freezed (you can't move it)
- \return bool \p true if camera is freezed
- */
- proto native bool IsFreezed();
-
- /**
- \brief Gets object that free camera is currently pointing at
- \return Object \p reference to Object that FreeDebugCamera is pointing to
- */
- proto native Object GetCrosshairObject();
- };
|