Class Shape

All Implemented Interfaces:
Deletable, JoltNative
Direct Known Subclasses:
CompoundShape, ConvexShape, DecoratedShape, HeightFieldShape, MeshShape

Shape relies on preview features of the Java platform:
Programs can only use Shape when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
  • Field Details

    • DEFAULT_CONVEX_RADIUS

      public static final float DEFAULT_CONVEX_RADIUS
      See Also:
  • Constructor Details

  • Method Details

    • at

      public static Shape at(MemoryAddressPREVIEW addr)
    • deleteInternal

      protected void deleteInternal()
      Specified by:
      deleteInternal in class DeletableJoltNative
    • getType

      public ShapeType getType()
    • getSubType

      public ShapeSubType getSubType()
    • getUserData

      public long getUserData()
    • setUserData

      public void setUserData(long userData)
    • mustBeStatic

      public boolean mustBeStatic()
    • getCenterOfMass

      public void getCenterOfMass(FVec3 out)
    • getLocalBounds

      public void getLocalBounds(AABox out)
    • getSubShapeIDBitsRecursive

      public int getSubShapeIDBitsRecursive()
    • getWorldSpaceBounds

      public void getWorldSpaceBounds(FMat44 comTransform, FVec3 scale, AABox out)
    • getInnerRadius

      public float getInnerRadius()
    • getMaterial

      @Nullable public PhysicsMaterial getMaterial(int subShapeId)
    • getSurfaceNormal

      public void getSurfaceNormal(int subShapeId, FVec3 localSurfacePosition, FVec3 out)
    • getSupportingFace

      public FVec3[] getSupportingFace(SegmentAllocatorPREVIEW alloc, int subShapeId, FVec3 direction, FVec3 scale, FMat44 comTransform)
    • getSubShapeUserData

      public long getSubShapeUserData(int subShapeId)
    • getSubShapeTransformedShape

      public TransformedShape getSubShapeTransformedShape(SegmentAllocatorPREVIEW alloc, int subShapeId, FVec3 positionCOM, Quat rotation, FVec3 scale)
    • getVolume

      public float getVolume()
    • isValidScale

      public boolean isValidScale(FVec3 scale)