private void UpdateBounds() { if (!StaticMesh) { return; } BoundBox = Geometry.CaculateWorldBound(StaticMesh.bounds, Matrix_LocalToWorld); BoundSphere = new FSphere(Geometry.CaculateBoundRadius(BoundBox), BoundBox.center); }
public void Execute() { for (int index = 0; index < length; ++index) { int visible = 1; float2 distRadius = new float2(0, 0); ref FAABB sectorBound = ref sectorBounds[index]; for (int PlaneIndex = 0; PlaneIndex < 6; ++PlaneIndex) { ref FPlane plane = ref planes[PlaneIndex]; distRadius.x = math.dot(plane.normalDist.xyz, sectorBound.center) + plane.normalDist.w; distRadius.y = math.dot(math.abs(plane.normalDist.xyz), sectorBound.extents); visible = math.select(visible, 0, distRadius.x + distRadius.y < 0); }