docs.unity3d.com
    Show / Hide Table of Contents

    Class RgbSensor

    The concrete class for an RGB sensor.

    Inheritance
    Object
    DataModelElement
    Sensor
    RgbSensor
    Inherited Members
    Sensor.m_Definition
    Sensor.modelType
    Sensor.description
    Sensor.position
    Sensor.rotation
    Sensor.velocity
    Sensor.acceleration
    Sensor.annotations
    DataModelElement.id
    Namespace: UnityEngine.Perception.GroundTruth.DataModel
    Syntax
    public class RgbSensor : Sensor, IMessageProducer

    Constructors

    RgbSensor(RgbSensorDefinition, Vector3, Quaternion)

    Create a new sensor

    Declaration
    public RgbSensor(RgbSensorDefinition definition, Vector3 position, Quaternion rotation)
    Parameters
    Type Name Description
    RgbSensorDefinition definition

    The id of the sensor

    Vector3 position

    The position of the sensor

    Quaternion rotation

    The rotation of the sensor

    RgbSensor(RgbSensorDefinition, Vector3, Quaternion, ImageEncodingFormat, RgbSensor.ImageProjection, Vector2)

    Create a new sensor

    Declaration
    public RgbSensor(RgbSensorDefinition definition, Vector3 position, Quaternion rotation, ImageEncodingFormat encodingFormat, RgbSensor.ImageProjection projection, Vector2 dimension)
    Parameters
    Type Name Description
    RgbSensorDefinition definition

    The id of the sensor

    Vector3 position

    The position of the sensor

    Quaternion rotation

    The rotation of the sensor

    ImageEncodingFormat encodingFormat

    The format of the image

    RgbSensor.ImageProjection projection

    The projection of the image

    Vector2 dimension

    The pixel dimensions of the image

    RgbSensor(RgbSensorDefinition, Vector3, Quaternion, Vector3, Vector3)

    Create a new sensor

    Declaration
    public RgbSensor(RgbSensorDefinition definition, Vector3 position, Quaternion rotation, Vector3 velocity, Vector3 acceleration)
    Parameters
    Type Name Description
    RgbSensorDefinition definition

    The id of the sensor

    Vector3 position

    The position of the sensor

    Quaternion rotation

    The rotation of the sensor

    Vector3 velocity

    The velocity of the sensor

    Vector3 acceleration

    The acceleration of the sensor

    RgbSensor(RgbSensorDefinition, Vector3, Quaternion, Vector3, Vector3, ImageEncodingFormat, RgbSensor.ImageProjection, Vector2)

    Create a new sensor

    Declaration
    public RgbSensor(RgbSensorDefinition definition, Vector3 position, Quaternion rotation, Vector3 velocity, Vector3 acceleration, ImageEncodingFormat encodingFormat, RgbSensor.ImageProjection projection, Vector2 dimension)
    Parameters
    Type Name Description
    RgbSensorDefinition definition

    The id of the sensor

    Vector3 position

    The position of the sensor

    Quaternion rotation

    The rotation of the sensor

    Vector3 velocity

    The velocity of the sensor

    Vector3 acceleration

    The acceleration of the sensor

    ImageEncodingFormat encodingFormat

    The format of the image

    RgbSensor.ImageProjection projection

    The projection of the image

    Vector2 dimension

    The pixel dimensions of the image

    Properties

    buffer

    The raw bytes of the image file

    Declaration
    public byte[] buffer { get; set; }
    Property Value
    Type Description
    Byte[]

    dimension

    The dimensions (width, height) of the image

    Declaration
    public Vector2 dimension { get; set; }
    Property Value
    Type Description
    Vector2

    imageEncodingFormat

    The image file type

    Declaration
    public ImageEncodingFormat imageEncodingFormat { get; set; }
    Property Value
    Type Description
    ImageEncodingFormat

    matrix

    The 3x3 image intrinsic matrix

    Declaration
    public float3x3 matrix { get; set; }
    Property Value
    Type Description
    float3x3

    projection

    The projection of the image.

    Declaration
    public RgbSensor.ImageProjection projection { get; set; }
    Property Value
    Type Description
    RgbSensor.ImageProjection

    Methods

    IsValid()

    Is the component valid?

    Declaration
    public override bool IsValid()
    Returns
    Type Description
    Boolean

    Is the component valid?

    Overrides
    Sensor.IsValid()

    ToMessage(IMessageBuilder)

    Convert contents int a message.

    Declaration
    public override void ToMessage(IMessageBuilder builder)
    Parameters
    Type Name Description
    IMessageBuilder builder

    The message builder that will convert the class's contents into a message

    Overrides
    Sensor.ToMessage(IMessageBuilder)
    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