예제 #1
0
    public static bool GroupIDContainsPoint(int groupID, ref Vector3 worldPoint, out int groupID_point)
    {
        ushort num;

        if (groupID < CullGrid.grid.groupBegin || groupID >= CullGrid.grid.groupEnd)
        {
            groupID_point = NetworkGroup.unassigned.id;
            return(false);
        }
        if (CullGrid.CellContainsPoint(CullGrid.CellFromGroupID(groupID), ref worldPoint, out num))
        {
            groupID_point = groupID;
            return(true);
        }
        groupID_point = CullGrid.GroupIDFromCell(num);
        return(false);
    }
예제 #2
0
    public static bool GroupIDContainsPoint(int groupID, ref Vector2 flatPoint, out int groupID_point)
    {
        ushort num;

        if (groupID < CullGrid.grid.groupBegin || groupID >= CullGrid.grid.groupEnd)
        {
            groupID_point = NetworkGroup.unassigned.id;
            return(false);
        }
        if (CullGrid.CellContainsPoint((ushort)(groupID - CullGrid.grid.groupBegin), ref flatPoint, out num))
        {
            groupID_point = groupID;
            return(true);
        }
        groupID_point = num + CullGrid.grid.groupBegin;
        return(false);
    }
예제 #3
0
 public static bool GroupIDContainsPoint(int groupID, ref Vector3 worldPoint)
 {
     return(groupID < CullGrid.grid.groupBegin || groupID >= CullGrid.grid.groupEnd ? false : CullGrid.CellContainsPoint((ushort)(groupID - CullGrid.grid.groupBegin), ref worldPoint));
 }