CameraComponent

Summary

Represents a camera component attached to an actor, defining view and projection parameters for scene rendering.

Remarks

Danger

All calls made within this class MUST be performed on the Master Thread. See Threads.RunLater on how to safely call this from an asynchronous thread. Failure to comply with this can cause catastrophical failures as the engine is not designed for this.

Definition

Namespace: SDT4.Managed.Core.Components
Assembly: SDT4.Managed.Core.dll

struct CameraComponent
Implements:

IActorComponent

Fields

Name Type Description

Properties

Name Type Description
public get; set; Owner ActorHandle
public static get; ComponentId Guid The unique identity of CameraComponent.
public get; set; ProjectionType ProjectionMode Gets or sets the projection mode utilised by the camera.
public get; set; NearPlane Single Gets or sets the distance to the near clipping plane of the frustum.
public get; set; FarPlane Single Gets or sets the distance to the far clipping plane of the frustum.
public get; set; OrthoLeftPlane Single Gets or sets the coordinate of the left clipping plane of the frustum. Only applicable in Orthographic mode.
public get; set; OrthoRightPlane Single Gets or sets the coordinate of the right clipping plane of the frustum. Only applicable in Orthographic mode.
public get; set; OrthoTopPlane Single Gets or sets the coordinate of the top clipping plane of the frustum. Only applicable in Orthographic mode.
public get; set; OrthoBottomPlane Single Gets or sets the coordinate of the bottom clipping plane of the frustum. Only applicable in Orthographic mode.
public get; set; PerspectiveFov Single Gets or sets the field of view in radians when operating in Perspective mode.
public get; set; AspectRatio Nullable<Single> Gets or sets the aspect ratio (width divided by height) used in Perspective mode.
NearPlane Remarks

In Perspective mode, this value must be strictly positive. In Orthographic mode, any valid real number may be specified.

FarPlane Remarks

In Perspective mode, this plane is frequently ignored when the renderer utilises infinite far planes. In Orthographic mode, any valid real number may be specified.

OrthoLeftPlane Remarks

Note

Shard Tech 4 assumes a left-handed coordinate system.

OrthoRightPlane Remarks

Note

Shard Tech 4 assumes a left-handed coordinate system.

OrthoTopPlane Remarks

Note

Shard Tech 4 assumes a left-handed coordinate system.

OrthoBottomPlane Remarks

Note

Shard Tech 4 assumes a left-handed coordinate system.

AspectRatio Remarks

When set to , the aspect ratio is derived automatically from the current viewport resolution.


Methods

public virtual Boolean Equals(Object? obj)

Summary: Determines whether the specified object is equal to the current component.

Parameters:

Returns:


public virtual Int32 GetHashCode()

Summary: Returns the hash code for this component.

Returns:


public virtual String ToString()

Summary: Returns a string representation of the component.

Returns: