Module physics_2d_server

Search:
Group by:

Consts

SPACE_PARAM_CONTACT_RECYCLE_RADIUS = 0'i64
SPACE_PARAM_CONTACT_MAX_SEPARATION = 1'i64
SPACE_PARAM_BODY_MAX_ALLOWED_PENETRATION = 2'i64
SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD = 3'i64
SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD = 4'i64
SPACE_PARAM_BODY_TIME_TO_SLEEP = 5'i64
SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS = 6'i64
SHAPE_LINE = 0'i64
SHAPE_RAY = 1'i64
SHAPE_SEGMENT = 2'i64
SHAPE_CIRCLE = 3'i64
SHAPE_RECTANGLE = 4'i64
SHAPE_CAPSULE = 5'i64
SHAPE_CONVEX_POLYGON = 6'i64
SHAPE_CONCAVE_POLYGON = 7'i64
SHAPE_CUSTOM = 8'i64
AREA_PARAM_GRAVITY = 0'i64
AREA_PARAM_GRAVITY_VECTOR = 1'i64
AREA_PARAM_GRAVITY_IS_POINT = 2'i64
AREA_PARAM_GRAVITY_DISTANCE_SCALE = 3'i64
AREA_PARAM_GRAVITY_POINT_ATTENUATION = 4'i64
AREA_PARAM_LINEAR_DAMP = 5'i64
AREA_PARAM_ANGULAR_DAMP = 6'i64
AREA_PARAM_PRIORITY = 7'i64
AREA_SPACE_OVERRIDE_DISABLED = 0'i64
AREA_SPACE_OVERRIDE_COMBINE = 1'i64
AREA_SPACE_OVERRIDE_COMBINE_REPLACE = 2'i64
AREA_SPACE_OVERRIDE_REPLACE = 3'i64
AREA_SPACE_OVERRIDE_REPLACE_COMBINE = 4'i64
BODY_MODE_STATIC = 0'i64
BODY_MODE_KINEMATIC = 1'i64
BODY_MODE_RIGID = 2'i64
BODY_MODE_CHARACTER = 3'i64
BODY_PARAM_BOUNCE = 0'i64
BODY_PARAM_FRICTION = 1'i64
BODY_PARAM_MASS = 2'i64
BODY_PARAM_INERTIA = 3'i64
BODY_PARAM_GRAVITY_SCALE = 4'i64
BODY_PARAM_LINEAR_DAMP = 5'i64
BODY_PARAM_ANGULAR_DAMP = 6'i64
BODY_PARAM_MAX = 7'i64
BODY_STATE_TRANSFORM = 0'i64
BODY_STATE_LINEAR_VELOCITY = 1'i64
BODY_STATE_ANGULAR_VELOCITY = 2'i64
BODY_STATE_SLEEPING = 3'i64
BODY_STATE_CAN_SLEEP = 4'i64
JOINT_PIN = 0'i64
JOINT_GROOVE = 1'i64
JOINT_DAMPED_SPRING = 2'i64
JOINT_PARAM_BIAS = 0'i64
JOINT_PARAM_MAX_BIAS = 1'i64
JOINT_PARAM_MAX_FORCE = 2'i64
DAMPED_STRING_REST_LENGTH = 0'i64
DAMPED_STRING_STIFFNESS = 1'i64
DAMPED_STRING_DAMPING = 2'i64
CCD_MODE_DISABLED = 0'i64
CCD_MODE_CAST_RAY = 1'i64
CCD_MODE_CAST_SHAPE = 2'i64
AREA_BODY_ADDED = 0'i64
AREA_BODY_REMOVED = 1'i64
INFO_ACTIVE_OBJECTS = 0'i64
INFO_COLLISION_PAIRS = 1'i64
INFO_ISLAND_COUNT = 2'i64

Procs

proc lineShapeCreate(): RID {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc rayShapeCreate(): RID {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc segmentShapeCreate(): RID {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc circleShapeCreate(): RID {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc rectangleShapeCreate(): RID {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc capsuleShapeCreate(): RID {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc convexPolygonShapeCreate(): RID {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc concavePolygonShapeCreate(): RID {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc shapeSetData(shape: RID; data: Variant) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc shapeGetType(shape: RID): int64 {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc shapeGetData(shape: RID): Variant {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc spaceCreate(): RID {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc spaceSetActive(space: RID; active: bool) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc spaceIsActive(space: RID): bool {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc spaceSetParam(space: RID; param: int64; value: float64) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc spaceGetParam(space: RID; param: int64): float64 {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc spaceGetDirectState(space: RID): Physics2DDirectSpaceState {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc areaCreate(): RID {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc areaSetSpace(area: RID; space: RID) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc areaGetSpace(area: RID): RID {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc areaSetSpaceOverrideMode(area: RID; mode: int64) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc areaGetSpaceOverrideMode(area: RID): int64 {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc areaAddShape(area: RID; shape: RID; transform: Transform2D = initTransform2D(
    vec2(1.0, 0.0), vec2(0.0, 1.0), vec2(0.0, 0.0))) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc areaSetShape(area: RID; shapeIdx: int64; shape: RID) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc areaSetShapeTransform(area: RID; shapeIdx: int64; transform: Transform2D) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc areaSetShapeDisabled(area: RID; shapeIdx: int64; disable: bool) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc areaGetShapeCount(area: RID): int64 {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc areaGetShape(area: RID; shapeIdx: int64): RID {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc areaGetShapeTransform(area: RID; shapeIdx: int64): Transform2D {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc areaRemoveShape(area: RID; shapeIdx: int64) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc areaClearShapes(area: RID) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc areaSetCollisionLayer(area: RID; layer: int64) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc areaSetCollisionMask(area: RID; mask: int64) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc areaSetParam(area: RID; param: int64; value: Variant) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc areaSetTransform(area: RID; transform: Transform2D) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc areaGetParam(area: RID; param: int64): Variant {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc areaGetTransform(area: RID): Transform2D {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc areaAttachObjectInstanceId(area: RID; id: int64) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc areaGetObjectInstanceId(area: RID): int64 {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc areaSetMonitorCallback(area: RID; receiver: Object; methodd: string) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc areaSetAreaMonitorCallback(area: RID; receiver: Object; methodd: string) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc areaSetMonitorable(area: RID; monitorable: bool) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc bodyCreate(): RID {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc bodySetSpace(body: RID; space: RID) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc bodyGetSpace(body: RID): RID {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc bodySetMode(body: RID; mode: int64) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc bodyGetMode(body: RID): int64 {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc bodyAddShape(body: RID; shape: RID; transform: Transform2D = initTransform2D(
    vec2(1.0, 0.0), vec2(0.0, 1.0), vec2(0.0, 0.0))) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc bodySetShape(body: RID; shapeIdx: int64; shape: RID) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc bodySetShapeTransform(body: RID; shapeIdx: int64; transform: Transform2D) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc bodySetShapeMetadata(body: RID; shapeIdx: int64; metadata: Variant) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc bodyGetShapeCount(body: RID): int64 {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc bodyGetShape(body: RID; shapeIdx: int64): RID {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc bodyGetShapeTransform(body: RID; shapeIdx: int64): Transform2D {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc bodyGetShapeMetadata(body: RID; shapeIdx: int64): Variant {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc bodyRemoveShape(body: RID; shapeIdx: int64) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc bodyClearShapes(body: RID) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc bodySetShapeDisabled(body: RID; shapeIdx: int64; disable: bool) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc bodySetShapeAsOneWayCollision(body: RID; shapeIdx: int64; enable: bool) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc bodyAttachObjectInstanceId(body: RID; id: int64) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc bodyGetObjectInstanceId(body: RID): int64 {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc bodySetContinuousCollisionDetectionMode(body: RID; mode: int64) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc bodyGetContinuousCollisionDetectionMode(body: RID): int64 {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc bodySetCollisionLayer(body: RID; layer: int64) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc bodyGetCollisionLayer(body: RID): int64 {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc bodySetCollisionMask(body: RID; mask: int64) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc bodyGetCollisionMask(body: RID): int64 {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc bodySetParam(body: RID; param: int64; value: float64) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc bodyGetParam(body: RID; param: int64): float64 {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc bodySetState(body: RID; state: int64; value: Variant) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc bodyGetState(body: RID; state: int64): Variant {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc bodyApplyImpulse(body: RID; position: Vector2; impulse: Vector2) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc bodyAddForce(body: RID; offset: Vector2; force: Vector2) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc bodySetAxisVelocity(body: RID; axisVelocity: Vector2) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc bodyAddCollisionException(body: RID; exceptedBody: RID) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc bodyRemoveCollisionException(body: RID; exceptedBody: RID) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc bodySetMaxContactsReported(body: RID; amount: int64) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc bodyGetMaxContactsReported(body: RID): int64 {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc bodySetOmitForceIntegration(body: RID; enable: bool) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc bodyIsOmittingForceIntegration(body: RID): bool {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc bodySetForceIntegrationCallback(body: RID; receiver: Object; methodd: string;
                                    userdata: Variant = newVariant()) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc bodyTestMotion(body: RID; fromm: Transform2D; motion: Vector2;
                   infiniteInertia: bool; margin: float64 = 0.08;
                   resultVal: Physics2DTestMotionResult = nil): bool {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc bodyGetDirectState(body: RID): Physics2DDirectBodyState {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc jointSetParam(joint: RID; param: int64; value: float64) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc jointGetParam(joint: RID; param: int64): float64 {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc pinJointCreate(anchor: Vector2; bodyA: RID; bodyB: RID = initRID()): RID {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc grooveJointCreate(groove1A: Vector2; groove2A: Vector2; anchorB: Vector2;
                      bodyA: RID = initRID(); bodyB: RID = initRID()): RID {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc dampedSpringJointCreate(anchorA: Vector2; anchorB: Vector2; bodyA: RID;
                            bodyB: RID = initRID()): RID {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc dampedStringJointSetParam(joint: RID; param: int64; value: float64) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc dampedStringJointGetParam(joint: RID; param: int64): float64 {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc jointGetType(joint: RID): int64 {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc freeRid(rid: RID) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc setActive(active: bool) {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc getProcessInfo(processInfo: int64): int64 {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}