Public Member Functions | |
void | StartCinematic (const uint flags=12) |
EnumCameraFlags. | |
void | StopCinematic (const bool noFade=false) |
if noFade is true will stop the cinematic immediately without fading out. | |
const int | CinematicState () const |
EnumCameraStates. | |
void | SetLookAtActor (kActor@ actor) |
void | ClearLookAtActor () |
void | SetRotateEyeVector (const kVec3 &in vector) |
The focus position that is used when AutoPlayRotationTrack is called if there is no LookAtActor set. | |
void | SetFinalView (const int view) |
the view to use for the camera origin and direction. view must be in range 0-2 | |
void | SetRotationTrack (const int view, const float startAngle, const float destAngle, const float startDist, const float destDist, const float startEyeZOffset=0, const float destEyeZOffset=0, const float startFocusZOffset=0, const float destFocusZOffset=0) |
Use with TweenRotationTrack and AutoPlayRotationTrack. | |
void | SetPositionTrack (const int view, const kVec3 &in startEye, const kVec3 &in destEye, const kVec3 &in startFocus, const kVec3 &in endFocus) |
Sets eye and focus start and dest positions for use with TweenPositionTrack and AutoPlayPositionTrack. | |
void | TweenPositionTrack (const int view, const float time) |
Lerps eye and focus positions to the start and dest positions using the time param (clamped 0..1). Call SetPositionTrack to set the start and dest positions. | |
void | TweenRotationTrack (const int view, const kVec3 &in pos, const float time) |
Lerps all variables set when SetRotationTrack was called using the time param (clamped 0..1). | |
void | AutoPlayPositionTrack (const int view, const float speed, const int lerpType) |
EnumCameraLerpType. Calls TweenPositionTrack on the view using speed and lerpType. | |
void | AutoPlayRotationTrack (const int view, const float speed, const int lerpType) |
EnumCameraLerpType. Calls TweenRotationTrack on the view using speed and lerpType. | |
void | AutoPlayBlendTrack (const int viewA, const int viewB, const int viewC, const float speed, const int lerpType) |
EnumCameraLerpType. Blends between viewB and viewC eye and focus. and sets the results to viewA. | |
void | SetEyeView (const kVec3 &in position) |
position of camera (finalview). finalview must be set or will do nothing. | |
void | SetFocusView (const kVec3 &in position) |
position of where the camera (finalview) is looking at. (Sets look direction from eye and focus positions). finalview must be set or will do nothing. | |
void | ZoomEyeViewToPosition (const kVec3 &in position, const float speed) |
linear lerp finalview eye position to position using speed. finalview must be set or will do nothing. | |
void | ZoomFocusViewToPosition (const kVec3 &in position, const float speed) |
linear lerp finalview focus position to position using speed. finalview must be set or will do nothing. | |
kVec3 | GetEyeView () |
position of camera (finalview). finalview must be set or will return vecZero. | |
kVec3 | GetFocusView () |
position of where the camera (finalview) is looking at. finalview must be set or will return vecZero. | |
void | ClearFinalView () |
finalview is set to null | |
void | ClearViewTracks () |
views 0-2 all variables are set to 0 | |
const bool | UserInterrupted () const |
User pressed left click or escape key or any controller button. While CinematicState() == CAMS_ACTIVE and used EnumCameraFlags CMF_LOCK_PLAYER. | |
const bool | Active () const |
const bool | Enabled () const |
CinematicState() >= CAMS_FADEOUT (Not Idle) | |
const bool | ViewingFromCamera () const |
CinematicState() >= CAMS_FADEIN && CinematicState() <= CAMS_ACTIVE_TO_FADEOUT. | |
kVec3 & | Tremor () |
x = adds to yaw, y = adds to pitch, z = adds to roll. lerps to vecZero using lerpTime of GAME_FRAME_TIME. | |
void | SetSector (const uint sectorIndex) |
const int | SectorIndex () |
const int | AreaID () const |
void | ClearInterpolation () |
const uint | Flags () const |
EnumCameraFlags. | |
Public Attributes | |
kVec3 | origin |
current position of camera. if a finalview is set then the origin will be set to the finalview's eye position. | |
kAngle | yaw |
if a finalview is set then the yaw will be set to the finalview's look direction. | |
kAngle | pitch |
if a finalview is set then the pitch will be set to the finalview's look direction. | |
kAngle | roll |
if a finalview is set then the roll will be set to 0. | |
float | fov |
Camera FOV (default is 74.0) | |
float | lookZOffset |
Used only if LookAtActor has been set. | |
Definition at line 1300 of file t1_scriptAPI.cpp.
const bool kCamera::Active | ( | ) | const |
const int kCamera::AreaID | ( | ) | const |
void kCamera::AutoPlayBlendTrack | ( | const int | viewA, |
const int | viewB, | ||
const int | viewC, | ||
const float | speed, | ||
const int | lerpType ) |
EnumCameraLerpType. Blends between viewB and viewC eye and focus. and sets the results to viewA.
void kCamera::AutoPlayPositionTrack | ( | const int | view, |
const float | speed, | ||
const int | lerpType ) |
EnumCameraLerpType. Calls TweenPositionTrack on the view using speed and lerpType.
void kCamera::AutoPlayRotationTrack | ( | const int | view, |
const float | speed, | ||
const int | lerpType ) |
EnumCameraLerpType. Calls TweenRotationTrack on the view using speed and lerpType.
const int kCamera::CinematicState | ( | ) | const |
void kCamera::ClearFinalView | ( | ) |
finalview is set to null
void kCamera::ClearInterpolation | ( | ) |
void kCamera::ClearLookAtActor | ( | ) |
void kCamera::ClearViewTracks | ( | ) |
views 0-2 all variables are set to 0
const bool kCamera::Enabled | ( | ) | const |
CinematicState() >= CAMS_FADEOUT (Not Idle)
const uint kCamera::Flags | ( | ) | const |
kVec3 kCamera::GetEyeView | ( | ) |
position of camera (finalview). finalview must be set or will return vecZero.
kVec3 kCamera::GetFocusView | ( | ) |
position of where the camera (finalview) is looking at. finalview must be set or will return vecZero.
const int kCamera::SectorIndex | ( | ) |
void kCamera::SetEyeView | ( | const kVec3 &in | position | ) |
position of camera (finalview). finalview must be set or will do nothing.
void kCamera::SetFinalView | ( | const int | view | ) |
the view to use for the camera origin and direction. view must be in range 0-2
void kCamera::SetFocusView | ( | const kVec3 &in | position | ) |
position of where the camera (finalview) is looking at. (Sets look direction from eye and focus positions). finalview must be set or will do nothing.
void kCamera::SetLookAtActor | ( | kActor@ | actor | ) |
void kCamera::SetPositionTrack | ( | const int | view, |
const kVec3 &in | startEye, | ||
const kVec3 &in | destEye, | ||
const kVec3 &in | startFocus, | ||
const kVec3 &in | endFocus ) |
Sets eye and focus start and dest positions for use with TweenPositionTrack and AutoPlayPositionTrack.
void kCamera::SetRotateEyeVector | ( | const kVec3 &in | vector | ) |
The focus position that is used when AutoPlayRotationTrack is called if there is no LookAtActor set.
void kCamera::SetRotationTrack | ( | const int | view, |
const float | startAngle, | ||
const float | destAngle, | ||
const float | startDist, | ||
const float | destDist, | ||
const float | startEyeZOffset = 0, | ||
const float | destEyeZOffset = 0, | ||
const float | startFocusZOffset = 0, | ||
const float | destFocusZOffset = 0 ) |
Use with TweenRotationTrack and AutoPlayRotationTrack.
void kCamera::SetSector | ( | const uint | sectorIndex | ) |
void kCamera::StartCinematic | ( | const uint | flags = 12 | ) |
void kCamera::StopCinematic | ( | const bool | noFade = false | ) |
if noFade is true will stop the cinematic immediately without fading out.
kVec3 & kCamera::Tremor | ( | ) |
x = adds to yaw, y = adds to pitch, z = adds to roll. lerps to vecZero using lerpTime of GAME_FRAME_TIME.
void kCamera::TweenPositionTrack | ( | const int | view, |
const float | time ) |
Lerps eye and focus positions to the start and dest positions using the time param (clamped 0..1). Call SetPositionTrack to set the start and dest positions.
void kCamera::TweenRotationTrack | ( | const int | view, |
const kVec3 &in | pos, | ||
const float | time ) |
Lerps all variables set when SetRotationTrack was called using the time param (clamped 0..1).
const bool kCamera::UserInterrupted | ( | ) | const |
User pressed left click or escape key or any controller button. While CinematicState() == CAMS_ACTIVE and used EnumCameraFlags CMF_LOCK_PLAYER.
const bool kCamera::ViewingFromCamera | ( | ) | const |
CinematicState() >= CAMS_FADEIN && CinematicState() <= CAMS_ACTIVE_TO_FADEOUT.
void kCamera::ZoomEyeViewToPosition | ( | const kVec3 &in | position, |
const float | speed ) |
linear lerp finalview eye position to position using speed. finalview must be set or will do nothing.
void kCamera::ZoomFocusViewToPosition | ( | const kVec3 &in | position, |
const float | speed ) |
linear lerp finalview focus position to position using speed. finalview must be set or will do nothing.
float kCamera::fov |
Camera FOV (default is 74.0)
Definition at line 1339 of file t1_scriptAPI.cpp.
float kCamera::lookZOffset |
Used only if LookAtActor has been set.
Definition at line 1340 of file t1_scriptAPI.cpp.
kVec3 kCamera::origin |
current position of camera. if a finalview is set then the origin will be set to the finalview's eye position.
Definition at line 1335 of file t1_scriptAPI.cpp.
kAngle kCamera::pitch |
if a finalview is set then the pitch will be set to the finalview's look direction.
Definition at line 1337 of file t1_scriptAPI.cpp.
kAngle kCamera::roll |
if a finalview is set then the roll will be set to 0.
Definition at line 1338 of file t1_scriptAPI.cpp.
kAngle kCamera::yaw |
if a finalview is set then the yaw will be set to the finalview's look direction.
Definition at line 1336 of file t1_scriptAPI.cpp.