Class CompoundCollisionShape

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

public class CompoundCollisionShape extends CollisionShape
A CompoundCollisionShape allows combining multiple base shapes to generate a more sophisticated shape.
  • Field Details

  • Constructor Details

    • CompoundCollisionShape

      public CompoundCollisionShape()
  • Method Details

    • addChildShape

      public void addChildShape(CollisionShape shape, Vector3f location)
      adds a child shape at the given local translation
      Parameters:
      shape - the child shape to add
      location - the local location of the child shape
    • addChildShape

      public void addChildShape(CollisionShape shape, Vector3f location, Matrix3f rotation)
      adds a child shape at the given local translation
      Parameters:
      shape - the child shape to add
      location - the local location of the child shape
      rotation - the local orientation of the child shape (not null, unaffected)
    • removeChildShape

      public void removeChildShape(CollisionShape shape)
      removes a child shape
      Parameters:
      shape - the child shape to remove
    • getChildren

      public List<ChildCollisionShape> getChildren()
    • setScale

      public void setScale(Vector3f scale)
      WARNING - CompoundCollisionShape scaling has no effect.
      Overrides:
      setScale in class CollisionShape
    • write

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

      public void read(JmeImporter im) throws IOException
      Specified by:
      read in interface Savable
      Overrides:
      read in class CollisionShape
      Throws:
      IOException