Documentation
¶
Overview ¶
This class extends PhysicsServer3D by providing additional virtual methods that can be overridden. When these methods are overridden, they will be called instead of the internal methods of the physics server.
Intended for use with GDExtension to create custom implementations of PhysicsServer3D.
Index ¶
- type Advanced
- type Any
- type Extension
- type ID
- type Implementation
- type Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsPhysicsServer3DExtension() Instance
- func (self Instance) BodyTestMotionIsExcludingBody(body RID.Body3D) bool
- func (self Instance) BodyTestMotionIsExcludingObject(obj int) bool
- func (self Instance) ID() ID
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) Virtual(name string) reflect.Value
- type Interface
- type MotionResult
- type RayResult
- type ShapeRestInfo
- type ShapeResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type Extension ¶
Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this [Extension]See Interface for methods that can be overridden by T.
func (*Extension[T]) AsPhysicsServer3DExtension ¶
type ID ¶
ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.
type Implementation ¶
type Implementation = implementation
Implementation implements Interface with empty methods.
type Instance ¶
type Instance [1]gdclass.PhysicsServer3DExtension
Instance of the class with convieniently typed arguments and results.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsPhysicsServer3DExtension ¶
func (Instance) BodyTestMotionIsExcludingBody ¶
func (Instance) BodyTestMotionIsExcludingObject ¶
type Interface ¶
type Interface interface { WorldBoundaryShapeCreate() RID.Shape3D SeparationRayShapeCreate() RID.Shape3D SphereShapeCreate() RID.Shape3D BoxShapeCreate() RID.Shape3D CapsuleShapeCreate() RID.Shape3D CylinderShapeCreate() RID.Shape3D ConvexPolygonShapeCreate() RID.Shape3D ConcavePolygonShapeCreate() RID.Shape3D HeightmapShapeCreate() RID.Shape3D CustomShapeCreate() RID.Shape3D ShapeSetData(shape RID.Shape3D, data any) ShapeSetCustomSolverBias(shape RID.Shape3D, bias Float.X) ShapeSetMargin(shape RID.Shape3D, margin Float.X) ShapeGetMargin(shape RID.Shape3D) Float.X ShapeGetType(shape RID.Shape3D) PhysicsServer3D.ShapeType ShapeGetData(shape RID.Shape3D) any ShapeGetCustomSolverBias(shape RID.Shape3D) Float.X SpaceCreate() RID.Space3D SpaceSetActive(space RID.Space3D, active bool) SpaceIsActive(space RID.Space3D) bool SpaceSetParam(space RID.Space3D, param PhysicsServer3D.SpaceParameter, value Float.X) SpaceGetParam(space RID.Space3D, param PhysicsServer3D.SpaceParameter) Float.X SpaceGetDirectState(space RID.Space3D) PhysicsDirectSpaceState3D.Instance SpaceSetDebugContacts(space RID.Space3D, max_contacts int) SpaceGetContacts(space RID.Space3D) []Vector3.XYZ SpaceGetContactCount(space RID.Space3D) int AreaCreate() RID.Area3D AreaSetSpace(area RID.Area3D, space RID.Space3D) AreaGetSpace(area RID.Area3D) RID.Space3D AreaAddShape(area RID.Area3D, shape RID.Shape3D, transform Transform3D.BasisOrigin, disabled bool) AreaSetShape(area RID.Area3D, shape_idx int, shape RID.Shape3D) AreaSetShapeTransform(area RID.Area3D, shape_idx int, transform Transform3D.BasisOrigin) AreaSetShapeDisabled(area RID.Area3D, shape_idx int, disabled bool) AreaGetShapeCount(area RID.Area3D) int AreaGetShape(area RID.Area3D, shape_idx int) RID.Shape3D AreaGetShapeTransform(area RID.Area3D, shape_idx int) Transform3D.BasisOrigin AreaRemoveShape(area RID.Area3D, shape_idx int) AreaClearShapes(area RID.Area3D) AreaAttachObjectInstanceId(area RID.Area3D, id int) AreaGetObjectInstanceId(area RID.Area3D) int AreaSetParam(area RID.Area3D, param PhysicsServer3D.AreaParameter, value any) AreaSetTransform(area RID.Area3D, transform Transform3D.BasisOrigin) AreaGetParam(area RID.Area3D, param PhysicsServer3D.AreaParameter) any AreaGetTransform(area RID.Area3D) Transform3D.BasisOrigin AreaSetCollisionLayer(area RID.Area3D, layer int) AreaGetCollisionLayer(area RID.Area3D) int AreaSetCollisionMask(area RID.Area3D, mask int) AreaGetCollisionMask(area RID.Area3D) int AreaSetMonitorable(area RID.Area3D, monitorable bool) AreaSetRayPickable(area RID.Area3D, enable bool) AreaSetMonitorCallback(area RID.Area3D, callback func(status int, body_rid RID.Any, instance_id Object.ID, body_shape_idx int, self_shape_idx int)) AreaSetAreaMonitorCallback(area RID.Area3D, callback func(status int, body_rid RID.Any, instance_id Object.ID, body_shape_idx int, self_shape_idx int)) BodyCreate() RID.Body3D BodySetSpace(body RID.Body3D, space RID.Space3D) BodyGetSpace(body RID.Body3D) RID.Space3D BodySetMode(body RID.Body3D, mode PhysicsServer3D.BodyMode) BodyGetMode(body RID.Body3D) PhysicsServer3D.BodyMode BodyAddShape(body RID.Body3D, shape RID.Shape3D, transform Transform3D.BasisOrigin, disabled bool) BodySetShape(body RID.Body3D, shape_idx int, shape RID.Shape3D) BodySetShapeTransform(body RID.Body3D, shape_idx int, transform Transform3D.BasisOrigin) BodySetShapeDisabled(body RID.Body3D, shape_idx int, disabled bool) BodyGetShapeCount(body RID.Body3D) int BodyGetShape(body RID.Body3D, shape_idx int) RID.Shape3D BodyGetShapeTransform(body RID.Body3D, shape_idx int) Transform3D.BasisOrigin BodyRemoveShape(body RID.Body3D, shape_idx int) BodyClearShapes(body RID.Body3D) BodyAttachObjectInstanceId(body RID.Body3D, id int) BodyGetObjectInstanceId(body RID.Body3D) int BodySetEnableContinuousCollisionDetection(body RID.Body3D, enable bool) BodyIsContinuousCollisionDetectionEnabled(body RID.Body3D) bool BodySetCollisionLayer(body RID.Body3D, layer int) BodyGetCollisionLayer(body RID.Body3D) int BodySetCollisionMask(body RID.Body3D, mask int) BodyGetCollisionMask(body RID.Body3D) int BodySetCollisionPriority(body RID.Body3D, priority Float.X) BodyGetCollisionPriority(body RID.Body3D) Float.X BodySetUserFlags(body RID.Body3D, flags int) BodyGetUserFlags(body RID.Body3D) int BodySetParam(body RID.Body3D, param PhysicsServer3D.BodyParameter, value any) BodyGetParam(body RID.Body3D, param PhysicsServer3D.BodyParameter) any BodyResetMassProperties(body RID.Body3D) BodySetState(body RID.Body3D, state PhysicsServer3D.BodyState, value any) BodyGetState(body RID.Body3D, state PhysicsServer3D.BodyState) any BodyApplyCentralImpulse(body RID.Body3D, impulse Vector3.XYZ) BodyApplyImpulse(body RID.Body3D, impulse Vector3.XYZ, position Vector3.XYZ) BodyApplyTorqueImpulse(body RID.Body3D, impulse Vector3.XYZ) BodyApplyCentralForce(body RID.Body3D, force Vector3.XYZ) BodyApplyForce(body RID.Body3D, force Vector3.XYZ, position Vector3.XYZ) BodyApplyTorque(body RID.Body3D, torque Vector3.XYZ) BodyAddConstantCentralForce(body RID.Body3D, force Vector3.XYZ) BodyAddConstantForce(body RID.Body3D, force Vector3.XYZ, position Vector3.XYZ) BodyAddConstantTorque(body RID.Body3D, torque Vector3.XYZ) BodySetConstantForce(body RID.Body3D, force Vector3.XYZ) BodyGetConstantForce(body RID.Body3D) Vector3.XYZ BodySetConstantTorque(body RID.Body3D, torque Vector3.XYZ) BodyGetConstantTorque(body RID.Body3D) Vector3.XYZ BodySetAxisVelocity(body RID.Body3D, axis_velocity Vector3.XYZ) BodySetAxisLock(body RID.Body3D, axis PhysicsServer3D.BodyAxis, lock bool) BodyIsAxisLocked(body RID.Body3D, axis PhysicsServer3D.BodyAxis) bool BodyAddCollisionException(body RID.Body3D, excepted_body RID.Body3D) BodyRemoveCollisionException(body RID.Body3D, excepted_body RID.Body3D) BodyGetCollisionExceptions(body RID.Body3D) []RID.Body3D BodySetMaxContactsReported(body RID.Body3D, amount int) BodyGetMaxContactsReported(body RID.Body3D) int BodySetContactsReportedDepthThreshold(body RID.Body3D, threshold Float.X) BodyGetContactsReportedDepthThreshold(body RID.Body3D) Float.X BodySetOmitForceIntegration(body RID.Body3D, enable bool) BodyIsOmittingForceIntegration(body RID.Body3D) bool BodySetStateSyncCallback(body RID.Body3D, callable func(state PhysicsDirectBodyState3D.Instance)) BodySetForceIntegrationCallback(body RID.Body3D, callable func(state PhysicsDirectBodyState3D.Instance, userdata any), userdata any) BodySetRayPickable(body RID.Body3D, enable bool) BodyTestMotion(body RID.Body3D, from Transform3D.BasisOrigin, motion Vector3.XYZ, margin Float.X, max_collisions int, collide_separation_ray bool, recovery_as_collision bool, result *MotionResult) bool BodyGetDirectState(body RID.Body3D) PhysicsDirectBodyState3D.Instance SoftBodyCreate() RID.SoftBody3D SoftBodyUpdateRenderingServer(body RID.SoftBody3D, rendering_server_handler PhysicsServer3DRenderingServerHandler.Instance) SoftBodySetSpace(body RID.SoftBody3D, space RID.Space3D) SoftBodyGetSpace(body RID.SoftBody3D) RID.Space3D SoftBodySetRayPickable(body RID.SoftBody3D, enable bool) SoftBodySetCollisionLayer(body RID.SoftBody3D, layer int) SoftBodyGetCollisionLayer(body RID.SoftBody3D) int SoftBodySetCollisionMask(body RID.SoftBody3D, mask int) SoftBodyGetCollisionMask(body RID.SoftBody3D) int SoftBodyAddCollisionException(body RID.SoftBody3D, body_b RID.Body3D) SoftBodyRemoveCollisionException(body RID.SoftBody3D, body_b RID.Body3D) SoftBodyGetCollisionExceptions(body RID.SoftBody3D) []RID.Body3D SoftBodySetState(body RID.SoftBody3D, state PhysicsServer3D.BodyState, v any) SoftBodyGetState(body RID.SoftBody3D, state PhysicsServer3D.BodyState) any SoftBodySetTransform(body RID.SoftBody3D, transform Transform3D.BasisOrigin) SoftBodySetSimulationPrecision(body RID.SoftBody3D, simulation_precision int) SoftBodyGetSimulationPrecision(body RID.SoftBody3D) int SoftBodySetTotalMass(body RID.SoftBody3D, total_mass Float.X) SoftBodyGetTotalMass(body RID.SoftBody3D) Float.X SoftBodySetLinearStiffness(body RID.SoftBody3D, linear_stiffness Float.X) SoftBodyGetLinearStiffness(body RID.SoftBody3D) Float.X SoftBodySetShrinkingFactor(body RID.Body3D, shrinking_factor Float.X) SoftBodyGetShrinkingFactor(body RID.Body3D) Float.X SoftBodySetPressureCoefficient(body RID.SoftBody3D, pressure_coefficient Float.X) SoftBodyGetPressureCoefficient(body RID.SoftBody3D) Float.X SoftBodySetDampingCoefficient(body RID.SoftBody3D, damping_coefficient Float.X) SoftBodyGetDampingCoefficient(body RID.SoftBody3D) Float.X SoftBodySetDragCoefficient(body RID.SoftBody3D, drag_coefficient Float.X) SoftBodyGetDragCoefficient(body RID.SoftBody3D) Float.X SoftBodySetMesh(body RID.SoftBody3D, mesh RID.Mesh) SoftBodyGetBounds(body RID.SoftBody3D) AABB.PositionSize SoftBodyMovePoint(body RID.SoftBody3D, point_index int, global_position Vector3.XYZ) SoftBodyGetPointGlobalPosition(body RID.SoftBody3D, point_index int) Vector3.XYZ SoftBodyRemoveAllPinnedPoints(body RID.SoftBody3D) SoftBodyPinPoint(body RID.SoftBody3D, point_index int, pin bool) SoftBodyIsPointPinned(body RID.SoftBody3D, point_index int) bool SoftBodyApplyPointImpulse(body RID.Body3D, point_index int, impulse Vector3.XYZ) SoftBodyApplyPointForce(body RID.Body3D, point_index int, force Vector3.XYZ) SoftBodyApplyCentralImpulse(body RID.Body3D, impulse Vector3.XYZ) SoftBodyApplyCentralForce(body RID.Body3D, force Vector3.XYZ) JointCreate() RID.Joint3D JointClear(joint RID.Joint3D) JointMakePin(joint RID.Joint3D, body_A RID.Body3D, local_A Vector3.XYZ, body_B RID.Body3D, local_B Vector3.XYZ) PinJointSetParam(joint RID.Joint3D, param PhysicsServer3D.PinJointParam, value Float.X) PinJointGetParam(joint RID.Joint3D, param PhysicsServer3D.PinJointParam) Float.X PinJointSetLocalA(joint RID.Joint3D, local_A Vector3.XYZ) PinJointGetLocalA(joint RID.Joint3D) Vector3.XYZ PinJointSetLocalB(joint RID.Joint3D, local_B Vector3.XYZ) PinJointGetLocalB(joint RID.Joint3D) Vector3.XYZ JointMakeHinge(joint RID.Joint3D, body_A RID.Body3D, hinge_A Transform3D.BasisOrigin, body_B RID.Body3D, hinge_B Transform3D.BasisOrigin) JointMakeHingeSimple(joint RID.Joint3D, body_A RID.Body3D, pivot_A Vector3.XYZ, axis_A Vector3.XYZ, body_B RID.Body3D, pivot_B Vector3.XYZ, axis_B Vector3.XYZ) HingeJointSetParam(joint RID.Joint3D, param PhysicsServer3D.HingeJointParam, value Float.X) HingeJointGetParam(joint RID.Joint3D, param PhysicsServer3D.HingeJointParam) Float.X HingeJointSetFlag(joint RID.Joint3D, flag PhysicsServer3D.HingeJointFlag, enabled bool) HingeJointGetFlag(joint RID.Joint3D, flag PhysicsServer3D.HingeJointFlag) bool JointMakeSlider(joint RID.Joint3D, body_A RID.Body3D, local_ref_A Transform3D.BasisOrigin, body_B RID.Body3D, local_ref_B Transform3D.BasisOrigin) SliderJointSetParam(joint RID.Joint3D, param PhysicsServer3D.SliderJointParam, value Float.X) SliderJointGetParam(joint RID.Joint3D, param PhysicsServer3D.SliderJointParam) Float.X JointMakeConeTwist(joint RID.Joint3D, body_A RID.Body3D, local_ref_A Transform3D.BasisOrigin, body_B RID.Body3D, local_ref_B Transform3D.BasisOrigin) ConeTwistJointSetParam(joint RID.Joint3D, param PhysicsServer3D.ConeTwistJointParam, value Float.X) ConeTwistJointGetParam(joint RID.Joint3D, param PhysicsServer3D.ConeTwistJointParam) Float.X JointMakeGeneric6dof(joint RID.Joint3D, body_A RID.Body3D, local_ref_A Transform3D.BasisOrigin, body_B RID.Body3D, local_ref_B Transform3D.BasisOrigin) Generic6dofJointSetParam(joint RID.Joint3D, axis Vector3.Axis, param PhysicsServer3D.G6DOFJointAxisParam, value Float.X) Generic6dofJointGetParam(joint RID.Joint3D, axis Vector3.Axis, param PhysicsServer3D.G6DOFJointAxisParam) Float.X Generic6dofJointSetFlag(joint RID.Joint3D, axis Vector3.Axis, flag PhysicsServer3D.G6DOFJointAxisFlag, enable bool) Generic6dofJointGetFlag(joint RID.Joint3D, axis Vector3.Axis, flag PhysicsServer3D.G6DOFJointAxisFlag) bool JointGetType(joint RID.Joint3D) PhysicsServer3D.JointType JointSetSolverPriority(joint RID.Joint3D, priority int) JointGetSolverPriority(joint RID.Joint3D) int JointDisableCollisionsBetweenBodies(joint RID.Joint3D, disable bool) JointIsDisabledCollisionsBetweenBodies(joint RID.Joint3D) bool FreeRid(rid RID.Any) SetActive(active bool) Init() Step(step Float.X) Sync() FlushQueries() EndSync() Finish() IsFlushingQueries() bool GetProcessInfo(process_info PhysicsServer3D.ProcessInfo) int }
type MotionResult ¶
type MotionResult = gd.PhysicsServer3DExtensionMotionResult
type RayResult ¶
type RayResult = gd.PhysicsServer3DExtensionRayResult
type ShapeRestInfo ¶
type ShapeRestInfo = gd.PhysicsServer3DExtensionShapeRestInfo
type ShapeResult ¶
type ShapeResult = gd.PhysicsServer3DExtensionShapeResult