docs.unity3d.com
    Show / Hide Table of Contents

    Class Metric

    Abstract class that holds the common data found in all metrics. Concrete instances of this class will add data for their specific metric type.

    Inheritance
    Object
    DataModelElement
    Metric
    GenericMetric
    Inherited Members
    DataModelElement.id
    DataModelElement.IsValid()
    Namespace: UnityEngine.Perception.GroundTruth.DataModel
    Syntax
    public abstract class Metric : DataModelElement, IMessageProducer

    Constructors

    Metric(MetricDefinition, String, String)

    Creates a new metric.

    Declaration
    protected Metric(MetricDefinition definition, string sensorId = null, string annotationId = null)
    Parameters
    Type Name Description
    MetricDefinition definition

    The metric definition

    String sensorId

    The sensor ID of the sensor associated with this metric, this value can be empty

    String annotationId

    The annotation ID of the annotation associated with this metric, this value can be empty

    Properties

    annotationId

    The annotation ID that this metric is associated with. If the value is none ("") then the metric is capture wide, and not associated with a specific annotation.

    Declaration
    public string annotationId { get; }
    Property Value
    Type Description
    String

    modelType

    Declaration
    public override string modelType { get; }
    Property Value
    Type Description
    String
    Overrides
    DataModelElement.modelType

    sensorId

    The sensor ID that this metric is associated with, this value can be null or empty if the metric is not associated with any particular sensor.

    Declaration
    public string sensorId { get; }
    Property Value
    Type Description
    String

    Methods

    GetValues<T>()

    Retrieves an array of the metric values.

    Declaration
    public abstract T[] GetValues<T>()
    Returns
    Type Description
    T[]
    Type Parameters
    Name Description
    T

    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
    DataModelElement.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