Box2DX.Collision.PolygonShape.ComputeAABB C# (CSharp) Method

ComputeAABB() public method

public ComputeAABB ( AABB &aabb, XForm xf ) : void
aabb AABB
xf Box2DX.Common.XForm
return void
		public override void ComputeAABB(out AABB aabb, XForm xf)
		{
			Mat22 R = Common.Math.Mul(xf.R, _obb.R);
			Mat22 absR = Common.Math.Abs(R);
			Vec2 h = Common.Math.Mul(absR, _obb.Extents);
			Vec2 position = xf.Position + Common.Math.Mul(xf.R, _obb.Center);
			aabb.LowerBound = position - h;
			aabb.UpperBound = position + h;
		}