Structure

PerspectiveCameraComponent

A component that defines a virtual camera and its controls.

Declaration

struct PerspectiveCameraComponent

Topics

Creating a Camera Component

init(near: Float, far: Float, fieldOfViewInDegrees: Float)

Creates a new perspective camera component with the given settings.

Setting Focal Points

var far: Float

The maximum distance in meters from the camera that the camera can see.

var near: Float

The minimum distance in meters from the camera that the camera can see.

Setting the Field of View

var fieldOfViewInDegrees: Float

The camera’s field of view, given in degrees.

Registering a Component Type

static func registerComponent()

Registers a new component type.

Comparing Perspective Camera Components

static func == (PerspectiveCameraComponent, PerspectiveCameraComponent) -> Bool

Indicates whether two perspective camera components are equal.

static func != (PerspectiveCameraComponent, PerspectiveCameraComponent) -> Bool

Indicates whether two perspective camera components are not equal.

Relationships

Conforms To

See Also

Configuring the Camera

var camera: PerspectiveCameraComponent

A camera component for the perspective camera entity.

protocol HasPerspectiveCamera

An interface that enables you to configure a virtual camera that you can use to define the rendering perspective when you’re not in an AR session.