Unofficial community resource. Not affiliated with, maintained by, or endorsed by WOWCube / Cubios Inc. Cubios Inc. does not guarantee the accuracy or completeness of this content. Official WOWCube Development Kit

WOWCube Docs logo
WOWCube Docs
Mission Control
Section Shortcuts
APIExamplesSourceWOWConnectChangelogDeveloper Toolkit
Filters
SDK and language defaults persist in cookies.
SDK version
Navigation Tree
Collapsed by default, focused on the active path.

Unofficial community resource. Not affiliated with, maintained by, or endorsed by WOWCube / Cubios Inc. Cubios Inc. does not guarantee the accuracy or completeness of this content. For official documentation and the SDK, see the WOWCube Development Kit.

Made byMcKay Seamons
GitHub
  1. Home
  2. Docs
  3. API
  4. Physics helper library
Mission NodeSDK 6.3PawnAPI Reference

Physics helper library

Physics helper library Helper library — not core native API. These are stock PAWN helpers supplied as source for convenience. They are not CubiOS native func...

API / SDK 6.3 / Pawn / API Reference
VersionSDK 6.3SDK 6.2SDK 6.1
Report issue

Physics helper library

Helper library — not core native API. These are stock PAWN helpers supplied as source for convenience. They are not CubiOS native functions.

PawnLibs/physics/PHYSICS_CIRCLE_DATA

Summary

Array with named fields which represents a round object.

Synopsis

Physics helper library
PAWN
1#define PHYSICS_CIRCLE_DATA .posX, .posY, .simplePosX, .simplePosY, .spdX, .spdY, .mass, .radius, .CoR, .module, .screen, .moduleT, .screenT,
2
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.

Description

Fields:

  • posX - circle position on X axis (fixed point)
  • posY - circle position on Y axis (fixed point)
  • simplePosX - circle position on X axis
  • simplePosY - circle position on Y axis
  • spdX - circle X speed
  • spdY - circle Y speed
  • mass - circle mass (fixed point)
  • radius - circle radius
  • CoR - Coefficient of restitution (fixed point)
  • module - module owner of this circle
  • screen - screen owner of this circle
  • moduleT - module transfer, last module owner. Can be used for resending messages
  • screenT - screen transfer, last screen owner. Can be used for resending messages

PawnLibs/physics/Physics_Circle_vs_AABB_obj

Summary

Check if there is a collision between round object and the axis-aligned bounding box.

Synopsis

Physics helper library
PAWN
1stock Physics_Circle_vs_AABB_obj(circle[PHYSICS_CIRCLE_DATA], rectX, rectY, rectWidth, rectHeight, fakeCircle[PHYSICS_CIRCLE_DATA] = 0)
2
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.

Inputs

  • circle - an object for whom collision is checked
  • rectX, rectY, - coordinates of the AABB object
  • rectWidth, rectHeight - dimensions of the AABB object

Outputs

  • fakeCircle - collision point, can be used for resolving collision

Return value

True if collision happens, false otherwise.

See also

  • Physics_Res_CvC_Coll_Mass()
  • Physics_Res_CvC_Coll_Massless()

PawnLibs/physics/Physics_Circle_Vs_Circle_obj

Summary

Check if there is a collision between two round objects.

Synopsis

Physics helper library
PAWN
1stock Physics_Circle_Vs_Circle_obj(circle1[PHYSICS_CIRCLE_DATA], circle2[PHYSICS_CIRCLE_DATA])
2
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.

Inputs

  • circle1, circle2 - objects for whom collision is checked

Return value

True if collision happens, false otherwise.

See also

  • Physics_Res_CvC_Coll_Mass()
  • Physics_Res_CvC_Coll_Massless()

PawnLibs/physics/Physics_Circle_Vs_LineSegment

Summary

Check if there is a collision between round object and the line.

Synopsis

Physics helper library
PAWN
1stock Physics_Circle_Vs_LineSegment(circle[PHYSICS_CIRCLE_DATA], lineSX, lineSY, lineEX, lineEY, fakeCircle[PHYSICS_CIRCLE_DATA] = 0)
2
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.

Inputs

  • circle - an object for whom collision is checked
  • lineSX, lineSY, lineEX, lineEY - the line start and end coordinates

Outputs

  • fakeCircle - collision point, can be used for resolving collision

Return value

True if collision happens, false otherwise.

See also

  • Physics_Res_CvC_Coll_Mass()
  • Physics_Res_CvC_Coll_Massless()

PawnLibs/physics/Physics_DeserializeCircle

Summary

Deserialize circle object data received from network.

Synopsis

Physics helper library
PAWN
1stock Physics_DeserializeCircle(serializedData_1, serializedData_2, circle[PHYSICS_CIRCLE_DATA])
2
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.

Inputs

  • serializedData_1, serializedData_2 - data to deserialize

Outputs

  • circle - deserialized data

See also

  • Physics_SerializeCircle()

PawnLibs/physics/Physics_Overlap

Summary

TBD: inner function

Synopsis

Physics helper library
PAWN
1stock Physics_Overlap(overlap, positionDifference, distance)
2
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.

PawnLibs/physics/Physics_Res_CvC_Coll_Mass

Summary

Resolve collision with mass

Synopsis

Physics helper library
PAWN
1stock Physics_Res_CvC_Coll_Mass(circle1[PHYSICS_CIRCLE_DATA], circle2[PHYSICS_CIRCLE_DATA])
2
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.

Outputs

  • circle1, circle2 - objects for whom collision is resolved

See also

  • Physics_Res_CvC_Coll_Massless()

PawnLibs/physics/Physics_Res_CvC_Coll_Massless

Summary

Resolve collision without mass.

Synopsis

Physics helper library
PAWN
1stock Physics_Res_CvC_Coll_Massless(circle1[PHYSICS_CIRCLE_DATA], circle2[PHYSICS_CIRCLE_DATA])
2
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.

Outputs

  • circle1, circle2 - objects for whom collision is resolved

See also

  • Physics_Res_CvC_Coll_Mass()

PawnLibs/physics/Physics_SerializeCircle

Summary

Serialize circle object data to send it over network.

Synopsis

Physics helper library
PAWN
1stock Physics_SerializeCircle(obj[PHYSICS_CIRCLE_DATA], &serializedData_1, &serializedData_2)
2
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.

Inputs

  • obj - an object to serialize

Outputs

  • serializedData_1, serializedData_2 - serialized data

See also

  • Physics_DeserializeCircle()
  • broadcastMessage()

Trust & provenance

Document status

Source
Physics · installed SDK headers
Classification
API reference
Verification
Community-maintained · verify against installed SDK

Catalog updated Oct 20, 2018

Structured index

Symbols on this page

Names and signatures are extracted from this SDK-derived page. Signature hashes detect accidental changes.

Physics helper libraryMember
PHYSICS_CIRCLE_DATAConstant#define PHYSICS_CIRCLE_DATA .posX, .posY, .simplePosX, .simplePosY, .spdX, .spdY, .mass, .radius, .CoR, .module, .screen, .moduleT, .screenT,
Physics_Circle_vs_AABB_objFunctionstock Physics_Circle_vs_AABB_obj(circle[PHYSICS_CIRCLE_DATA], rectX, rectY, rectWidth, rectHeight, fakeCircle[PHYSICS_CIRCLE_DATA] = 0)
Physics_Circle_Vs_Circle_objFunctionstock Physics_Circle_Vs_Circle_obj(circle1[PHYSICS_CIRCLE_DATA], circle2[PHYSICS_CIRCLE_DATA])
Physics_Circle_Vs_LineSegmentFunctionstock Physics_Circle_Vs_LineSegment(circle[PHYSICS_CIRCLE_DATA], lineSX, lineSY, lineEX, lineEY, fakeCircle[PHYSICS_CIRCLE_DATA] = 0)
Physics_DeserializeCircleFunctionstock Physics_DeserializeCircle(serializedData_1, serializedData_2, circle[PHYSICS_CIRCLE_DATA])
Physics_OverlapFunctionstock Physics_Overlap(overlap, positionDifference, distance)
Physics_Res_CvC_Coll_MassFunctionstock Physics_Res_CvC_Coll_Mass(circle1[PHYSICS_CIRCLE_DATA], circle2[PHYSICS_CIRCLE_DATA])
Physics_Res_CvC_Coll_MasslessFunctionstock Physics_Res_CvC_Coll_Massless(circle1[PHYSICS_CIRCLE_DATA], circle2[PHYSICS_CIRCLE_DATA])
Physics_SerializeCircleFunctionstock Physics_SerializeCircle(obj[PHYSICS_CIRCLE_DATA], &serializedData_1, &serializedData_2)
Jump Grid

On This Page

PawnLibs/physics/PHYSICS\ CIRCLE\ DATAPawnLibs/physics/Physics\ Circle\ vs\ AABB\ objPawnLibs/physics/Physics\ Circle\ Vs\ Circle\ objPawnLibs/physics/Physics\ Circle\ Vs\ LineSegmentPawnLibs/physics/Physics\ DeserializeCirclePawnLibs/physics/Physics\ OverlapPawnLibs/physics/Physics\ Res\ CvC\ Coll\ MassPawnLibs/physics/Physics\ Res\ CvC\ Coll\ MasslessPawnLibs/physics/Physics\ SerializeCircle
Back to top ↑
Context Rail

Related nodes

SELF\ ID
API / SDK 6.3 / Pawn / API Reference
graphics
API / SDK 6.3 / Pawn / API Reference
SND\ cacheSounds
API / SDK 6.3 / Pawn / API Reference
topology
API / SDK 6.3 / Pawn / API Reference
Previous Node
SPLASH\ SCREEN\ MAX\ LEADERS
API / SDK 6.3 / Pawn / API Reference
Next Node
log
API / SDK 6.3 / Pawn / API Reference