Class ConeCollisionShape

java.lang.Object
com.jme3.bullet.collision.shapes.CollisionShape
com.jme3.bullet.collision.shapes.ConeCollisionShape
All Implemented Interfaces:
com.jme3.export.Savable

public class ConeCollisionShape extends CollisionShape
Cone collision shape represents a 3D cone with a radius, height, and axis (X, Y or Z).
Author:
normenhansen
  • Field Details

    • radius

      protected float radius
    • height

      protected float height
    • axis

      protected int axis
  • Constructor Details

    • ConeCollisionShape

      protected ConeCollisionShape()
      Serialization only, do not use.
    • ConeCollisionShape

      public ConeCollisionShape(float radius, float height, int axis)
      Creates a new cone collision shape with the given height, radius, and axis.
      Parameters:
      radius - The radius of the cone in world units.
      height - The height of the cone in world units.
      axis - The axis towards which the cone faces, see the PhysicsSpace.AXIS_* constants.
    • ConeCollisionShape

      public ConeCollisionShape(float radius, float height)
      Creates a new cone collision shape with the given height, radius and default Y axis.
      Parameters:
      radius - The radius of the cone in world units.
      height - The height of the cone in world units.
  • Method Details

    • getRadius

      public float getRadius()
    • getHeight

      public float getHeight()
    • getAxis

      public int getAxis()
    • write

      public void write(com.jme3.export.JmeExporter ex) throws IOException
      Specified by:
      write in interface com.jme3.export.Savable
      Overrides:
      write in class CollisionShape
      Throws:
      IOException
    • read

      public void read(com.jme3.export.JmeImporter im) throws IOException
      Specified by:
      read in interface com.jme3.export.Savable
      Overrides:
      read in class CollisionShape
      Throws:
      IOException
    • createShape

      protected void createShape()