コード例 #1
0
 public static Int3 Min(Int3 a, Int3 b)
 {
     return(new Int3(Mathf.Min(a.x, b.x), Mathf.Min(a.y, b.y), Mathf.Min(a.z, b.z)));
 }
コード例 #2
0
 public Int3 Clamp(Int3 min, Int3 max)
 {
     return(new Int3(Mathf.Clamp(x, min.x, max.x),
                     Mathf.Clamp(y, min.y, max.y),
                     Mathf.Clamp(z, min.z, max.z)));
 }
コード例 #3
0
ファイル: VoxelEntity.cs プロジェクト: PcloD/Sandbox
 public bool ContainsTrunk(Int3 coord)
 {
     return(coord >= Int3.Zero && coord < worldDimension);
 }
コード例 #4
0
 private void RemoveVertIndexAtCoord(Int3 coord)
 {
     cellToVertIndexLookup.Remove(GetVertIndexBufferKey(coord));
 }
コード例 #5
0
 private void SetVertIndexAtCoord(Int3 coord, int value)
 {
     cellToVertIndexLookup[GetVertIndexBufferKey(coord)] = value;
 }
コード例 #6
0
 private Vector3 GetCellOriginPos(Int3 coord)
 {
     return(Vector3.Scale(data.cellSize, coord.ToVector3()));
 }