Loading files
68c592872This file is pinned to the selected release. Download the original to open it in your design tool.
//Do not edit! This file was generated by com.unity.simulationpro MessageGeneration.
using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using Unity.SimulationPro.Foundation;
namespace Unity.SimulationPro.Foundation.MoveitMessages
{
[Serializable]
public class CostSourceMsg : IMessage
{
public const string k_MessageTypeName = "moveit_msgs/CostSource";
public string MessageTypeName => k_MessageTypeName;
public static readonly MessageTypeId k_MessageTypeId = new MessageTypeId(k_MessageTypeName);
public MessageTypeId MessageTypeId => k_MessageTypeId;
// The density of the cost source
public double cost_density;
// The volume of the cost source is represented as an
// axis-aligned bounding box (AABB)
// The AABB is specified by two of its opposite corners
public GeometryMessages.Vector3Msg aabb_min;
public GeometryMessages.Vector3Msg aabb_max;
public CostSourceMsg()
{
this.cost_density = 0.0;
this.aabb_min = new GeometryMessages.Vector3Msg();
this.aabb_max = new GeometryMessages.Vector3Msg();
}
public CostSourceMsg(double cost_density, GeometryMessages.Vector3Msg aabb_min, GeometryMessages.Vector3Msg aabb_max)
{
this.cost_density = cost_density;
this.aabb_min = aabb_min;
this.aabb_max = aabb_max;
}
static string[] s_FieldNames = { "cost_density", "aabb_min", "aabb_max" };
public static CostSourceMsg Deserialize(IMessageDeserializer deserializer) => new CostSourceMsg(deserializer);
private CostSourceMsg(IMessageDeserializer deserializer)
{
deserializer.BeginMessage(s_FieldNames);
deserializer.Read(out this.cost_density);
deserializer.Read(out this.aabb_min);
deserializer.Read(out this.aabb_max);
deserializer.EndMessage();
}
public void WriteTo(IMessageSerializer serializer)
{
serializer.BeginMessage(s_FieldNames);
serializer.Write(this.cost_density);
serializer.Write(this.aabb_min);
serializer.Write(this.aabb_max);
serializer.EndMessage();
}
public override string ToString()
{
return "CostSourceMsg: " +
"\ncost_density: " + cost_density.ToString() +
"\naabb_min: " + aabb_min.ToString() +
"\naabb_max: " + aabb_max.ToString();
}
#if UNITY_EDITOR
[UnityEditor.InitializeOnLoadMethod]
#else
[UnityEngine.RuntimeInitializeOnLoadMethod(UnityEngine.RuntimeInitializeLoadType.BeforeSceneLoad)]
#endif
public static void Register()
{
MessageTypeRegistry.Register(k_MessageTypeId, Deserialize);
}
}
}