@Override public void onRender(SECamera camera) { super.onRender(camera); SERect3D rect = new SERect3D(); rect.setSize(camera.getWidth(), camera.getHeight(), 0.1f); SEObjectFactory.createOpaqueRectangle( this, rect, mName + "_image", SESceneManager.BACKGROUND_IMAGE_KEY); setImageSize(camera.getWidth(), camera.getHeight()); setTranslate(camera.getScreenLocation(0.1f), false); SEVector3f yAxis = getCamera().getAxisY(); SEVector2f yAxis2f = new SEVector2f(yAxis.getZ(), yAxis.getY()); float angle = (float) (180 * yAxis2f.getAngle() / Math.PI); setRotate(new SERotate(-angle, 1, 0, 0), false); setVisible(false, false); }
private void initImage() { File f = new File(mSaveImagePath); if (f.exists()) { SEObject.applyImage_JNI(mImageName, mSaveImagePath); SELoadResThread.getInstance() .process( new Runnable() { public void run() { final int imageData = SEObject.loadImageData_JNI(mSaveImagePath); if (imageData != 0) new SECommand(getHomeScene()) { public void run() { SEObject.addImageData_JNI(mSaveImagePath, imageData); } }.execute(); } }); } }
@Override public void initStatus() { super.initStatus(); setCanChangeBind(false); mRequestCode = (int) System.currentTimeMillis(); if (mRequestCode < 0) { mRequestCode = -mRequestCode; } mSaveImagePath = getContext().getFilesDir() + File.separator + getScene().getSceneName() + mName + mIndex + ".png"; File dir = new File(HomeUtils.SDCARD_PATH); if (!dir.exists()) { dir.mkdirs(); } mPhotoObject = findComponenetObjectByRegularName("picture"); mImageName = mPhotoObject.getImageName(); initImage(); setHasInit(true); }