docs.unity3d.com
Search Results for

    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
    Implements
    IMessageProducer
    Inherited Members
    DataModelElement.id
    DataModelElement.IsValid()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Perception.GroundTruth.DataModel
    Assembly: Unity.Perception.Runtime.dll
    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

    Type of the data object

    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[]

    Array of requested metrics

    Type Parameters
    Name Description
    T

    Any metric value based on IMessageProducer

    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)

    Implements

    IMessageProducer
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)