Tabnine Logo
SimpleMoveAnimator
Code IndexAdd Tabnine to your IDE (free)

How to use
SimpleMoveAnimator
in
kendzi.jogl.camera

Best Java code snippets using kendzi.jogl.camera.SimpleMoveAnimator (Showing top 7 results out of 315)

origin: kendzi/kendzi3d

@Override
public void actionPerformed(ActionEvent pE) {
  EastNorth mapCenter = MainApplication.getMap().mapView.getCenter();
  Perspective3D perspective = perspective3dProvider.getPerspective3d();
  double x = perspective.calcX(mapCenter.getX());
  double y = perspective.calcY(mapCenter.getY());
  simpleMoveAnimator.getPoint().x = x;
  simpleMoveAnimator.getPoint().y = Camera.CAM_HEIGHT;
  simpleMoveAnimator.getPoint().z = -y;
}
origin: kendzi/kendzi3d

public void updateState() {
  double time = System.currentTimeMillis() / 1000d;
  double dt = time - lastTime;
  lastTime = time;
  vf = calcForwardSpeed(vf, dt, time);
  vs = calcSideSpeed(vs, dt, time);
  vu = calcUpSpeed(vu, dt, time);
  wh = calcHorizontallySpeed(wh, dt, time);
  Vector3d speed = new Vector3d(vf, vu, vs);
  speed = PointUtil.rotateZ3d(speed, angle.z);
  speed = PointUtil.rotateY3d(speed, angle.y);
  Vector3d dx = speed;
  dx.scale(dt);
  point.add(dx);
  Vector3d angleSpeed = new Vector3d(0, wh, 0);
  Vector3d dOmega = angleSpeed;
  dOmega.scale(dt);
  angle.add(dOmega);
}
origin: kendzi/kendzi3d

@SuppressWarnings("unqualified-field-access")
public String info() {
  String speedsStr = "";
  for (Speeds s : Speeds.values()) {
    SpeedData speedData = speeds.get(s);
    speedsStr += "" + s + ", active: " + speedData.active + ", last: " + speedData.last + ", start: " + speedData.start
        + "\n";
  }
  return "KinematicsSimpleAnimator [\n" + "\np=" + format(point) + ",\n angle=" + formatAngle(angle) + ",\n lastTime="
      + df.format(lastTime) + ",\n vf=" + df.format(vf) + ",\n vs=" + df.format(vs) + ",\n wh="
      + df.format(Math.toDegrees(wh)) + ",\n speeds:\n" + speedsStr
  + "]";
}
origin: kendzi/kendzi3d

  kinematicsSimpleAnimator.translateLeft(start);
  kinematicsSimpleAnimator.rotateLeft(false);
} else { // turn left
  kinematicsSimpleAnimator.translateLeft(false);
  kinematicsSimpleAnimator.rotateLeft(start);
  kinematicsSimpleAnimator.translateRight(start);
  kinematicsSimpleAnimator.rotateRight(false);
} else { // turn right
  kinematicsSimpleAnimator.translateRight(false);
  kinematicsSimpleAnimator.rotateRight(start);
kinematicsSimpleAnimator.translateRight(start);
kinematicsSimpleAnimator.translateLeft(start);
kinematicsSimpleAnimator.moveForward(start);
kinematicsSimpleAnimator.moveBackwards(start);
kinematicsSimpleAnimator.moveForward(start);
kinematicsSimpleAnimator.moveBackwards(start);
kinematicsSimpleAnimator.moveUp(start);
kinematicsSimpleAnimator.moveDown(start);
origin: kendzi/kendzi3d

/**
 * Sets camera position and rotation.
 *
 * @param pGlu
 *            GLU
 */
private void setCamera(GLU pGlu) {
  Point3d pos = this.simpleMoveAnimator.getPoint();
  Vector3d posLookAt = new Vector3d(100, 0, 0);
  Vector3d rotate = this.simpleMoveAnimator.getAngle();
  posLookAt = PointUtil.rotateZ3d(posLookAt, rotate.z);
  posLookAt = PointUtil.rotateY3d(posLookAt, rotate.y);
  posLookAt.add(pos);
  pGlu.gluLookAt(pos.x, pos.y, pos.z, posLookAt.x, posLookAt.y, posLookAt.z, 0, 1, 0);
}
origin: kendzi/kendzi3d

camera.updateState();
origin: kendzi/kendzi3d

@Override
public void display(GLAutoDrawable drawable) {
  this.simpleMoveAnimator.updateState();
  GL2 gl = drawable.getGL().getGL2();
  // System.err.println("INIT GL IS: " + gl.getClass().getName());
  GLU glu = new GLU();
  // _direction_
  gl.glLightfv(GLLightingFunc.GL_LIGHT0, GLLightingFunc.GL_POSITION, this.lightPos, 0);
  // clear color and depth buffers
  gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
  // gl.glClear(GL2.GL_COLOR_BUFFER_BIT | GL2.GL_DEPTH_BUFFER_BIT);
  gl.glMatrixMode(GLMatrixFunc.GL_MODELVIEW);
  gl.glLoadIdentity();
  setCamera(glu);
  gl.glEnable(GL.GL_MULTISAMPLE);
  // String versionStr = gl.glGetString( GL2.GL_VERSION );
  // log.info( "GL version:"+versionStr );
  floor.draw(gl);
  axisLabels.draw(gl);
  // drawTextInfo(gl, this.simpleMoveAnimator.info());
  // Flush all drawing operations to the graphics card
  gl.glFlush();
}
kendzi.jogl.cameraSimpleMoveAnimator

Javadoc

Simple camera move animator.

Most used methods

  • getPoint
  • updateState
  • calcForwardSpeed
    Calculate forward speed.
  • calcHorizontallySpeed
    Calculate horizontal rotation speed.
  • calcSideSpeed
    Calculate side speed.
  • calcUpSpeed
    Calculate up/down speed.
  • format
  • formatAngle
  • getAngle
  • moveBackwards
  • moveDown
  • moveForward
  • moveDown,
  • moveForward,
  • moveUp,
  • rotateHorizontally,
  • rotateLeft,
  • rotateRight,
  • rotateVertically,
  • setRotateAngle,
  • setSpeed,
  • speedFollower

Popular in Java

  • Finding current android device location
  • setContentView (Activity)
  • putExtra (Intent)
  • onRequestPermissionsResult (Fragment)
  • Menu (java.awt)
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • JList (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now