godot.gen.godot.CylinderShape3D.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of godot-library-debug Show documentation
Show all versions of godot-library-debug Show documentation
Contains godot api as kotlin classes and jvm cpp interaction code.
// THIS FILE IS GENERATED! DO NOT EDIT IT MANUALLY!
@file:Suppress("PackageDirectoryMismatch", "unused", "FunctionName", "RedundantModalityModifier",
"UNCHECKED_CAST", "JoinDeclarationAndAssignment", "USELESS_CAST",
"RemoveRedundantQualifierName", "NOTHING_TO_INLINE", "NON_FINAL_MEMBER_IN_OBJECT",
"RedundantVisibilityModifier", "RedundantUnitReturnType", "MemberVisibilityCanBePrivate")
package godot
import godot.`annotation`.GodotBaseType
import godot.core.TypeManager
import godot.core.VariantType.DOUBLE
import godot.core.VariantType.NIL
import godot.core.memory.TransferContext
import godot.util.VoidPtr
import kotlin.Boolean
import kotlin.Double
import kotlin.Float
import kotlin.Int
import kotlin.Suppress
/**
* A 3D cylinder shape used for physics collision.
*
* Tutorials:
* [https://godotengine.org/asset-library/asset/676](https://godotengine.org/asset-library/asset/676)
*
* A 3D cylinder shape, intended for use in physics. Usually used to provide a shape for a [godot.CollisionShape3D].
*
* **Note:** There are several known bugs with cylinder collision shapes. Using [godot.CapsuleShape3D] or [godot.BoxShape3D] instead is recommended.
*
* **Performance:** [godot.CylinderShape3D] is fast to check collisions against, but it is slower than [godot.CapsuleShape3D], [godot.BoxShape3D], and [godot.SphereShape3D].
*/
@GodotBaseType
public open class CylinderShape3D : Shape3D() {
/**
* The cylinder's height.
*/
public var height: Float
get() {
TransferContext.writeArguments()
TransferContext.callMethod(rawPtr, MethodBindings.getHeightPtr, DOUBLE)
return (TransferContext.readReturnValue(DOUBLE, false) as Double).toFloat()
}
set(`value`) {
TransferContext.writeArguments(DOUBLE to value.toDouble())
TransferContext.callMethod(rawPtr, MethodBindings.setHeightPtr, NIL)
}
/**
* The cylinder's radius.
*/
public var radius: Float
get() {
TransferContext.writeArguments()
TransferContext.callMethod(rawPtr, MethodBindings.getRadiusPtr, DOUBLE)
return (TransferContext.readReturnValue(DOUBLE, false) as Double).toFloat()
}
set(`value`) {
TransferContext.writeArguments(DOUBLE to value.toDouble())
TransferContext.callMethod(rawPtr, MethodBindings.setRadiusPtr, NIL)
}
public override fun new(scriptIndex: Int): Boolean {
callConstructor(ENGINECLASS_CYLINDERSHAPE3D, scriptIndex)
return true
}
public companion object
internal object MethodBindings {
public val setRadiusPtr: VoidPtr = TypeManager.getMethodBindPtr("CylinderShape3D", "set_radius")
public val getRadiusPtr: VoidPtr = TypeManager.getMethodBindPtr("CylinderShape3D", "get_radius")
public val setHeightPtr: VoidPtr = TypeManager.getMethodBindPtr("CylinderShape3D", "set_height")
public val getHeightPtr: VoidPtr = TypeManager.getMethodBindPtr("CylinderShape3D", "get_height")
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy