Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 /// <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);
 }
Esempio n. 3
0
 public RigidBodyPolygon(MyVector position, DoubleVector origDirectionFacing, MyPolygon polygon, double radius)
     : base(position, origDirectionFacing, radius)
 {
     _polygon = new MyPolygonSyncedRotation(polygon.UniquePoints, polygon.Triangles, this.Rotation);
 }
Esempio n. 4
0
 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);
 }
Esempio n. 5
0
 /// <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);
 }
Esempio n. 6
0
 public RigidBodyPolygon(MyVector position, DoubleVector origDirectionFacing, MyPolygon polygon, double radius)
     : base(position, origDirectionFacing, radius)
 {
     _polygon = new MyPolygonSyncedRotation(polygon.UniquePoints, polygon.Triangles, this.Rotation);
 }
Esempio n. 7
0
 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);
 }
Esempio n. 8
0
        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);
        }
 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);
 }