/// <summary> /// Initializes a new empty system object /// </summary> public MySystemObject() { Type = MySystemObjectType.EMPTY; DisplayName = ""; CenterPosition = Vector3D.Zero; ChildObjects = new HashSet <MySystemObject>(); Id = Guid.NewGuid(); ParentId = Guid.Empty; }
public MyPlanetItem() { Type = SystemObjectType.PLANET; DisplayName = "Planet"; DefName = ""; Size = 0; CenterPosition = Vector3D.Zero; OffsetPosition = Vector3D.Zero; Generated = false; PlanetMoons = new MyPlanetMoonItem[0]; }
// Optimized version public MyPositionAndOrientation(ref MatrixD matrix) { Position = matrix.Translation; Forward = (Vector3)matrix.Forward; Up = (Vector3)matrix.Up; }
public MyPositionAndOrientation(Vector3D position, Vector3 forward, Vector3 up) { Position = position; Forward = forward; Up = up; }
public static SerializableVector3D RoundOff(this SerializableVector3D vector, float roundTo) { return(new SerializableVector3D(Math.Round(vector.X / roundTo, 0, MidpointRounding.ToEven) * roundTo, Math.Round(vector.Y / roundTo, 0, MidpointRounding.ToEven) * roundTo, Math.Round(vector.Z / roundTo, 0, MidpointRounding.ToEven) * roundTo)); }
public static System.Windows.Media.Media3D.Point3D ToPoint3D(this SerializableVector3D point) { return(new System.Windows.Media.Media3D.Point3D(point.X, point.Y, point.Z)); }
public GpsData() { name = "Gps"; color = Vector3.Zero; position = Vector3D.Zero; }
public Vector3DWrapper(SerializableVector3D v) { _vector = v; }