Class XRPassthroughLayerComponent
This component is responsible to create a XR Passthrough Layer.
Inheritance
Implements
Inherited Members
Namespace: Evergine.Components.XR
Assembly: Evergine.Components.dll
Syntax
public class XRPassthroughLayerComponent : Component, IDependencyObject
Fields
passthroughLayer
The XR instance of the passthrough layer.
Declaration
public XRPassthroughLayer passthroughLayer
Field Value
| Type | Description |
|---|---|
| XRPassthroughLayer |
Properties
Brightness
Gets or sets the brightness adjustment value in the range [-100, 100]. The neutral element is 0.
Declaration
[RenderPropertyAsFInput(AttachToTag = 2, AttachToValue = XRPassthroughColorControlType.ColorAdjustment, MinLimit = -100, MaxLimit = 100)]
public float Brightness { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
ColorControl
Gets or sets the flags indicating how to control the color of the layer.
Declaration
[RenderProperty(Tag = 2)]
public XRPassthroughColorControlType ColorControl { get; set; }
Property Value
| Type | Description |
|---|---|
| XRPassthroughColorControlType |
ColorMapMonoToMono
Gets or sets the color curve to which the passthrough imagery luminance values are mapped.
Declaration
[RenderProperty(AttachToTag = 2, AttachToValue = XRPassthroughColorControlType.GrayscaleMap)]
public FloatCurve ColorMapMonoToMono { get; set; }
Property Value
| Type | Description |
|---|---|
| FloatCurve |
ColorMapMonoToRGBA
Gets or sets the color curve to which the passthrough imagery luminance values are mapped.
Declaration
[RenderProperty(AttachToTag = 2, AttachToValue = XRPassthroughColorControlType.ColorMap)]
public ColorCurve ColorMapMonoToRGBA { get; set; }
Property Value
| Type | Description |
|---|---|
| ColorCurve |
CompositionOrder
Gets or sets the composition order. It defines the order of the layers in composition. The layer with larger CompositionOrder would be composited in the front of the layer with smaller CompositionOrder.
Declaration
public int CompositionOrder { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Contrast
Gets or sets the contrast adjustment value in the range [0, Infinity]. The neutral element is 1.
Declaration
[RenderPropertyAsFInput(AttachToTag = 2, AttachToValue = XRPassthroughColorControlType.ColorAdjustment, MinLimit = 0)]
public float Contrast { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
EdgeColor
Gets or sets the passthorugh edge color.
Declaration
[RenderProperty(AttachToTag = 1, AttachToValue = true)]
public Color EdgeColor { get; set; }
Property Value
| Type | Description |
|---|---|
| Color |
EdgeRendering
Gets or sets a value indicating whether enabling or not the Passthroigh edge enhancement.
Declaration
[RenderProperty(Tag = 1)]
public bool EdgeRendering { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
IsRunning
Gets a value indicating whether the passthrough is running.
Declaration
public bool IsRunning { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Opacity
Gets or sets passthrough texture opacity.
Declaration
[RenderPropertyAsFInput(AsSlider = true, MinLimit = 0, MaxLimit = 1)]
public float Opacity { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
PassthroughLayer
Gets the XR instance of the passthrough layer.
Declaration
public XRPassthroughLayer PassthroughLayer { get; }
Property Value
| Type | Description |
|---|---|
| XRPassthroughLayer |
Placement
Gets or sets whether this overlay should layer behind the scene or in front of it.
Declaration
public XROverlayType Placement { get; set; }
Property Value
| Type | Description |
|---|---|
| XROverlayType |
ProjectionSurface
Gets or sets the type of projection surface for this Passthrough layer.
Declaration
public XRProjectionSurfaceType ProjectionSurface { get; set; }
Property Value
| Type | Description |
|---|---|
| XRProjectionSurfaceType |
Saturation
Gets or sets the saturation adjustment value in the range [0, Infinity]. The neutral element is 1.
Declaration
[RenderPropertyAsFInput(AttachToTag = 2, AttachToValue = XRPassthroughColorControlType.ColorAdjustment, MinLimit = 0)]
public float Saturation { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
StartPassthroughAutomatically
Gets or sets a value indicating whether the passthrough layer is played automatically when the component starts.
Declaration
public bool StartPassthroughAutomatically { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
Methods
OnActivated()
Invoked when the object is activated once is attached.
Declaration
protected override void OnActivated()
Overrides
OnAttached()
Invoked when the object is attached to the system.
Declaration
protected override bool OnAttached()
Returns
| Type | Description |
|---|---|
| bool | True if all is OK. |
Overrides
OnDeactivated()
Invoked when the object is deactivated.
Declaration
protected override void OnDeactivated()
Overrides
OnDetach()
Invoked when the object is detached.
Declaration
protected override void OnDetach()