M&B: Bannerlord 1.2.12
The horns sound, the ravens gather.
Loading...
Searching...
No Matches
TaleWorlds.Engine.Camera Class Referencesealed

Inherits NativeObject.

Public Member Functions

void ReleaseCamera ()
 
void ReleaseCameraEntity ()
 
void LookAt (Vec3 position, Vec3 target, Vec3 upVector)
 
void ScreenSpaceRayProjection (Vec2 screenPosition, ref Vec3 rayBegin, ref Vec3 rayEnd)
 Casts a ray from screen point to the world/scene.
 
bool CheckEntityVisibility (GameEntity entity)
 
void SetViewVolume (bool perspective, float dLeft, float dRight, float dBottom, float dTop, float dNear, float dFar)
 
void GetNearPlanePoints (Vec3[] nearPlanePoints)
 
void SetFovVertical (float verticalFov, float aspectRatioXY, float newDNear, float newDFar)
 
void SetFovHorizontal (float horizontalFov, float aspectRatioXY, float newDNear, float newDFar)
 
void GetViewProjMatrix (ref MatrixFrame viewProj)
 
float GetFovVertical ()
 
float GetFovHorizontal ()
 
float GetAspectRatio ()
 
void FillParametersFrom (Camera otherCamera)
 
void RenderFrustrum ()
 
void ViewportPointToWorldRay (ref Vec3 rayBegin, ref Vec3 rayEnd, Vec2 viewportPoint)
 
Vec3 WorldPointToViewPortPoint (ref Vec3 worldPoint)
 
bool EnclosesPoint (Vec3 pointInWorldSpace)
 

Static Public Member Functions

static Camera CreateCamera ()
 
static void GetNearPlanePointsStatic (ref MatrixFrame cameraFrame, float verticalFov, float aspectRatioXY, float newDNear, float newDFar, Vec3[] nearPlanePoints)
 
static MatrixFrame ConstructCameraFromPositionElevationBearing (Vec3 position, float elevation, float bearing)
 

Properties

GameEntity Entity [get, set]
 
Vec3 Position [get, set]
 
Vec3 Direction [get]
 
MatrixFrame Frame [get, set]
 
float Near [get]
 
float Far [get]
 
float HorizontalFov [get]
 

Member Function Documentation

◆ CreateCamera()

static Camera TaleWorlds.Engine.Camera.CreateCamera ( )
static

◆ ReleaseCamera()

void TaleWorlds.Engine.Camera.ReleaseCamera ( )

◆ ReleaseCameraEntity()

void TaleWorlds.Engine.Camera.ReleaseCameraEntity ( )

◆ LookAt()

void TaleWorlds.Engine.Camera.LookAt ( Vec3 position,
Vec3 target,
Vec3 upVector )

◆ ScreenSpaceRayProjection()

void TaleWorlds.Engine.Camera.ScreenSpaceRayProjection ( Vec2 screenPosition,
ref Vec3 rayBegin,
ref Vec3 rayEnd )
Parameters
screenPositionPosition of the ray on the screen. {(x,y)| 0<=x<=1 and 0<=y<=1}.
rayBeginInitial point of the ray. It lies on viewport/projection plane of the camera.
rayEndEnd point of the ray which is in the view frustum of the camera. It lies on the clipping plane of the camera.

◆ CheckEntityVisibility()

bool TaleWorlds.Engine.Camera.CheckEntityVisibility ( GameEntity entity)

◆ SetViewVolume()

void TaleWorlds.Engine.Camera.SetViewVolume ( bool perspective,
float dLeft,
float dRight,
float dBottom,
float dTop,
float dNear,
float dFar )

◆ GetNearPlanePointsStatic()

static void TaleWorlds.Engine.Camera.GetNearPlanePointsStatic ( ref MatrixFrame cameraFrame,
float verticalFov,
float aspectRatioXY,
float newDNear,
float newDFar,
Vec3[] nearPlanePoints )
static

◆ GetNearPlanePoints()

void TaleWorlds.Engine.Camera.GetNearPlanePoints ( Vec3[] nearPlanePoints)

◆ SetFovVertical()

void TaleWorlds.Engine.Camera.SetFovVertical ( float verticalFov,
float aspectRatioXY,
float newDNear,
float newDFar )

◆ SetFovHorizontal()

void TaleWorlds.Engine.Camera.SetFovHorizontal ( float horizontalFov,
float aspectRatioXY,
float newDNear,
float newDFar )

◆ GetViewProjMatrix()

void TaleWorlds.Engine.Camera.GetViewProjMatrix ( ref MatrixFrame viewProj)

◆ GetFovVertical()

float TaleWorlds.Engine.Camera.GetFovVertical ( )

◆ GetFovHorizontal()

float TaleWorlds.Engine.Camera.GetFovHorizontal ( )

◆ GetAspectRatio()

float TaleWorlds.Engine.Camera.GetAspectRatio ( )

◆ FillParametersFrom()

void TaleWorlds.Engine.Camera.FillParametersFrom ( Camera otherCamera)

◆ RenderFrustrum()

void TaleWorlds.Engine.Camera.RenderFrustrum ( )

◆ ViewportPointToWorldRay()

void TaleWorlds.Engine.Camera.ViewportPointToWorldRay ( ref Vec3 rayBegin,
ref Vec3 rayEnd,
Vec2 viewportPoint )

◆ WorldPointToViewPortPoint()

Vec3 TaleWorlds.Engine.Camera.WorldPointToViewPortPoint ( ref Vec3 worldPoint)

◆ EnclosesPoint()

bool TaleWorlds.Engine.Camera.EnclosesPoint ( Vec3 pointInWorldSpace)

◆ ConstructCameraFromPositionElevationBearing()

static MatrixFrame TaleWorlds.Engine.Camera.ConstructCameraFromPositionElevationBearing ( Vec3 position,
float elevation,
float bearing )
static

Property Documentation

◆ Entity

GameEntity TaleWorlds.Engine.Camera.Entity
getset

◆ Position

Vec3 TaleWorlds.Engine.Camera.Position
getset

◆ Direction

Vec3 TaleWorlds.Engine.Camera.Direction
get

◆ Frame

MatrixFrame TaleWorlds.Engine.Camera.Frame
getset

◆ Near

float TaleWorlds.Engine.Camera.Near
get

◆ Far

float TaleWorlds.Engine.Camera.Far
get

◆ HorizontalFov

float TaleWorlds.Engine.Camera.HorizontalFov
get