Beispiel #1
0
 public AABC(int x, int y, int z, Voxelization.AABCGrid grid) : base(x, y, z)
 {
     base.x    = x;
     base.y    = y;
     base.z    = z;
     this.grid = grid;
 }
Beispiel #2
0
 public AABCGridSetAABCIterator(Voxelization.AABCGrid grid) : base(grid)
 {
     base.position = new Voxelization.AABCGrid.AABCPosition(0, 0, 0);
     if (grid.IsAABCSet(base.position))
     {
         this.nextPosition = base.position;
     }
     this.nextFound = true;
 }
Beispiel #3
0
 private void Start()
 {
     if (this.createMultipleGrids && this.includeChildren)
     {
         this.aABCGrids = Voxelization.CreateMultipleGridsWithGameObjectMesh(base.gameObject, this.cubeSide, this.drawMeshInside);
     }
     else
     {
         this.aABCGrids = new List <Voxelization.AABCGrid>();
         Voxelization.AABCGrid item = Voxelization.CreateGridWithGameObjectMesh(base.gameObject, this.cubeSide, this.includeChildren, this.drawMeshInside);
         this.aABCGrids.Add(item);
     }
 }
Beispiel #4
0
 private void TestTriangleIntersectionAABC()
 {
     Voxelization.AABCGrid grid         = new Voxelization.AABCGrid(1, 1, 1, 1f, new Vector3(1f, 1f, 1f));
     Vector3[]             triangle     = new Vector3[] { new Vector3(1f, 1f, 1f), new Vector3(1f, 2f, 1f), new Vector3(2f, 1f, 2f) };
     Vector3[]             vectorArray2 = new Vector3[] { new Vector3(2f, 1f, 1f), new Vector3(1f, 2f, 1f), new Vector3(1f, 1f, 2f) };
     Vector3[]             vectorArray3 = new Vector3[] { new Vector3(-1f, -1f, -2f), new Vector3(-1f, -1f, -2f), new Vector3(-1f, -1f, -2f) };
     MonoBehaviour.print("aabc vertices:");
     Vector3[] vectorArray4 = grid.GetAABCCorners(0, 0, 0);
     for (int i = 0; i < 8; i++)
     {
         MonoBehaviour.print(string.Concat(new object[] { "Vertex ", i, ": ", vectorArray4[i] }));
     }
     if (grid.TriangleIntersectAABC(triangle, 0, 0, 0))
     {
         MonoBehaviour.print("Triangle A intersect the AABC, Test is OK");
     }
     else
     {
         MonoBehaviour.print("Triangle A doesn't intersect the AABC, Test is NOT OK");
     }
     if (grid.TriangleIntersectAABC(vectorArray2, 0, 0, 0))
     {
         MonoBehaviour.print("Triangle B intersect the AABC, Test is OK");
     }
     else
     {
         MonoBehaviour.print("Triangle B doesn't intersect the AABC, Test is NOT OK");
     }
     if (grid.TriangleIntersectAABC(vectorArray3, 0, 0, 0))
     {
         MonoBehaviour.print("Triangle C intersect the AABC, Test is NOT OK");
     }
     else
     {
         MonoBehaviour.print("Triangle C doesn't intersect the AABC, Test is OK");
     }
 }
Beispiel #5
0
 protected AABCGridIteratorBase(Voxelization.AABCGrid grid)
 {
     this.grid = grid;
 }
Beispiel #6
0
 public AABCGridIterator(Voxelization.AABCGrid grid) : base(grid)
 {
 }
Beispiel #7
0
 public AABC(Voxelization.AABCGrid.AABCPosition position, Voxelization.AABCGrid grid) : base(position.x, position.y, position.z)
 {
     this.grid = grid;
 }
Beispiel #8
0
 public AABC(Voxelization.AABCGrid.AABC aABC) : base(aABC.x, aABC.y, aABC.z)
 {
     this.grid = aABC.grid;
 }