Codota Logo
org.deegree.rendering.r3d
Code IndexAdd Codota to your IDE (free)

How to use org.deegree.rendering.r3d

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
origin: deegree/deegree3

/**
 * @param box
 * @return true if the box intersect with this viewfrustum.
 */
public boolean intersects( float[][] box ) {
  int classification = intersectsFrustum( box );
  if ( classification == OUTSIDE ) {
    return false;
  }
  return true;
}
origin: deegree/deegree3

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

/**
 * Rotate the viewfrustum around the z-axis (according to the view direction). yaw
 * 
 * @param delta
 */
public void rotateZ( double delta ) {
  rotate( right, backward, delta );
  rotate( up, backward, delta );
  setCameraParams( eye, lookingAt, up );
}
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

/**
 * @param gl
 */
private void reshape( GL gl ) {
  float aspect = (float) width / (float) height;
  LOG.trace( "reshape( GLAutoDrawable, " + 0 + ", " + 0 + ", " + width + ", " + height + " ) called, aspect: "
        + aspect );
  gl.glMatrixMode( GL.GL_PROJECTION );
  gl.glLoadIdentity();
  gl.glViewport( 0, 0, width, height );
  glu.gluPerspective( viewParams.getViewFrustum().getFOVY(), aspect, viewParams.getViewFrustum().getZNear(),
            viewParams.getViewFrustum().getZFar() );
  gl.glMatrixMode( GL.GL_MODELVIEW );
}
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

/**
 * Create a view Frustum by using the given roll, pitch, yaw and distance to the point of interest (looking at), to
 * calculate the eye and the up vector.
 * 
 * @param pitch
 * @param yaw
 * @param roll
 * @param distance
 * @param lookingAt
 * @param fovy
 *            the field-of-view in y direction
 * @param aspect
 * @param zNear
 * @param zFar
 */
public ViewFrustum( double pitch, double yaw, double roll, double distance, Point3d lookingAt, double fovy,
          double aspect, double zNear, double zFar ) {
  Point3d calculatedEye = calcObserPosition( lookingAt, pitch, yaw, distance );
  Vector3d calculatedUp = calcUp( roll, calculatedEye, lookingAt );
  setPerspectiveParams( fovy, aspect, zNear, zFar );
  setCameraParams( calculatedEye, lookingAt, calculatedUp );
}
origin: deegree/deegree3

private int intersectsFrustum( float[][] box ) {
  int result = INSIDE;
  // for each plane do ...
  for ( int i = 0; i < 6; i++ ) {
    // is the positive vertex outside?
    Point3d pVertex = pl[i].getPositiveVertex( box );
    Point3d nVertex = pl[i].getNegativeVertex( box );
    if ( pl[i].distance( pVertex ) < 0 ) {
      return OUTSIDE;
    } else if ( pl[i].distance( nVertex ) < 0 ) {
      result = INTERSECT;
    }
  }
  return result;
}
origin: deegree/deegree3

public FlightControls( GLCanvas master, ViewParams viewParams ) {
  this.master = master;
  this.vf = viewParams.getViewFrustum();
}
origin: deegree/deegree3

/**
 * Returns a guaranteed upper bound for the size that a world-space unit (e.g. a line with length 1) has in pixels
 * after perspective projection, i.e. in pixels on the screen.
 * 
 * @param dist
 *            distance of the object (from the point-of-view)
 * @return maximum number of pixels that an object of size 1 will cover
 */
public double estimatePixelSizeForSpaceUnit( double dist ) {
  double h = 2.0 * dist * (float) Math.tan( Math.toRadians( vf.getFOVY() * 0.5f ) );
  return projectionHeight / h;
}
origin: deegree/deegree3

private boolean isInViewVolume( Arc arc ) {
  float[][] scaledBBox = arc.getBBox();
  scaledBBox[0][2] *= zScale;
  scaledBBox[1][2] *= zScale;
  return viewRegion.intersects( scaledBBox );
}
origin: deegree/deegree3

/**
 * 
 * @param eye
 * @param lookingAt
 * @param viewerUp
 * @param fovy
 * @param zNear
 * @param zFar
 */
public ViewParams( Point3d eye, Point3d lookingAt, Vector3d viewerUp, double fovy, double zNear, double zFar ) {
  this.vf = new ViewFrustum( eye, lookingAt, viewerUp, fovy, 1.0, zNear, zFar );
}
origin: deegree/deegree3

/**
 * Create a viewFrustum from the given parameters.
 * 
 * @param eye
 * @param lookingAt
 * @param up
 * @param fovy
 *            the field-of-view in y direction
 * @param aspect
 * @param zNear
 * @param zFar
 */
public ViewFrustum( Point3d eye, Point3d lookingAt, Vector3d up, double fovy, double aspect, double zNear,
          double zFar ) {
  setPerspectiveParams( fovy, aspect, zNear, zFar );
  setCameraParams( eye, lookingAt, up );
}
origin: deegree/deegree3

private int intersectsFrustum( double[][] box ) {
  int result = INSIDE;
  // for each plane do ...
  for ( int i = 0; i < 6; i++ ) {
    // is the positive vertex outside?
    Point3d pVertex = pl[i].getPositiveVertex( box );
    Point3d nVertex = pl[i].getNegativeVertex( box );
    if ( pl[i].distance( pVertex ) < 0 ) {
      return OUTSIDE;
    } else if ( pl[i].distance( nVertex ) < 0 ) {
      result = INTERSECT;
    }
  }
  return result;
}
origin: deegree/deegree3

/**
 * Rotate the viewfrustum around the y-axis (according to the view direction). roll
 * 
 * @param delta
 */
public void rotateY( double delta ) {
  rotate( right, up, delta );
  rotate( backward, up, delta );
  lookingAt = new Point3d( eye );
  lookingAt.sub( backward );
  setCameraParams( eye, lookingAt, up );
}
origin: deegree/deegree3

/**
 * Determines if this arc interferes with the given {@link Geometry}.
 * 
 * @param roi
 *            geometry that is tested for interference
 * @param zScale
 *            scaling factor applied to z values of the mesh geometry (and bounding boxes)
 * @return true, if the arc interferes with the geometry, false otherwise
 */
public boolean interferes( ViewFrustum roi, float zScale ) {
  float[][] nodeBBox = getBBox();
  nodeBBox[0][2] *= zScale;
  nodeBBox[1][2] *= zScale;
  return roi.intersects( nodeBBox );
}
origin: deegree/deegree3

/**
 * @param box
 * @return true if the box intersect with this viewfrustum.
 */
public boolean intersects( double[][] box ) {
  int classification = intersectsFrustum( box );
  if ( classification == OUTSIDE ) {
    return false;
  }
  return true;
}
origin: deegree/deegree3

private int intersectsFrustum( float[] box ) {
  int result = INSIDE;
  // for each plane do ...
  float[] t = new float[3];
  for ( int i = 0; i < 6; i++ ) {
    // is the positive vertex outside?
    pl[i].getPositiveVertex( box, t );
    if ( pl[i].distance( t ) < 0 ) {
      return OUTSIDE;
    }
    // is the negative vertex outside?
    pl[i].getNegativeVertex( box, t );
    if ( pl[i].distance( t ) < 0 ) {
      result = INTERSECT;
    }
  }
  return result;
}
origin: deegree/deegree3

/**
 * Rotate the viewfrustum around the x-axis (according to the view direction). pitch
 * 
 * @param delta
 */
public void rotateX( double delta ) {
  rotate( up, right, delta );
  rotate( backward, right, delta );
  lookingAt = new Point3d( eye );
  lookingAt.sub( backward );
  setCameraParams( eye, lookingAt, up );
}
origin: deegree/deegree3

/**
 * @param box
 * @return true if the box intersect with this viewfrustum.
 */
public boolean intersects( float[] box ) {
  int classification = intersectsFrustum( box );
  if ( classification == OUTSIDE ) {
    return false;
  }
  return true;
}
org.deegree.rendering.r3d

Most used classes

  • ViewFrustum
    Models a frustum volume, commonly used for view frustums (space volume visible to a viewer of a 3D s
  • ViewParams
    Encapsulates the relevant viewing and projection parameters that are needed for performing view frus
  • SimpleGeometryStyle
    The SimpleGeometryStyle class TODO add class documentation here.
  • MultiresolutionMesh
    Implementation of a fragment based multiresolution model for massive triangle meshes (e.g. large ter
  • JOGLUtils
    JOGL-related utility methods.
  • RenderFragmentManager,
  • TerrainRenderingManager,
  • BillBoard,
  • RenderableGeometry,
  • RenderableQualityModel,
  • RenderableTexturedGeometry,
  • WorldRenderableObject,
  • RenderableManager,
  • PrototypeReference,
  • RenderablePrototype,
  • TexturePool,
  • RenderableFileStoreConfig,
  • RenderableSQLStoreConfig,
  • GeometryQualityModel
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