public SphereRigid(Vector3 positionXNA, Material mat, float radius) : base(MathHelperModule.GetSphereRigid2DCoordinatesPositionXNA(positionXNA, radius), MathHelperModule.GetPositionCenter(positionXNA, radius), TextureType.DefaultCircle) { //Texture = StaticData.EngineManager.Content.Load<Texture2D>(@"RigidsTextures/DefaultCircle"); ReInitializeData(positionXNA, mat, radius); }
public SphereRigid(SphereRigid anotherRB) : base(MathHelperModule.GetSphereRigid2DCoordinatesPositionXNA(anotherRB.PositionXNA, anotherRB.Radius), MathHelperModule.GetPositionCenter(anotherRB.PositionXNA, anotherRB.Radius), TextureType.DefaultCircle) { this._positionCenter = anotherRB.PositionXNA; this._positionCenter = anotherRB.PositionCenterEngine; this.Width = anotherRB.Width; this.Height = anotherRB.Height; this.vertices = RigidsHelperModule.MakeNewVPCMatrix(anotherRB.vertices); this.InverseInertiaTensorWorld = anotherRB.InverseInertiaTensorWorld; this.baseMomentOfInertia = anotherRB.baseMomentOfInertia; //this.basicEffect = anotherRB.basicEffect; this.acceleration = anotherRB.acceleration; this.canSleep = anotherRB.canSleep; this.Center = anotherRB.Center; this.dAngle = anotherRB.dAngle; this.torqueAccum = anotherRB.torqueAccum; this.torque = anotherRB.torque; this.EnlargingFactor = anotherRB.EnlargingFactor; this.gravity = anotherRB.gravity; this.Radius = anotherRB.Radius; this.isAwake = anotherRB.isAwake; this.IsCollidable = anotherRB.IsCollidable; this.IsClicked = anotherRB.IsClicked; this.LastFrameAcceleration = anotherRB.LastFrameAcceleration; this.LastFrameVelocity = anotherRB.LastFrameVelocity; this.Mass = anotherRB.Mass; this.InvMass = anotherRB.InvMass; this.material = anotherRB.material; this.motion = anotherRB.motion; this.orientation = anotherRB.orientation; this.RectangleArea = anotherRB.RectangleArea; this.TextureType = anotherRB.TextureType; this.sleepEpsilon = anotherRB.sleepEpsilon; this.angVelocity = anotherRB.angVelocity; this.angAcceleration = anotherRB.angAcceleration; this.divisions = anotherRB.divisions; this.wired = anotherRB.wired; this.InitRotation = anotherRB.InitRotation; this.InitTorque = anotherRB.InitTorque; }