Files
speckle-unity/Packages/systems.speckle.speckle-unity/ConverterUnity.Units.cs
T
2021-12-02 13:26:32 +00:00

24 lines
560 B
C#

using Objects.Geometry;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
using Mesh = Objects.Geometry.Mesh;
namespace Objects.Converter.Unity
{
public partial class ConverterUnity
{
public string ModelUnits = Speckle.Core.Kits.Units.Meters; //the default Unity units are meters
private double ScaleToNative(double value, string units)
{
var f = Speckle.Core.Kits.Units.GetConversionFactor(units, ModelUnits);
return value * f;
}
}
}