Exemplo n.º 1
0
 /**
  * Creates a skybox with the specified single texture.
  *
  * @param resourceId int Resouce id of the skybox texture.
  * @throws TextureException
  * @return {@code boolean} True if the clear task was queued successfully.
  */
 public boolean setSkybox(int resourceId) throws TextureException {
   final AFrameTask task =
       new AFrameTask() {
         @Override
         protected void doTask() {
           for (int i = 0, j = mCameras.size(); i < j; ++i) mCameras.get(i).setFarPlane(1000);
         }
       };
   synchronized (mNextSkyboxLock) {
     mNextSkybox = new Cube(700, true, false);
     mNextSkybox.setDoubleSided(true);
     mSkyboxTexture = new Texture("skybox", resourceId);
     Material material = new Material();
     material.setColorInfluence(0);
     material.addTexture(mSkyboxTexture);
     mNextSkybox.setMaterial(material);
   }
   return internalOfferTask(task);
 }