Class ArucoCameraDisplay
Manages Unity virual cameras that shoot 3D content aligned with the Images displayed as background. It creates the augmented reality effect by the images from the physical cameras and the ArucoObject tracked by ArucoObjectsTracker.
Inheritance
Inherited Members
Namespace: ArucoUnity.Cameras.Displays
Assembly: Assembly-CSharp.dll
Syntax
public abstract class ArucoCameraDisplay : ArucoCameraController, IArucoCameraDisplay, IArucoCameraController, IController
Fields
| Improve this Doc View SourcecameraBackgroundDistance
Declaration
public const float cameraBackgroundDistance = 1F
Field Value
Type | Description |
---|---|
Single |
Properties
| Improve this Doc View SourceArucoCameraUndistortion
Gets or sets the optional undistortion process associated with the ArucoCamera.
Declaration
public IArucoCameraUndistortion ArucoCameraUndistortion { get; set; }
Property Value
Type | Description |
---|---|
IArucoCameraUndistortion |
BackgroundCameras
Declaration
public virtual Camera[] BackgroundCameras { get; protected set; }
Property Value
Type | Description |
---|---|
Camera[] |
Backgrounds
Declaration
public virtual Renderer[] Backgrounds { get; protected set; }
Property Value
Type | Description |
---|---|
Renderer[] |
Cameras
Declaration
public virtual Camera[] Cameras { get; protected set; }
Property Value
Type | Description |
---|---|
Camera[] |
Methods
| Improve this Doc View SourceConfigureDefaultBackgrounds()
Places the Backgrounds in front of the corresponding BackgroundCameras centered and scaled to fit in the camera view.
Declaration
protected virtual void ConfigureDefaultBackgrounds()
ConfigureDisplay()
Configures the BackgroundCameras and the Backgrounds according to the ArucoCameraUndistortion if set otherwise with default values.
Declaration
protected virtual void ConfigureDisplay()
ConfigureRectifiedBackground(Int32)
Places a Backgrounds in front of the corresponding BackgroundCameras centered with the principal point of the corresponding rectified camera matrix in RectifiedCameraMatrices and scaled to fit in the field of view calculated from the focal lengths of the rectified camera matrix.
Declaration
protected virtual void ConfigureRectifiedBackground(int cameraId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | cameraId | The id of the background and the background camera to configure. |
ConfigureRectifiedCamera(Int32)
Configures the field of view of a Cameras according to the vertical focal length of the corresponding rectified camera matrix in RectifiedCameraMatrices. If the camera targets an eye in VR mode, Unity has already configured it.
Declaration
protected virtual void ConfigureRectifiedCamera(int cameraId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | cameraId | The id of the camera to configure. |
Configuring()
Adds ArucoCameraUndistortion as dependency if set.
Declaration
protected override void Configuring()
Overrides
| Improve this Doc View SourcePlaceArucoObject(Transform, Int32, Vector3, Quaternion)
Declaration
public virtual void PlaceArucoObject(Transform arucoObject, int cameraId, Vector3 localPosition, Quaternion localRotation)
Parameters
Type | Name | Description |
---|---|---|
Transform | arucoObject | |
Int32 | cameraId | |
Vector3 | localPosition | |
Quaternion | localRotation |
SetDisplayActive(Boolean)
Activates or deactivates the Cameras, the BackgroundCameras and the Backgrounds.
Declaration
protected virtual void SetDisplayActive(bool value)
Parameters
Type | Name | Description |
---|---|---|
Boolean | value | True to activate, false to deactivate. |
Starting()
Calls ConfigureDisplay() the SetDisplayActive(Boolean) to activate the display.
Declaration
protected override void Starting()
Overrides
| Improve this Doc View SourceStopping()
Deactivates the display with SetDisplayActive(Boolean).
Declaration
protected override void Stopping()