godot.gen.godot.CircleShape2D.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.
The newest version!
// 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.VariantParser.DOUBLE
import godot.core.VariantParser.NIL
import godot.core.memory.TransferContext
import godot.util.VoidPtr
import kotlin.Double
import kotlin.Float
import kotlin.Int
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* A 2D circle shape, intended for use in physics. Usually used to provide a shape for a
* [CollisionShape2D].
* **Performance:** [CircleShape2D] is fast to check collisions against. It is faster than
* [RectangleShape2D] and [CapsuleShape2D].
*/
@GodotBaseType
public open class CircleShape2D : Shape2D() {
/**
* The circle's radius.
*/
public final inline var radius: Float
@JvmName("radiusProperty")
get() = getRadius()
@JvmName("radiusProperty")
set(`value`) {
setRadius(value)
}
public override fun new(scriptIndex: Int): Unit {
callConstructor(ENGINECLASS_CIRCLESHAPE2D, scriptIndex)
}
public final fun setRadius(radius: Float): Unit {
TransferContext.writeArguments(DOUBLE to radius.toDouble())
TransferContext.callMethod(rawPtr, MethodBindings.setRadiusPtr, NIL)
}
public final fun getRadius(): Float {
TransferContext.writeArguments()
TransferContext.callMethod(rawPtr, MethodBindings.getRadiusPtr, DOUBLE)
return (TransferContext.readReturnValue(DOUBLE) as Double).toFloat()
}
public companion object
internal object MethodBindings {
public val setRadiusPtr: VoidPtr =
TypeManager.getMethodBindPtr("CircleShape2D", "set_radius", 373806689)
public val getRadiusPtr: VoidPtr =
TypeManager.getMethodBindPtr("CircleShape2D", "get_radius", 1740695150)
}
}