docs.unity3d.com
    Show / Hide Table of Contents

    Class PhotosensorToDepth

    The role of this class is to interpret the data incoming from the photosensor into an depth texture. The internal shader does a simple conversion of the z axis value between [minRange, maxRange] -> [0.0, 1.0].

    Inheritance
    Object
    NodeRuntime
    Transcoder
    PhotosensorEncoder
    PhotosensorToDepth
    PhotosensorToDepthNode
    Inherited Members
    PhotosensorEncoder.photosensorData
    PhotosensorEncoder.samplingRate
    PhotosensorEncoder.framePeriod
    PhotosensorEncoder._currentIndex
    PhotosensorEncoder._lastIndex
    PhotosensorEncoder.InitializeComputeShader(String)
    Transcoder.inTranscode
    Transcoder.outTranscode
    Transcoder._computeShader
    Transcoder._computeKernelIdx
    Transcoder.EnableInterfaceOnChangeEvent()
    Transcoder.DisableInterfaceOnChangeEvent()
    Transcoder.InitializeComputeShader(String, String)
    Transcoder.Release()
    NodeRuntime._parent
    NodeRuntime._portList
    NodeRuntime._queryPath
    NodeRuntime._tickCPUTimeNs
    NodeRuntime.Initialize(SystemGraphComponent)
    NodeRuntime.InternalInitialize()
    NodeRuntime.Start()
    NodeRuntime.OnTick(Double, Double, Scheduler.ClockState, Scheduler.Signal)
    NodeRuntime.Update()
    NodeRuntime.FixedUpdate()
    NodeRuntime.OnPortAdded(String, Type, String, PortDirection, FieldExtra, IPortType)
    NodeRuntime.OnPortRemoved(String)
    NodeRuntime.InitializeDynamicPorts(SystemGraphComponent)
    NodeRuntime.QueryPath
    NodeRuntime.TickCPUTimeNs
    NodeRuntime.PortDataList
    Namespace: Mechatronics.SensorSDK
    Syntax
    public class PhotosensorToDepth : PhotosensorEncoder

    Fields

    _outputBuffer

    An internal reference to the render texture used to output the result.

    Declaration
    protected RenderTexture _outputBuffer
    Field Value
    Type Description
    RenderTexture

    depth

    Declaration
    [Tooltip("Current state of the frame sampled.")]
    [Field("Depth", PortDirection.Right, FieldExtra.Write)]
    [SerializeField]
    protected PortType<RenderTexture> depth
    Field Value
    Type Description
    PortType<RenderTexture>

    height

    Declaration
    [Tooltip("Vertical frame size.")]
    [Field("FrameHeight", PortDirection.Left, FieldExtra.Read)]
    [SerializeField]
    protected PortType<uint> height
    Field Value
    Type Description
    PortType<UInt32>

    width

    Declaration
    [Tooltip("Horizontal frame size.")]
    [Field("FrameWidth", PortDirection.Left, FieldExtra.Read)]
    [SerializeField]
    protected PortType<uint> width
    Field Value
    Type Description
    PortType<UInt32>

    Methods

    Disable()

    Disable the change event on the input render texture and release the graphic resources.

    Declaration
    public override void Disable()
    Overrides
    NodeRuntime.Disable()

    Enable(Scheduler.ClockState)

    Enable the change event on the input render texture and initialize the compute shader.

    Declaration
    public override void Enable(Scheduler.ClockState clockState)
    Parameters
    Type Name Description
    Scheduler.ClockState clockState

    The parameters of the waveform associated to this node

    Overrides
    NodeRuntime.Enable(Scheduler.ClockState)

    Transcode(CustomPassContext)

    Add to the command buffer the Conversion of the photosensor sampling data into a depth buffer.

    Declaration
    protected override void Transcode(CustomPassContext ctx)
    Parameters
    Type Name Description
    CustomPassContext ctx

    Custom pass context

    Overrides
    Transcoder.Transcode(CustomPassContext)
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023