Turok
 
Loading...
Searching...
No Matches
kCamera Class Reference

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.
 
kVec3Tremor ()
 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.
 

Detailed Description

Definition at line 1300 of file t1_scriptAPI.cpp.

Member Function Documentation

◆ Active()

const bool kCamera::Active ( ) const

◆ AreaID()

const int kCamera::AreaID ( ) const

◆ AutoPlayBlendTrack()

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.

◆ AutoPlayPositionTrack()

void kCamera::AutoPlayPositionTrack ( const int view,
const float speed,
const int lerpType )

EnumCameraLerpType. Calls TweenPositionTrack on the view using speed and lerpType.

◆ AutoPlayRotationTrack()

void kCamera::AutoPlayRotationTrack ( const int view,
const float speed,
const int lerpType )

EnumCameraLerpType. Calls TweenRotationTrack on the view using speed and lerpType.

◆ CinematicState()

const int kCamera::CinematicState ( ) const

◆ ClearFinalView()

void kCamera::ClearFinalView ( )

finalview is set to null

◆ ClearInterpolation()

void kCamera::ClearInterpolation ( )

◆ ClearLookAtActor()

void kCamera::ClearLookAtActor ( )

◆ ClearViewTracks()

void kCamera::ClearViewTracks ( )

views 0-2 all variables are set to 0

◆ Enabled()

const bool kCamera::Enabled ( ) const

CinematicState() >= CAMS_FADEOUT (Not Idle)

◆ Flags()

const uint kCamera::Flags ( ) const

◆ GetEyeView()

kVec3 kCamera::GetEyeView ( )

position of camera (finalview). finalview must be set or will return vecZero.

◆ GetFocusView()

kVec3 kCamera::GetFocusView ( )

position of where the camera (finalview) is looking at. finalview must be set or will return vecZero.

◆ SectorIndex()

const int kCamera::SectorIndex ( )

◆ SetEyeView()

void kCamera::SetEyeView ( const kVec3 &in position)

position of camera (finalview). finalview must be set or will do nothing.

◆ SetFinalView()

void kCamera::SetFinalView ( const int view)

the view to use for the camera origin and direction. view must be in range 0-2

◆ SetFocusView()

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.

◆ SetLookAtActor()

void kCamera::SetLookAtActor ( kActor@ actor)

◆ SetPositionTrack()

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.

◆ SetRotateEyeVector()

void kCamera::SetRotateEyeVector ( const kVec3 &in vector)

The focus position that is used when AutoPlayRotationTrack is called if there is no LookAtActor set.

◆ SetRotationTrack()

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.

◆ SetSector()

void kCamera::SetSector ( const uint sectorIndex)

◆ StartCinematic()

void kCamera::StartCinematic ( const uint flags = 12)

◆ StopCinematic()

void kCamera::StopCinematic ( const bool noFade = false)

if noFade is true will stop the cinematic immediately without fading out.

◆ Tremor()

kVec3 & kCamera::Tremor ( )

x = adds to yaw, y = adds to pitch, z = adds to roll. lerps to vecZero using lerpTime of GAME_FRAME_TIME.

◆ TweenPositionTrack()

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.

◆ TweenRotationTrack()

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).

◆ UserInterrupted()

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.

◆ ViewingFromCamera()

const bool kCamera::ViewingFromCamera ( ) const

CinematicState() >= CAMS_FADEIN && CinematicState() <= CAMS_ACTIVE_TO_FADEOUT.

◆ ZoomEyeViewToPosition()

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.

◆ ZoomFocusViewToPosition()

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.

Member Data Documentation

◆ fov

float kCamera::fov

Camera FOV (default is 74.0)

Definition at line 1339 of file t1_scriptAPI.cpp.

◆ lookZOffset

float kCamera::lookZOffset

Used only if LookAtActor has been set.

Definition at line 1340 of file t1_scriptAPI.cpp.

◆ origin

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.

◆ pitch

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.

◆ roll

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.

◆ yaw

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.