protected abstract bool ShapeQueryCircle( TSVector2 bodySpaceOrigin, FP radius);
protected override void ApplyBodyPosition() { this.worldSpaceOrigin = this.Body.BodyToWorldPointCurrent(this.bodySpaceOrigin); this.worldSpaceAABB = new VoltAABB(this.worldSpaceOrigin, this.radius); }
internal TSVector2 WorldToBodyPoint(TSVector2 vector) { return(VoltMath.WorldToBodyPoint(this.position, this.facing, vector)); }
protected abstract bool ShapeQueryPoint( TSVector2 bodySpacePoint);
public VoltAABB ComputeTopRight(TSVector2 center) { return(new VoltAABB(this.top, center.y, center.x, this.right)); }
public VoltAABB ComputeBottomRight(TSVector2 center) { return(new VoltAABB(center.y, this.bottom, center.x, this.right)); }
public static TSVector2 Right(this TSVector2 v) { return(new TSVector2(v.y, -v.x)); }
public VoltAABB(TSVector2 center, FP radius) : this(center, new TSVector2(radius, radius)) { }
public static TSVector2 WorldToBodyDirection( TSVector2 bodyFacing, TSVector2 vector) { return(vector.InvRotate(bodyFacing)); }
public static TSVector2 BodyToWorldDirection( TSVector2 bodyFacing, TSVector2 vector) { return(vector.Rotate(bodyFacing)); }
internal TSVector2 BodyToWorldDirection(TSVector2 vector) { return(VoltMath.BodyToWorldDirection(this.facing, vector)); }
internal TSVector2 BodyToWorldPoint(TSVector2 vector) { return(VoltMath.BodyToWorldPoint(this.position, this.facing, vector)); }
internal TSVector2 WorldToBodyDirection(TSVector2 vector) { return(VoltMath.WorldToBodyDirection(this.facing, vector)); }
internal Axis(TSVector2 normal, FP width) { this.normal = normal; this.width = width; }
public static TSVector2 Left(this TSVector2 v) { return(new TSVector2(-v.y, v.x)); }
public void QueryPoint( TSVector2 point, VoltBuffer <VoltBody> outBuffer) { outBuffer.Add(this.bodies, this.count); }
public static TSVector2 InvRotate(this TSVector2 v, TSVector2 b) { return(new TSVector2(v.x * b.x + v.y * b.y, v.y * b.x - v.x * b.y)); }
public VoltAABB ComputeTopLeft(TSVector2 center) { return(new VoltAABB(this.top, center.y, this.left, center.x)); }
public static FP Angle(this TSVector2 v) { return(TSMath.Atan2(v.y, v.x)); }
public VoltAABB ComputeBottomLeft(TSVector2 center) { return(new VoltAABB(center.y, this.bottom, this.left, center.x)); }
public static FP Cross(TSVector2 a, TSVector2 b) { return(a.x * b.y - a.y * b.x); }
internal void SetContained(VoltShape shape) { this.shape = shape; this.distance = 0.0f; this.normal = TSVector2.zero; }
internal void Store(ref HistoryRecord other) { this.aabb = other.aabb; this.position = other.position; this.facing = other.facing; }