Ejemplo n.º 1
0
        public void ClampPointToSurfaceAlwaysIncreasesLargestComponentToHalfSideLengthWhenPointLiesInsideSurface()
        {
            origin = new Vector3(10f, 10f, 10f);
            testObj = new CubeSurface(origin, sideLength, up);

            AssertPointInsideCubeIsPushedToSurface(new Vector3(7f, 13.5f, 7f));
            AssertPointInsideCubeIsPushedToSurface(new Vector3(6f, 9.5f, 9.5f));
            AssertPointInsideCubeIsPushedToSurface(new Vector3(8f, 11f, 6.25f));
        }
 internal override Surface GetSurface()
 {
     if (null == surface)
         surface = new CubeSurface(transform.position, sideLength, transform.up);
     return surface;
 }
Ejemplo n.º 3
0
 public void SetUp()
 {
     origin = new Vector3(0, 0, 0);
     sideLength = 10f;
     up = new Vector3(0, 1, 0);
     testObj = new CubeSurface(origin, sideLength, up);
 }