commonMain.de.fabmax.kool.physics.geometry.CollisionGeometry.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kool-physics Show documentation
Show all versions of kool-physics Show documentation
A multiplatform OpenGL / Vulkan graphics engine written in kotlin
package de.fabmax.kool.physics.geometry
import de.fabmax.kool.math.MutableVec3f
import de.fabmax.kool.math.spatial.BoundingBoxF
import de.fabmax.kool.scene.geometry.MeshBuilder
import de.fabmax.kool.util.Releasable
@Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING")
expect class GeometryHolder
interface CollisionGeometry : Releasable {
val holder: GeometryHolder
fun generateMesh(target: MeshBuilder)
/**
* Returns the axis-aligned bounding box of this shape in local coordinates.
*/
fun getBounds(result: BoundingBoxF): BoundingBoxF
fun estimateInertiaForMass(mass: Float, result: MutableVec3f = MutableVec3f()): MutableVec3f
}