Examples of BoundingBox


Examples of com.jme.bounding.BoundingBox

    public <T extends CellServerState> T getDefaultCellServerState(
            Properties props) {

        ModelCellServerState cellState = new ModelCellServerState();
        cellState.setBoundingVolumeHint(new BoundingVolumeHint(true,
                new BoundingBox(Vector3f.ZERO,
                                1.44526004f,
                                1.44525876f,
                                0.13593452f)));
       
        // add the model
View Full Code Here

Examples of com.jme.bounding.BoundingBox

        BoundingVolume hint = bounds;
        if (bounds instanceof BoundingBox) {
            // Handle if the bounding volume is a box. We only care about the
            // x and z extents, since we'll always want to place the model on
            // the floor, no matter how high it is.
            BoundingBox box = (BoundingBox) bounds;
            if (box.xExtent > 20 || box.zExtent > 20) {
                hint = new BoundingBox(Vector3f.ZERO, 1, box.yExtent, 1);
            }
        }
        else if (bounds instanceof BoundingSphere) {
            // Handle if the bounding volume is a sphere. This is a bit tricky.
            // If the radius is too large, we want to place the model close to
            // the avatar, but we also want the model to sit on the floor, not
            // in it. So in this case, we need to create a bounding box for the
            // hint instead of a sphere, so we can set the x and z extents to
            // be 1 and the y extent to be the radius of the sphere.
            BoundingSphere sphere = (BoundingSphere) bounds;
            if (sphere.radius > 20) {
                hint = new BoundingBox(Vector3f.ZERO, 1, sphere.radius, 1);
            }
        }
        return new BoundingVolumeHint(true, hint);
    }
View Full Code Here

Examples of com.jme.bounding.BoundingBox

        {
            super ("Pick Box", new Vector3f(x, y, z), xSize, ySize, zSize);

            this.jointName = jointName;

            setModelBound(new BoundingBox(new Vector3f(x, y, z),
                                          xSize, ySize, zSize));
            setCullHint(CullHint.Always);
        }
View Full Code Here

Examples of com.jme.bounding.BoundingBox

            boundsCenterZTF.setText(Double.toString(center.z));
            boundsSizeXTF.setText(Double.toString(sphere.getRadius()));
            boundsSizeYTF.setText("N/A Sphere");
            boundsSizeZTF.setText("N/A Sphere");
        } else if (bounds instanceof BoundingBox) {
            BoundingBox box = (BoundingBox) bounds;
            Vector3f center = new Vector3f();
            box.getCenter();
            boundsCenterXTF.setText(Double.toString(center.x));
            boundsCenterYTF.setText(Double.toString(center.y));
            boundsCenterZTF.setText(Double.toString(center.z));

            boundsSizeXTF.setText(Float.toString(box.xExtent));
View Full Code Here

Examples of com.jme.bounding.BoundingBox

     */
    BoundingVolume calcBounds(Spatial n) {
        BoundingVolume bounds = null;

        if (n instanceof Geometry) {
            bounds = new BoundingBox();
            bounds.computeFromPoints(((Geometry) n).getVertexBuffer());

            bounds.transform(
                    n.getLocalRotation(),
                    n.getLocalTranslation(),
View Full Code Here

Examples of com.jme.bounding.BoundingBox

         * Try rotating 45 degrees to see what that does.
         */
        //Vector3f axis = new Vector3f((float) 1, (float) 0, (float) 0);
        //cellServerState.setRotation(new Rotation(axis, (float) Math.PI / 4));

  BoundingBox box = new BoundingBox(
      new Vector3f(0, 0, 0), 0.27053905F, 0.060000006F, 0.27053908F);

  BoundingVolumeHint hint = new BoundingVolumeHint(true, box);
  cellServerState.setBoundingVolumeHint(hint);
 
View Full Code Here

Examples of com.jme3.bounding.BoundingBox

         */
        terrain = new TerrainQuad("terrain", 65, 513, heightmap.getHeightMap());//, new LodPerspectiveCalculatorFactory(getCamera(), 4)); // add this in to see it use entropy for LOD calculations
        TerrainLodControl control = new TerrainLodControl(terrain, getCamera());
        terrain.addControl(control);
        terrain.setMaterial(matTerrain);
        terrain.setModelBound(new BoundingBox());
        terrain.updateModelBound();
        terrain.setLocalTranslation(0, -100, 0);
        terrain.setLocalScale(1f, 1f, 1f);
        rootNode.attachChild(terrain);

View Full Code Here

Examples of com.voyagegames.core.BoundingBox

    super(obj, REQUIRED_OBJECTS);
   
    final MapQuestLatLongJson lr = new MapQuestLatLongJson(obj.values.get("lr").objectValue());
    final MapQuestLatLongJson ul = new MapQuestLatLongJson(obj.values.get("ul").objectValue());
   
    boundingBox = new BoundingBox(lr.value, ul.value);
  }
View Full Code Here

Examples of crazypants.render.BoundingBox

  }

  @Override
  public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {

    BoundingBox bb = BoundingBox.UNIT_CUBE;
    TranslatedCubeRenderer.instance.renderBoundingBox(x, y, z, block, bb, xform, null, world != null);

    Tessellator.instance.addTranslation(x, y, z);

    IIcon icon = EnderIO.blockAttractor.getOnIcon();
View Full Code Here

Examples of javafx.geometry.BoundingBox

  }

  @Override
  public void renderTiles(Group container, double width, double height) {
    // render map
    checkBounds = new BoundingBox(
            0 - container.getTranslateX() - World.TILE_WIDTH,
            0 - container.getTranslateY(),
            width + World.TILE_WIDTH, height + World.TILE_HEIGHT * 3);
    visibleNodesToAdd.clear();
    visibleNodesToRemove.clear();
 
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.