docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class QuaternionMsg

    ROS geometry_msgs/Quaternion message.

    Inheritance
    object
    QuaternionMsg
    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 QuaternionMsg : IMessage

    Constructors

    QuaternionMsg()

    Initializes a new instance with default values.

    Declaration
    public QuaternionMsg()

    QuaternionMsg(double, double, double, double)

    Initializes a new instance with default values.

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

    X-axis component.

    double y

    Y-axis component.

    double z

    Z-axis component.

    double w

    W (scalar) component of the quaternion.

    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/Quaternion"
    Field Value
    Type Description
    string

    w

    W field.

    Declaration
    public double w
    Field Value
    Type Description
    double

    x

    This represents an orientation in free space in quaternion form.

    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 QuaternionMsg from the given deserializer.

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

    The deserializer.

    Returns
    Type Description
    QuaternionMsg

    A new QuaternionMsg 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 ==(QuaternionMsg, QuaternionMsg)

    Determines whether two QuaternionMsg instances have equal component values.

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

    First operand.

    QuaternionMsg b

    Second operand.

    Returns
    Type Description
    bool

    true if all components are equal; otherwise, false.

    operator !=(QuaternionMsg, QuaternionMsg)

    Determines whether two instances are not equal.

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

    First operand.

    QuaternionMsg b

    Second operand.

    Returns
    Type Description
    bool

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

    Implements

    IMessage

    Extension Methods

    CoordinateSpaceExtensions.As<C>(QuaternionMsg)
    CoordinateSpaceExtensions.From(QuaternionMsg, CoordinateSpaceSelection)
    CoordinateSpaceExtensions.From<C>(QuaternionMsg)
    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)