Codota Logo
ViewFrustum.getEyePos
Code IndexAdd Codota to your IDE (free)

How to use
getEyePos
method
in
org.deegree.rendering.r3d.ViewFrustum

Best Java code snippets using org.deegree.rendering.r3d.ViewFrustum.getEyePos (Showing top 14 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ArrayList a =
  • Codota Iconnew ArrayList<String>()
  • Codota Iconnew ArrayList()
  • Codota Iconnew ArrayList<Object>()
  • Smart code suggestions by Codota
}
origin: deegree/deegree3

  private double calcMove() {
    double moveStep = vf.getEyePos().z / 50.0;
    if ( moveStep < 5 ) {
      moveStep = 5;
    }
    return moveStep;
  }
}
origin: deegree/deegree3

/**
 * Checks whether the screen-space error (after perspective projection) introduced by the fragments of the
 * {@link Arc} is acceptable.
 * 
 * @param arc
 * @return true, if all fragments are fine
 */
private boolean isScreenSpaceErrorAcceptable( Arc arc ) {
  float[][] scaledBBox = arc.getBBox();
  scaledBBox[0][2] *= zScale;
  scaledBBox[1][2] *= zScale;
  float[] eyePos = new float[3];
  eyePos[0] = (float) viewRegion.getEyePos().x;
  eyePos[1] = (float) viewRegion.getEyePos().y;
  eyePos[2] = (float) viewRegion.getEyePos().z;
  float dist = VectorUtils.getDistance( scaledBBox, eyePos );
  double projectionFactor = viewParams.estimatePixelSizeForSpaceUnit( dist );
  double screenError = projectionFactor * arc.geometricError;
  // System.out.println ("error: " + arc.geometryError);
  // System.out.println ("screen error: " + screenError);
  return screenError <= maxPixelError;
}
origin: deegree/deegree3

/**
 * @param viewParams
 *            to get the objects for.
 * @return the objects which intersect with the given view parameters and or it's children, or the empty list.
 */
public Set<T> getObjects( ViewParams viewParams ) {
  Set<T> result = new HashSet<T>();
  Point3d e = viewParams.getViewFrustum().getEyePos();
  float[] eye = new float[] { (float) e.x, (float) e.y, (float) e.z };
  getObjects( viewParams, eye, result );
  return result;
}
origin: deegree/deegree3

private boolean isTexturable( MeshFragment fragment ) {
  float[][] scaledBBox = new float[2][3];
  scaledBBox[0] = Arrays.copyOf( fragment.bbox[0], 3 );
  scaledBBox[1] = Arrays.copyOf( fragment.bbox[1], 3 );
  scaledBBox[0][2] *= zScale;
  scaledBBox[1][2] *= zScale;
  float[] eyePos = new float[3];
  eyePos[0] = (float) viewRegion.getEyePos().x;
  eyePos[1] = (float) viewRegion.getEyePos().y;
  eyePos[2] = (float) viewRegion.getEyePos().z;
  float dist = VectorUtils.getDistance( scaledBBox, eyePos );
  double pixelSize = viewParams.estimatePixelSizeForSpaceUnit( dist );
  double metersPerPixel = maxProjectedTexelSize / pixelSize;
  double resolution = getFinestTextureResolution( metersPerPixel );
  if ( resolution <= 0.00001 ) {
    resolution = 0.00001;
  }
  double textureSize = getMaxSideLen( fragment ) / resolution;
  LOG.debug( "Side len: " + getMaxSideLen( fragment ) + ", resolution: " + resolution + ", texture size: "
        + textureSize );
  if ( textureSize > maxTextureSize ) {
    LOG.debug( "Side len: " + getMaxSideLen( fragment ) + ", resolution: " + resolution + ", texture size: "
          + textureSize );
  } else {
    LOG.debug( "No refinement needed, Side len: " + getMaxSideLen( fragment ) + ", resolution: " + resolution
          + ", texture size: " + textureSize );
  }
  return textureSize <= maxTextureSize;
}
origin: deegree/deegree3

ViewParams params = glRenderContext.getViewParams();
GL context = glRenderContext.getContext();
params.getViewFrustum().getEyePos();
Set<WorldRenderableObject> buildings = getObjects( params );
if ( !buildings.isEmpty() ) {
origin: deegree/deegree3

Point3d eyePosPoint = vf.getEyePos();
float[] eyePos = new float[] { (float) eyePosPoint.x, (float) eyePosPoint.y, (float) eyePosPoint.z };
origin: deegree/deegree3

/**
 * Set the new projection plane dimensions
 * 
 * @param width
 * @param height
 */
public void setProjectionPlaneDimensions( int width, int height ) {
  projectionWidth = width;
  projectionHeight = height;
  double aspect = (double) width / height;
  vf.setPerspectiveParams( vf.getFOVY(), aspect, vf.getZNear(), vf.getZFar() );
  vf.setCameraParams( vf.getEyePos(), vf.getLookingAt(), vf.getUp() );
}
origin: deegree/deegree3

Point3d eyePos = viewParams.getViewFrustum().getEyePos();
Point3d lookingAt = viewParams.getViewFrustum().getLookingAt();
Vector3d viewerUp = viewParams.getViewFrustum().getUp();
origin: deegree/deegree3

ViewParams viewParams = glRenderContext.getViewParams();
Point3d e = viewParams.getViewFrustum().getEyePos();
float[] eye = new float[] { (float) e.x, (float) e.y, (float) e.z };
double distance = Vectors3f.distance( eye, position );
origin: deegree/deegree3

GL context = glRenderContext.getContext();
long begin = System.currentTimeMillis();
Point3d eye = params.getViewFrustum().getEyePos();
float[] eye2 = new float[] { (float) eye.x, (float) eye.y, (float) eye.z };
Set<BillBoard> boards = getObjects( params );
origin: deegree/deegree3

Point3d eyePos = params.getViewFrustum().getEyePos();
Point3d lookingAt = params.getViewFrustum().getLookingAt();
Vector3d viewerUp = params.getViewFrustum().getUp();
origin: deegree/deegree3

@Override
public void render( RenderContext glRenderContext ) {
  Point3d eye = glRenderContext.getViewParams().getViewFrustum().getEyePos();
  GL context = glRenderContext.getContext();
  context.glPushMatrix();
  context.glDepthMask( false );
  context.glEnable( GL.GL_TEXTURE_2D );
  context.glEnableClientState( GL.GL_TEXTURE_COORD_ARRAY );
  // the translation
  context.glTranslatef( location[0], location[1], location[2] );
  // the rotation
  calculateAndSetRotation( context, new float[] { (float) eye.x, (float) eye.y, (float) eye.z } );
  context.glScalef( width, 1, height );
  TexturePool.loadTexture( glRenderContext, textureID );
  // context.glMaterialfv( GL.GL_FRONT_AND_BACK, GL.GL_AMBIENT_AND_DIFFUSE, new float[] { 1, 1, 1, .1f }, 0 );
  context.glVertexPointer( 3, GL.GL_FLOAT, 0, coordBuffer );
  context.glTexCoordPointer( 2, GL.GL_FLOAT, 0, textureBuffer );
  // context.glDisableClientState( GL.GL_NORMAL_ARRAY );
  context.glDrawArrays( GL.GL_QUADS, 0, 4 );
  context.glDisableClientState( GL.GL_TEXTURE_COORD_ARRAY );
  context.glDisable( GL.GL_TEXTURE_2D );
  context.glDepthMask( true );
  context.glMatrixMode( GL.GL_MODELVIEW );
  context.glPopMatrix();
}
origin: deegree/deegree3

Point3d eyePos = frustum.getEyePos();
Point2f eyePos2D = new Point2f( (float) eyePos.x / maxX, (float) eyePos.y / maxY );
origin: deegree/deegree3

Point3d eyePos = frustum.getEyePos();
Point2f eyePos2D = new Point2f( (float) eyePos.x / 32768.0f, (float) eyePos.y / 32768.0f );
org.deegree.rendering.r3dViewFrustumgetEyePos

Popular methods of ViewFrustum

  • getFOVY
  • getLookingAt
  • getUp
  • getZFar
  • getZNear
  • <init>
    Create a viewFrustum from the given parameters.
  • calcObserPosition
    Calculate the position of the viewer regarding the yaw and the pitch.
  • calcUp
    The up vector only depends on the roll
  • intersects
  • intersectsFrustum
  • moveForward
    Move the viewfrustum to the forward (according to the view direction).
  • moveRight
    Move the viewfrustum to the right (according to the view direction).
  • moveForward,
  • moveRight,
  • moveUp,
  • rotate,
  • rotateX,
  • rotateY,
  • rotateZ,
  • setCameraParams,
  • setPerspectiveParams

Popular in Java

  • Updating database using SQL prepared statement
  • findViewById (Activity)
  • onRequestPermissionsResult (Fragment)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • Menu (java.awt)
  • BigInteger (java.math)
    Immutable arbitrary-precision integers. All operations behave as if BigIntegers were represented in
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Stack (java.util)
    The Stack class represents a last-in-first-out (LIFO) stack of objects. It extends class Vector with
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now