Examples of BoundingSphere


Examples of com.ardor3d.bounding.BoundingSphere

        if (sceneBounds instanceof BoundingBox) {
            final BoundingBox bbox = (BoundingBox) sceneBounds;
            bbox.getExtent(_extents);
        } else if (sceneBounds instanceof BoundingSphere) {
            final BoundingSphere bsphere = (BoundingSphere) sceneBounds;
            _extents.set(bsphere.getRadius(), bsphere.getRadius(), bsphere.getRadius());
        }

        _corners[0].addLocal(_extents.getX(), _extents.getY(), _extents.getZ());
        _corners[1].addLocal(_extents.getX(), -_extents.getY(), _extents.getZ());
        _corners[2].addLocal(_extents.getX(), _extents.getY(), -_extents.getZ());
View Full Code Here

Examples of com.jme.bounding.BoundingSphere

        Node[] subNode = new Node[5];
        TriMesh[] triMesh = new TriMesh[5];
        subNode[0] = new Node("spheres");
        subNode[0].setRenderState(Tool.createXRayShader());
        triMesh[0] = new Sphere("sphere", new Vector3f(0, 0, 0), 10, 10, 5);
        triMesh[0].setModelBound(new BoundingSphere());
        subNode[1] = new Node("boxes");
        triMesh[1] = new Box("box", new Vector3f(0, 0, 0), 5, 5, 5);
        triMesh[1].setModelBound(new BoundingBox());
        subNode[2] = new Node("toruses");
        triMesh[2] = new Torus("torus", 10, 10, 2, 3);
View Full Code Here

Examples of com.jme.bounding.BoundingSphere

        matState = (MaterialState) ClientContextJME.getWorldManager().getRenderManager().createRendererState(RenderState.RS_MATERIAL);
        matState.setDiffuse(color);
        ret.setRenderState(matState);

        ret.setModelBound(new BoundingSphere());
        ret.updateModelBound();

        return ret;
    }
View Full Code Here

Examples of com.jme.bounding.BoundingSphere

*/
@DependsOnCellComponentMO(SharedStateComponentMO.class)
public class DefaultEnvironmentCellMO extends EnvironmentCellMO {
    public DefaultEnvironmentCellMO() {
        setLocalTransform(new CellTransform());
        setLocalBounds(new BoundingSphere());
        setName("environment");
    }
View Full Code Here

Examples of com.jme.bounding.BoundingSphere

        }

        public BoundingVolume createBounds() {
            switch(boundsType) {
                case SPHERE :
                    return new BoundingSphere(dimension_x, new Vector3f(center_x, center_y, center_z));
                case BOX :
                    return new BoundingBox(new Vector3f(center_x, center_y, center_z), dimension_x, dimension_y, dimension_z);
                default :
                    throw new RuntimeException("Unsupported bounds type "+boundsType);
            }
View Full Code Here

Examples of com.jme.bounding.BoundingSphere

            return;

        if (live) {
            if (localBounds==null) {
                logger.severe("CELL HAS NULL BOUNDS, defaulting to unit sphere");
                localBounds = new BoundingSphere(1f, new Vector3f());
            }

            createChannelComponent();
            resolveAutoComponentAnnotationsForCell();
View Full Code Here

Examples of com.jme.bounding.BoundingSphere

    public static BoundingVolume getCellBounds(PositionComponentServerState setup) {
        BoundsType type = setup.getBounds().type;
        float x = (float)setup.getBounds().x;
       
        if (type.equals(BoundsType.SPHERE) == true) {
            return new BoundingSphere(x, new Vector3f());
        }
        else if (type.equals(BoundsType.BOX) == true) {
            return new BoundingBox(new Vector3f(), x, (float)setup.getBounds().y, (float)setup.getBounds().z);
        }
       
View Full Code Here

Examples of com.jme.bounding.BoundingSphere

    private boolean isLarge(BoundingVolume bounds) {
        if (bounds instanceof BoundingBox) {
            BoundingBox box = (BoundingBox) bounds;
            return (box.xExtent > 20 || box.zExtent > 20);
        } else if (bounds instanceof BoundingSphere) {
            BoundingSphere sphere = (BoundingSphere) bounds;
            return (sphere.radius > 20);
        } else {
            // unknown bounds type
            return true;
        }
View Full Code Here

Examples of com.jme.bounding.BoundingSphere

    private ManagedReference<AvatarCellCacheMO> avatarCellCacheRef;
    private ManagedReference<UserMO> userRef;
    private WonderlandClientID clientID;

    public AvatarCellMO(UserMO user, WonderlandClientID clientID) {
        super(new BoundingSphere(AvatarBoundsHelper.AVATAR_CELL_SIZE, new Vector3f()),
              new CellTransform(null, new Vector3f())  );

        this.userRef = AppContext.getDataManager().createReference(user);
        this.clientID = clientID;
View Full Code Here

Examples of com.jme.bounding.BoundingSphere

        matState3.setDiffuse(color);
        n.setRenderState(matState3);
        n.attachChild(t);

        // Set the bound on the tube and update it
        t.setModelBound(new BoundingSphere());
        t.updateModelBound();
        return n;
    }
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.