Examples of Sphere


Examples of jray.common.Sphere

    Vect3 dist=new Vect3();
   
    System.out.print("Building octree... ");
   
    for(Object3D o : objects){
      Sphere s = o.getBoundingSphere();
      if(s!=null){
        Vect.subtract(center, s.getPosition(), dist);
        qdist = s.getRadius();
        if(Double.isInfinite(qdist)||Double.isNaN(qdist))
          throw new RuntimeException("Invalid BoundingSphere: "+s+" from "+o);
        qdist = qdist*qdist + dist.quadLength();
        if(maxQuadDist < qdist)
          maxQuadDist = qdist;
View Full Code Here

Examples of libnoiseforjava.model.Sphere

      // Resize the destination noise map so that it can store the new output
      // values from the source model.
      destNoiseMap.setSize (destWidth, destHeight);

      // Create the plane model.
      Sphere sphereModel = new Sphere();
      sphereModel.setModule (sourceModule);

      double lonExtent = eastLonBound  - westLonBound ;
      double latExtent = northLatBound - southLatBound;
      double xDelta = lonExtent / (double)destWidth ;
      double yDelta = latExtent / (double)destHeight;
      double curLon = westLonBound ;
      double curLat = southLatBound;

      // Fill every point in the noise map with the output values from the model.
      for (int y = 0; y < destHeight; y++)
      {
         curLon = westLonBound;
         for (int x = 0; x < destWidth; x++)
         {
            float curValue = (float)sphereModel.getValue (curLat, curLon);
            destNoiseMap.setValue(x, y, curValue);
            curLon += xDelta;
         }
         curLat += yDelta;
         setCallback(y);
View Full Code Here

Examples of org.lwjgl.util.glu.Sphere

    glLightModel(GL_LIGHT_MODEL_AMBIENT, vectorBuffer);

    glEnable(GL_LIGHT0);
    glEnable(GL_LIGHTING);

    sphere = new Sphere();

    if ( "PB".equalsIgnoreCase(args[0]) ) {
      backgroundLoader = new BackgroundLoader() {
        Drawable getDrawable() throws LWJGLException {
          return new Pbuffer(2, 2, new PixelFormat(8, 24, 0), Display.getDrawable());
View Full Code Here

Examples of org.lwjgl.util.glu.Sphere

    vectorBuffer.put(0.2f).put(0.2f).put(0.2f).put(1.0f);
    vectorBuffer.clear();
    glLightModel(GL_LIGHT_MODEL_AMBIENT, vectorBuffer);

    sphere = new Sphere();
  }
View Full Code Here

Examples of org.lwjgl.util.glu.Sphere

    vectorBuffer.put(0.2f).put(0.2f).put(0.2f).put(1.0f);
    vectorBuffer.clear();
    glLightModel(GL_LIGHT_MODEL_AMBIENT, vectorBuffer);

    sphere = new Sphere();
  }
View Full Code Here

Examples of org.lwjgl.util.glu.Sphere

  public PaddleGO(Paddle paddle, Material material, GraphicsObjectsManager goManager) {
    super(material, goManager);
    this.paddle = paddle;

    c = new Cylinder();
    sphere = new Sphere();
  }
View Full Code Here

Examples of org.lwjgl.util.glu.Sphere

  public Star(float radius, float density) {
    super(Physics.getSphereVolume(radius) * density);
    this.radius = radius;
    this.tensor = Physics.getSphereInertialTensor(mass, radius);
    sphere = new Sphere();
    sphere.setDrawStyle(GLU.GLU_FILL);
    sphere.setNormals(GLU.GLU_SMOOTH);
    sphere.setTextureFlag(true);
  }
View Full Code Here

Examples of org.lwjgl.util.glu.Sphere

  public Planet(float radius, float density) {
    super(Physics.getSphereVolume(radius) * density);
    this.radius = radius;
    this.tensor = Physics.getSphereInertialTensor(mass, radius);
    sphere = new Sphere();
    sphere.setDrawStyle(GLU.GLU_FILL);
    sphere.setNormals(GLU.GLU_SMOOTH);
    sphere.setTextureFlag(true);
  }
View Full Code Here

Examples of org.lwjgl.util.glu.Sphere

    this.rotZ = rotZ;
    this.hCenter = hCenter;
    this.vCenter = vCenter;

    cylinder = new Cylinder();
    sphere = new Sphere();
  }
View Full Code Here

Examples of org.springframework.data.mongodb.core.geo.Sphere

   */
  @Test
  public void shouldWriteEntityWithGeoSphereCorrectly() {

    ClassWithGeoSphere object = new ClassWithGeoSphere();
    Sphere sphere = new Sphere(new Point(1, 2), 3);
    Distance radius = sphere.getRadius();
    object.sphere = sphere;

    DBObject dbo = new BasicDBObject();
    converter.write(object, dbo);

    assertThat(dbo, is(notNullValue()));
    assertThat(dbo.get("sphere"), is(instanceOf(DBObject.class)));
    assertThat(
        dbo.get("sphere"),
        is((Object) new BasicDBObject("center", new BasicDBObject("x", sphere.getCenter().getX()).append("y", sphere
            .getCenter().getY())).append("radius", radius.getNormalizedValue()).append("metric",
            radius.getMetric().toString())));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.