Example #1
0
 private SEVector3f worldLocationToDesk(SEVector3f worldLocation) {
   float r = worldLocation.getVectorZ().getLength();
   float postitionAngle = (float) (worldLocation.getVectorZ().getAngle_II() * 180 / Math.PI);
   float preAngle = mWallShelf.getUserRotate().getAngle();
   float angle = postitionAngle - preAngle;
   float x = (float) (-r * Math.sin(angle * Math.PI / 180));
   float y = (float) (r * Math.cos(angle * Math.PI / 180));
   SEVector3f deskLocation = new SEVector3f(x, y, worldLocation.getZ());
   return deskLocation;
 }
Example #2
0
 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);
 }
Example #3
0
  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);
  }
Example #4
0
 @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);
 }