Examples of BoundingSphere


Examples of com.jme.bounding.BoundingSphere

        // Attach the first arrow and the subnode to the main node
        n.attachChild(subNode1);
        n.attachChild(subNode2);

        // Set the bounds on the arrows and update them
        a1.setModelBound(new BoundingSphere());
        a1.updateModelBound();
        a2.setModelBound(new BoundingSphere());
        a2.updateModelBound();

        return n;
    }
View Full Code Here

Examples of com.jme.bounding.BoundingSphere

        CullState cullState = (CullState)rm.createRendererState(StateType.Cull);
        cullState.setCullFace(CullState.Face.Back);
        sphereNode.setRenderState(cullState);

        // Set the bound so this node can be pickable
        sphere.setModelBound(new BoundingSphere());
        sphere.updateModelBound();
        return sphereNode;
    }
View Full Code Here

Examples of com.jme.bounding.BoundingSphere

    public ConeOfSilenceCellMO() {
    }

    public ConeOfSilenceCellMO(Vector3f center, float size) {
  super(new BoundingSphere(size, center), new CellTransform(null, center));
    }
View Full Code Here

Examples of com.jme.bounding.BoundingSphere

    public void setServerState(CellServerState cellServerState) {
        super.setServerState(cellServerState);

  ConeOfSilenceCellServerState coneOfSilenceCellServerState = (ConeOfSilenceCellServerState) cellServerState;

  setLocalBounds(new BoundingSphere(4.5f, new Vector3f()));
    }
View Full Code Here

Examples of com.jme.bounding.BoundingSphere

    /**
     * Returns the proximity bounds for the avatar with
     * specified center
     */
    public static BoundingSphere getProximityBounds(Vector3f center) {
        return new BoundingSphere(PROXIMITY_SIZE, center);
    }
View Full Code Here

Examples of com.jme.bounding.BoundingSphere

     */
    public static BoundingVolume getFrustumBounds(CellTransform avatarT3D) {
        Vector3f p = new Vector3f(0f,0f,-MAX_VIEW_DISTANCE/2f*0.95f);
        avatarT3D.transform(p);
               
        return new BoundingSphere(MAX_VIEW_DISTANCE/2, p);
    }
View Full Code Here

Examples of com.jme.bounding.BoundingSphere

                               (int)((extent.x*2)*scale),
                               (int)((extent.z*2)*scale));
                }
                g.setColor(current);
            } else if (bounds instanceof BoundingSphere) {
                BoundingSphere sphere = (BoundingSphere)bounds;
                center = sphere.getCenter(center);
                float radius = sphere.getRadius();
               
                if (radius==Float.POSITIVE_INFINITY)
                    return;

                g.setColor(color);
View Full Code Here

Examples of com.jme.bounding.BoundingSphere

            // 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.BoundingSphere

//
//        System.err.println("ROTATED "+bounds);
//        System.err.println(rot.toAngleAxis(null));

        if (bounds instanceof BoundingSphere) {
            BoundingSphere sphere = (BoundingSphere) bounds;
            Vector3f center = new Vector3f();
            sphere.getCenter(center);
            boundsCenterXTF.setText(Double.toString(center.x));
            boundsCenterYTF.setText(Double.toString(center.y));
            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();
View Full Code Here

Examples of com.jme.bounding.BoundingSphere

      return;
  }

  if (chatType.equals(ChatType.PUBLIC)) {
      BoundingVolume[] bounds = new BoundingVolume[] {
                new BoundingSphere((float) 1, new Vector3f())
      };

      logger.info("Adding proximity listener... " + prox
    + " bounds " + bounds[0]);
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.