public Atom.Math.Vector2 Project(Atom.Math.Vector2 point) { Vector3 projected = this.device.Viewport.Project( new Vector3(point.X, point.Y, 0), this.Projection, this.View, Matrix.Identity ); return(new Atom.Math.Vector2(projected.X, projected.Y)); }
public void ScaleTo(Atom.Math.Vector2 factor) { var desc = this.fixtureDescriptor as IScaleable; if (desc != null) { desc.ScaleTo(factor); this.Generate(); } }
public Atom.Math.Vector2 UnprojectIdentity(Atom.Math.Vector2 point) { var identity = Matrix.Identity; Vector3 projected = this.device.Viewport.Unproject( new Vector3(point.X, point.Y, 0), this.Projection, identity, identity ); return(new Atom.Math.Vector2(projected.X, projected.Y)); }
public bool IntersectsAt(Atom.Math.Vector2 point) { if (fixture != null) { var p = point.ToXna(); return(fixture.TestPoint(ref p)); } else { return(false); } }
public void ScaleTo(Atom.Math.Vector2 factor) { this.Radius = factor.Length * 0.05f; }
public void ScaleTo(Atom.Math.Vector2 factor) { this.Width = Atom.Math.MathUtilities.Clamp(Math.Abs(factor.X), 1, 1000); this.Height = Atom.Math.MathUtilities.Clamp(Math.Abs(factor.Y), 1, 1000); }