Class PlaneCollisionShape

All Implemented Interfaces:
com.jme3.export.Savable, com.jme3.util.clone.JmeCloneable, Cloneable, Comparable<NativePhysicsObject>

public class PlaneCollisionShape extends CollisionShape
A planar collision shape based on Bullet's btStaticPlaneShape. Not for use in dynamic bodies. Collisions between HeightfieldCollisionShape, MeshCollisionShape, and PlaneCollisionShape objects are never detected. Similarly, collisions between GImpactCollisionShape objects and PlaneCollisionShape objects are never detected.
  • Field Details

    • logger2

      public static final Logger logger2
      message logger for this class
  • Constructor Details

    • PlaneCollisionShape

      protected PlaneCollisionShape()
      No-argument constructor needed by SavableClassUtil.
    • PlaneCollisionShape

      public PlaneCollisionShape(com.jme3.math.Plane plane)
      Instantiate a plane shape defined by the specified plane.
      Parameters:
      plane - the desired plane (not null, unaffected)
  • Method Details

    • getPlane

      public final com.jme3.math.Plane getPlane()
      Copy the defining plane.
      Returns:
      a new instance (not null)
    • cloneFields

      public void cloneFields(com.jme3.util.clone.Cloner cloner, Object original)
      Callback from Cloner to convert this shallow-cloned shape into a deep-cloned one, using the specified Cloner and original to resolve copied fields.
      Specified by:
      cloneFields in interface com.jme3.util.clone.JmeCloneable
      Overrides:
      cloneFields in class CollisionShape
      Parameters:
      cloner - the Cloner that's cloning this shape (not null)
      original - the instance from which this shape was shallow-cloned (not null, unaffected)
    • maxRadius

      public float maxRadius()
      Calculate how far the shape extends.
      Overrides:
      maxRadius in class CollisionShape
      Returns:
      positive infinity
    • read

      public void read(com.jme3.export.JmeImporter importer) throws IOException
      De-serialize the shape from the specified importer, for example when loading from a J3O file.
      Specified by:
      read in interface com.jme3.export.Savable
      Overrides:
      read in class CollisionShape
      Parameters:
      importer - (not null)
      Throws:
      IOException - from the importer
    • write

      public void write(com.jme3.export.JmeExporter exporter) throws IOException
      Serialize this shape to the specified exporter, for example when saving to a J3O file.
      Specified by:
      write in interface com.jme3.export.Savable
      Overrides:
      write in class CollisionShape
      Parameters:
      exporter - (not null)
      Throws:
      IOException - from the exporter