public MyPolygonSyncedRotation(MyVector[] uniquePoints, Triangle[] triangles, MyQuaternion rotation) : base(uniquePoints, triangles) { MyVector[] clonedPoints = Utility3D.GetClonedArray(uniquePoints); _rotatedPoly = new MyPolygon(clonedPoints, Utility3D.GetClonedArray(clonedPoints, triangles)); SyncRotation(rotation); }
/// <summary> /// This overload is used if you plan to do collisions /// </summary> public RigidBodyPolygon(MyVector position, DoubleVector origDirectionFacing, MyPolygon polygon, double radius, double elasticity, double kineticFriction, double staticFriction, MyVector boundingBoxLower, MyVector boundingBoxUpper) : base(position, origDirectionFacing, radius, elasticity, kineticFriction, staticFriction, boundingBoxLower, boundingBoxUpper) { _polygon = new MyPolygonSyncedRotation(polygon.UniquePoints, polygon.Triangles, this.Rotation); }
public RigidBodyPolygon(MyVector position, DoubleVector origDirectionFacing, MyPolygon polygon, double radius) : base(position, origDirectionFacing, radius) { _polygon = new MyPolygonSyncedRotation(polygon.UniquePoints, polygon.Triangles, this.Rotation); }
public SolidBallPolygon(MyVector position, DoubleVector origDirectionFacing, MyPolygon polygon, double radius, double mass, MyVector boundingBoxLower, MyVector boundingBoxUpper) : base(position, origDirectionFacing, radius, mass, boundingBoxLower, boundingBoxUpper) { _polygon = new MyPolygonSyncedRotation(polygon.UniquePoints, polygon.Triangles, this.Rotation); }
public PolygonTest(MyVector position, DoubleVector origDirFacing, MyPolygon polygon, double radius) : base(position, origDirFacing, polygon, radius) { _rotateHandleX = new MyVector(this.Radius + DOTRADIUS, 0, 0); _rotateHandleY = new MyVector(this.Radius + (DOTRADIUS * 3), 0, 0); _rotateHandleZ = new MyVector(this.Radius + (DOTRADIUS * 5), 0, 0); _rotationX = new MyQuaternion(new MyVector(0, 0, 1), 0); _rotationY = new MyQuaternion(new MyVector(0, 0, 1), 0); _rotationZ = new MyQuaternion(new MyVector(0, 0, 1), 0); }