public void show(SEAnimFinishListener l, boolean show) { if (show) { SEVector3f yAxis = getCamera().getAxisY(); SEVector2f yAxis2f = new SEVector2f(yAxis.getZ(), yAxis.getY()); float angle = (float) (180 * yAxis2f.getAngle() / Math.PI); setTranslate(getCamera().getScreenLocation(0.1f), false); setRotate(new SERotate(-angle, 1, 0, 0), false); setUserTransParas(); } setVisible(show, true); }
private void setMovePoint(int touchX, int touchY) { House house = (House) mWallShelf.getParent(); SEVector3f location = house.getFingerLocation(touchX, touchY); float radius = house.getWallRadius() * 0.8f; // SERay Ray = getScene().getCamera().screenCoordinateToRay(touchX, touchY); mRealLocation = location; // getTouchLocation(Ray, mWallShelf.getBorderHeight()); // SEVector3f touchLocation = getTouchLocation(Ray, mWallShelf.getBorderHeight() + 5); mObjectTransParas = new SETransParas(); mObjectTransParas.mTranslate = new SEVector3f(location.getX(), location.getY() - 60, location.getZ()); mObjectTransParas.mRotate.set(mWallShelf.getUserRotate().getAngle(), 0, 0, 1); }
@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); }