Logo
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Properties | List of all members
Yukar.Engine.CameraManager Class Reference

A class that plays the camera created with the camera tool More...

Public Types

enum  InterpolateState { NONE , IN_PROGRESS , ABORTED }
 

Public Member Functions

bool isSkillCameraPlaying (bool strict)
 Whether the skill camera has advanced more than a certain amount of time More...
 
void setCameraFromPathName (Catalog catalog, bool isBattle, Guid mapId, string name)
 Camera set by camera path and name More...
 
void setCameraFromGuid (Catalog catalog, Guid guId)
 Camera set with guid More...
 
int getKeyFrameCount ()
 Get the number of keyframes of the current camera More...
 
void setKeyFrame (int index)
 Playing current camera animation More...
 
void playAnimation (float spd=1.0f)
 Playing current camera animation More...
 
void stopAnimation ()
 Stopping current camera animation More...
 
void animationCameraMatrix (Catalog catalog, Common.Rom.Map map, SharpKmyMath.Vector3 heroPos, SharpKmyMath.Vector2 shake, float asp, float farclip, out SharpKmyMath.Matrix4 p, out SharpKmyMath.Matrix4 v, out SharpKmyMath.Vector3 _lookat, float playerAngY=0f, float ofsY=0f)
 Current camera animation processing and matrix generation More...
 
void convQuaternionToRotation (Microsoft.Xna.Framework.Quaternion quat, out Microsoft.Xna.Framework.Vector3 rot)
 
void convQuaternionToRotation (Microsoft.Xna.Framework.Quaternion quat, out SharpKmyMath.Vector3 rot)
 
void setWaitFunc (Func< bool > func)
 

Static Public Member Functions

static Vector3 CalcLpfPosition (Vector3 oldPos, Vector3 newPos, Common.Rom.Camera.LpfTypes lpfType, float elapsedTime)
 

Public Attributes

InterpolateState m_is_intp = InterpolateState.NONE
 
Vector3 m_last_position = new Vector3()
 
Vector3 m_last_offset = new Vector3()
 
Vector3 m_last_light = new Vector3(1, 1, 0)
 
Vector3 m_last_dof = new Vector3()
 
Common.Rom.Camera.TargetType m_last_target = Common.Rom.Camera.TargetType.TARGET_PLAYER
 
Guid m_last_targetId = Guid.Empty
 
Vector3 m_last_targetPos = new Vector3()
 
bool useMapCameraRange = true
 

Properties

Common.Rom.Camera ntpCamera = null [get, set]
 
bool isPlayAnim = false [get, set]
 
bool isWaitCameraPlaying [get]
 
float playSpeed = 1.0f [get, set]
 
float playFrame = 0.0f [get, set]
 
float totalElapsed = 0.0f [get, set]
 
Quaternion camQuat = new Quaternion() [get]
 
SharpKmyMath.Vector3 m_intp_campos = new SharpKmyMath.Vector3() [get, set]
 
SharpKmyMath.Vector3 m_intp_target = new SharpKmyMath.Vector3() [get, set]
 
Vector3 m_intp_others = new Vector3() [get, set]
 
SharpKmyMath.Vector3 m_view_angle = new SharpKmyMath.Vector3() [get, set]
 
float m_fovy [get, set]
 
float m_nearClip [get, set]
 
float m_distance [get, set]
 

Detailed Description

A class that plays the camera created with the camera tool

Member Enumeration Documentation

◆ InterpolateState

Enumerator
NONE 
IN_PROGRESS 
ABORTED 

Member Function Documentation

◆ animationCameraMatrix()

void Yukar.Engine.CameraManager.animationCameraMatrix ( Catalog  catalog,
Common.Rom.Map  map,
SharpKmyMath.Vector3  heroPos,
SharpKmyMath.Vector2  shake,
float  asp,
float  farclip,
out SharpKmyMath.Matrix4  p,
out SharpKmyMath.Matrix4  v,
out SharpKmyMath.Vector3  _lookat,
float  playerAngY = 0f,
float  ofsY = 0f 
)

Current camera animation processing and matrix generation

Parameters
catalog
map
heroPos
shake
asp
farclip
p
v
_lookat
playerAngY
ofsY

◆ CalcLpfPosition()

static Vector3 Yukar.Engine.CameraManager.CalcLpfPosition ( Vector3  oldPos,
Vector3  newPos,
Common.Rom.Camera.LpfTypes  lpfType,
float  elapsedTime 
)
static

◆ convQuaternionToRotation() [1/2]

void Yukar.Engine.CameraManager.convQuaternionToRotation ( Microsoft.Xna.Framework.Quaternion  quat,
out Microsoft.Xna.Framework.Vector3  rot 
)

◆ convQuaternionToRotation() [2/2]

void Yukar.Engine.CameraManager.convQuaternionToRotation ( Microsoft.Xna.Framework.Quaternion  quat,
out SharpKmyMath.Vector3  rot 
)

◆ getKeyFrameCount()

int Yukar.Engine.CameraManager.getKeyFrameCount ( )

Get the number of keyframes of the current camera

Returns

◆ isSkillCameraPlaying()

bool Yukar.Engine.CameraManager.isSkillCameraPlaying ( bool  strict)

Whether the skill camera has advanced more than a certain amount of time

In strict mode, the skill camera won't return true unless it's playing Execute with false in the skill use flow as the camera may be overridden in the skill event

◆ playAnimation()

void Yukar.Engine.CameraManager.playAnimation ( float  spd = 1.0f)

Playing current camera animation

Parameters
spd

◆ setCameraFromGuid()

void Yukar.Engine.CameraManager.setCameraFromGuid ( Catalog  catalog,
Guid  guId 
)

Camera set with guid

Parameters
catalogcatalog
guIdguId
isIntpShould the camera be interpolated from the previous state?
intpTimeInterpolation time

◆ setCameraFromPathName()

void Yukar.Engine.CameraManager.setCameraFromPathName ( Catalog  catalog,
bool  isBattle,
Guid  mapId,
string  name 
)

Camera set by camera path and name

Parameters
catalogcatalog
isBattleWhether to search from battle camera
mapIdID of the map where the camera is stored
namecamera name

◆ setKeyFrame()

void Yukar.Engine.CameraManager.setKeyFrame ( int  index)

Playing current camera animation

Parameters
index

◆ setWaitFunc()

void Yukar.Engine.CameraManager.setWaitFunc ( Func< bool >  func)

◆ stopAnimation()

void Yukar.Engine.CameraManager.stopAnimation ( )

Stopping current camera animation

Member Data Documentation

◆ m_is_intp

InterpolateState Yukar.Engine.CameraManager.m_is_intp = InterpolateState.NONE

◆ m_last_dof

Vector3 Yukar.Engine.CameraManager.m_last_dof = new Vector3()

◆ m_last_light

Vector3 Yukar.Engine.CameraManager.m_last_light = new Vector3(1, 1, 0)

◆ m_last_offset

Vector3 Yukar.Engine.CameraManager.m_last_offset = new Vector3()

◆ m_last_position

Vector3 Yukar.Engine.CameraManager.m_last_position = new Vector3()

◆ m_last_target

Common.Rom.Camera.TargetType Yukar.Engine.CameraManager.m_last_target = Common.Rom.Camera.TargetType.TARGET_PLAYER

◆ m_last_targetId

Guid Yukar.Engine.CameraManager.m_last_targetId = Guid.Empty

◆ m_last_targetPos

Vector3 Yukar.Engine.CameraManager.m_last_targetPos = new Vector3()

◆ useMapCameraRange

bool Yukar.Engine.CameraManager.useMapCameraRange = true

Property Documentation

◆ camQuat

Quaternion Yukar.Engine.CameraManager.camQuat = new Quaternion()
get

◆ isPlayAnim

bool Yukar.Engine.CameraManager.isPlayAnim = false
getset

◆ isWaitCameraPlaying

bool Yukar.Engine.CameraManager.isWaitCameraPlaying
get

◆ m_distance

float Yukar.Engine.CameraManager.m_distance
getset

◆ m_fovy

float Yukar.Engine.CameraManager.m_fovy
getset

◆ m_intp_campos

SharpKmyMath.Vector3 Yukar.Engine.CameraManager.m_intp_campos = new SharpKmyMath.Vector3()
getset

◆ m_intp_others

Vector3 Yukar.Engine.CameraManager.m_intp_others = new Vector3()
getset

◆ m_intp_target

SharpKmyMath.Vector3 Yukar.Engine.CameraManager.m_intp_target = new SharpKmyMath.Vector3()
getset

◆ m_nearClip

float Yukar.Engine.CameraManager.m_nearClip
getset

◆ m_view_angle

SharpKmyMath.Vector3 Yukar.Engine.CameraManager.m_view_angle = new SharpKmyMath.Vector3()
getset

◆ ntpCamera

Common.Rom.Camera Yukar.Engine.CameraManager.ntpCamera = null
getset

◆ playFrame

float Yukar.Engine.CameraManager.playFrame = 0.0f
getset

◆ playSpeed

float Yukar.Engine.CameraManager.playSpeed = 1.0f
getset

◆ totalElapsed

float Yukar.Engine.CameraManager.totalElapsed = 0.0f
getset