MinieExamples/src/main/java/jme3utilities/minie/test/TargetDemo.java
/**
     * Register a bowling-pin shape with the specified radius.
     *
     * @param radius the desired radius (in physics-space units, &gt;0)
     */
Register a bowling-pin shape with the specified radius.

@param radius the desired radius (in physics-space units, >0)
Register a bowling - pin shape with the specified radius . @param radius the desired radius ( in physics - space units > 0 )
private void registerBowlingPinShape(float radius) {
        unregisterShape("bowlingPin");
        String bowlingPinPath = "CollisionShapes/bowlingPin.j3o";
        CollisionShape shape
                = (CollisionShape) assetManager.loadAsset(bowlingPinPath);
        shape = Heart.deepCopy(shape);
        BoundingBox bounds
                = shape.boundingBox(Vector3f.ZERO, Matrix3f.IDENTITY, null);
        float xHalfExtent = bounds.getXExtent();
        float yHalfExtent = bounds.getYExtent();
        float unscaledRadius = (xHalfExtent + yHalfExtent) / 2f;
        float scale = radius / unscaledRadius;
        shape.setScale(scale);
        registerShape("bowlingPin", shape);
    }
private void registerBowlingPinShape ( float radius ) { unregisterShape ( "bowlingPin" ) ; String bowlingPinPath = "CollisionShapes/bowlingPin.j3o" ; CollisionShape shape = ( CollisionShape ) assetManager . loadAsset ( bowlingPinPath ) ; shape = Heart . deepCopy ( shape ) ; BoundingBox bounds = shape . boundingBox ( Vector3f . ZERO , Matrix3f . IDENTITY , null ) ; float xHalfExtent = bounds . getXExtent ( ) ; float yHalfExtent = bounds . getYExtent ( ) ; float unscaledRadius = ( xHalfExtent + yHalfExtent ) / 2f ; float scale = radius / unscaledRadius ; shape . setScale ( scale ) ; registerShape ( "bowlingPin" , shape ) ; }
Register a bowling-pin shape with the specified radius.
Register a bowling - pin shape with the specified radius .