docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class Vector3Msg

    ROS geometry_msgs/Vector3 message.

    Inheritance
    object
    Vector3Msg
    Implements
    IMessage
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Unity.SimulationPro.Foundation.GeometryMessages
    Assembly: Unity.SimulationPro.Foundation.dll
    Syntax
    [Serializable]
    public class Vector3Msg : IMessage

    Constructors

    Vector3Msg()

    Initializes a new instance with default values.

    Declaration
    public Vector3Msg()

    Vector3Msg(double, double, double)

    Initializes a new instance with default values.

    Declaration
    public Vector3Msg(double x, double y, double z)
    Parameters
    Type Name Description
    double x

    X-axis component.

    double y

    Y-axis component.

    double z

    Z-axis component.

    Fields

    k_MessageTypeId

    Identifier for this message type.

    Declaration
    public static readonly MessageTypeId k_MessageTypeId
    Field Value
    Type Description
    MessageTypeId

    k_MessageTypeName

    The ROS message type name string used for serialization and topic matching.

    Declaration
    public const string k_MessageTypeName = "geometry_msgs/Vector3"
    Field Value
    Type Description
    string

    x

    This represents a vector in free space. This is semantically different than a point. A vector is always anchored at the origin. When a transform is applied to a vector, only the rotational component is applied.

    Declaration
    public double x
    Field Value
    Type Description
    double

    y

    Y field.

    Declaration
    public double y
    Field Value
    Type Description
    double

    z

    Z field.

    Declaration
    public double z
    Field Value
    Type Description
    double

    Properties

    MessageTypeId

    Gets the unique runtime identifier for this message type.

    Declaration
    public MessageTypeId MessageTypeId { get; }
    Property Value
    Type Description
    MessageTypeId

    MessageTypeName

    Gets the ROS message type name for this message.

    Declaration
    public string MessageTypeName { get; }
    Property Value
    Type Description
    string

    Methods

    Deserialize(IMessageDeserializer)

    Deserializes a Vector3Msg from the given deserializer.

    Declaration
    public static Vector3Msg Deserialize(IMessageDeserializer deserializer)
    Parameters
    Type Name Description
    IMessageDeserializer deserializer

    The deserializer.

    Returns
    Type Description
    Vector3Msg

    A new Vector3Msg instance.

    Equals(object)

    Determines whether the specified object is equal to this instance.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj

    The target object.

    Returns
    Type Description
    bool

    true if the objects are equal; otherwise, false.

    Overrides
    object.Equals(object)

    GetHashCode()

    Returns a hash code for this instance.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    A hash code for this instance.

    Overrides
    object.GetHashCode()

    Register()

    Registers this message type with the MessageTypeRegistry.

    Declaration
    [InitializeOnLoadMethod]
    public static void Register()

    ToString()

    Returns a human-readable string representation of this message.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string representation of this instance.

    Overrides
    object.ToString()

    WriteTo(IMessageSerializer)

    Serializes this message to the given serializer.

    Declaration
    public void WriteTo(IMessageSerializer serializer)
    Parameters
    Type Name Description
    IMessageSerializer serializer

    The serializer.

    Operators

    operator ==(Vector3Msg, Vector3Msg)

    Determines whether two Vector3Msg instances have equal component values.

    Declaration
    public static bool operator ==(Vector3Msg a, Vector3Msg b)
    Parameters
    Type Name Description
    Vector3Msg a

    First operand.

    Vector3Msg b

    Second operand.

    Returns
    Type Description
    bool

    true if all components are equal; otherwise, false.

    operator !=(Vector3Msg, Vector3Msg)

    Determines whether two instances are not equal.

    Declaration
    public static bool operator !=(Vector3Msg a, Vector3Msg b)
    Parameters
    Type Name Description
    Vector3Msg a

    First operand.

    Vector3Msg b

    Second operand.

    Returns
    Type Description
    bool

    true if the instances are not equal; otherwise, false.

    Implements

    IMessage

    Extension Methods

    CoordinateSpaceExtensions.As<C>(Vector3Msg)
    CoordinateSpaceExtensions.From(Vector3Msg, CoordinateSpaceSelection)
    CoordinateSpaceExtensions.From<C>(Vector3Msg)
    In This Article
    Back to top
    Copyright © 2026 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)