/// <summary> /// Convert Volumen unit type /// </summary> /// <param name="units"></param> /// <param name="from"></param> /// <param name="to"></param> /// <returns></returns> public static double ConvertUnits(this int units, eVolumeType from, eVolumeType to) { double[][] factor = { new double[] { 1, 2, 0.25 }, new double[] { 0.5, 1, 0.125 }, new double[] { 4, 8, 1 } }; return(units * factor[(int)from][(int)to]); }
public override bool intersects(UWB_BoundingVolume other) { eVolumeType vt = other.getType(); if (eVolumeType.box == vt) { UWB_BoundingBox otherBox = other as UWB_BoundingBox; return(intesectBoxBox(mMin, mMax, otherBox.getMin(), otherBox.getMax())); } return(false); }
public override void add(UWB_BoundingVolume other) { if (other != null) { eVolumeType vt = other.getType(); if (eVolumeType.box == vt) { UWB_BoundingBox box = other as UWB_BoundingBox; add(box); } } }