Exemplo n.º 1
0
        public void setMipLevel(int level)
        {
            if (level == 0)
            {
                mippedDisplayer = null;
            }

            else if (mippedDisplayer == null || mippedDisplayer.getMipLevel() != level)
            {
                mippedDisplayer = new PaintedCubeSpaceDisplayComponant(level);
                if (pathThatThisSpaceWasLoadedFromCANBENULL != null)
                {
                    if (CubeAnimator.DataLoader.hasMipAtPathAndLevel(pathThatThisSpaceWasLoadedFromCANBENULL, level))
                    {
                        mippedDisplayer.setBuffers(CubeAnimator.DataLoader.getBuffersAtPathAtMipLevel(pathThatThisSpaceWasLoadedFromCANBENULL, level));
                    }
                    else
                    {
                        mippedDisplayer.createModel(Compositer.device, array, spaceWidth, spaceHeight);

                        CubeAnimator.DataLoader.addPathAndMipForMemoization(pathThatThisSpaceWasLoadedFromCANBENULL, level,
                                                                            new VertexAndIndexBuffers(mippedDisplayer.getVertexBuffer(), mippedDisplayer.getIndexBuffer()));
                    }
                }
                else
                {
                    mippedDisplayer.createModel(Compositer.device, array, spaceWidth, spaceHeight);
                }
            }
        }
Exemplo n.º 2
0
        public PaintedCubeSpace(int width, int height, Vector3 nLoc)
        {
            unMippedDisplayer = new PaintedCubeSpaceDisplayComponant(0);
            mippedDisplayer   = null;
            array             = new byte[width, height, width];


            loc = nLoc;

            spaceWidth  = width;
            spaceHeight = height;
        }