public override void Rotate(idRotation rotation, int id = 1) { if (this.Disposed == true) { throw new ObjectDisposedException(this.GetType().Name); } }
/// <remarks> /// Unlinks the clip model. /// </remarks> /// <param name="rotation"></param> public void Rotate(idRotation rotation) { Unlink(); _origin *= rotation; _axis *= rotation.ToMatrix(); }
public override void Rotate(idRotation rotation, int id = -1) { if (this.Disposed == true) { throw new ObjectDisposedException(this.GetType().Name); } Vector3 masterOrigin; Matrix masterAxis; _origin *= rotation; _axis *= rotation.ToMatrix(); if (_hasMaster == true) { _self.GetMasterPosition(out masterOrigin, out masterAxis); _localAxis *= rotation.ToMatrix(); _localOrigin = Vector3.Transform(_origin - masterOrigin, Matrix.Transpose(masterAxis)); } else { _localAxis = _axis; _localOrigin = _origin; } if (_clipModel != null) { _clipModel.Link(idR.Game.Clip, _self, 0, _origin, _axis); } }
public override TraceResult ClipRotation(idRotation rotation, idClipModel model) { if (this.Disposed == true) { throw new ObjectDisposedException(this.GetType().Name); } return(new TraceResult()); }
public override void Rotate(idRotation rotation, int id = 1) { if (this.Disposed == true) { throw new ObjectDisposedException(this.GetType().Name); } idConsole.Warning("TODO: idPhysics_Player.Rotate"); }
public TraceResult RotationModel(Vector3 start, idRotation rotation, idClipModel model, Matrix traceModelAxis, ContentFlags contentMask, int modelHandle, Vector3 modelOrigin, Matrix modelAxis) { idConsole.Warning("TODO: idClip.RotationModel"); // TODO: idTraceModel traceModel = TraceModelForClipModel(model); _rotationCount++; // TODO: return idR.CollisionModelManager.Rotation(start, rotation, traceModel, traceModelAxis, contentMask, modelHandle, modelOrigin, modelAxis); return(new TraceResult()); }
public override TraceResult ClipRotation(idRotation rotation, idClipModel model) { if (this.Disposed == true) { throw new ObjectDisposedException(this.GetType().Name); } if (model != null) { idConsole.Warning("TODO: return idR.Game.Clip.RotationModel(_clipModel.Origin, rotation, _clipModel, _clipModel.Axis, _clipMask, model, model.Origin, model.Axis);"); } else { idConsole.Warning("TODO: return idR.Game.Clip.Rotation(_clipModel.Origin, rotation, _clipModel, _clipModel.Axis, _clipMask, _self);"); } return(new TraceResult()); }
public override TraceResult ClipRotation(idRotation rotation, idClipModel model) { if (this.Disposed == true) { throw new ObjectDisposedException(this.GetType().Name); } TraceResult result; if (model != null) { result = idR.Game.Clip.RotationModel(_origin, rotation, _clipModel, _axis, ContentFlags.MaskSolid, model.Handle, model.Origin, model.Axis); } else { idR.Game.Clip.Rotation(out result, _origin, rotation, _clipModel, _axis, ContentFlags.MaskSolid, _self); } return(result); }
/// <summary> /// Rotate the physics object in world space. /// </summary> /// <param name="rotation"></param> /// <param name="id"></param> public abstract void Rotate(idRotation rotation, int id = 1);
private void SetupTransforms(float x, float y) { Matrix transform = Matrix.Identity; Vector3 origin = new Vector3(_origin.X + x, _origin.Y + y, 0); if(_rotate.X > 0) { idRotation rot = new idRotation(origin, new Vector3(0, 0, 1), _rotate.X); transform = rot.ToMatrix(); } if((_shear.X > 0) || (_shear.Y > 0)) { Matrix mat = Matrix.Identity; mat.M12 = _shear.X; mat.M21 = _shear.Y; transform *= mat; } if(transform != Matrix.Identity) { _context.SetTransformInformation(origin, transform); } }
public override void Rotate(idRotation rotation, int id = -1) { if(this.Disposed == true) { throw new ObjectDisposedException(this.GetType().Name); } Vector3 masterOrigin; Matrix masterAxis; _origin *= rotation; _axis *= rotation.ToMatrix(); if(_hasMaster == true) { _self.GetMasterPosition(out masterOrigin, out masterAxis); _localAxis *= rotation.ToMatrix(); _localOrigin = Vector3.Transform(_origin - masterOrigin, Matrix.Transpose(masterAxis)); } else { _localAxis = _axis; _localOrigin = _origin; } if(_clipModel != null) { _clipModel.Link(idR.Game.Clip, _self, 0, _origin, _axis); } }
public override TraceResult ClipRotation(idRotation rotation, idClipModel model) { if(this.Disposed == true) { throw new ObjectDisposedException(this.GetType().Name); } if(model != null) { idConsole.Warning("TODO: return idR.Game.Clip.RotationModel(_clipModel.Origin, rotation, _clipModel, _clipModel.Axis, _clipMask, model, model.Origin, model.Axis);"); } else { idConsole.Warning("TODO: return idR.Game.Clip.Rotation(_clipModel.Origin, rotation, _clipModel, _clipModel.Axis, _clipMask, _self);"); } return new TraceResult(); }
public override void Rotate(idRotation rotation, int id = 1) { if(this.Disposed == true) { throw new ObjectDisposedException(this.GetType().Name); } idConsole.Warning("TODO: idPhysics_Player.Rotate"); }
public abstract TraceResult ClipRotation(idRotation rotation, idClipModel model);
/// <summary> /// Rotate the physics object in world space. /// </summary> /// <param name="rotation"></param> /// <param name="id"></param> public abstract void Rotate(idRotation rotation, int id = 1);
public override TraceResult ClipRotation(idRotation rotation, idClipModel model) { if(this.Disposed == true) { throw new ObjectDisposedException(this.GetType().Name); } return new TraceResult(); }
public override void Rotate(idRotation rotation, int id = 1) { if(this.Disposed == true) { throw new ObjectDisposedException(this.GetType().Name); } }
/// <remarks> /// Unlinks the clip model. /// </remarks> /// <param name="rotation"></param> public void Rotate(idRotation rotation) { Unlink(); _origin *= rotation; _axis *= rotation.ToMatrix(); }
public abstract TraceResult ClipRotation(idRotation rotation, idClipModel model);
public override TraceResult ClipRotation(idRotation rotation, idClipModel model) { if(this.Disposed == true) { throw new ObjectDisposedException(this.GetType().Name); } TraceResult result; if(model != null) { result = idR.Game.Clip.RotationModel(_origin, rotation, _clipModel, _axis, ContentFlags.MaskSolid, model.Handle, model.Origin, model.Axis); } else { idR.Game.Clip.Rotation(out result, _origin, rotation, _clipModel, _axis, ContentFlags.MaskSolid, _self); } return result; }
public bool Rotation(out TraceResult result, Vector3 start, idRotation rotation, idClipModel model, Matrix traceModelAxis, ContentFlags contentMask, idEntity passEntity) { idConsole.Warning("TODO: idClip.Rotation"); /*idTraceModel traceModel = TraceModelForClipModel(model); * idBounds traceBounds = new idBounds(); * TraceResult traceResult; * * if((passEntity == null) || (passEntity.Index != idR.EntityIndexWorld)) * { * // test world * _rotationCount++; * * // TODO: NEED ENGINE SOURCE idR.CollisionModelManager.Rotation(out result, start, rotation, traceModel, traceModelAxis, contentMask, 0, Vector3.Zero, Matrix.Identity); * result.ContactInformation.EntityIndex = (result.Fraction != 1.0f) ? idR.EntityIndexWorld : idR.EntityIndexNone; * * if(result.Fraction == 0.0f) * { * return true; // blocked immediately by the world * } * } * else * { * result = new TraceResult(); * result.Fraction = 1.0f; * result.EndPosition = start; * result.EndAxis = traceModelAxis * rotation.ToMatrix(); * } * * if(traceModel == null) * { * traceBounds = idBounds.FromPointRotation(start, rotation); * } * else * { * traceBounds = idBounds.FromBoundsRotation(traceModel.Bounds, start, traceModelAxis, rotation); * } * * idClipModel[] clipModelList = GetTraceClipModels(traceBounds, contentMask, passEntity); * * foreach(idClipModel touch in clipModelList) * { * if(touch == null) * { * continue; * } * * if(touch.RenderModelHandle != -1) * { * continue; * } * * _rotationCount++; * // TODO: traceResult = idR.CollisionModelManager.Rotation(start, rotation, traceModel, traceModelAxis, contentMask, touch.Handle, touch.Origin, touch.Axis); * * if(traceResult.Fraction < result.Fraction) * { * result = traceResult; * result.ContactInformation.EntityIndex = touch.Entity.Index; * result.ContactInformation.ID = touch.ID; * * if(result.Fraction == 0.0f) * { * break; * } * } * } * * return (result.Fraction < 1.0f);*/ result = new TraceResult(); return(false); }