Table of Contents

Class Camera

Namespace
BasilEngine.Components
Assembly
BasilEngine.dll
[NativeHeader("Bindings/ManagedCamera.hpp")]
[NativeClass("ManagedCamera", ".")]
public class Camera : Component
Inheritance
Camera
Inherited Members

Properties

AspectRatio

Aspect ratio of the camera's projection.

public float AspectRatio { get; set; }

Property Value

float

active

Indicates whether the camera is active (not yet wired).

public bool active { get; }

Property Value

bool

far

Far clipping plane distance.

public float far { get; set; }

Property Value

float

fov

Field of view in degrees for perspective cameras.

public float fov { get; set; }

Property Value

float

near

Near clipping plane distance.

public float near { get; set; }

Property Value

float

type

Projection type of the camera.

public Camera.CameraType type { get; set; }

Property Value

Camera.CameraType

Methods

Internal_GetAspectRatio(ulong)

[NativeMethod("getAspectRatio")]
[StaticAccessor("ManagedCamera", StaticAccessorType.DoubleColon)]
public static extern float Internal_GetAspectRatio(ulong handle)

Parameters

handle ulong

Returns

float

Internal_GetFOV(ulong)

[NativeMethod("getFoV")]
[StaticAccessor("ManagedCamera", StaticAccessorType.DoubleColon)]
public static extern float Internal_GetFOV(ulong handle)

Parameters

handle ulong

Returns

float

Internal_GetFarPlane(ulong)

[NativeMethod("getFar")]
[StaticAccessor("ManagedCamera", StaticAccessorType.DoubleColon)]
public static extern float Internal_GetFarPlane(ulong handle)

Parameters

handle ulong

Returns

float

Internal_GetNearPlane(ulong)

[NativeMethod("getNear")]
[StaticAccessor("ManagedCamera", StaticAccessorType.DoubleColon)]
public static extern float Internal_GetNearPlane(ulong handle)

Parameters

handle ulong

Returns

float

Internal_GetType(ulong)

[NativeMethod("GetCameraType")]
[StaticAccessor("ManagedCamera", StaticAccessorType.DoubleColon)]
public static extern int Internal_GetType(ulong handle)

Parameters

handle ulong

Returns

int

Internal_SetAspectRatio(ulong, float)

[NativeMethod("setAspectRatio")]
[StaticAccessor("ManagedCamera", StaticAccessorType.DoubleColon)]
public static extern void Internal_SetAspectRatio(ulong handle, float ratio)

Parameters

handle ulong
ratio float

Internal_SetFOV(ulong, float)

[NativeMethod("setFoV")]
[StaticAccessor("ManagedCamera", StaticAccessorType.DoubleColon)]
public static extern void Internal_SetFOV(ulong handle, float fov)

Parameters

handle ulong
fov float

Internal_SetFarPlane(ulong, float)

[NativeMethod("setFar")]
[StaticAccessor("ManagedCamera", StaticAccessorType.DoubleColon)]
public static extern void Internal_SetFarPlane(ulong handle, float far)

Parameters

handle ulong
far float

Internal_SetNearPlane(ulong, float)

[NativeMethod("setNear")]
[StaticAccessor("ManagedCamera", StaticAccessorType.DoubleColon)]
public static extern void Internal_SetNearPlane(ulong handle, float near)

Parameters

handle ulong
near float

Internal_SetType(ulong, int)

[NativeMethod("SetCameraType")]
[StaticAccessor("ManagedCamera", StaticAccessorType.DoubleColon)]
public static extern void Internal_SetType(ulong handle, int type)

Parameters

handle ulong
type int

ScreenPointToRay(Vector2)

Creates a world-space ray from a screen position.

public Ray ScreenPointToRay(Vector2 screenPoint)

Parameters

screenPoint Vector2

Screen coordinates.

Returns

Ray

Ray originating from the camera through the screen point.

ScreenToWorldPoint(Vector2, float)

Converts a screen point to a world-space position at a given depth.

public Vector3 ScreenToWorldPoint(Vector2 screenPoint, float depth = 0)

Parameters

screenPoint Vector2

Screen coordinates.

depth float

Distance from the near plane in world units.

Returns

Vector3

Point in world space.