joltc.odin (162993B)
1 // Copyright (c) Amer Koleci and Contributors. 2 // Licensed under the MIT License (MIT). See LICENSE in the repository root for more information. 3 package jolt 4 5 when ODIN_OS == .Windows { 6 foreign import lib "joltc.lib" 7 } else when ODIN_OS == .Darwin { 8 foreign import lib "libjoltc.dylib" 9 } else when ODIN_OS == .Linux { 10 foreign import lib "libjoltc.so" 11 } 12 13 DEFAULT_COLLISION_TOLERANCE :: (1.0e-4) // float cDefaultCollisionTolerance = 1.0e-4f 14 DEFAULT_PENETRATION_TOLERANCE :: (1.0e-4) // float cDefaultPenetrationTolerance = 1.0e-4f 15 DEFAULT_CONVEX_RADIUS :: (0.05) // float cDefaultConvexRadius = 0.05f 16 CAPSULE_PROJECTION_SLOP :: (0.02) // float cCapsuleProjectionSlop = 0.02f 17 MAX_PHYSICS_JOBS :: (2048) // int cMaxPhysicsJobs = 2048 18 MAX_PHYSICS_BARRIERS :: (8) // int cMaxPhysicsBarriers = 8 19 INVALID_COLLISION_GROUP_ID :: max(u32) 20 INVALID_COLLISION_SUBGROUP_ID :: max(u32) 21 M_PI :: (3.14159265358979323846) // To avoid collision with JPH_PI 22 23 Bool :: u32 24 BodyID :: u32 25 SubShapeID :: u32 26 ObjectLayer :: u32 27 BroadPhaseLayer :: u8 28 CollisionGroupID :: u32 29 CollisionSubGroupID :: u32 30 CharacterID :: u32 31 BroadPhaseLayerInterface :: struct {} 32 ObjectVsBroadPhaseLayerFilter :: struct {} 33 ObjectLayerPairFilter :: struct {} 34 BroadPhaseLayerFilter :: struct {} 35 ObjectLayerFilter :: struct {} 36 BodyFilter :: struct {} 37 ShapeFilter :: struct {} 38 SimShapeFilter :: struct {} 39 PhysicsStepListener :: struct {} 40 PhysicsSystem :: struct {} 41 PhysicsMaterial :: struct {} 42 ShapeSettings :: struct {} 43 ConvexShapeSettings :: struct {} 44 SphereShapeSettings :: struct {} 45 BoxShapeSettings :: struct {} 46 PlaneShapeSettings :: struct {} 47 TriangleShapeSettings :: struct {} 48 CapsuleShapeSettings :: struct {} 49 TaperedCapsuleShapeSettings :: struct {} 50 CylinderShapeSettings :: struct {} 51 TaperedCylinderShapeSettings :: struct {} 52 ConvexHullShapeSettings :: struct {} 53 CompoundShapeSettings :: struct {} 54 StaticCompoundShapeSettings :: struct {} 55 MutableCompoundShapeSettings :: struct {} 56 MeshShapeSettings :: struct {} 57 HeightFieldShapeSettings :: struct {} 58 RotatedTranslatedShapeSettings :: struct {} 59 ScaledShapeSettings :: struct {} 60 OffsetCenterOfMassShapeSettings :: struct {} 61 EmptyShapeSettings :: struct {} 62 Shape :: struct {} 63 ConvexShape :: struct {} 64 SphereShape :: struct {} 65 BoxShape :: struct {} 66 PlaneShape :: struct {} 67 CapsuleShape :: struct {} 68 CylinderShape :: struct {} 69 TaperedCylinderShape :: struct {} 70 TriangleShape :: struct {} 71 TaperedCapsuleShape :: struct {} 72 ConvexHullShape :: struct {} 73 CompoundShape :: struct {} 74 StaticCompoundShape :: struct {} 75 MutableCompoundShape :: struct {} 76 MeshShape :: struct {} 77 HeightFieldShape :: struct {} 78 DecoratedShape :: struct {} 79 RotatedTranslatedShape :: struct {} 80 ScaledShape :: struct {} 81 OffsetCenterOfMassShape :: struct {} 82 EmptyShape :: struct {} 83 BodyCreationSettings :: struct {} 84 SoftBodyCreationSettings :: struct {} 85 BodyInterface :: struct {} 86 BodyLockInterface :: struct {} 87 BroadPhaseQuery :: struct {} 88 NarrowPhaseQuery :: struct {} 89 MotionProperties :: struct {} 90 Body :: struct {} 91 ContactListener :: struct {} 92 ContactManifold :: struct {} 93 GroupFilter :: struct {} 94 GroupFilterTable :: struct {} /* Inherits JPH_GroupFilter */ 95 96 /* Enums */ 97 PhysicsUpdateError :: enum i32 { 98 None = 0, 99 ManifoldCacheFull = 1, 100 BodyPairCacheFull = 2, 101 ContactConstraintsFull = 4, 102 } 103 104 BodyType :: enum i32 { 105 Rigid = 0, 106 Soft = 1, 107 } 108 109 MotionType :: enum i32 { 110 Static = 0, 111 Kinematic = 1, 112 Dynamic = 2, 113 } 114 115 Activation :: enum i32 { 116 Activate = 0, 117 DontActivate = 1, 118 } 119 120 ValidateResult :: enum i32 { 121 AcceptAllContactsForThisBodyPair = 0, 122 AcceptContact = 1, 123 RejectContact = 2, 124 RejectAllContactsForThisBodyPair = 3, 125 } 126 127 ShapeType :: enum i32 { 128 Convex = 0, 129 Compound = 1, 130 Decorated = 2, 131 Mesh = 3, 132 HeightField = 4, 133 SoftBody = 5, 134 User1 = 6, 135 User2 = 7, 136 User3 = 8, 137 User4 = 9, 138 } 139 140 ShapeSubType :: enum i32 { 141 Sphere = 0, 142 Box = 1, 143 Triangle = 2, 144 Capsule = 3, 145 TaperedCapsule = 4, 146 Cylinder = 5, 147 ConvexHull = 6, 148 StaticCompound = 7, 149 MutableCompound = 8, 150 RotatedTranslated = 9, 151 Scaled = 10, 152 OffsetCenterOfMass = 11, 153 Mesh = 12, 154 HeightField = 13, 155 SoftBody = 14, 156 } 157 158 ConstraintType :: enum i32 { 159 Constraint = 0, 160 TwoBodyConstraint = 1, 161 } 162 163 ConstraintSubType :: enum i32 { 164 Fixed = 0, 165 Point = 1, 166 Hinge = 2, 167 Slider = 3, 168 Distance = 4, 169 Cone = 5, 170 SwingTwist = 6, 171 SixDOF = 7, 172 Path = 8, 173 Vehicle = 9, 174 RackAndPinion = 10, 175 Gear = 11, 176 Pulley = 12, 177 User1 = 13, 178 User2 = 14, 179 User3 = 15, 180 User4 = 16, 181 } 182 183 ConstraintSpace :: enum i32 { 184 LocalToBodyCOM = 0, 185 WorldSpace = 1, 186 } 187 188 MotionQuality :: enum i32 { 189 Discrete = 0, 190 LinearCast = 1, 191 } 192 193 OverrideMassProperties :: enum i32 { 194 CalculateMassAndInertia = 0, 195 CalculateInertia = 1, 196 MassAndInertiaProvided = 2, 197 } 198 199 AllowedDOFs :: enum i32 { 200 All = 63, 201 TranslationX = 1, 202 TranslationY = 2, 203 TranslationZ = 4, 204 RotationX = 8, 205 RotationY = 16, 206 RotationZ = 32, 207 Plane2D = 35, 208 } 209 210 GroundState :: enum i32 { 211 OnGround = 0, 212 OnSteepGround = 1, 213 NotSupported = 2, 214 InAir = 3, 215 } 216 217 BackFaceMode :: enum i32 { 218 IgnoreBackFaces = 0, 219 CollideWithBackFaces = 1, 220 } 221 222 ActiveEdgeMode :: enum i32 { 223 CollideOnlyWithActive = 0, 224 CollideWithAll = 1, 225 } 226 227 CollectFacesMode :: enum i32 { 228 CollectFaces = 0, 229 NoFaces = 1, 230 } 231 232 MotorState :: enum i32 { 233 Off = 0, 234 Velocity = 1, 235 Position = 2, 236 } 237 238 CollisionCollectorType :: enum i32 { 239 AllHit = 0, 240 AllHitSorted = 1, 241 ClosestHit = 2, 242 AnyHit = 3, 243 } 244 245 SwingType :: enum i32 { 246 Cone = 0, 247 Pyramid = 1, 248 } 249 250 SixDOFConstraintAxis :: enum i32 { 251 TranslationX = 0, 252 TranslationY = 1, 253 TranslationZ = 2, 254 RotationX = 3, 255 RotationY = 4, 256 RotationZ = 5, 257 } 258 259 SpringMode :: enum i32 { 260 FrequencyAndDamping = 0, 261 StiffnessAndDamping = 1, 262 } 263 264 /// Defines how to color soft body constraints 265 SoftBodyConstraintColor :: enum i32 { 266 ConstraintType = 0, /// Draw different types of constraints in different colors 267 ConstraintGroup = 1, /// Draw constraints in the same group in the same color, non-parallel group will be red 268 ConstraintOrder = 2, /// Draw constraints in the same group in the same color, non-parallel group will be red, and order within each group will be indicated with gradient 269 } 270 271 BodyManager_ShapeColor :: enum i32 { 272 InstanceColor = 0, ///< Random color per instance 273 ShapeTypeColor = 1, ///< Convex = green, scaled = yellow, compound = orange, mesh = red 274 MotionTypeColor = 2, ///< Static = grey, keyframed = green, dynamic = random color per instance 275 SleepColor = 3, ///< Static = grey, keyframed = green, dynamic = yellow, sleeping = red 276 IslandColor = 4, ///< Static = grey, active = random color per island, sleeping = light grey 277 MaterialColor = 5, ///< Color as defined by the PhysicsMaterial of the shape 278 } 279 280 DebugRenderer_CastShadow :: enum i32 { 281 On = 0, ///< This shape should cast a shadow 282 Off = 1, ///< This shape should not cast a shadow 283 } 284 285 DebugRenderer_DrawMode :: enum i32 { 286 Solid = 0, ///< Draw as a solid shape 287 Wireframe = 1, ///< Draw as wireframe 288 } 289 290 Mesh_Shape_BuildQuality :: enum i32 { 291 FavorRuntimePerformance = 0, 292 FavorBuildSpeed = 1, 293 } 294 295 TransmissionMode :: enum i32 { 296 Auto = 0, 297 Manual = 1, 298 } 299 300 Vec3 :: [3]f32 301 Vec4 :: [4]f32 302 Quat :: quaternion128 303 304 Plane :: struct { 305 normal: Vec3, 306 distance: f32, 307 } 308 309 Mat4 :: matrix[4,4]f32 310 RVec3 :: Vec3 311 RMat4 :: Mat4 312 Color :: u32 313 314 AABox :: struct { 315 min: Vec3, 316 max: Vec3, 317 } 318 319 Triangle :: struct { 320 v1: Vec3, 321 v2: Vec3, 322 v3: Vec3, 323 materialIndex: u32, 324 } 325 326 IndexedTriangleNoMaterial :: struct { 327 i1: u32, 328 i2: u32, 329 i3: u32, 330 } 331 332 IndexedTriangle :: struct { 333 i1: u32, 334 i2: u32, 335 i3: u32, 336 materialIndex: u32, 337 userData: u32, 338 } 339 340 MassProperties :: struct { 341 mass: f32, 342 inertia: Mat4, 343 } 344 345 ContactSettings :: struct { 346 combinedFriction: f32, 347 combinedRestitution: f32, 348 invMassScale1: f32, 349 invInertiaScale1: f32, 350 invMassScale2: f32, 351 invInertiaScale2: f32, 352 isSensor: Bool, 353 relativeLinearSurfaceVelocity: Vec3, 354 relativeAngularSurfaceVelocity: Vec3, 355 } 356 357 CollideSettingsBase :: struct { 358 /// How active edges (edges that a moving object should bump into) are handled 359 activeEdgeMode: ActiveEdgeMode, /* = JPH_ActiveEdgeMode_CollideOnlyWithActive*/ 360 361 /// If colliding faces should be collected or only the collision point 362 collectFacesMode: CollectFacesMode, /* = JPH_CollectFacesMode_NoFaces*/ 363 364 /// If objects are closer than this distance, they are considered to be colliding (used for GJK) (unit: meter) 365 collisionTolerance: f32, /* = JPH_DEFAULT_COLLISION_TOLERANCE*/ 366 367 /// A factor that determines the accuracy of the penetration depth calculation. If the change of the squared distance is less than tolerance * current_penetration_depth^2 the algorithm will terminate. (unit: dimensionless) 368 penetrationTolerance: f32, /* = JPH_DEFAULT_PENETRATION_TOLERANCE*/ 369 370 /// When mActiveEdgeMode is CollideOnlyWithActive a movement direction can be provided. When hitting an inactive edge, the system will select the triangle normal as penetration depth only if it impedes the movement less than with the calculated penetration depth. 371 activeEdgeMovementDirection: Vec3, /* = Vec3::sZero()*/ 372 } 373 374 /* CollideShapeSettings */ 375 CollideShapeSettings :: struct { 376 base: CollideSettingsBase, /* Inherits JPH_CollideSettingsBase */ 377 378 /// When > 0 contacts in the vicinity of the query shape can be found. All nearest contacts that are not further away than this distance will be found (unit: meter) 379 maxSeparationDistance: f32, /* = 0.0f*/ 380 381 /// How backfacing triangles should be treated 382 backFaceMode: BackFaceMode, /* = JPH_BackFaceMode_IgnoreBackFaces*/ 383 } 384 385 /* ShapeCastSettings */ 386 ShapeCastSettings :: struct { 387 base: CollideSettingsBase, /* Inherits JPH_CollideSettingsBase */ 388 389 /// How backfacing triangles should be treated (should we report moving from back to front for triangle based shapes, e.g. for MeshShape/HeightFieldShape?) 390 backFaceModeTriangles: BackFaceMode, /* = JPH_BackFaceMode_IgnoreBackFaces*/ 391 392 /// How backfacing convex objects should be treated (should we report starting inside an object and moving out?) 393 backFaceModeConvex: BackFaceMode, /* = JPH_BackFaceMode_IgnoreBackFaces*/ 394 395 /// Indicates if we want to shrink the shape by the convex radius and then expand it again. This speeds up collision detection and gives a more accurate normal at the cost of a more 'rounded' shape. 396 useShrunkenShapeAndConvexRadius: bool, /* = false*/ 397 398 /// When true, and the shape is intersecting at the beginning of the cast (fraction = 0) then this will calculate the deepest penetration point (costing additional CPU time) 399 returnDeepestPoint: bool, /* = false*/ 400 } 401 402 RayCastSettings :: struct { 403 /// How backfacing triangles should be treated (should we report back facing hits for triangle based shapes, e.g. MeshShape/HeightFieldShape?) 404 backFaceModeTriangles: BackFaceMode, /* = JPH_BackFaceMode_IgnoreBackFaces*/ 405 406 /// How backfacing convex objects should be treated (should we report back facing hits for convex shapes?) 407 backFaceModeConvex: BackFaceMode, /* = JPH_BackFaceMode_IgnoreBackFaces*/ 408 409 /// If convex shapes should be treated as solid. When true, a ray starting inside a convex shape will generate a hit at fraction 0. 410 treatConvexAsSolid: bool, /* = true*/ 411 } 412 413 SpringSettings :: struct { 414 mode: SpringMode, 415 frequencyOrStiffness: f32, 416 damping: f32, 417 } 418 419 MotorSettings :: struct { 420 springSettings: SpringSettings, 421 minForceLimit: f32, 422 maxForceLimit: f32, 423 minTorqueLimit: f32, 424 maxTorqueLimit: f32, 425 } 426 427 SubShapeIDPair :: struct { 428 Body1ID: BodyID, 429 subShapeID1: SubShapeID, 430 Body2ID: BodyID, 431 subShapeID2: SubShapeID, 432 } 433 434 BroadPhaseCastResult :: struct { 435 bodyID: BodyID, 436 fraction: f32, 437 } 438 439 RayCastResult :: struct { 440 bodyID: BodyID, 441 fraction: f32, 442 subShapeID2: SubShapeID, 443 } 444 445 CollidePointResult :: struct { 446 bodyID: BodyID, 447 subShapeID2: SubShapeID, 448 } 449 450 CollideShapeResult :: struct { 451 contactPointOn1: Vec3, 452 contactPointOn2: Vec3, 453 penetrationAxis: Vec3, 454 penetrationDepth: f32, 455 subShapeID1: SubShapeID, 456 subShapeID2: SubShapeID, 457 bodyID2: BodyID, 458 shape1FaceCount: u32, 459 shape1Faces: ^Vec3, 460 shape2FaceCount: u32, 461 shape2Faces: ^Vec3, 462 } 463 464 ShapeCastResult :: struct { 465 contactPointOn1: Vec3, 466 contactPointOn2: Vec3, 467 penetrationAxis: Vec3, 468 penetrationDepth: f32, 469 subShapeID1: SubShapeID, 470 subShapeID2: SubShapeID, 471 bodyID2: BodyID, 472 fraction: f32, 473 isBackFaceHit: bool, 474 } 475 476 DrawSettings :: struct { 477 drawGetSupportFunction: bool, ///< Draw the GetSupport() function, used for convex collision detection 478 drawSupportDirection: bool, ///< When drawing the support function, also draw which direction mapped to a specific support point 479 drawGetSupportingFace: bool, ///< Draw the faces that were found colliding during collision detection 480 drawShape: bool, ///< Draw the shapes of all bodies 481 drawShapeWireframe: bool, ///< When mDrawShape is true and this is true, the shapes will be drawn in wireframe instead of solid. 482 drawShapeColor: BodyManager_ShapeColor, ///< Coloring scheme to use for shapes 483 drawBoundingBox: bool, ///< Draw a bounding box per body 484 drawCenterOfMassTransform: bool, ///< Draw the center of mass for each body 485 drawWorldTransform: bool, ///< Draw the world transform (which may differ from its center of mass) of each body 486 drawVelocity: bool, ///< Draw the velocity vector for each body 487 drawMassAndInertia: bool, ///< Draw the mass and inertia (as the box equivalent) for each body 488 drawSleepStats: bool, ///< Draw stats regarding the sleeping algorithm of each body 489 drawSoftBodyVertices: bool, ///< Draw the vertices of soft bodies 490 drawSoftBodyVertexVelocities: bool, ///< Draw the velocities of the vertices of soft bodies 491 drawSoftBodyEdgeConstraints: bool, ///< Draw the edge constraints of soft bodies 492 drawSoftBodyBendConstraints: bool, ///< Draw the bend constraints of soft bodies 493 drawSoftBodyVolumeConstraints: bool, ///< Draw the volume constraints of soft bodies 494 drawSoftBodySkinConstraints: bool, ///< Draw the skin constraints of soft bodies 495 drawSoftBodyLRAConstraints: bool, ///< Draw the LRA constraints of soft bodies 496 drawSoftBodyPredictedBounds: bool, ///< Draw the predicted bounds of soft bodies 497 drawSoftBodyConstraintColor: SoftBodyConstraintColor, ///< Coloring scheme to use for soft body constraints 498 } 499 500 SupportingFace :: struct { 501 count: u32, 502 vertices: [32]Vec3, 503 } 504 505 CollisionGroup :: struct { 506 groupFilter: ^GroupFilter, 507 groupID: CollisionGroupID, 508 subGroupID: CollisionSubGroupID, 509 } 510 511 CastRayResultCallback :: proc "c" (_context: rawptr, result: ^RayCastResult) 512 RayCastBodyResultCallback :: proc "c" (_context: rawptr, result: ^BroadPhaseCastResult) 513 CollideShapeBodyResultCallback :: proc "c" (_context: rawptr, result: BodyID) 514 CollidePointResultCallback :: proc "c" (_context: rawptr, result: ^CollidePointResult) 515 CollideShapeResultCallback :: proc "c" (_context: rawptr, result: ^CollideShapeResult) 516 CastShapeResultCallback :: proc "c" (_context: rawptr, result: ^ShapeCastResult) 517 CastRayCollectorCallback :: proc "c" (_context: rawptr, result: ^RayCastResult) -> f32 518 RayCastBodyCollectorCallback :: proc "c" (_context: rawptr, result: ^BroadPhaseCastResult) -> f32 519 CollideShapeBodyCollectorCallback :: proc "c" (_context: rawptr, result: BodyID) -> f32 520 CollidePointCollectorCallback :: proc "c" (_context: rawptr, result: ^CollidePointResult) -> f32 521 CollideShapeCollectorCallback :: proc "c" (_context: rawptr, result: ^CollideShapeResult) -> f32 522 CastShapeCollectorCallback :: proc "c" (_context: rawptr, result: ^ShapeCastResult) -> f32 523 524 CollisionEstimationResultImpulse :: struct { 525 contactImpulse: f32, 526 frictionImpulse1: f32, 527 frictionImpulse2: f32, 528 } 529 530 CollisionEstimationResult :: struct { 531 linearVelocity1: Vec3, 532 angularVelocity1: Vec3, 533 linearVelocity2: Vec3, 534 angularVelocity2: Vec3, 535 tangent1: Vec3, 536 tangent2: Vec3, 537 impulseCount: u32, 538 impulses: ^CollisionEstimationResultImpulse, 539 } 540 541 BodyActivationListener :: struct {} 542 BodyDrawFilter :: struct {} 543 SharedMutex :: struct {} 544 DebugRenderer :: struct {} 545 Constraint :: struct {} 546 TwoBodyConstraint :: struct {} 547 FixedConstraint :: struct {} 548 DistanceConstraint :: struct {} 549 PointConstraint :: struct {} 550 HingeConstraint :: struct {} 551 SliderConstraint :: struct {} 552 ConeConstraint :: struct {} 553 SwingTwistConstraint :: struct {} 554 SixDOFConstraint :: struct {} 555 GearConstraint :: struct {} 556 CharacterBase :: struct {} 557 Character :: struct {} /* Inherits JPH_CharacterBase */ 558 CharacterVirtual :: struct {} /* Inherits JPH_CharacterBase */ 559 CharacterContactListener :: struct {} 560 CharacterVsCharacterCollision :: struct {} 561 Skeleton :: struct {} 562 RagdollSettings :: struct {} 563 Ragdoll :: struct {} 564 565 ConstraintSettings :: struct { 566 enabled: bool, 567 constraintPriority: u32, 568 numVelocityStepsOverride: u32, 569 numPositionStepsOverride: u32, 570 drawConstraintSize: f32, 571 userData: u64, 572 } 573 574 FixedConstraintSettings :: struct { 575 base: ConstraintSettings, /* Inherits JPH_ConstraintSettings */ 576 space: ConstraintSpace, 577 autoDetectPoint: bool, 578 point1: RVec3, 579 axisX1: Vec3, 580 axisY1: Vec3, 581 point2: RVec3, 582 axisX2: Vec3, 583 axisY2: Vec3, 584 } 585 586 DistanceConstraintSettings :: struct { 587 base: ConstraintSettings, /* Inherits JPH_ConstraintSettings */ 588 space: ConstraintSpace, 589 point1: RVec3, 590 point2: RVec3, 591 minDistance: f32, 592 maxDistance: f32, 593 limitsSpringSettings: SpringSettings, 594 } 595 596 PointConstraintSettings :: struct { 597 base: ConstraintSettings, /* Inherits JPH_ConstraintSettings */ 598 space: ConstraintSpace, 599 point1: RVec3, 600 point2: RVec3, 601 } 602 603 HingeConstraintSettings :: struct { 604 base: ConstraintSettings, /* Inherits JPH_ConstraintSettings */ 605 space: ConstraintSpace, 606 point1: RVec3, 607 hingeAxis1: Vec3, 608 normalAxis1: Vec3, 609 point2: RVec3, 610 hingeAxis2: Vec3, 611 normalAxis2: Vec3, 612 limitsMin: f32, 613 limitsMax: f32, 614 limitsSpringSettings: SpringSettings, 615 maxFrictionTorque: f32, 616 motorSettings: MotorSettings, 617 } 618 619 SliderConstraintSettings :: struct { 620 base: ConstraintSettings, /* Inherits JPH_ConstraintSettings */ 621 space: ConstraintSpace, 622 autoDetectPoint: bool, 623 point1: RVec3, 624 sliderAxis1: Vec3, 625 normalAxis1: Vec3, 626 point2: RVec3, 627 sliderAxis2: Vec3, 628 normalAxis2: Vec3, 629 limitsMin: f32, 630 limitsMax: f32, 631 limitsSpringSettings: SpringSettings, 632 maxFrictionForce: f32, 633 motorSettings: MotorSettings, 634 } 635 636 ConeConstraintSettings :: struct { 637 base: ConstraintSettings, /* Inherits JPH_ConstraintSettings */ 638 space: ConstraintSpace, 639 point1: RVec3, 640 twistAxis1: Vec3, 641 point2: RVec3, 642 twistAxis2: Vec3, 643 halfConeAngle: f32, 644 } 645 646 SwingTwistConstraintSettings :: struct { 647 base: ConstraintSettings, /* Inherits JPH_ConstraintSettings */ 648 space: ConstraintSpace, 649 position1: RVec3, 650 twistAxis1: Vec3, 651 planeAxis1: Vec3, 652 position2: RVec3, 653 twistAxis2: Vec3, 654 planeAxis2: Vec3, 655 swingType: SwingType, 656 normalHalfConeAngle: f32, 657 planeHalfConeAngle: f32, 658 twistMinAngle: f32, 659 twistMaxAngle: f32, 660 maxFrictionTorque: f32, 661 swingMotorSettings: MotorSettings, 662 twistMotorSettings: MotorSettings, 663 } 664 665 SixDOFConstraintSettings :: struct { 666 base: ConstraintSettings, /* Inherits JPH_ConstraintSettings */ 667 space: ConstraintSpace, 668 position1: RVec3, 669 axisX1: Vec3, 670 axisY1: Vec3, 671 position2: RVec3, 672 axisX2: Vec3, 673 axisY2: Vec3, 674 maxFriction: [6]f32, 675 swingType: SwingType, 676 limitMin: [6]f32, 677 limitMax: [6]f32, 678 limitsSpringSettings: [3]SpringSettings, 679 motorSettings: [6]MotorSettings, 680 } 681 682 GearConstraintSettings :: struct { 683 base: ConstraintSettings, /* Inherits JPH_ConstraintSettings */ 684 space: ConstraintSpace, 685 hingeAxis1: Vec3, 686 hingeAxis2: Vec3, 687 ratio: f32, 688 } 689 690 BodyLockRead :: struct { 691 lockInterface: ^BodyLockInterface, 692 mutex: ^SharedMutex, 693 body: ^Body, 694 } 695 696 BodyLockWrite :: struct { 697 lockInterface: ^BodyLockInterface, 698 mutex: ^SharedMutex, 699 body: ^Body, 700 } 701 702 BodyLockMultiRead :: struct {} 703 BodyLockMultiWrite :: struct {} 704 705 ExtendedUpdateSettings :: struct { 706 stickToFloorStepDown: Vec3, 707 walkStairsStepUp: Vec3, 708 walkStairsMinStepForward: f32, 709 walkStairsStepForwardTest: f32, 710 walkStairsCosAngleForwardContact: f32, 711 walkStairsStepDownExtra: Vec3, 712 } 713 714 CharacterBaseSettings :: struct { 715 up: Vec3, 716 supportingVolume: Plane, 717 maxSlopeAngle: f32, 718 enhancedInternalEdgeRemoval: bool, 719 shape: ^Shape, 720 } 721 722 /* Character */ 723 CharacterSettings :: struct { 724 base: CharacterBaseSettings, /* Inherits JPH_CharacterBaseSettings */ 725 layer: ObjectLayer, 726 mass: f32, 727 friction: f32, 728 gravityFactor: f32, 729 allowedDOFs: AllowedDOFs, 730 } 731 732 /* CharacterVirtual */ 733 CharacterVirtualSettings :: struct { 734 base: CharacterBaseSettings, /* Inherits JPH_CharacterBaseSettings */ 735 ID: CharacterID, 736 mass: f32, 737 maxStrength: f32, 738 shapeOffset: Vec3, 739 backFaceMode: BackFaceMode, 740 predictiveContactDistance: f32, 741 maxCollisionIterations: u32, 742 maxConstraintIterations: u32, 743 minTimeRemaining: f32, 744 collisionTolerance: f32, 745 characterPadding: f32, 746 maxNumHits: u32, 747 hitReductionCosMaxAngle: f32, 748 penetrationRecoverySpeed: f32, 749 innerBodyShape: ^Shape, 750 innerBodyIDOverride: BodyID, 751 innerBodyLayer: ObjectLayer, 752 } 753 754 CharacterContactSettings :: struct { 755 canPushCharacter: bool, 756 canReceiveImpulses: bool, 757 } 758 759 CharacterVirtualContact :: struct { 760 hash: u64, 761 bodyB: BodyID, 762 characterIDB: CharacterID, 763 subShapeIDB: SubShapeID, 764 position: RVec3, 765 linearVelocity: Vec3, 766 contactNormal: Vec3, 767 surfaceNormal: Vec3, 768 distance: f32, 769 fraction: f32, 770 motionTypeB: MotionType, 771 isSensorB: bool, 772 characterB: ^CharacterVirtual, 773 userData: u64, 774 material: ^PhysicsMaterial, 775 hadCollision: bool, 776 wasDiscarded: bool, 777 canPushCharacter: bool, 778 } 779 780 TraceFunc :: proc "c" (message: cstring) 781 AssertFailureFunc :: proc "c" (expression: cstring, message: cstring, file: cstring, line: u32) -> bool 782 JobFunction :: proc "c" (arg: rawptr) 783 QueueJobCallback :: proc "c" (_context: rawptr, job: JobFunction, arg: rawptr) 784 QueueJobsCallback :: proc "c" (_context: rawptr, job: JobFunction, args: ^rawptr, count: u32) 785 786 JobSystemThreadPoolConfig :: struct { 787 maxJobs: u32, 788 maxBarriers: u32, 789 numThreads: i32, 790 } 791 792 JobSystemConfig :: struct { 793 _context: rawptr, 794 queueJob: QueueJobCallback, 795 queueJobs: QueueJobsCallback, 796 maxConcurrency: u32, 797 maxBarriers: u32, 798 } 799 800 JobSystem :: struct {} 801 802 @(default_calling_convention="c", link_prefix="JPH_") 803 foreign lib { 804 JobSystemThreadPool_Create :: proc(config: ^JobSystemThreadPoolConfig) -> ^JobSystem --- 805 JobSystemCallback_Create :: proc(config: ^JobSystemConfig) -> ^JobSystem --- 806 JobSystem_Destroy :: proc(jobSystem: ^JobSystem) --- 807 Init :: proc() -> bool --- 808 Shutdown :: proc() --- 809 SetTraceHandler :: proc(handler: TraceFunc) --- 810 SetAssertFailureHandler :: proc(handler: AssertFailureFunc) --- 811 812 /* Structs free members */ 813 CollideShapeResult_FreeMembers :: proc(result: ^CollideShapeResult) --- 814 CollisionEstimationResult_FreeMembers :: proc(result: ^CollisionEstimationResult) --- 815 816 /* JPH_BroadPhaseLayerInterface */ 817 BroadPhaseLayerInterfaceMask_Create :: proc(numBroadPhaseLayers: u32) -> ^BroadPhaseLayerInterface --- 818 BroadPhaseLayerInterfaceMask_ConfigureLayer :: proc(bpInterface: ^BroadPhaseLayerInterface, broadPhaseLayer: BroadPhaseLayer, groupsToInclude: u32, groupsToExclude: u32) --- 819 BroadPhaseLayerInterfaceTable_Create :: proc(numObjectLayers: u32, numBroadPhaseLayers: u32) -> ^BroadPhaseLayerInterface --- 820 BroadPhaseLayerInterfaceTable_MapObjectToBroadPhaseLayer :: proc(bpInterface: ^BroadPhaseLayerInterface, objectLayer: ObjectLayer, broadPhaseLayer: BroadPhaseLayer) --- 821 822 /* JPH_ObjectLayerPairFilter */ 823 ObjectLayerPairFilterMask_Create :: proc() -> ^ObjectLayerPairFilter --- 824 ObjectLayerPairFilterMask_GetObjectLayer :: proc(group: u32, mask: u32) -> ObjectLayer --- 825 ObjectLayerPairFilterMask_GetGroup :: proc(layer: ObjectLayer) -> u32 --- 826 ObjectLayerPairFilterMask_GetMask :: proc(layer: ObjectLayer) -> u32 --- 827 ObjectLayerPairFilterTable_Create :: proc(numObjectLayers: u32) -> ^ObjectLayerPairFilter --- 828 ObjectLayerPairFilterTable_DisableCollision :: proc(objectFilter: ^ObjectLayerPairFilter, layer1: ObjectLayer, layer2: ObjectLayer) --- 829 ObjectLayerPairFilterTable_EnableCollision :: proc(objectFilter: ^ObjectLayerPairFilter, layer1: ObjectLayer, layer2: ObjectLayer) --- 830 ObjectLayerPairFilterTable_ShouldCollide :: proc(objectFilter: ^ObjectLayerPairFilter, layer1: ObjectLayer, layer2: ObjectLayer) -> bool --- 831 832 /* JPH_ObjectVsBroadPhaseLayerFilter */ 833 ObjectVsBroadPhaseLayerFilterMask_Create :: proc(broadPhaseLayerInterface: ^BroadPhaseLayerInterface) -> ^ObjectVsBroadPhaseLayerFilter --- 834 ObjectVsBroadPhaseLayerFilterTable_Create :: proc(broadPhaseLayerInterface: ^BroadPhaseLayerInterface, numBroadPhaseLayers: u32, objectLayerPairFilter: ^ObjectLayerPairFilter, numObjectLayers: u32) -> ^ObjectVsBroadPhaseLayerFilter --- 835 DrawSettings_InitDefault :: proc(settings: ^DrawSettings) --- 836 } 837 838 /* JPH_PhysicsSystem */ 839 PhysicsSystemSettings :: struct { 840 maxBodies: u32, /* 10240 */ 841 numBodyMutexes: u32, /* 0 */ 842 maxBodyPairs: u32, /* 65536 */ 843 maxContactConstraints: u32, /* 10240 */ 844 _padding: u32, 845 broadPhaseLayerInterface: ^BroadPhaseLayerInterface, 846 objectLayerPairFilter: ^ObjectLayerPairFilter, 847 objectVsBroadPhaseLayerFilter: ^ObjectVsBroadPhaseLayerFilter, 848 } 849 850 PhysicsSettings :: struct { 851 maxInFlightBodyPairs: i32, 852 stepListenersBatchSize: i32, 853 stepListenerBatchesPerJob: i32, 854 baumgarte: f32, 855 speculativeContactDistance: f32, 856 penetrationSlop: f32, 857 linearCastThreshold: f32, 858 linearCastMaxPenetration: f32, 859 manifoldTolerance: f32, 860 maxPenetrationDistance: f32, 861 bodyPairCacheMaxDeltaPositionSq: f32, 862 bodyPairCacheCosMaxDeltaRotationDiv2: f32, 863 contactNormalCosMaxDeltaRotation: f32, 864 contactPointPreserveLambdaMaxDistSq: f32, 865 numVelocitySteps: u32, 866 numPositionSteps: u32, 867 minVelocityForRestitution: f32, 868 timeBeforeSleep: f32, 869 pointVelocitySleepThreshold: f32, 870 deterministicSimulation: bool, 871 constraintWarmStart: bool, 872 useBodyPairContactCache: bool, 873 useManifoldReduction: bool, 874 useLargeIslandSplitter: bool, 875 allowSleeping: bool, 876 checkActiveEdges: bool, 877 } 878 879 @(default_calling_convention="c", link_prefix="JPH_") 880 foreign lib { 881 PhysicsSystem_Create :: proc(settings: ^PhysicsSystemSettings) -> ^PhysicsSystem --- 882 PhysicsSystem_Destroy :: proc(system: ^PhysicsSystem) --- 883 PhysicsSystem_SetPhysicsSettings :: proc(system: ^PhysicsSystem, settings: ^PhysicsSettings) --- 884 PhysicsSystem_GetPhysicsSettings :: proc(system: ^PhysicsSystem, result: ^PhysicsSettings) --- 885 PhysicsSystem_OptimizeBroadPhase :: proc(system: ^PhysicsSystem) --- 886 PhysicsSystem_Update :: proc(system: ^PhysicsSystem, deltaTime: f32, collisionSteps: i32, jobSystem: ^JobSystem) -> PhysicsUpdateError --- 887 PhysicsSystem_GetBodyInterface :: proc(system: ^PhysicsSystem) -> ^BodyInterface --- 888 PhysicsSystem_GetBodyInterfaceNoLock :: proc(system: ^PhysicsSystem) -> ^BodyInterface --- 889 PhysicsSystem_GetBodyLockInterface :: proc(system: ^PhysicsSystem) -> ^BodyLockInterface --- 890 PhysicsSystem_GetBodyLockInterfaceNoLock :: proc(system: ^PhysicsSystem) -> ^BodyLockInterface --- 891 PhysicsSystem_GetBroadPhaseQuery :: proc(system: ^PhysicsSystem) -> ^BroadPhaseQuery --- 892 PhysicsSystem_GetNarrowPhaseQuery :: proc(system: ^PhysicsSystem) -> ^NarrowPhaseQuery --- 893 PhysicsSystem_GetNarrowPhaseQueryNoLock :: proc(system: ^PhysicsSystem) -> ^NarrowPhaseQuery --- 894 PhysicsSystem_SetContactListener :: proc(system: ^PhysicsSystem, listener: ^ContactListener) --- 895 PhysicsSystem_SetBodyActivationListener :: proc(system: ^PhysicsSystem, listener: ^BodyActivationListener) --- 896 PhysicsSystem_SetSimShapeFilter :: proc(system: ^PhysicsSystem, filter: ^SimShapeFilter) --- 897 PhysicsSystem_WereBodiesInContact :: proc(system: ^PhysicsSystem, body1: BodyID, body2: BodyID) -> bool --- 898 PhysicsSystem_GetNumBodies :: proc(system: ^PhysicsSystem) -> u32 --- 899 PhysicsSystem_GetNumActiveBodies :: proc(system: ^PhysicsSystem, type: BodyType) -> u32 --- 900 PhysicsSystem_GetMaxBodies :: proc(system: ^PhysicsSystem) -> u32 --- 901 PhysicsSystem_GetNumConstraints :: proc(system: ^PhysicsSystem) -> u32 --- 902 PhysicsSystem_SetGravity :: proc(system: ^PhysicsSystem, value: ^Vec3) --- 903 PhysicsSystem_GetGravity :: proc(system: ^PhysicsSystem, result: ^Vec3) --- 904 PhysicsSystem_AddConstraint :: proc(system: ^PhysicsSystem, constraint: ^Constraint) --- 905 PhysicsSystem_RemoveConstraint :: proc(system: ^PhysicsSystem, constraint: ^Constraint) --- 906 PhysicsSystem_AddConstraints :: proc(system: ^PhysicsSystem, constraints: ^^Constraint, count: u32) --- 907 PhysicsSystem_RemoveConstraints :: proc(system: ^PhysicsSystem, constraints: ^^Constraint, count: u32) --- 908 PhysicsSystem_AddStepListener :: proc(system: ^PhysicsSystem, listener: ^PhysicsStepListener) --- 909 PhysicsSystem_RemoveStepListener :: proc(system: ^PhysicsSystem, listener: ^PhysicsStepListener) --- 910 PhysicsSystem_GetBodies :: proc(system: ^PhysicsSystem, ids: ^BodyID, count: u32) --- 911 PhysicsSystem_GetConstraints :: proc(system: ^PhysicsSystem, constraints: ^^Constraint, count: u32) --- 912 PhysicsSystem_ActivateBodiesInAABox :: proc(system: ^PhysicsSystem, box: ^AABox, layer: ObjectLayer) --- 913 PhysicsSystem_DrawBodies :: proc(system: ^PhysicsSystem, settings: ^DrawSettings, renderer: ^DebugRenderer, bodyFilter: ^BodyDrawFilter) --- /* = nullptr */ 914 PhysicsSystem_DrawConstraints :: proc(system: ^PhysicsSystem, renderer: ^DebugRenderer) --- 915 PhysicsSystem_DrawConstraintLimits :: proc(system: ^PhysicsSystem, renderer: ^DebugRenderer) --- 916 PhysicsSystem_DrawConstraintReferenceFrame :: proc(system: ^PhysicsSystem, renderer: ^DebugRenderer) --- 917 } 918 919 /* PhysicsStepListener */ 920 PhysicsStepListenerContext :: struct { 921 deltaTime: f32, 922 isFirstStep: Bool, 923 isLastStep: Bool, 924 physicsSystem: ^PhysicsSystem, 925 } 926 927 PhysicsStepListener_Procs :: struct { 928 OnStep: proc "c" (userData: rawptr, _context: ^PhysicsStepListenerContext), 929 } 930 931 @(default_calling_convention="c", link_prefix="JPH_") 932 foreign lib { 933 PhysicsStepListener_SetProcs :: proc(procs: ^PhysicsStepListener_Procs) --- 934 PhysicsStepListener_Create :: proc(userData: rawptr) -> ^PhysicsStepListener --- 935 PhysicsStepListener_Destroy :: proc(listener: ^PhysicsStepListener) --- 936 937 /* Math */ 938 Math_Sin :: proc(value: f32) -> f32 --- 939 Math_Cos :: proc(value: f32) -> f32 --- 940 Quat_FromTo :: proc(from: ^Vec3, to: ^Vec3, quat: ^Quat) --- 941 Quat_GetAxisAngle :: proc(quat: ^Quat, outAxis: ^Vec3, outAngle: ^f32) --- 942 Quat_GetEulerAngles :: proc(quat: ^Quat, result: ^Vec3) --- 943 Quat_RotateAxisX :: proc(quat: ^Quat, result: ^Vec3) --- 944 Quat_RotateAxisY :: proc(quat: ^Quat, result: ^Vec3) --- 945 Quat_RotateAxisZ :: proc(quat: ^Quat, result: ^Vec3) --- 946 Quat_Inversed :: proc(quat: ^Quat, result: ^Quat) --- 947 Quat_GetPerpendicular :: proc(quat: ^Quat, result: ^Quat) --- 948 Quat_GetRotationAngle :: proc(quat: ^Quat, axis: ^Vec3) -> f32 --- 949 Quat_FromEulerAngles :: proc(angles: ^Vec3, result: ^Quat) --- 950 Quat_Add :: proc(q1: ^Quat, q2: ^Quat, result: ^Quat) --- 951 Quat_Subtract :: proc(q1: ^Quat, q2: ^Quat, result: ^Quat) --- 952 Quat_Multiply :: proc(q1: ^Quat, q2: ^Quat, result: ^Quat) --- 953 Quat_MultiplyScalar :: proc(q: ^Quat, scalar: f32, result: ^Quat) --- 954 Quat_DivideScalar :: proc(q: ^Quat, scalar: f32, result: ^Quat) --- 955 Quat_Dot :: proc(q1: ^Quat, q2: ^Quat, result: ^f32) --- 956 Quat_Conjugated :: proc(quat: ^Quat, result: ^Quat) --- 957 Quat_GetTwist :: proc(quat: ^Quat, axis: ^Vec3, result: ^Quat) --- 958 Quat_GetSwingTwist :: proc(quat: ^Quat, outSwing: ^Quat, outTwist: ^Quat) --- 959 Quat_Lerp :: proc(from: ^Quat, to: ^Quat, fraction: f32, result: ^Quat) --- 960 Quat_Slerp :: proc(from: ^Quat, to: ^Quat, fraction: f32, result: ^Quat) --- 961 Quat_Rotate :: proc(quat: ^Quat, vec: ^Vec3, result: ^Vec3) --- 962 Quat_InverseRotate :: proc(quat: ^Quat, vec: ^Vec3, result: ^Vec3) --- 963 Vec3_AxisX :: proc(result: ^Vec3) --- 964 Vec3_AxisY :: proc(result: ^Vec3) --- 965 Vec3_AxisZ :: proc(result: ^Vec3) --- 966 Vec3_IsClose :: proc(v1: ^Vec3, v2: ^Vec3, maxDistSq: f32) -> bool --- 967 Vec3_IsNearZero :: proc(v: ^Vec3, maxDistSq: f32) -> bool --- 968 Vec3_IsNormalized :: proc(v: ^Vec3, tolerance: f32) -> bool --- 969 Vec3_IsNaN :: proc(v: ^Vec3) -> bool --- 970 Vec3_Negate :: proc(v: ^Vec3, result: ^Vec3) --- 971 Vec3_Normalized :: proc(v: ^Vec3, result: ^Vec3) --- 972 Vec3_Cross :: proc(v1: ^Vec3, v2: ^Vec3, result: ^Vec3) --- 973 Vec3_Abs :: proc(v: ^Vec3, result: ^Vec3) --- 974 Vec3_Length :: proc(v: ^Vec3) -> f32 --- 975 Vec3_LengthSquared :: proc(v: ^Vec3) -> f32 --- 976 Vec3_DotProduct :: proc(v1: ^Vec3, v2: ^Vec3, result: ^f32) --- 977 Vec3_Normalize :: proc(v: ^Vec3, result: ^Vec3) --- 978 Vec3_Add :: proc(v1: ^Vec3, v2: ^Vec3, result: ^Vec3) --- 979 Vec3_Subtract :: proc(v1: ^Vec3, v2: ^Vec3, result: ^Vec3) --- 980 Vec3_Multiply :: proc(v1: ^Vec3, v2: ^Vec3, result: ^Vec3) --- 981 Vec3_MultiplyScalar :: proc(v: ^Vec3, scalar: f32, result: ^Vec3) --- 982 Vec3_MultiplyMatrix :: proc(left: ^Mat4, right: ^Vec3, result: ^Vec3) --- 983 Vec3_Divide :: proc(v1: ^Vec3, v2: ^Vec3, result: ^Vec3) --- 984 Vec3_DivideScalar :: proc(v: ^Vec3, scalar: f32, result: ^Vec3) --- 985 Mat4_Add :: proc(m1: ^Mat4, m2: ^Mat4, result: ^Mat4) --- 986 Mat4_Subtract :: proc(m1: ^Mat4, m2: ^Mat4, result: ^Mat4) --- 987 Mat4_Multiply :: proc(m1: ^Mat4, m2: ^Mat4, result: ^Mat4) --- 988 Mat4_MultiplyScalar :: proc(m: ^Mat4, scalar: f32, result: ^Mat4) --- 989 Mat4_Zero :: proc(result: ^Mat4) --- 990 Mat4_Identity :: proc(result: ^Mat4) --- 991 Mat4_Rotation :: proc(result: ^Mat4, rotation: ^Quat) --- 992 Mat4_Rotation2 :: proc(result: ^Mat4, axis: ^Vec3, angle: f32) --- 993 Mat4_Translation :: proc(result: ^Mat4, translation: ^Vec3) --- 994 Mat4_RotationTranslation :: proc(result: ^Mat4, rotation: ^Quat, translation: ^Vec3) --- 995 Mat4_InverseRotationTranslation :: proc(result: ^Mat4, rotation: ^Quat, translation: ^Vec3) --- 996 Mat4_Scale :: proc(result: ^Mat4, scale: ^Vec3) --- 997 Mat4_Transposed :: proc(m: ^Mat4, result: ^Mat4) --- 998 Mat4_Inversed :: proc(_matrix: ^Mat4, result: ^Mat4) --- 999 Mat4_GetAxisX :: proc(_matrix: ^Mat4, result: ^Vec3) --- 1000 Mat4_GetAxisY :: proc(_matrix: ^Mat4, result: ^Vec3) --- 1001 Mat4_GetAxisZ :: proc(_matrix: ^Mat4, result: ^Vec3) --- 1002 Mat4_GetTranslation :: proc(_matrix: ^Mat4, result: ^Vec3) --- 1003 Mat4_GetQuaternion :: proc(_matrix: ^Mat4, result: ^Quat) --- 1004 1005 /* Material */ 1006 PhysicsMaterial_Create :: proc(name: cstring, color: u32) -> ^PhysicsMaterial --- 1007 PhysicsMaterial_Destroy :: proc(material: ^PhysicsMaterial) --- 1008 PhysicsMaterial_GetDebugName :: proc(material: ^PhysicsMaterial) -> cstring --- 1009 PhysicsMaterial_GetDebugColor :: proc(material: ^PhysicsMaterial) -> u32 --- 1010 1011 /* GroupFilter/GroupFilterTable */ 1012 GroupFilter_Destroy :: proc(groupFilter: ^GroupFilter) --- 1013 GroupFilter_CanCollide :: proc(groupFilter: ^GroupFilter, group1: ^CollisionGroup, group2: ^CollisionGroup) -> bool --- 1014 GroupFilterTable_Create :: proc(numSubGroups: u32) -> ^GroupFilterTable --- /* = 0*/ 1015 GroupFilterTable_DisableCollision :: proc(table: ^GroupFilterTable, subGroup1: CollisionSubGroupID, subGroup2: CollisionSubGroupID) --- 1016 GroupFilterTable_EnableCollision :: proc(table: ^GroupFilterTable, subGroup1: CollisionSubGroupID, subGroup2: CollisionSubGroupID) --- 1017 GroupFilterTable_IsCollisionEnabled :: proc(table: ^GroupFilterTable, subGroup1: CollisionSubGroupID, subGroup2: CollisionSubGroupID) -> bool --- 1018 1019 /* ShapeSettings */ 1020 ShapeSettings_Destroy :: proc(settings: ^ShapeSettings) --- 1021 ShapeSettings_GetUserData :: proc(settings: ^ShapeSettings) -> u64 --- 1022 ShapeSettings_SetUserData :: proc(settings: ^ShapeSettings, userData: u64) --- 1023 1024 /* Shape */ 1025 Shape_Destroy :: proc(shape: ^Shape) --- 1026 Shape_GetType :: proc(shape: ^Shape) -> ShapeType --- 1027 Shape_GetSubType :: proc(shape: ^Shape) -> ShapeSubType --- 1028 Shape_GetUserData :: proc(shape: ^Shape) -> u64 --- 1029 Shape_SetUserData :: proc(shape: ^Shape, userData: u64) --- 1030 Shape_MustBeStatic :: proc(shape: ^Shape) -> bool --- 1031 Shape_GetCenterOfMass :: proc(shape: ^Shape, result: ^Vec3) --- 1032 Shape_GetLocalBounds :: proc(shape: ^Shape, result: ^AABox) --- 1033 Shape_GetSubShapeIDBitsRecursive :: proc(shape: ^Shape) -> u32 --- 1034 Shape_GetWorldSpaceBounds :: proc(shape: ^Shape, centerOfMassTransform: ^RMat4, scale: ^Vec3, result: ^AABox) --- 1035 Shape_GetInnerRadius :: proc(shape: ^Shape) -> f32 --- 1036 Shape_GetMassProperties :: proc(shape: ^Shape, result: ^MassProperties) --- 1037 Shape_GetLeafShape :: proc(shape: ^Shape, subShapeID: SubShapeID, remainder: ^SubShapeID) -> ^Shape --- 1038 Shape_GetMaterial :: proc(shape: ^Shape, subShapeID: SubShapeID) -> ^PhysicsMaterial --- 1039 Shape_GetSurfaceNormal :: proc(shape: ^Shape, subShapeID: SubShapeID, localPosition: ^Vec3, normal: ^Vec3) --- 1040 Shape_GetSupportingFace :: proc(shape: ^Shape, subShapeID: SubShapeID, direction: ^Vec3, scale: ^Vec3, centerOfMassTransform: ^Mat4, outVertices: ^SupportingFace) --- 1041 Shape_GetVolume :: proc(shape: ^Shape) -> f32 --- 1042 Shape_IsValidScale :: proc(shape: ^Shape, scale: ^Vec3) -> bool --- 1043 Shape_MakeScaleValid :: proc(shape: ^Shape, scale: ^Vec3, result: ^Vec3) --- 1044 Shape_ScaleShape :: proc(shape: ^Shape, scale: ^Vec3) -> ^Shape --- 1045 Shape_CastRay :: proc(shape: ^Shape, origin: ^Vec3, direction: ^Vec3, hit: ^RayCastResult) -> bool --- 1046 Shape_CastRay2 :: proc(shape: ^Shape, origin: ^Vec3, direction: ^Vec3, rayCastSettings: ^RayCastSettings, collectorType: CollisionCollectorType, callback: CastRayResultCallback, userData: rawptr, shapeFilter: ^ShapeFilter) -> bool --- 1047 Shape_CollidePoint :: proc(shape: ^Shape, point: ^Vec3, shapeFilter: ^ShapeFilter) -> bool --- 1048 Shape_CollidePoint2 :: proc(shape: ^Shape, point: ^Vec3, collectorType: CollisionCollectorType, callback: CollidePointResultCallback, userData: rawptr, shapeFilter: ^ShapeFilter) -> bool --- 1049 1050 /* JPH_ConvexShape */ 1051 ConvexShapeSettings_GetDensity :: proc(shape: ^ConvexShapeSettings) -> f32 --- 1052 ConvexShapeSettings_SetDensity :: proc(shape: ^ConvexShapeSettings, value: f32) --- 1053 ConvexShape_GetDensity :: proc(shape: ^ConvexShape) -> f32 --- 1054 ConvexShape_SetDensity :: proc(shape: ^ConvexShape, inDensity: f32) --- 1055 1056 /* BoxShape */ 1057 BoxShapeSettings_Create :: proc(halfExtent: ^Vec3, convexRadius: f32) -> ^BoxShapeSettings --- 1058 BoxShapeSettings_CreateShape :: proc(settings: ^BoxShapeSettings) -> ^BoxShape --- 1059 BoxShape_Create :: proc(halfExtent: ^Vec3, convexRadius: f32) -> ^BoxShape --- 1060 BoxShape_GetHalfExtent :: proc(shape: ^BoxShape, halfExtent: ^Vec3) --- 1061 BoxShape_GetConvexRadius :: proc(shape: ^BoxShape) -> f32 --- 1062 1063 /* SphereShape */ 1064 SphereShapeSettings_Create :: proc(radius: f32) -> ^SphereShapeSettings --- 1065 SphereShapeSettings_CreateShape :: proc(settings: ^SphereShapeSettings) -> ^SphereShape --- 1066 SphereShapeSettings_GetRadius :: proc(settings: ^SphereShapeSettings) -> f32 --- 1067 SphereShapeSettings_SetRadius :: proc(settings: ^SphereShapeSettings, radius: f32) --- 1068 SphereShape_Create :: proc(radius: f32) -> ^SphereShape --- 1069 SphereShape_GetRadius :: proc(shape: ^SphereShape) -> f32 --- 1070 1071 /* PlaneShape */ 1072 PlaneShapeSettings_Create :: proc(plane: ^Plane, material: ^PhysicsMaterial, halfExtent: f32) -> ^PlaneShapeSettings --- 1073 PlaneShapeSettings_CreateShape :: proc(settings: ^PlaneShapeSettings) -> ^PlaneShape --- 1074 PlaneShape_Create :: proc(plane: ^Plane, material: ^PhysicsMaterial, halfExtent: f32) -> ^PlaneShape --- 1075 PlaneShape_GetPlane :: proc(shape: ^PlaneShape, result: ^Plane) --- 1076 PlaneShape_GetHalfExtent :: proc(shape: ^PlaneShape) -> f32 --- 1077 1078 /* TriangleShape */ 1079 TriangleShapeSettings_Create :: proc(v1: ^Vec3, v2: ^Vec3, v3: ^Vec3, convexRadius: f32) -> ^TriangleShapeSettings --- 1080 TriangleShapeSettings_CreateShape :: proc(settings: ^TriangleShapeSettings) -> ^TriangleShape --- 1081 TriangleShape_Create :: proc(v1: ^Vec3, v2: ^Vec3, v3: ^Vec3, convexRadius: f32) -> ^TriangleShape --- 1082 TriangleShape_GetConvexRadius :: proc(shape: ^TriangleShape) -> f32 --- 1083 TriangleShape_GetVertex1 :: proc(shape: ^TriangleShape, result: ^Vec3) --- 1084 TriangleShape_GetVertex2 :: proc(shape: ^TriangleShape, result: ^Vec3) --- 1085 TriangleShape_GetVertex3 :: proc(shape: ^TriangleShape, result: ^Vec3) --- 1086 1087 /* CapsuleShape */ 1088 CapsuleShapeSettings_Create :: proc(halfHeightOfCylinder: f32, radius: f32) -> ^CapsuleShapeSettings --- 1089 CapsuleShapeSettings_CreateShape :: proc(settings: ^CapsuleShapeSettings) -> ^CapsuleShape --- 1090 CapsuleShape_Create :: proc(halfHeightOfCylinder: f32, radius: f32) -> ^CapsuleShape --- 1091 CapsuleShape_GetRadius :: proc(shape: ^CapsuleShape) -> f32 --- 1092 CapsuleShape_GetHalfHeightOfCylinder :: proc(shape: ^CapsuleShape) -> f32 --- 1093 1094 /* CylinderShape */ 1095 CylinderShapeSettings_Create :: proc(halfHeight: f32, radius: f32, convexRadius: f32) -> ^CylinderShapeSettings --- 1096 CylinderShapeSettings_CreateShape :: proc(settings: ^CylinderShapeSettings) -> ^CylinderShape --- 1097 CylinderShape_Create :: proc(halfHeight: f32, radius: f32) -> ^CylinderShape --- 1098 CylinderShape_GetRadius :: proc(shape: ^CylinderShape) -> f32 --- 1099 CylinderShape_GetHalfHeight :: proc(shape: ^CylinderShape) -> f32 --- 1100 1101 /* TaperedCylinderShape */ 1102 TaperedCylinderShapeSettings_Create :: proc(halfHeightOfTaperedCylinder: f32, topRadius: f32, bottomRadius: f32, convexRadius: f32, material: ^PhysicsMaterial) -> ^TaperedCylinderShapeSettings --- /* = cDefaultConvexRadius*/ 1103 TaperedCylinderShapeSettings_CreateShape :: proc(settings: ^TaperedCylinderShapeSettings) -> ^TaperedCylinderShape --- 1104 TaperedCylinderShape_GetTopRadius :: proc(shape: ^TaperedCylinderShape) -> f32 --- 1105 TaperedCylinderShape_GetBottomRadius :: proc(shape: ^TaperedCylinderShape) -> f32 --- 1106 TaperedCylinderShape_GetConvexRadius :: proc(shape: ^TaperedCylinderShape) -> f32 --- 1107 TaperedCylinderShape_GetHalfHeight :: proc(shape: ^TaperedCylinderShape) -> f32 --- 1108 1109 /* ConvexHullShape */ 1110 ConvexHullShapeSettings_Create :: proc(points: ^Vec3, pointsCount: u32, maxConvexRadius: f32) -> ^ConvexHullShapeSettings --- 1111 ConvexHullShapeSettings_CreateShape :: proc(settings: ^ConvexHullShapeSettings) -> ^ConvexHullShape --- 1112 ConvexHullShape_GetNumPoints :: proc(shape: ^ConvexHullShape) -> u32 --- 1113 ConvexHullShape_GetPoint :: proc(shape: ^ConvexHullShape, index: u32, result: ^Vec3) --- 1114 ConvexHullShape_GetNumFaces :: proc(shape: ^ConvexHullShape) -> u32 --- 1115 ConvexHullShape_GetNumVerticesInFace :: proc(shape: ^ConvexHullShape, faceIndex: u32) -> u32 --- 1116 ConvexHullShape_GetFaceVertices :: proc(shape: ^ConvexHullShape, faceIndex: u32, maxVertices: u32, vertices: ^u32) -> u32 --- 1117 1118 /* MeshShape */ 1119 MeshShapeSettings_Create :: proc(triangles: ^Triangle, triangleCount: u32) -> ^MeshShapeSettings --- 1120 MeshShapeSettings_Create2 :: proc(vertices: ^Vec3, verticesCount: u32, triangles: ^IndexedTriangle, triangleCount: u32) -> ^MeshShapeSettings --- 1121 MeshShapeSettings_GetMaxTrianglesPerLeaf :: proc(settings: ^MeshShapeSettings) -> u32 --- 1122 MeshShapeSettings_SetMaxTrianglesPerLeaf :: proc(settings: ^MeshShapeSettings, value: u32) --- 1123 MeshShapeSettings_GetActiveEdgeCosThresholdAngle :: proc(settings: ^MeshShapeSettings) -> f32 --- 1124 MeshShapeSettings_SetActiveEdgeCosThresholdAngle :: proc(settings: ^MeshShapeSettings, value: f32) --- 1125 MeshShapeSettings_GetPerTriangleUserData :: proc(settings: ^MeshShapeSettings) -> bool --- 1126 MeshShapeSettings_SetPerTriangleUserData :: proc(settings: ^MeshShapeSettings, value: bool) --- 1127 MeshShapeSettings_GetBuildQuality :: proc(settings: ^MeshShapeSettings) -> Mesh_Shape_BuildQuality --- 1128 MeshShapeSettings_SetBuildQuality :: proc(settings: ^MeshShapeSettings, value: Mesh_Shape_BuildQuality) --- 1129 MeshShapeSettings_Sanitize :: proc(settings: ^MeshShapeSettings) --- 1130 MeshShapeSettings_CreateShape :: proc(settings: ^MeshShapeSettings) -> ^MeshShape --- 1131 MeshShape_GetTriangleUserData :: proc(shape: ^MeshShape, id: SubShapeID) -> u32 --- 1132 1133 /* HeightFieldShape */ 1134 HeightFieldShapeSettings_Create :: proc(samples: ^f32, offset: ^Vec3, scale: ^Vec3, sampleCount: u32, materialIndices: ^u8) -> ^HeightFieldShapeSettings --- 1135 HeightFieldShapeSettings_DetermineMinAndMaxSample :: proc(settings: ^HeightFieldShapeSettings, pOutMinValue: ^f32, pOutMaxValue: ^f32, pOutQuantizationScale: ^f32) --- 1136 HeightFieldShapeSettings_CalculateBitsPerSampleForError :: proc(settings: ^HeightFieldShapeSettings, maxError: f32) -> u32 --- 1137 HeightFieldShapeSettings_GetOffset :: proc(shape: ^HeightFieldShapeSettings, result: ^Vec3) --- 1138 HeightFieldShapeSettings_SetOffset :: proc(settings: ^HeightFieldShapeSettings, value: ^Vec3) --- 1139 HeightFieldShapeSettings_GetScale :: proc(shape: ^HeightFieldShapeSettings, result: ^Vec3) --- 1140 HeightFieldShapeSettings_SetScale :: proc(settings: ^HeightFieldShapeSettings, value: ^Vec3) --- 1141 HeightFieldShapeSettings_GetSampleCount :: proc(settings: ^HeightFieldShapeSettings) -> u32 --- 1142 HeightFieldShapeSettings_SetSampleCount :: proc(settings: ^HeightFieldShapeSettings, value: u32) --- 1143 HeightFieldShapeSettings_GetMinHeightValue :: proc(settings: ^HeightFieldShapeSettings) -> f32 --- 1144 HeightFieldShapeSettings_SetMinHeightValue :: proc(settings: ^HeightFieldShapeSettings, value: f32) --- 1145 HeightFieldShapeSettings_GetMaxHeightValue :: proc(settings: ^HeightFieldShapeSettings) -> f32 --- 1146 HeightFieldShapeSettings_SetMaxHeightValue :: proc(settings: ^HeightFieldShapeSettings, value: f32) --- 1147 HeightFieldShapeSettings_GetBlockSize :: proc(settings: ^HeightFieldShapeSettings) -> u32 --- 1148 HeightFieldShapeSettings_SetBlockSize :: proc(settings: ^HeightFieldShapeSettings, value: u32) --- 1149 HeightFieldShapeSettings_GetBitsPerSample :: proc(settings: ^HeightFieldShapeSettings) -> u32 --- 1150 HeightFieldShapeSettings_SetBitsPerSample :: proc(settings: ^HeightFieldShapeSettings, value: u32) --- 1151 HeightFieldShapeSettings_GetActiveEdgeCosThresholdAngle :: proc(settings: ^HeightFieldShapeSettings) -> f32 --- 1152 HeightFieldShapeSettings_SetActiveEdgeCosThresholdAngle :: proc(settings: ^HeightFieldShapeSettings, value: f32) --- 1153 HeightFieldShapeSettings_CreateShape :: proc(settings: ^HeightFieldShapeSettings) -> ^HeightFieldShape --- 1154 HeightFieldShape_GetSampleCount :: proc(shape: ^HeightFieldShape) -> u32 --- 1155 HeightFieldShape_GetBlockSize :: proc(shape: ^HeightFieldShape) -> u32 --- 1156 HeightFieldShape_GetMaterial :: proc(shape: ^HeightFieldShape, x: u32, y: u32) -> ^PhysicsMaterial --- 1157 HeightFieldShape_GetPosition :: proc(shape: ^HeightFieldShape, x: u32, y: u32, result: ^Vec3) --- 1158 HeightFieldShape_IsNoCollision :: proc(shape: ^HeightFieldShape, x: u32, y: u32) -> bool --- 1159 HeightFieldShape_ProjectOntoSurface :: proc(shape: ^HeightFieldShape, localPosition: ^Vec3, outSurfacePosition: ^Vec3, outSubShapeID: ^SubShapeID) -> bool --- 1160 HeightFieldShape_GetMinHeightValue :: proc(shape: ^HeightFieldShape) -> f32 --- 1161 HeightFieldShape_GetMaxHeightValue :: proc(shape: ^HeightFieldShape) -> f32 --- 1162 1163 /* TaperedCapsuleShape */ 1164 TaperedCapsuleShapeSettings_Create :: proc(halfHeightOfTaperedCylinder: f32, topRadius: f32, bottomRadius: f32) -> ^TaperedCapsuleShapeSettings --- 1165 TaperedCapsuleShapeSettings_CreateShape :: proc(settings: ^TaperedCapsuleShapeSettings) -> ^TaperedCapsuleShape --- 1166 TaperedCapsuleShape_GetTopRadius :: proc(shape: ^TaperedCapsuleShape) -> f32 --- 1167 TaperedCapsuleShape_GetBottomRadius :: proc(shape: ^TaperedCapsuleShape) -> f32 --- 1168 TaperedCapsuleShape_GetHalfHeight :: proc(shape: ^TaperedCapsuleShape) -> f32 --- 1169 1170 /* CompoundShape */ 1171 CompoundShapeSettings_AddShape :: proc(settings: ^CompoundShapeSettings, position: ^Vec3, rotation: ^Quat, shapeSettings: ^ShapeSettings, userData: u32) --- 1172 CompoundShapeSettings_AddShape2 :: proc(settings: ^CompoundShapeSettings, position: ^Vec3, rotation: ^Quat, shape: ^Shape, userData: u32) --- 1173 CompoundShape_GetNumSubShapes :: proc(shape: ^CompoundShape) -> u32 --- 1174 CompoundShape_GetSubShape :: proc(shape: ^CompoundShape, index: u32, subShape: ^^Shape, positionCOM: ^Vec3, rotation: ^Quat, userData: ^u32) --- 1175 CompoundShape_GetSubShapeIndexFromID :: proc(shape: ^CompoundShape, id: SubShapeID, remainder: ^SubShapeID) -> u32 --- 1176 1177 /* StaticCompoundShape */ 1178 StaticCompoundShapeSettings_Create :: proc() -> ^StaticCompoundShapeSettings --- 1179 StaticCompoundShape_Create :: proc(settings: ^StaticCompoundShapeSettings) -> ^StaticCompoundShape --- 1180 1181 /* MutableCompoundShape */ 1182 MutableCompoundShapeSettings_Create :: proc() -> ^MutableCompoundShapeSettings --- 1183 MutableCompoundShape_Create :: proc(settings: ^MutableCompoundShapeSettings) -> ^MutableCompoundShape --- 1184 MutableCompoundShape_AddShape :: proc(shape: ^MutableCompoundShape, position: ^Vec3, rotation: ^Quat, child: ^Shape, userData: u32, index: u32) -> u32 --- /* = 0 */ 1185 MutableCompoundShape_RemoveShape :: proc(shape: ^MutableCompoundShape, index: u32) --- 1186 MutableCompoundShape_ModifyShape :: proc(shape: ^MutableCompoundShape, index: u32, position: ^Vec3, rotation: ^Quat) --- 1187 MutableCompoundShape_ModifyShape2 :: proc(shape: ^MutableCompoundShape, index: u32, position: ^Vec3, rotation: ^Quat, newShape: ^Shape) --- 1188 MutableCompoundShape_AdjustCenterOfMass :: proc(shape: ^MutableCompoundShape) --- 1189 1190 /* DecoratedShape */ 1191 DecoratedShape_GetInnerShape :: proc(shape: ^DecoratedShape) -> ^Shape --- 1192 1193 /* RotatedTranslatedShape */ 1194 RotatedTranslatedShapeSettings_Create :: proc(position: ^Vec3, rotation: ^Quat, shapeSettings: ^ShapeSettings) -> ^RotatedTranslatedShapeSettings --- 1195 RotatedTranslatedShapeSettings_Create2 :: proc(position: ^Vec3, rotation: ^Quat, shape: ^Shape) -> ^RotatedTranslatedShapeSettings --- 1196 RotatedTranslatedShapeSettings_CreateShape :: proc(settings: ^RotatedTranslatedShapeSettings) -> ^RotatedTranslatedShape --- 1197 RotatedTranslatedShape_Create :: proc(position: ^Vec3, rotation: ^Quat, shape: ^Shape) -> ^RotatedTranslatedShape --- 1198 RotatedTranslatedShape_GetPosition :: proc(shape: ^RotatedTranslatedShape, position: ^Vec3) --- 1199 RotatedTranslatedShape_GetRotation :: proc(shape: ^RotatedTranslatedShape, rotation: ^Quat) --- 1200 1201 /* ScaledShape */ 1202 ScaledShapeSettings_Create :: proc(shapeSettings: ^ShapeSettings, scale: ^Vec3) -> ^ScaledShapeSettings --- 1203 ScaledShapeSettings_Create2 :: proc(shape: ^Shape, scale: ^Vec3) -> ^ScaledShapeSettings --- 1204 ScaledShapeSettings_CreateShape :: proc(settings: ^ScaledShapeSettings) -> ^ScaledShape --- 1205 ScaledShape_Create :: proc(shape: ^Shape, scale: ^Vec3) -> ^ScaledShape --- 1206 ScaledShape_GetScale :: proc(shape: ^ScaledShape, result: ^Vec3) --- 1207 1208 /* OffsetCenterOfMassShape */ 1209 OffsetCenterOfMassShapeSettings_Create :: proc(offset: ^Vec3, shapeSettings: ^ShapeSettings) -> ^OffsetCenterOfMassShapeSettings --- 1210 OffsetCenterOfMassShapeSettings_Create2 :: proc(offset: ^Vec3, shape: ^Shape) -> ^OffsetCenterOfMassShapeSettings --- 1211 OffsetCenterOfMassShapeSettings_CreateShape :: proc(settings: ^OffsetCenterOfMassShapeSettings) -> ^OffsetCenterOfMassShape --- 1212 OffsetCenterOfMassShape_Create :: proc(offset: ^Vec3, shape: ^Shape) -> ^OffsetCenterOfMassShape --- 1213 OffsetCenterOfMassShape_GetOffset :: proc(shape: ^OffsetCenterOfMassShape, result: ^Vec3) --- 1214 1215 /* EmptyShape */ 1216 EmptyShapeSettings_Create :: proc(centerOfMass: ^Vec3) -> ^EmptyShapeSettings --- 1217 EmptyShapeSettings_CreateShape :: proc(settings: ^EmptyShapeSettings) -> ^EmptyShape --- 1218 1219 /* JPH_BodyCreationSettings */ 1220 BodyCreationSettings_Create :: proc() -> ^BodyCreationSettings --- 1221 BodyCreationSettings_Create2 :: proc(settings: ^ShapeSettings, position: ^RVec3, rotation: ^Quat, motionType: MotionType, objectLayer: ObjectLayer) -> ^BodyCreationSettings --- 1222 BodyCreationSettings_Create3 :: proc(shape: ^Shape, position: ^RVec3, rotation: ^Quat, motionType: MotionType, objectLayer: ObjectLayer) -> ^BodyCreationSettings --- 1223 BodyCreationSettings_Destroy :: proc(settings: ^BodyCreationSettings) --- 1224 BodyCreationSettings_GetPosition :: proc(settings: ^BodyCreationSettings, result: ^RVec3) --- 1225 BodyCreationSettings_SetPosition :: proc(settings: ^BodyCreationSettings, value: ^RVec3) --- 1226 BodyCreationSettings_GetRotation :: proc(settings: ^BodyCreationSettings, result: ^Quat) --- 1227 BodyCreationSettings_SetRotation :: proc(settings: ^BodyCreationSettings, value: ^Quat) --- 1228 BodyCreationSettings_GetLinearVelocity :: proc(settings: ^BodyCreationSettings, velocity: ^Vec3) --- 1229 BodyCreationSettings_SetLinearVelocity :: proc(settings: ^BodyCreationSettings, velocity: ^Vec3) --- 1230 BodyCreationSettings_GetAngularVelocity :: proc(settings: ^BodyCreationSettings, velocity: ^Vec3) --- 1231 BodyCreationSettings_SetAngularVelocity :: proc(settings: ^BodyCreationSettings, velocity: ^Vec3) --- 1232 BodyCreationSettings_GetUserData :: proc(settings: ^BodyCreationSettings) -> u64 --- 1233 BodyCreationSettings_SetUserData :: proc(settings: ^BodyCreationSettings, value: u64) --- 1234 BodyCreationSettings_GetObjectLayer :: proc(settings: ^BodyCreationSettings) -> ObjectLayer --- 1235 BodyCreationSettings_SetObjectLayer :: proc(settings: ^BodyCreationSettings, value: ObjectLayer) --- 1236 BodyCreationSettings_GetCollisionGroup :: proc(settings: ^BodyCreationSettings, result: ^CollisionGroup) --- 1237 BodyCreationSettings_SetCollisionGroup :: proc(settings: ^BodyCreationSettings, value: ^CollisionGroup) --- 1238 BodyCreationSettings_GetMotionType :: proc(settings: ^BodyCreationSettings) -> MotionType --- 1239 BodyCreationSettings_SetMotionType :: proc(settings: ^BodyCreationSettings, value: MotionType) --- 1240 BodyCreationSettings_GetAllowedDOFs :: proc(settings: ^BodyCreationSettings) -> AllowedDOFs --- 1241 BodyCreationSettings_SetAllowedDOFs :: proc(settings: ^BodyCreationSettings, value: AllowedDOFs) --- 1242 BodyCreationSettings_GetAllowDynamicOrKinematic :: proc(settings: ^BodyCreationSettings) -> bool --- 1243 BodyCreationSettings_SetAllowDynamicOrKinematic :: proc(settings: ^BodyCreationSettings, value: bool) --- 1244 BodyCreationSettings_GetIsSensor :: proc(settings: ^BodyCreationSettings) -> bool --- 1245 BodyCreationSettings_SetIsSensor :: proc(settings: ^BodyCreationSettings, value: bool) --- 1246 BodyCreationSettings_GetCollideKinematicVsNonDynamic :: proc(settings: ^BodyCreationSettings) -> bool --- 1247 BodyCreationSettings_SetCollideKinematicVsNonDynamic :: proc(settings: ^BodyCreationSettings, value: bool) --- 1248 BodyCreationSettings_GetUseManifoldReduction :: proc(settings: ^BodyCreationSettings) -> bool --- 1249 BodyCreationSettings_SetUseManifoldReduction :: proc(settings: ^BodyCreationSettings, value: bool) --- 1250 BodyCreationSettings_GetApplyGyroscopicForce :: proc(settings: ^BodyCreationSettings) -> bool --- 1251 BodyCreationSettings_SetApplyGyroscopicForce :: proc(settings: ^BodyCreationSettings, value: bool) --- 1252 BodyCreationSettings_GetMotionQuality :: proc(settings: ^BodyCreationSettings) -> MotionQuality --- 1253 BodyCreationSettings_SetMotionQuality :: proc(settings: ^BodyCreationSettings, value: MotionQuality) --- 1254 BodyCreationSettings_GetEnhancedInternalEdgeRemoval :: proc(settings: ^BodyCreationSettings) -> bool --- 1255 BodyCreationSettings_SetEnhancedInternalEdgeRemoval :: proc(settings: ^BodyCreationSettings, value: bool) --- 1256 BodyCreationSettings_GetAllowSleeping :: proc(settings: ^BodyCreationSettings) -> bool --- 1257 BodyCreationSettings_SetAllowSleeping :: proc(settings: ^BodyCreationSettings, value: bool) --- 1258 BodyCreationSettings_GetFriction :: proc(settings: ^BodyCreationSettings) -> f32 --- 1259 BodyCreationSettings_SetFriction :: proc(settings: ^BodyCreationSettings, value: f32) --- 1260 BodyCreationSettings_GetRestitution :: proc(settings: ^BodyCreationSettings) -> f32 --- 1261 BodyCreationSettings_SetRestitution :: proc(settings: ^BodyCreationSettings, value: f32) --- 1262 BodyCreationSettings_GetLinearDamping :: proc(settings: ^BodyCreationSettings) -> f32 --- 1263 BodyCreationSettings_SetLinearDamping :: proc(settings: ^BodyCreationSettings, value: f32) --- 1264 BodyCreationSettings_GetAngularDamping :: proc(settings: ^BodyCreationSettings) -> f32 --- 1265 BodyCreationSettings_SetAngularDamping :: proc(settings: ^BodyCreationSettings, value: f32) --- 1266 BodyCreationSettings_GetMaxLinearVelocity :: proc(settings: ^BodyCreationSettings) -> f32 --- 1267 BodyCreationSettings_SetMaxLinearVelocity :: proc(settings: ^BodyCreationSettings, value: f32) --- 1268 BodyCreationSettings_GetMaxAngularVelocity :: proc(settings: ^BodyCreationSettings) -> f32 --- 1269 BodyCreationSettings_SetMaxAngularVelocity :: proc(settings: ^BodyCreationSettings, value: f32) --- 1270 BodyCreationSettings_GetGravityFactor :: proc(settings: ^BodyCreationSettings) -> f32 --- 1271 BodyCreationSettings_SetGravityFactor :: proc(settings: ^BodyCreationSettings, value: f32) --- 1272 BodyCreationSettings_GetNumVelocityStepsOverride :: proc(settings: ^BodyCreationSettings) -> u32 --- 1273 BodyCreationSettings_SetNumVelocityStepsOverride :: proc(settings: ^BodyCreationSettings, value: u32) --- 1274 BodyCreationSettings_GetNumPositionStepsOverride :: proc(settings: ^BodyCreationSettings) -> u32 --- 1275 BodyCreationSettings_SetNumPositionStepsOverride :: proc(settings: ^BodyCreationSettings, value: u32) --- 1276 BodyCreationSettings_GetOverrideMassProperties :: proc(settings: ^BodyCreationSettings) -> OverrideMassProperties --- 1277 BodyCreationSettings_SetOverrideMassProperties :: proc(settings: ^BodyCreationSettings, value: OverrideMassProperties) --- 1278 BodyCreationSettings_GetInertiaMultiplier :: proc(settings: ^BodyCreationSettings) -> f32 --- 1279 BodyCreationSettings_SetInertiaMultiplier :: proc(settings: ^BodyCreationSettings, value: f32) --- 1280 BodyCreationSettings_GetMassPropertiesOverride :: proc(settings: ^BodyCreationSettings, result: ^MassProperties) --- 1281 BodyCreationSettings_SetMassPropertiesOverride :: proc(settings: ^BodyCreationSettings, massProperties: ^MassProperties) --- 1282 1283 /* JPH_SoftBodyCreationSettings */ 1284 SoftBodyCreationSettings_Create :: proc() -> ^SoftBodyCreationSettings --- 1285 SoftBodyCreationSettings_Destroy :: proc(settings: ^SoftBodyCreationSettings) --- 1286 1287 /* JPH_Constraint */ 1288 Constraint_Destroy :: proc(constraint: ^Constraint) --- 1289 Constraint_GetType :: proc(constraint: ^Constraint) -> ConstraintType --- 1290 Constraint_GetSubType :: proc(constraint: ^Constraint) -> ConstraintSubType --- 1291 Constraint_GetConstraintPriority :: proc(constraint: ^Constraint) -> u32 --- 1292 Constraint_SetConstraintPriority :: proc(constraint: ^Constraint, priority: u32) --- 1293 Constraint_GetNumVelocityStepsOverride :: proc(constraint: ^Constraint) -> u32 --- 1294 Constraint_SetNumVelocityStepsOverride :: proc(constraint: ^Constraint, value: u32) --- 1295 Constraint_GetNumPositionStepsOverride :: proc(constraint: ^Constraint) -> u32 --- 1296 Constraint_SetNumPositionStepsOverride :: proc(constraint: ^Constraint, value: u32) --- 1297 Constraint_GetEnabled :: proc(constraint: ^Constraint) -> bool --- 1298 Constraint_SetEnabled :: proc(constraint: ^Constraint, enabled: bool) --- 1299 Constraint_GetUserData :: proc(constraint: ^Constraint) -> u64 --- 1300 Constraint_SetUserData :: proc(constraint: ^Constraint, userData: u64) --- 1301 Constraint_NotifyShapeChanged :: proc(constraint: ^Constraint, bodyID: BodyID, deltaCOM: ^Vec3) --- 1302 Constraint_ResetWarmStart :: proc(constraint: ^Constraint) --- 1303 Constraint_IsActive :: proc(constraint: ^Constraint) -> bool --- 1304 Constraint_SetupVelocityConstraint :: proc(constraint: ^Constraint, deltaTime: f32) --- 1305 Constraint_WarmStartVelocityConstraint :: proc(constraint: ^Constraint, warmStartImpulseRatio: f32) --- 1306 Constraint_SolveVelocityConstraint :: proc(constraint: ^Constraint, deltaTime: f32) -> bool --- 1307 Constraint_SolvePositionConstraint :: proc(constraint: ^Constraint, deltaTime: f32, baumgarte: f32) -> bool --- 1308 1309 /* JPH_TwoBodyConstraint */ 1310 TwoBodyConstraint_GetBody1 :: proc(constraint: ^TwoBodyConstraint) -> ^Body --- 1311 TwoBodyConstraint_GetBody2 :: proc(constraint: ^TwoBodyConstraint) -> ^Body --- 1312 TwoBodyConstraint_GetConstraintToBody1Matrix :: proc(constraint: ^TwoBodyConstraint, result: ^Mat4) --- 1313 TwoBodyConstraint_GetConstraintToBody2Matrix :: proc(constraint: ^TwoBodyConstraint, result: ^Mat4) --- 1314 1315 /* JPH_FixedConstraint */ 1316 FixedConstraintSettings_Init :: proc(settings: ^FixedConstraintSettings) --- 1317 FixedConstraint_Create :: proc(settings: ^FixedConstraintSettings, body1: ^Body, body2: ^Body) -> ^FixedConstraint --- 1318 FixedConstraint_GetSettings :: proc(constraint: ^FixedConstraint, settings: ^FixedConstraintSettings) --- 1319 FixedConstraint_GetTotalLambdaPosition :: proc(constraint: ^FixedConstraint, result: ^Vec3) --- 1320 FixedConstraint_GetTotalLambdaRotation :: proc(constraint: ^FixedConstraint, result: ^Vec3) --- 1321 1322 /* JPH_DistanceConstraint */ 1323 DistanceConstraintSettings_Init :: proc(settings: ^DistanceConstraintSettings) --- 1324 DistanceConstraint_Create :: proc(settings: ^DistanceConstraintSettings, body1: ^Body, body2: ^Body) -> ^DistanceConstraint --- 1325 DistanceConstraint_GetSettings :: proc(constraint: ^DistanceConstraint, settings: ^DistanceConstraintSettings) --- 1326 DistanceConstraint_SetDistance :: proc(constraint: ^DistanceConstraint, minDistance: f32, maxDistance: f32) --- 1327 DistanceConstraint_GetMinDistance :: proc(constraint: ^DistanceConstraint) -> f32 --- 1328 DistanceConstraint_GetMaxDistance :: proc(constraint: ^DistanceConstraint) -> f32 --- 1329 DistanceConstraint_GetLimitsSpringSettings :: proc(constraint: ^DistanceConstraint, result: ^SpringSettings) --- 1330 DistanceConstraint_SetLimitsSpringSettings :: proc(constraint: ^DistanceConstraint, settings: ^SpringSettings) --- 1331 DistanceConstraint_GetTotalLambdaPosition :: proc(constraint: ^DistanceConstraint) -> f32 --- 1332 1333 /* JPH_PointConstraint */ 1334 PointConstraintSettings_Init :: proc(settings: ^PointConstraintSettings) --- 1335 PointConstraint_Create :: proc(settings: ^PointConstraintSettings, body1: ^Body, body2: ^Body) -> ^PointConstraint --- 1336 PointConstraint_GetSettings :: proc(constraint: ^PointConstraint, settings: ^PointConstraintSettings) --- 1337 PointConstraint_SetPoint1 :: proc(constraint: ^PointConstraint, space: ConstraintSpace, value: ^RVec3) --- 1338 PointConstraint_SetPoint2 :: proc(constraint: ^PointConstraint, space: ConstraintSpace, value: ^RVec3) --- 1339 PointConstraint_GetLocalSpacePoint1 :: proc(constraint: ^PointConstraint, result: ^Vec3) --- 1340 PointConstraint_GetLocalSpacePoint2 :: proc(constraint: ^PointConstraint, result: ^Vec3) --- 1341 PointConstraint_GetTotalLambdaPosition :: proc(constraint: ^PointConstraint, result: ^Vec3) --- 1342 1343 /* JPH_HingeConstraint */ 1344 HingeConstraintSettings_Init :: proc(settings: ^HingeConstraintSettings) --- 1345 HingeConstraint_Create :: proc(settings: ^HingeConstraintSettings, body1: ^Body, body2: ^Body) -> ^HingeConstraint --- 1346 HingeConstraint_GetSettings :: proc(constraint: ^HingeConstraint, settings: ^HingeConstraintSettings) --- 1347 HingeConstraint_GetLocalSpacePoint1 :: proc(constraint: ^HingeConstraint, result: ^Vec3) --- 1348 HingeConstraint_GetLocalSpacePoint2 :: proc(constraint: ^HingeConstraint, result: ^Vec3) --- 1349 HingeConstraint_GetLocalSpaceHingeAxis1 :: proc(constraint: ^HingeConstraint, result: ^Vec3) --- 1350 HingeConstraint_GetLocalSpaceHingeAxis2 :: proc(constraint: ^HingeConstraint, result: ^Vec3) --- 1351 HingeConstraint_GetLocalSpaceNormalAxis1 :: proc(constraint: ^HingeConstraint, result: ^Vec3) --- 1352 HingeConstraint_GetLocalSpaceNormalAxis2 :: proc(constraint: ^HingeConstraint, result: ^Vec3) --- 1353 HingeConstraint_GetCurrentAngle :: proc(constraint: ^HingeConstraint) -> f32 --- 1354 HingeConstraint_SetMaxFrictionTorque :: proc(constraint: ^HingeConstraint, frictionTorque: f32) --- 1355 HingeConstraint_GetMaxFrictionTorque :: proc(constraint: ^HingeConstraint) -> f32 --- 1356 HingeConstraint_SetMotorSettings :: proc(constraint: ^HingeConstraint, settings: ^MotorSettings) --- 1357 HingeConstraint_GetMotorSettings :: proc(constraint: ^HingeConstraint, result: ^MotorSettings) --- 1358 HingeConstraint_SetMotorState :: proc(constraint: ^HingeConstraint, state: MotorState) --- 1359 HingeConstraint_GetMotorState :: proc(constraint: ^HingeConstraint) -> MotorState --- 1360 HingeConstraint_SetTargetAngularVelocity :: proc(constraint: ^HingeConstraint, angularVelocity: f32) --- 1361 HingeConstraint_GetTargetAngularVelocity :: proc(constraint: ^HingeConstraint) -> f32 --- 1362 HingeConstraint_SetTargetAngle :: proc(constraint: ^HingeConstraint, angle: f32) --- 1363 HingeConstraint_GetTargetAngle :: proc(constraint: ^HingeConstraint) -> f32 --- 1364 HingeConstraint_SetLimits :: proc(constraint: ^HingeConstraint, inLimitsMin: f32, inLimitsMax: f32) --- 1365 HingeConstraint_GetLimitsMin :: proc(constraint: ^HingeConstraint) -> f32 --- 1366 HingeConstraint_GetLimitsMax :: proc(constraint: ^HingeConstraint) -> f32 --- 1367 HingeConstraint_HasLimits :: proc(constraint: ^HingeConstraint) -> bool --- 1368 HingeConstraint_GetLimitsSpringSettings :: proc(constraint: ^HingeConstraint, result: ^SpringSettings) --- 1369 HingeConstraint_SetLimitsSpringSettings :: proc(constraint: ^HingeConstraint, settings: ^SpringSettings) --- 1370 HingeConstraint_GetTotalLambdaPosition :: proc(constraint: ^HingeConstraint, result: ^Vec3) --- 1371 HingeConstraint_GetTotalLambdaRotation :: proc(constraint: ^HingeConstraint, rotation: ^[2]f32) --- 1372 HingeConstraint_GetTotalLambdaRotationLimits :: proc(constraint: ^HingeConstraint) -> f32 --- 1373 HingeConstraint_GetTotalLambdaMotor :: proc(constraint: ^HingeConstraint) -> f32 --- 1374 1375 /* JPH_SliderConstraint */ 1376 SliderConstraintSettings_Init :: proc(settings: ^SliderConstraintSettings) --- 1377 SliderConstraintSettings_SetSliderAxis :: proc(settings: ^SliderConstraintSettings, axis: ^Vec3) --- 1378 SliderConstraint_Create :: proc(settings: ^SliderConstraintSettings, body1: ^Body, body2: ^Body) -> ^SliderConstraint --- 1379 SliderConstraint_GetSettings :: proc(constraint: ^SliderConstraint, settings: ^SliderConstraintSettings) --- 1380 SliderConstraint_GetCurrentPosition :: proc(constraint: ^SliderConstraint) -> f32 --- 1381 SliderConstraint_SetMaxFrictionForce :: proc(constraint: ^SliderConstraint, frictionForce: f32) --- 1382 SliderConstraint_GetMaxFrictionForce :: proc(constraint: ^SliderConstraint) -> f32 --- 1383 SliderConstraint_SetMotorSettings :: proc(constraint: ^SliderConstraint, settings: ^MotorSettings) --- 1384 SliderConstraint_GetMotorSettings :: proc(constraint: ^SliderConstraint, result: ^MotorSettings) --- 1385 SliderConstraint_SetMotorState :: proc(constraint: ^SliderConstraint, state: MotorState) --- 1386 SliderConstraint_GetMotorState :: proc(constraint: ^SliderConstraint) -> MotorState --- 1387 SliderConstraint_SetTargetVelocity :: proc(constraint: ^SliderConstraint, velocity: f32) --- 1388 SliderConstraint_GetTargetVelocity :: proc(constraint: ^SliderConstraint) -> f32 --- 1389 SliderConstraint_SetTargetPosition :: proc(constraint: ^SliderConstraint, position: f32) --- 1390 SliderConstraint_GetTargetPosition :: proc(constraint: ^SliderConstraint) -> f32 --- 1391 SliderConstraint_SetLimits :: proc(constraint: ^SliderConstraint, inLimitsMin: f32, inLimitsMax: f32) --- 1392 SliderConstraint_GetLimitsMin :: proc(constraint: ^SliderConstraint) -> f32 --- 1393 SliderConstraint_GetLimitsMax :: proc(constraint: ^SliderConstraint) -> f32 --- 1394 SliderConstraint_HasLimits :: proc(constraint: ^SliderConstraint) -> bool --- 1395 SliderConstraint_GetLimitsSpringSettings :: proc(constraint: ^SliderConstraint, result: ^SpringSettings) --- 1396 SliderConstraint_SetLimitsSpringSettings :: proc(constraint: ^SliderConstraint, settings: ^SpringSettings) --- 1397 SliderConstraint_GetTotalLambdaPosition :: proc(constraint: ^SliderConstraint, position: ^[2]f32) --- 1398 SliderConstraint_GetTotalLambdaPositionLimits :: proc(constraint: ^SliderConstraint) -> f32 --- 1399 SliderConstraint_GetTotalLambdaRotation :: proc(constraint: ^SliderConstraint, result: ^Vec3) --- 1400 SliderConstraint_GetTotalLambdaMotor :: proc(constraint: ^SliderConstraint) -> f32 --- 1401 1402 /* JPH_ConeConstraint */ 1403 ConeConstraintSettings_Init :: proc(settings: ^ConeConstraintSettings) --- 1404 ConeConstraint_Create :: proc(settings: ^ConeConstraintSettings, body1: ^Body, body2: ^Body) -> ^ConeConstraint --- 1405 ConeConstraint_GetSettings :: proc(constraint: ^ConeConstraint, settings: ^ConeConstraintSettings) --- 1406 ConeConstraint_SetHalfConeAngle :: proc(constraint: ^ConeConstraint, halfConeAngle: f32) --- 1407 ConeConstraint_GetCosHalfConeAngle :: proc(constraint: ^ConeConstraint) -> f32 --- 1408 ConeConstraint_GetTotalLambdaPosition :: proc(constraint: ^ConeConstraint, result: ^Vec3) --- 1409 ConeConstraint_GetTotalLambdaRotation :: proc(constraint: ^ConeConstraint) -> f32 --- 1410 1411 /* JPH_SwingTwistConstraint */ 1412 SwingTwistConstraintSettings_Init :: proc(settings: ^SwingTwistConstraintSettings) --- 1413 SwingTwistConstraint_Create :: proc(settings: ^SwingTwistConstraintSettings, body1: ^Body, body2: ^Body) -> ^SwingTwistConstraint --- 1414 SwingTwistConstraint_GetSettings :: proc(constraint: ^SwingTwistConstraint, settings: ^SwingTwistConstraintSettings) --- 1415 SwingTwistConstraint_GetNormalHalfConeAngle :: proc(constraint: ^SwingTwistConstraint) -> f32 --- 1416 SwingTwistConstraint_GetTotalLambdaPosition :: proc(constraint: ^SwingTwistConstraint, result: ^Vec3) --- 1417 SwingTwistConstraint_GetTotalLambdaTwist :: proc(constraint: ^SwingTwistConstraint) -> f32 --- 1418 SwingTwistConstraint_GetTotalLambdaSwingY :: proc(constraint: ^SwingTwistConstraint) -> f32 --- 1419 SwingTwistConstraint_GetTotalLambdaSwingZ :: proc(constraint: ^SwingTwistConstraint) -> f32 --- 1420 SwingTwistConstraint_GetTotalLambdaMotor :: proc(constraint: ^SwingTwistConstraint, result: ^Vec3) --- 1421 1422 /* JPH_SixDOFConstraint */ 1423 SixDOFConstraintSettings_Init :: proc(settings: ^SixDOFConstraintSettings) --- 1424 SixDOFConstraintSettings_MakeFreeAxis :: proc(settings: ^SixDOFConstraintSettings, axis: SixDOFConstraintAxis) --- 1425 SixDOFConstraintSettings_IsFreeAxis :: proc(settings: ^SixDOFConstraintSettings, axis: SixDOFConstraintAxis) -> bool --- 1426 SixDOFConstraintSettings_MakeFixedAxis :: proc(settings: ^SixDOFConstraintSettings, axis: SixDOFConstraintAxis) --- 1427 SixDOFConstraintSettings_IsFixedAxis :: proc(settings: ^SixDOFConstraintSettings, axis: SixDOFConstraintAxis) -> bool --- 1428 SixDOFConstraintSettings_SetLimitedAxis :: proc(settings: ^SixDOFConstraintSettings, axis: SixDOFConstraintAxis, min: f32, max: f32) --- 1429 SixDOFConstraint_Create :: proc(settings: ^SixDOFConstraintSettings, body1: ^Body, body2: ^Body) -> ^SixDOFConstraint --- 1430 SixDOFConstraint_GetSettings :: proc(constraint: ^SixDOFConstraint, settings: ^SixDOFConstraintSettings) --- 1431 SixDOFConstraint_GetLimitsMin :: proc(constraint: ^SixDOFConstraint, axis: SixDOFConstraintAxis) -> f32 --- 1432 SixDOFConstraint_GetLimitsMax :: proc(constraint: ^SixDOFConstraint, axis: SixDOFConstraintAxis) -> f32 --- 1433 SixDOFConstraint_GetTotalLambdaPosition :: proc(constraint: ^SixDOFConstraint, result: ^Vec3) --- 1434 SixDOFConstraint_GetTotalLambdaRotation :: proc(constraint: ^SixDOFConstraint, result: ^Vec3) --- 1435 SixDOFConstraint_GetTotalLambdaMotorTranslation :: proc(constraint: ^SixDOFConstraint, result: ^Vec3) --- 1436 SixDOFConstraint_GetTotalLambdaMotorRotation :: proc(constraint: ^SixDOFConstraint, result: ^Vec3) --- 1437 SixDOFConstraint_GetTranslationLimitsMin :: proc(constraint: ^SixDOFConstraint, result: ^Vec3) --- 1438 SixDOFConstraint_GetTranslationLimitsMax :: proc(constraint: ^SixDOFConstraint, result: ^Vec3) --- 1439 SixDOFConstraint_GetRotationLimitsMin :: proc(constraint: ^SixDOFConstraint, result: ^Vec3) --- 1440 SixDOFConstraint_GetRotationLimitsMax :: proc(constraint: ^SixDOFConstraint, result: ^Vec3) --- 1441 SixDOFConstraint_IsFixedAxis :: proc(constraint: ^SixDOFConstraint, axis: SixDOFConstraintAxis) -> bool --- 1442 SixDOFConstraint_IsFreeAxis :: proc(constraint: ^SixDOFConstraint, axis: SixDOFConstraintAxis) -> bool --- 1443 SixDOFConstraint_GetLimitsSpringSettings :: proc(constraint: ^SixDOFConstraint, result: ^SpringSettings, axis: SixDOFConstraintAxis) --- 1444 SixDOFConstraint_SetLimitsSpringSettings :: proc(constraint: ^SixDOFConstraint, settings: ^SpringSettings, axis: SixDOFConstraintAxis) --- 1445 SixDOFConstraint_SetMaxFriction :: proc(constraint: ^SixDOFConstraint, axis: SixDOFConstraintAxis, inFriction: f32) --- 1446 SixDOFConstraint_GetMaxFriction :: proc(constraint: ^SixDOFConstraint, axis: SixDOFConstraintAxis) -> f32 --- 1447 SixDOFConstraint_GetRotationInConstraintSpace :: proc(constraint: ^SixDOFConstraint, result: ^Quat) --- 1448 SixDOFConstraint_GetMotorSettings :: proc(constraint: ^SixDOFConstraint, axis: SixDOFConstraintAxis, settings: ^MotorSettings) --- 1449 SixDOFConstraint_SetMotorState :: proc(constraint: ^SixDOFConstraint, axis: SixDOFConstraintAxis, state: MotorState) --- 1450 SixDOFConstraint_GetMotorState :: proc(constraint: ^SixDOFConstraint, axis: SixDOFConstraintAxis) -> MotorState --- 1451 SixDOFConstraint_SetTargetVelocityCS :: proc(constraint: ^SixDOFConstraint, inVelocity: ^Vec3) --- 1452 SixDOFConstraint_GetTargetVelocityCS :: proc(constraint: ^SixDOFConstraint, result: ^Vec3) --- 1453 SixDOFConstraint_SetTargetAngularVelocityCS :: proc(constraint: ^SixDOFConstraint, inAngularVelocity: ^Vec3) --- 1454 SixDOFConstraint_GetTargetAngularVelocityCS :: proc(constraint: ^SixDOFConstraint, result: ^Vec3) --- 1455 SixDOFConstraint_SetTargetPositionCS :: proc(constraint: ^SixDOFConstraint, inPosition: ^Vec3) --- 1456 SixDOFConstraint_GetTargetPositionCS :: proc(constraint: ^SixDOFConstraint, result: ^Vec3) --- 1457 SixDOFConstraint_SetTargetOrientationCS :: proc(constraint: ^SixDOFConstraint, inOrientation: ^Quat) --- 1458 SixDOFConstraint_GetTargetOrientationCS :: proc(constraint: ^SixDOFConstraint, result: ^Quat) --- 1459 SixDOFConstraint_SetTargetOrientationBS :: proc(constraint: ^SixDOFConstraint, inOrientation: ^Quat) --- 1460 1461 /* JPH_GearConstraint */ 1462 GearConstraintSettings_Init :: proc(settings: ^GearConstraintSettings) --- 1463 GearConstraint_Create :: proc(settings: ^GearConstraintSettings, body1: ^Body, body2: ^Body) -> ^GearConstraint --- 1464 GearConstraint_GetSettings :: proc(constraint: ^GearConstraint, settings: ^GearConstraintSettings) --- 1465 GearConstraint_SetConstraints :: proc(constraint: ^GearConstraint, gear1: ^Constraint, gear2: ^Constraint) --- 1466 GearConstraint_GetTotalLambda :: proc(constraint: ^GearConstraint) -> f32 --- 1467 1468 /* BodyInterface */ 1469 BodyInterface_DestroyBody :: proc(bodyInterface: ^BodyInterface, bodyID: BodyID) --- 1470 BodyInterface_CreateAndAddBody :: proc(bodyInterface: ^BodyInterface, settings: ^BodyCreationSettings, activationMode: Activation) -> BodyID --- 1471 BodyInterface_CreateBody :: proc(bodyInterface: ^BodyInterface, settings: ^BodyCreationSettings) -> ^Body --- 1472 BodyInterface_CreateBodyWithID :: proc(bodyInterface: ^BodyInterface, bodyID: BodyID, settings: ^BodyCreationSettings) -> ^Body --- 1473 BodyInterface_CreateBodyWithoutID :: proc(bodyInterface: ^BodyInterface, settings: ^BodyCreationSettings) -> ^Body --- 1474 BodyInterface_DestroyBodyWithoutID :: proc(bodyInterface: ^BodyInterface, body: ^Body) --- 1475 BodyInterface_AssignBodyID :: proc(bodyInterface: ^BodyInterface, body: ^Body) -> bool --- 1476 BodyInterface_AssignBodyID2 :: proc(bodyInterface: ^BodyInterface, body: ^Body, bodyID: BodyID) -> bool --- 1477 BodyInterface_UnassignBodyID :: proc(bodyInterface: ^BodyInterface, bodyID: BodyID) -> ^Body --- 1478 BodyInterface_CreateSoftBody :: proc(bodyInterface: ^BodyInterface, settings: ^SoftBodyCreationSettings) -> ^Body --- 1479 BodyInterface_CreateSoftBodyWithID :: proc(bodyInterface: ^BodyInterface, bodyID: BodyID, settings: ^SoftBodyCreationSettings) -> ^Body --- 1480 BodyInterface_CreateSoftBodyWithoutID :: proc(bodyInterface: ^BodyInterface, settings: ^SoftBodyCreationSettings) -> ^Body --- 1481 BodyInterface_CreateAndAddSoftBody :: proc(bodyInterface: ^BodyInterface, settings: ^SoftBodyCreationSettings, activationMode: Activation) -> BodyID --- 1482 BodyInterface_AddBody :: proc(bodyInterface: ^BodyInterface, bodyID: BodyID, activationMode: Activation) --- 1483 BodyInterface_RemoveBody :: proc(bodyInterface: ^BodyInterface, bodyID: BodyID) --- 1484 BodyInterface_RemoveAndDestroyBody :: proc(bodyInterface: ^BodyInterface, bodyID: BodyID) --- 1485 BodyInterface_IsAdded :: proc(bodyInterface: ^BodyInterface, bodyID: BodyID) -> bool --- 1486 BodyInterface_GetBodyType :: proc(bodyInterface: ^BodyInterface, bodyID: BodyID) -> BodyType --- 1487 BodyInterface_SetLinearVelocity :: proc(bodyInterface: ^BodyInterface, bodyID: BodyID, velocity: ^Vec3) --- 1488 BodyInterface_GetLinearVelocity :: proc(bodyInterface: ^BodyInterface, bodyID: BodyID, velocity: ^Vec3) --- 1489 BodyInterface_GetCenterOfMassPosition :: proc(bodyInterface: ^BodyInterface, bodyID: BodyID, position: ^RVec3) --- 1490 BodyInterface_GetMotionType :: proc(bodyInterface: ^BodyInterface, bodyID: BodyID) -> MotionType --- 1491 BodyInterface_SetMotionType :: proc(bodyInterface: ^BodyInterface, bodyID: BodyID, motionType: MotionType, activationMode: Activation) --- 1492 BodyInterface_GetRestitution :: proc(bodyInterface: ^BodyInterface, bodyID: BodyID) -> f32 --- 1493 BodyInterface_SetRestitution :: proc(bodyInterface: ^BodyInterface, bodyID: BodyID, restitution: f32) --- 1494 BodyInterface_GetFriction :: proc(bodyInterface: ^BodyInterface, bodyID: BodyID) -> f32 --- 1495 BodyInterface_SetFriction :: proc(bodyInterface: ^BodyInterface, bodyID: BodyID, friction: f32) --- 1496 BodyInterface_SetPosition :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID, position: ^RVec3, activationMode: Activation) --- 1497 BodyInterface_GetPosition :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID, result: ^RVec3) --- 1498 BodyInterface_SetRotation :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID, rotation: ^Quat, activationMode: Activation) --- 1499 BodyInterface_GetRotation :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID, result: ^Quat) --- 1500 BodyInterface_SetPositionAndRotation :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID, position: ^RVec3, rotation: ^Quat, activationMode: Activation) --- 1501 BodyInterface_SetPositionAndRotationWhenChanged :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID, position: ^RVec3, rotation: ^Quat, activationMode: Activation) --- 1502 BodyInterface_GetPositionAndRotation :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID, position: ^RVec3, rotation: ^Quat) --- 1503 BodyInterface_SetPositionRotationAndVelocity :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID, position: ^RVec3, rotation: ^Quat, linearVelocity: ^Vec3, angularVelocity: ^Vec3) --- 1504 BodyInterface_GetCollisionGroup :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID, result: ^CollisionGroup) --- 1505 BodyInterface_SetCollisionGroup :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID, group: ^CollisionGroup) --- 1506 BodyInterface_GetShape :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID) -> ^Shape --- 1507 BodyInterface_SetShape :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID, shape: ^Shape, updateMassProperties: bool, activationMode: Activation) --- 1508 BodyInterface_NotifyShapeChanged :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID, previousCenterOfMass: ^Vec3, updateMassProperties: bool, activationMode: Activation) --- 1509 BodyInterface_ActivateBody :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID) --- 1510 BodyInterface_ActivateBodies :: proc(bodyInterface: ^BodyInterface, bodyIDs: ^BodyID, count: u32) --- 1511 BodyInterface_ActivateBodiesInAABox :: proc(bodyInterface: ^BodyInterface, box: ^AABox, broadPhaseLayerFilter: ^BroadPhaseLayerFilter, objectLayerFilter: ^ObjectLayerFilter) --- 1512 BodyInterface_DeactivateBody :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID) --- 1513 BodyInterface_DeactivateBodies :: proc(bodyInterface: ^BodyInterface, bodyIDs: ^BodyID, count: u32) --- 1514 BodyInterface_IsActive :: proc(bodyInterface: ^BodyInterface, bodyID: BodyID) -> bool --- 1515 BodyInterface_ResetSleepTimer :: proc(bodyInterface: ^BodyInterface, bodyID: BodyID) --- 1516 BodyInterface_GetObjectLayer :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID) -> ObjectLayer --- 1517 BodyInterface_SetObjectLayer :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID, layer: ObjectLayer) --- 1518 BodyInterface_GetWorldTransform :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID, result: ^RMat4) --- 1519 BodyInterface_GetCenterOfMassTransform :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID, result: ^RMat4) --- 1520 BodyInterface_MoveKinematic :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID, targetPosition: ^RVec3, targetRotation: ^Quat, deltaTime: f32) --- 1521 BodyInterface_ApplyBuoyancyImpulse :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID, surfacePosition: ^RVec3, surfaceNormal: ^Vec3, buoyancy: f32, linearDrag: f32, angularDrag: f32, fluidVelocity: ^Vec3, gravity: ^Vec3, deltaTime: f32) -> bool --- 1522 BodyInterface_SetLinearAndAngularVelocity :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID, linearVelocity: ^Vec3, angularVelocity: ^Vec3) --- 1523 BodyInterface_GetLinearAndAngularVelocity :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID, linearVelocity: ^Vec3, angularVelocity: ^Vec3) --- 1524 BodyInterface_AddLinearVelocity :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID, linearVelocity: ^Vec3) --- 1525 BodyInterface_AddLinearAndAngularVelocity :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID, linearVelocity: ^Vec3, angularVelocity: ^Vec3) --- 1526 BodyInterface_SetAngularVelocity :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID, angularVelocity: ^Vec3) --- 1527 BodyInterface_GetAngularVelocity :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID, angularVelocity: ^Vec3) --- 1528 BodyInterface_GetPointVelocity :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID, point: ^RVec3, velocity: ^Vec3) --- 1529 BodyInterface_AddForce :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID, force: ^Vec3) --- 1530 BodyInterface_AddForce2 :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID, force: ^Vec3, point: ^RVec3) --- 1531 BodyInterface_AddTorque :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID, torque: ^Vec3) --- 1532 BodyInterface_AddForceAndTorque :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID, force: ^Vec3, torque: ^Vec3) --- 1533 BodyInterface_AddImpulse :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID, impulse: ^Vec3) --- 1534 BodyInterface_AddImpulse2 :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID, impulse: ^Vec3, point: ^RVec3) --- 1535 BodyInterface_AddAngularImpulse :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID, angularImpulse: ^Vec3) --- 1536 BodyInterface_SetMotionQuality :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID, quality: MotionQuality) --- 1537 BodyInterface_GetMotionQuality :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID) -> MotionQuality --- 1538 BodyInterface_GetInverseInertia :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID, result: ^Mat4) --- 1539 BodyInterface_SetGravityFactor :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID, value: f32) --- 1540 BodyInterface_GetGravityFactor :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID) -> f32 --- 1541 BodyInterface_SetUseManifoldReduction :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID, value: bool) --- 1542 BodyInterface_GetUseManifoldReduction :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID) -> bool --- 1543 BodyInterface_SetUserData :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID, inUserData: u64) --- 1544 BodyInterface_GetUserData :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID) -> u64 --- 1545 BodyInterface_SetIsSensor :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID, value: bool) --- 1546 BodyInterface_IsSensor :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID) -> bool --- 1547 BodyInterface_GetMaterial :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID, subShapeID: SubShapeID) -> ^PhysicsMaterial --- 1548 BodyInterface_InvalidateContactCache :: proc(bodyInterface: ^BodyInterface, bodyId: BodyID) --- 1549 1550 //-------------------------------------------------------------------------------------------------- 1551 // JPH_BodyLockInterface 1552 //-------------------------------------------------------------------------------------------------- 1553 BodyLockInterface_LockRead :: proc(lockInterface: ^BodyLockInterface, bodyID: BodyID, outLock: ^BodyLockRead) --- 1554 BodyLockInterface_UnlockRead :: proc(lockInterface: ^BodyLockInterface, ioLock: ^BodyLockRead) --- 1555 BodyLockInterface_LockWrite :: proc(lockInterface: ^BodyLockInterface, bodyID: BodyID, outLock: ^BodyLockWrite) --- 1556 BodyLockInterface_UnlockWrite :: proc(lockInterface: ^BodyLockInterface, ioLock: ^BodyLockWrite) --- 1557 BodyLockInterface_LockMultiRead :: proc(lockInterface: ^BodyLockInterface, bodyIDs: ^BodyID, count: u32) -> ^BodyLockMultiRead --- 1558 BodyLockMultiRead_Destroy :: proc(ioLock: ^BodyLockMultiRead) --- 1559 BodyLockMultiRead_GetBody :: proc(ioLock: ^BodyLockMultiRead, bodyIndex: u32) -> ^Body --- 1560 BodyLockInterface_LockMultiWrite :: proc(lockInterface: ^BodyLockInterface, bodyIDs: ^BodyID, count: u32) -> ^BodyLockMultiWrite --- 1561 BodyLockMultiWrite_Destroy :: proc(ioLock: ^BodyLockMultiWrite) --- 1562 BodyLockMultiWrite_GetBody :: proc(ioLock: ^BodyLockMultiWrite, bodyIndex: u32) -> ^Body --- 1563 1564 //-------------------------------------------------------------------------------------------------- 1565 // JPH_MotionProperties 1566 //-------------------------------------------------------------------------------------------------- 1567 MotionProperties_GetAllowedDOFs :: proc(properties: ^MotionProperties) -> AllowedDOFs --- 1568 MotionProperties_SetLinearDamping :: proc(properties: ^MotionProperties, damping: f32) --- 1569 MotionProperties_GetLinearDamping :: proc(properties: ^MotionProperties) -> f32 --- 1570 MotionProperties_SetAngularDamping :: proc(properties: ^MotionProperties, damping: f32) --- 1571 MotionProperties_GetAngularDamping :: proc(properties: ^MotionProperties) -> f32 --- 1572 MotionProperties_SetMassProperties :: proc(properties: ^MotionProperties, allowedDOFs: AllowedDOFs, massProperties: ^MassProperties) --- 1573 MotionProperties_GetInverseMassUnchecked :: proc(properties: ^MotionProperties) -> f32 --- 1574 MotionProperties_SetInverseMass :: proc(properties: ^MotionProperties, inverseMass: f32) --- 1575 MotionProperties_GetInverseInertiaDiagonal :: proc(properties: ^MotionProperties, result: ^Vec3) --- 1576 MotionProperties_GetInertiaRotation :: proc(properties: ^MotionProperties, result: ^Quat) --- 1577 MotionProperties_SetInverseInertia :: proc(properties: ^MotionProperties, diagonal: ^Vec3, rot: ^Quat) --- 1578 MotionProperties_ScaleToMass :: proc(properties: ^MotionProperties, mass: f32) --- 1579 1580 //-------------------------------------------------------------------------------------------------- 1581 // JPH_RayCast 1582 //-------------------------------------------------------------------------------------------------- 1583 RayCast_GetPointOnRay :: proc(origin: ^Vec3, direction: ^Vec3, fraction: f32, result: ^Vec3) --- 1584 RRayCast_GetPointOnRay :: proc(origin: ^RVec3, direction: ^Vec3, fraction: f32, result: ^RVec3) --- 1585 1586 //-------------------------------------------------------------------------------------------------- 1587 // JPH_MassProperties 1588 //-------------------------------------------------------------------------------------------------- 1589 MassProperties_DecomposePrincipalMomentsOfInertia :: proc(properties: ^MassProperties, rotation: ^Mat4, diagonal: ^Vec3) --- 1590 MassProperties_ScaleToMass :: proc(properties: ^MassProperties, mass: f32) --- 1591 MassProperties_GetEquivalentSolidBoxSize :: proc(mass: f32, inertiaDiagonal: ^Vec3, result: ^Vec3) --- 1592 1593 //-------------------------------------------------------------------------------------------------- 1594 // JPH_CollideShapeSettings 1595 //-------------------------------------------------------------------------------------------------- 1596 CollideShapeSettings_Init :: proc(settings: ^CollideShapeSettings) --- 1597 1598 //-------------------------------------------------------------------------------------------------- 1599 // JPH_ShapeCastSettings 1600 //-------------------------------------------------------------------------------------------------- 1601 ShapeCastSettings_Init :: proc(settings: ^ShapeCastSettings) --- 1602 1603 //-------------------------------------------------------------------------------------------------- 1604 // JPH_BroadPhaseQuery 1605 //-------------------------------------------------------------------------------------------------- 1606 BroadPhaseQuery_CastRay :: proc(query: ^BroadPhaseQuery, origin: ^Vec3, direction: ^Vec3, callback: RayCastBodyCollectorCallback, userData: rawptr, broadPhaseLayerFilter: ^BroadPhaseLayerFilter, objectLayerFilter: ^ObjectLayerFilter) -> bool --- 1607 BroadPhaseQuery_CastRay2 :: proc(query: ^BroadPhaseQuery, origin: ^Vec3, direction: ^Vec3, collectorType: CollisionCollectorType, callback: RayCastBodyResultCallback, userData: rawptr, broadPhaseLayerFilter: ^BroadPhaseLayerFilter, objectLayerFilter: ^ObjectLayerFilter) -> bool --- 1608 BroadPhaseQuery_CollideAABox :: proc(query: ^BroadPhaseQuery, box: ^AABox, callback: CollideShapeBodyCollectorCallback, userData: rawptr, broadPhaseLayerFilter: ^BroadPhaseLayerFilter, objectLayerFilter: ^ObjectLayerFilter) -> bool --- 1609 BroadPhaseQuery_CollideSphere :: proc(query: ^BroadPhaseQuery, center: ^Vec3, radius: f32, callback: CollideShapeBodyCollectorCallback, userData: rawptr, broadPhaseLayerFilter: ^BroadPhaseLayerFilter, objectLayerFilter: ^ObjectLayerFilter) -> bool --- 1610 BroadPhaseQuery_CollidePoint :: proc(query: ^BroadPhaseQuery, point: ^Vec3, callback: CollideShapeBodyCollectorCallback, userData: rawptr, broadPhaseLayerFilter: ^BroadPhaseLayerFilter, objectLayerFilter: ^ObjectLayerFilter) -> bool --- 1611 1612 //-------------------------------------------------------------------------------------------------- 1613 // JPH_NarrowPhaseQuery 1614 //-------------------------------------------------------------------------------------------------- 1615 NarrowPhaseQuery_CastRay :: proc(query: ^NarrowPhaseQuery, origin: ^RVec3, direction: ^Vec3, hit: ^RayCastResult, broadPhaseLayerFilter: ^BroadPhaseLayerFilter, objectLayerFilter: ^ObjectLayerFilter, bodyFilter: ^BodyFilter) -> bool --- 1616 NarrowPhaseQuery_CastRay2 :: proc(query: ^NarrowPhaseQuery, origin: ^RVec3, direction: ^Vec3, rayCastSettings: ^RayCastSettings, callback: CastRayCollectorCallback, userData: rawptr, broadPhaseLayerFilter: ^BroadPhaseLayerFilter, objectLayerFilter: ^ObjectLayerFilter, bodyFilter: ^BodyFilter, shapeFilter: ^ShapeFilter) -> bool --- 1617 NarrowPhaseQuery_CastRay3 :: proc(query: ^NarrowPhaseQuery, origin: ^RVec3, direction: ^Vec3, rayCastSettings: ^RayCastSettings, collectorType: CollisionCollectorType, callback: CastRayResultCallback, userData: rawptr, broadPhaseLayerFilter: ^BroadPhaseLayerFilter, objectLayerFilter: ^ObjectLayerFilter, bodyFilter: ^BodyFilter, shapeFilter: ^ShapeFilter) -> bool --- 1618 NarrowPhaseQuery_CollidePoint :: proc(query: ^NarrowPhaseQuery, point: ^RVec3, callback: CollidePointCollectorCallback, userData: rawptr, broadPhaseLayerFilter: ^BroadPhaseLayerFilter, objectLayerFilter: ^ObjectLayerFilter, bodyFilter: ^BodyFilter, shapeFilter: ^ShapeFilter) -> bool --- 1619 NarrowPhaseQuery_CollidePoint2 :: proc(query: ^NarrowPhaseQuery, point: ^RVec3, collectorType: CollisionCollectorType, callback: CollidePointResultCallback, userData: rawptr, broadPhaseLayerFilter: ^BroadPhaseLayerFilter, objectLayerFilter: ^ObjectLayerFilter, bodyFilter: ^BodyFilter, shapeFilter: ^ShapeFilter) -> bool --- 1620 NarrowPhaseQuery_CollideShape :: proc(query: ^NarrowPhaseQuery, shape: ^Shape, scale: ^Vec3, centerOfMassTransform: ^RMat4, settings: ^CollideShapeSettings, baseOffset: ^RVec3, callback: CollideShapeCollectorCallback, userData: rawptr, broadPhaseLayerFilter: ^BroadPhaseLayerFilter, objectLayerFilter: ^ObjectLayerFilter, bodyFilter: ^BodyFilter, shapeFilter: ^ShapeFilter) -> bool --- 1621 NarrowPhaseQuery_CollideShape2 :: proc(query: ^NarrowPhaseQuery, shape: ^Shape, scale: ^Vec3, centerOfMassTransform: ^RMat4, settings: ^CollideShapeSettings, baseOffset: ^RVec3, collectorType: CollisionCollectorType, callback: CollideShapeResultCallback, userData: rawptr, broadPhaseLayerFilter: ^BroadPhaseLayerFilter, objectLayerFilter: ^ObjectLayerFilter, bodyFilter: ^BodyFilter, shapeFilter: ^ShapeFilter) -> bool --- 1622 NarrowPhaseQuery_CastShape :: proc(query: ^NarrowPhaseQuery, shape: ^Shape, worldTransform: ^RMat4, direction: ^Vec3, settings: ^ShapeCastSettings, baseOffset: ^RVec3, callback: CastShapeCollectorCallback, userData: rawptr, broadPhaseLayerFilter: ^BroadPhaseLayerFilter, objectLayerFilter: ^ObjectLayerFilter, bodyFilter: ^BodyFilter, shapeFilter: ^ShapeFilter) -> bool --- 1623 NarrowPhaseQuery_CastShape2 :: proc(query: ^NarrowPhaseQuery, shape: ^Shape, worldTransform: ^RMat4, direction: ^Vec3, settings: ^ShapeCastSettings, baseOffset: ^RVec3, collectorType: CollisionCollectorType, callback: CastShapeResultCallback, userData: rawptr, broadPhaseLayerFilter: ^BroadPhaseLayerFilter, objectLayerFilter: ^ObjectLayerFilter, bodyFilter: ^BodyFilter, shapeFilter: ^ShapeFilter) -> bool --- 1624 1625 //-------------------------------------------------------------------------------------------------- 1626 // JPH_Body 1627 //-------------------------------------------------------------------------------------------------- 1628 Body_GetID :: proc(body: ^Body) -> BodyID --- 1629 Body_GetBodyType :: proc(body: ^Body) -> BodyType --- 1630 Body_IsRigidBody :: proc(body: ^Body) -> bool --- 1631 Body_IsSoftBody :: proc(body: ^Body) -> bool --- 1632 Body_IsActive :: proc(body: ^Body) -> bool --- 1633 Body_IsStatic :: proc(body: ^Body) -> bool --- 1634 Body_IsKinematic :: proc(body: ^Body) -> bool --- 1635 Body_IsDynamic :: proc(body: ^Body) -> bool --- 1636 Body_CanBeKinematicOrDynamic :: proc(body: ^Body) -> bool --- 1637 Body_SetIsSensor :: proc(body: ^Body, value: bool) --- 1638 Body_IsSensor :: proc(body: ^Body) -> bool --- 1639 Body_SetCollideKinematicVsNonDynamic :: proc(body: ^Body, value: bool) --- 1640 Body_GetCollideKinematicVsNonDynamic :: proc(body: ^Body) -> bool --- 1641 Body_SetUseManifoldReduction :: proc(body: ^Body, value: bool) --- 1642 Body_GetUseManifoldReduction :: proc(body: ^Body) -> bool --- 1643 Body_GetUseManifoldReductionWithBody :: proc(body: ^Body, other: ^Body) -> bool --- 1644 Body_SetApplyGyroscopicForce :: proc(body: ^Body, value: bool) --- 1645 Body_GetApplyGyroscopicForce :: proc(body: ^Body) -> bool --- 1646 Body_SetEnhancedInternalEdgeRemoval :: proc(body: ^Body, value: bool) --- 1647 Body_GetEnhancedInternalEdgeRemoval :: proc(body: ^Body) -> bool --- 1648 Body_GetEnhancedInternalEdgeRemovalWithBody :: proc(body: ^Body, other: ^Body) -> bool --- 1649 Body_GetMotionType :: proc(body: ^Body) -> MotionType --- 1650 Body_SetMotionType :: proc(body: ^Body, motionType: MotionType) --- 1651 Body_GetBroadPhaseLayer :: proc(body: ^Body) -> BroadPhaseLayer --- 1652 Body_GetObjectLayer :: proc(body: ^Body) -> ObjectLayer --- 1653 Body_GetCollisionGroup :: proc(body: ^Body, result: ^CollisionGroup) --- 1654 Body_SetCollisionGroup :: proc(body: ^Body, value: ^CollisionGroup) --- 1655 Body_GetAllowSleeping :: proc(body: ^Body) -> bool --- 1656 Body_SetAllowSleeping :: proc(body: ^Body, allowSleeping: bool) --- 1657 Body_ResetSleepTimer :: proc(body: ^Body) --- 1658 Body_GetFriction :: proc(body: ^Body) -> f32 --- 1659 Body_SetFriction :: proc(body: ^Body, friction: f32) --- 1660 Body_GetRestitution :: proc(body: ^Body) -> f32 --- 1661 Body_SetRestitution :: proc(body: ^Body, restitution: f32) --- 1662 Body_GetLinearVelocity :: proc(body: ^Body, velocity: ^Vec3) --- 1663 Body_SetLinearVelocity :: proc(body: ^Body, velocity: ^Vec3) --- 1664 Body_SetLinearVelocityClamped :: proc(body: ^Body, velocity: ^Vec3) --- 1665 Body_GetAngularVelocity :: proc(body: ^Body, velocity: ^Vec3) --- 1666 Body_SetAngularVelocity :: proc(body: ^Body, velocity: ^Vec3) --- 1667 Body_SetAngularVelocityClamped :: proc(body: ^Body, velocity: ^Vec3) --- 1668 Body_GetPointVelocityCOM :: proc(body: ^Body, pointRelativeToCOM: ^Vec3, velocity: ^Vec3) --- 1669 Body_GetPointVelocity :: proc(body: ^Body, point: ^RVec3, velocity: ^Vec3) --- 1670 Body_AddForce :: proc(body: ^Body, force: ^Vec3) --- 1671 Body_AddForceAtPosition :: proc(body: ^Body, force: ^Vec3, position: ^RVec3) --- 1672 Body_AddTorque :: proc(body: ^Body, force: ^Vec3) --- 1673 Body_GetAccumulatedForce :: proc(body: ^Body, force: ^Vec3) --- 1674 Body_GetAccumulatedTorque :: proc(body: ^Body, force: ^Vec3) --- 1675 Body_ResetForce :: proc(body: ^Body) --- 1676 Body_ResetTorque :: proc(body: ^Body) --- 1677 Body_ResetMotion :: proc(body: ^Body) --- 1678 Body_GetInverseInertia :: proc(body: ^Body, result: ^Mat4) --- 1679 Body_AddImpulse :: proc(body: ^Body, impulse: ^Vec3) --- 1680 Body_AddImpulseAtPosition :: proc(body: ^Body, impulse: ^Vec3, position: ^RVec3) --- 1681 Body_AddAngularImpulse :: proc(body: ^Body, angularImpulse: ^Vec3) --- 1682 Body_MoveKinematic :: proc(body: ^Body, targetPosition: ^RVec3, targetRotation: ^Quat, deltaTime: f32) --- 1683 Body_ApplyBuoyancyImpulse :: proc(body: ^Body, surfacePosition: ^RVec3, surfaceNormal: ^Vec3, buoyancy: f32, linearDrag: f32, angularDrag: f32, fluidVelocity: ^Vec3, gravity: ^Vec3, deltaTime: f32) -> bool --- 1684 Body_IsInBroadPhase :: proc(body: ^Body) -> bool --- 1685 Body_IsCollisionCacheInvalid :: proc(body: ^Body) -> bool --- 1686 Body_GetShape :: proc(body: ^Body) -> ^Shape --- 1687 Body_GetPosition :: proc(body: ^Body, result: ^RVec3) --- 1688 Body_GetRotation :: proc(body: ^Body, result: ^Quat) --- 1689 Body_GetWorldTransform :: proc(body: ^Body, result: ^RMat4) --- 1690 Body_GetCenterOfMassPosition :: proc(body: ^Body, result: ^RVec3) --- 1691 Body_GetCenterOfMassTransform :: proc(body: ^Body, result: ^RMat4) --- 1692 Body_GetInverseCenterOfMassTransform :: proc(body: ^Body, result: ^RMat4) --- 1693 Body_GetWorldSpaceBounds :: proc(body: ^Body, result: ^AABox) --- 1694 Body_GetWorldSpaceSurfaceNormal :: proc(body: ^Body, subShapeID: SubShapeID, position: ^RVec3, normal: ^Vec3) --- 1695 Body_GetMotionProperties :: proc(body: ^Body) -> ^MotionProperties --- 1696 Body_GetMotionPropertiesUnchecked :: proc(body: ^Body) -> ^MotionProperties --- 1697 Body_SetUserData :: proc(body: ^Body, userData: u64) --- 1698 Body_GetUserData :: proc(body: ^Body) -> u64 --- 1699 Body_GetFixedToWorldBody :: proc() -> ^Body --- 1700 } 1701 1702 /* JPH_BroadPhaseLayerFilter_Procs */ 1703 BroadPhaseLayerFilter_Procs :: struct { 1704 ShouldCollide: proc "c" (userData: rawptr, layer: BroadPhaseLayer) -> bool, 1705 } 1706 1707 @(default_calling_convention="c", link_prefix="JPH_") 1708 foreign lib { 1709 BroadPhaseLayerFilter_SetProcs :: proc(procs: ^BroadPhaseLayerFilter_Procs) --- 1710 BroadPhaseLayerFilter_Create :: proc(userData: rawptr) -> ^BroadPhaseLayerFilter --- 1711 BroadPhaseLayerFilter_Destroy :: proc(filter: ^BroadPhaseLayerFilter) --- 1712 } 1713 1714 /* JPH_ObjectLayerFilter */ 1715 ObjectLayerFilter_Procs :: struct { 1716 ShouldCollide: proc "c" (userData: rawptr, layer: ObjectLayer) -> bool, 1717 } 1718 1719 @(default_calling_convention="c", link_prefix="JPH_") 1720 foreign lib { 1721 ObjectLayerFilter_SetProcs :: proc(procs: ^ObjectLayerFilter_Procs) --- 1722 ObjectLayerFilter_Create :: proc(userData: rawptr) -> ^ObjectLayerFilter --- 1723 ObjectLayerFilter_Destroy :: proc(filter: ^ObjectLayerFilter) --- 1724 } 1725 1726 /* JPH_BodyFilter */ 1727 BodyFilter_Procs :: struct { 1728 ShouldCollide: proc "c" (userData: rawptr, bodyID: BodyID) -> bool, 1729 ShouldCollideLocked: proc "c" (userData: rawptr, bodyID: ^Body) -> bool, 1730 } 1731 1732 @(default_calling_convention="c", link_prefix="JPH_") 1733 foreign lib { 1734 BodyFilter_SetProcs :: proc(procs: ^BodyFilter_Procs) --- 1735 BodyFilter_Create :: proc(userData: rawptr) -> ^BodyFilter --- 1736 BodyFilter_Destroy :: proc(filter: ^BodyFilter) --- 1737 } 1738 1739 /* JPH_ShapeFilter */ 1740 ShapeFilter_Procs :: struct { 1741 ShouldCollide: proc "c" (userData: rawptr, shape2: ^Shape, subShapeIDOfShape2: ^SubShapeID) -> bool, 1742 ShouldCollide2: proc "c" (userData: rawptr, shape1: ^Shape, subShapeIDOfShape1: ^SubShapeID, shape2: ^Shape, subShapeIDOfShape2: ^SubShapeID) -> bool, 1743 } 1744 1745 @(default_calling_convention="c", link_prefix="JPH_") 1746 foreign lib { 1747 ShapeFilter_SetProcs :: proc(procs: ^ShapeFilter_Procs) --- 1748 ShapeFilter_Create :: proc(userData: rawptr) -> ^ShapeFilter --- 1749 ShapeFilter_Destroy :: proc(filter: ^ShapeFilter) --- 1750 ShapeFilter_GetBodyID2 :: proc(filter: ^ShapeFilter) -> BodyID --- 1751 ShapeFilter_SetBodyID2 :: proc(filter: ^ShapeFilter, id: BodyID) --- 1752 } 1753 1754 /* JPH_SimShapeFilter */ 1755 SimShapeFilter_Procs :: struct { 1756 ShouldCollide: proc "c" (userData: rawptr, body1: ^Body, shape1: ^Shape, subShapeIDOfShape1: ^SubShapeID, body2: ^Body, shape2: ^Shape, subShapeIDOfShape2: ^SubShapeID) -> bool, 1757 } 1758 1759 @(default_calling_convention="c", link_prefix="JPH_") 1760 foreign lib { 1761 SimShapeFilter_SetProcs :: proc(procs: ^SimShapeFilter_Procs) --- 1762 SimShapeFilter_Create :: proc(userData: rawptr) -> ^SimShapeFilter --- 1763 SimShapeFilter_Destroy :: proc(filter: ^SimShapeFilter) --- 1764 } 1765 1766 /* Contact listener */ 1767 ContactListener_Procs :: struct { 1768 OnContactValidate: proc "c" (userData: rawptr, body1: ^Body, body2: ^Body, baseOffset: ^RVec3, collisionResult: ^CollideShapeResult) -> ValidateResult, 1769 OnContactAdded: proc "c" (userData: rawptr, body1: ^Body, body2: ^Body, manifold: ^ContactManifold, settings: ^ContactSettings), 1770 OnContactPersisted: proc "c" (userData: rawptr, body1: ^Body, body2: ^Body, manifold: ^ContactManifold, settings: ^ContactSettings), 1771 OnContactRemoved: proc "c" (userData: rawptr, subShapePair: ^SubShapeIDPair), 1772 } 1773 1774 @(default_calling_convention="c", link_prefix="JPH_") 1775 foreign lib { 1776 ContactListener_SetProcs :: proc(procs: ^ContactListener_Procs) --- 1777 ContactListener_Create :: proc(userData: rawptr) -> ^ContactListener --- 1778 ContactListener_Destroy :: proc(listener: ^ContactListener) --- 1779 } 1780 1781 /* BodyActivationListener */ 1782 BodyActivationListener_Procs :: struct { 1783 OnBodyActivated: proc "c" (userData: rawptr, bodyID: BodyID, bodyUserData: u64), 1784 OnBodyDeactivated: proc "c" (userData: rawptr, bodyID: BodyID, bodyUserData: u64), 1785 } 1786 1787 @(default_calling_convention="c", link_prefix="JPH_") 1788 foreign lib { 1789 BodyActivationListener_SetProcs :: proc(procs: ^BodyActivationListener_Procs) --- 1790 BodyActivationListener_Create :: proc(userData: rawptr) -> ^BodyActivationListener --- 1791 BodyActivationListener_Destroy :: proc(listener: ^BodyActivationListener) --- 1792 } 1793 1794 /* JPH_BodyDrawFilter */ 1795 BodyDrawFilter_Procs :: struct { 1796 ShouldDraw: proc "c" (userData: rawptr, body: ^Body) -> bool, 1797 } 1798 1799 @(default_calling_convention="c", link_prefix="JPH_") 1800 foreign lib { 1801 BodyDrawFilter_SetProcs :: proc(procs: ^BodyDrawFilter_Procs) --- 1802 BodyDrawFilter_Create :: proc(userData: rawptr) -> ^BodyDrawFilter --- 1803 BodyDrawFilter_Destroy :: proc(filter: ^BodyDrawFilter) --- 1804 1805 /* ContactManifold */ 1806 ContactManifold_GetWorldSpaceNormal :: proc(manifold: ^ContactManifold, result: ^Vec3) --- 1807 ContactManifold_GetPenetrationDepth :: proc(manifold: ^ContactManifold) -> f32 --- 1808 ContactManifold_GetSubShapeID1 :: proc(manifold: ^ContactManifold) -> SubShapeID --- 1809 ContactManifold_GetSubShapeID2 :: proc(manifold: ^ContactManifold) -> SubShapeID --- 1810 ContactManifold_GetPointCount :: proc(manifold: ^ContactManifold) -> u32 --- 1811 ContactManifold_GetWorldSpaceContactPointOn1 :: proc(manifold: ^ContactManifold, index: u32, result: ^RVec3) --- 1812 ContactManifold_GetWorldSpaceContactPointOn2 :: proc(manifold: ^ContactManifold, index: u32, result: ^RVec3) --- 1813 1814 /* CharacterBase */ 1815 CharacterBase_Destroy :: proc(character: ^CharacterBase) --- 1816 CharacterBase_GetCosMaxSlopeAngle :: proc(character: ^CharacterBase) -> f32 --- 1817 CharacterBase_SetMaxSlopeAngle :: proc(character: ^CharacterBase, maxSlopeAngle: f32) --- 1818 CharacterBase_GetUp :: proc(character: ^CharacterBase, result: ^Vec3) --- 1819 CharacterBase_SetUp :: proc(character: ^CharacterBase, value: ^Vec3) --- 1820 CharacterBase_IsSlopeTooSteep :: proc(character: ^CharacterBase, value: ^Vec3) -> bool --- 1821 CharacterBase_GetShape :: proc(character: ^CharacterBase) -> ^Shape --- 1822 CharacterBase_GetGroundState :: proc(character: ^CharacterBase) -> GroundState --- 1823 CharacterBase_IsSupported :: proc(character: ^CharacterBase) -> bool --- 1824 CharacterBase_GetGroundPosition :: proc(character: ^CharacterBase, position: ^RVec3) --- 1825 CharacterBase_GetGroundNormal :: proc(character: ^CharacterBase, normal: ^Vec3) --- 1826 CharacterBase_GetGroundVelocity :: proc(character: ^CharacterBase, velocity: ^Vec3) --- 1827 CharacterBase_GetGroundMaterial :: proc(character: ^CharacterBase) -> ^PhysicsMaterial --- 1828 CharacterBase_GetGroundBodyId :: proc(character: ^CharacterBase) -> BodyID --- 1829 CharacterBase_GetGroundSubShapeId :: proc(character: ^CharacterBase) -> SubShapeID --- 1830 CharacterBase_GetGroundUserData :: proc(character: ^CharacterBase) -> u64 --- 1831 1832 /* CharacterSettings */ 1833 CharacterSettings_Init :: proc(settings: ^CharacterSettings) --- 1834 1835 /* Character */ 1836 Character_Create :: proc(settings: ^CharacterSettings, position: ^RVec3, rotation: ^Quat, userData: u64, system: ^PhysicsSystem) -> ^Character --- 1837 Character_AddToPhysicsSystem :: proc(character: ^Character, activationMode: Activation, lockBodies: bool) --- /*= JPH_ActivationActivate */ 1838 Character_RemoveFromPhysicsSystem :: proc(character: ^Character, lockBodies: bool) --- /* = true */ 1839 Character_Activate :: proc(character: ^Character, lockBodies: bool) --- /* = true */ 1840 Character_PostSimulation :: proc(character: ^Character, maxSeparationDistance: f32, lockBodies: bool) --- /* = true */ 1841 Character_SetLinearAndAngularVelocity :: proc(character: ^Character, linearVelocity: ^Vec3, angularVelocity: ^Vec3, lockBodies: bool) --- /* = true */ 1842 Character_GetLinearVelocity :: proc(character: ^Character, result: ^Vec3) --- 1843 Character_SetLinearVelocity :: proc(character: ^Character, value: ^Vec3, lockBodies: bool) --- /* = true */ 1844 Character_AddLinearVelocity :: proc(character: ^Character, value: ^Vec3, lockBodies: bool) --- /* = true */ 1845 Character_AddImpulse :: proc(character: ^Character, value: ^Vec3, lockBodies: bool) --- /* = true */ 1846 Character_GetBodyID :: proc(character: ^Character) -> BodyID --- 1847 Character_GetPositionAndRotation :: proc(character: ^Character, position: ^RVec3, rotation: ^Quat, lockBodies: bool) --- /* = true */ 1848 Character_SetPositionAndRotation :: proc(character: ^Character, position: ^RVec3, rotation: ^Quat, activationMode: Activation, lockBodies: bool) --- /* = true */ 1849 Character_GetPosition :: proc(character: ^Character, position: ^RVec3, lockBodies: bool) --- /* = true */ 1850 Character_SetPosition :: proc(character: ^Character, position: ^RVec3, activationMode: Activation, lockBodies: bool) --- /* = true */ 1851 Character_GetRotation :: proc(character: ^Character, rotation: ^Quat, lockBodies: bool) --- /* = true */ 1852 Character_SetRotation :: proc(character: ^Character, rotation: ^Quat, activationMode: Activation, lockBodies: bool) --- /* = true */ 1853 Character_GetCenterOfMassPosition :: proc(character: ^Character, result: ^RVec3, lockBodies: bool) --- /* = true */ 1854 Character_GetWorldTransform :: proc(character: ^Character, result: ^RMat4, lockBodies: bool) --- /* = true */ 1855 Character_GetLayer :: proc(character: ^Character) -> ObjectLayer --- 1856 Character_SetLayer :: proc(character: ^Character, value: ObjectLayer, lockBodies: bool) --- /*= true*/ 1857 Character_SetShape :: proc(character: ^Character, shape: ^Shape, maxPenetrationDepth: f32, lockBodies: bool) --- /*= true*/ 1858 1859 /* CharacterVirtualSettings */ 1860 CharacterVirtualSettings_Init :: proc(settings: ^CharacterVirtualSettings) --- 1861 1862 /* CharacterVirtual */ 1863 CharacterVirtual_Create :: proc(settings: ^CharacterVirtualSettings, position: ^RVec3, rotation: ^Quat, userData: u64, system: ^PhysicsSystem) -> ^CharacterVirtual --- 1864 CharacterVirtual_GetID :: proc(character: ^CharacterVirtual) -> CharacterID --- 1865 CharacterVirtual_SetListener :: proc(character: ^CharacterVirtual, listener: ^CharacterContactListener) --- 1866 CharacterVirtual_SetCharacterVsCharacterCollision :: proc(character: ^CharacterVirtual, characterVsCharacterCollision: ^CharacterVsCharacterCollision) --- 1867 CharacterVirtual_GetLinearVelocity :: proc(character: ^CharacterVirtual, velocity: ^Vec3) --- 1868 CharacterVirtual_SetLinearVelocity :: proc(character: ^CharacterVirtual, velocity: ^Vec3) --- 1869 CharacterVirtual_GetPosition :: proc(character: ^CharacterVirtual, position: ^RVec3) --- 1870 CharacterVirtual_SetPosition :: proc(character: ^CharacterVirtual, position: ^RVec3) --- 1871 CharacterVirtual_GetRotation :: proc(character: ^CharacterVirtual, rotation: ^Quat) --- 1872 CharacterVirtual_SetRotation :: proc(character: ^CharacterVirtual, rotation: ^Quat) --- 1873 CharacterVirtual_GetWorldTransform :: proc(character: ^CharacterVirtual, result: ^RMat4) --- 1874 CharacterVirtual_GetCenterOfMassTransform :: proc(character: ^CharacterVirtual, result: ^RMat4) --- 1875 CharacterVirtual_GetMass :: proc(character: ^CharacterVirtual) -> f32 --- 1876 CharacterVirtual_SetMass :: proc(character: ^CharacterVirtual, value: f32) --- 1877 CharacterVirtual_GetMaxStrength :: proc(character: ^CharacterVirtual) -> f32 --- 1878 CharacterVirtual_SetMaxStrength :: proc(character: ^CharacterVirtual, value: f32) --- 1879 CharacterVirtual_GetPenetrationRecoverySpeed :: proc(character: ^CharacterVirtual) -> f32 --- 1880 CharacterVirtual_SetPenetrationRecoverySpeed :: proc(character: ^CharacterVirtual, value: f32) --- 1881 CharacterVirtual_GetEnhancedInternalEdgeRemoval :: proc(character: ^CharacterVirtual) -> bool --- 1882 CharacterVirtual_SetEnhancedInternalEdgeRemoval :: proc(character: ^CharacterVirtual, value: bool) --- 1883 CharacterVirtual_GetCharacterPadding :: proc(character: ^CharacterVirtual) -> f32 --- 1884 CharacterVirtual_GetMaxNumHits :: proc(character: ^CharacterVirtual) -> u32 --- 1885 CharacterVirtual_SetMaxNumHits :: proc(character: ^CharacterVirtual, value: u32) --- 1886 CharacterVirtual_GetHitReductionCosMaxAngle :: proc(character: ^CharacterVirtual) -> f32 --- 1887 CharacterVirtual_SetHitReductionCosMaxAngle :: proc(character: ^CharacterVirtual, value: f32) --- 1888 CharacterVirtual_GetMaxHitsExceeded :: proc(character: ^CharacterVirtual) -> bool --- 1889 CharacterVirtual_GetShapeOffset :: proc(character: ^CharacterVirtual, result: ^Vec3) --- 1890 CharacterVirtual_SetShapeOffset :: proc(character: ^CharacterVirtual, value: ^Vec3) --- 1891 CharacterVirtual_GetUserData :: proc(character: ^CharacterVirtual) -> u64 --- 1892 CharacterVirtual_SetUserData :: proc(character: ^CharacterVirtual, value: u64) --- 1893 CharacterVirtual_GetInnerBodyID :: proc(character: ^CharacterVirtual) -> BodyID --- 1894 CharacterVirtual_CancelVelocityTowardsSteepSlopes :: proc(character: ^CharacterVirtual, desiredVelocity: ^Vec3, velocity: ^Vec3) --- 1895 CharacterVirtual_StartTrackingContactChanges :: proc(character: ^CharacterVirtual) --- 1896 CharacterVirtual_FinishTrackingContactChanges :: proc(character: ^CharacterVirtual) --- 1897 CharacterVirtual_Update :: proc(character: ^CharacterVirtual, deltaTime: f32, layer: ObjectLayer, system: ^PhysicsSystem, bodyFilter: ^BodyFilter, shapeFilter: ^ShapeFilter) --- 1898 CharacterVirtual_ExtendedUpdate :: proc(character: ^CharacterVirtual, deltaTime: f32, settings: ^ExtendedUpdateSettings, layer: ObjectLayer, system: ^PhysicsSystem, bodyFilter: ^BodyFilter, shapeFilter: ^ShapeFilter) --- 1899 CharacterVirtual_RefreshContacts :: proc(character: ^CharacterVirtual, layer: ObjectLayer, system: ^PhysicsSystem, bodyFilter: ^BodyFilter, shapeFilter: ^ShapeFilter) --- 1900 CharacterVirtual_CanWalkStairs :: proc(character: ^CharacterVirtual, linearVelocity: ^Vec3) -> bool --- 1901 CharacterVirtual_WalkStairs :: proc(character: ^CharacterVirtual, deltaTime: f32, stepUp: ^Vec3, stepForward: ^Vec3, stepForwardTest: ^Vec3, stepDownExtra: ^Vec3, layer: ObjectLayer, system: ^PhysicsSystem, bodyFilter: ^BodyFilter, shapeFilter: ^ShapeFilter) -> bool --- 1902 CharacterVirtual_StickToFloor :: proc(character: ^CharacterVirtual, stepDown: ^Vec3, layer: ObjectLayer, system: ^PhysicsSystem, bodyFilter: ^BodyFilter, shapeFilter: ^ShapeFilter) -> bool --- 1903 CharacterVirtual_UpdateGroundVelocity :: proc(character: ^CharacterVirtual) --- 1904 CharacterVirtual_SetShape :: proc(character: ^CharacterVirtual, shape: ^Shape, maxPenetrationDepth: f32, layer: ObjectLayer, system: ^PhysicsSystem, bodyFilter: ^BodyFilter, shapeFilter: ^ShapeFilter) -> bool --- 1905 CharacterVirtual_SetInnerBodyShape :: proc(character: ^CharacterVirtual, shape: ^Shape) --- 1906 CharacterVirtual_GetNumActiveContacts :: proc(character: ^CharacterVirtual) -> u32 --- 1907 CharacterVirtual_GetActiveContact :: proc(character: ^CharacterVirtual, index: u32, result: ^CharacterVirtualContact) --- 1908 CharacterVirtual_HasCollidedWithBody :: proc(character: ^CharacterVirtual, body: BodyID) -> bool --- 1909 CharacterVirtual_HasCollidedWith :: proc(character: ^CharacterVirtual, other: CharacterID) -> bool --- 1910 CharacterVirtual_HasCollidedWithCharacter :: proc(character: ^CharacterVirtual, other: ^CharacterVirtual) -> bool --- 1911 } 1912 1913 /* CharacterContactListener */ 1914 CharacterContactListener_Procs :: struct { 1915 OnAdjustBodyVelocity: proc "c" (userData: rawptr, character: ^CharacterVirtual, body2: ^Body, ioLinearVelocity: ^Vec3, ioAngularVelocity: ^Vec3), 1916 OnContactValidate: proc "c" (userData: rawptr, character: ^CharacterVirtual, bodyID2: BodyID, subShapeID2: SubShapeID) -> bool, 1917 OnCharacterContactValidate: proc "c" (userData: rawptr, character: ^CharacterVirtual, otherCharacter: ^CharacterVirtual, subShapeID2: SubShapeID) -> bool, 1918 OnContactAdded: proc "c" (userData: rawptr, character: ^CharacterVirtual, bodyID2: BodyID, subShapeID2: SubShapeID, contactPosition: ^RVec3, contactNormal: ^Vec3, ioSettings: ^CharacterContactSettings), 1919 OnContactPersisted: proc "c" (userData: rawptr, character: ^CharacterVirtual, bodyID2: BodyID, subShapeID2: SubShapeID, contactPosition: ^RVec3, contactNormal: ^Vec3, ioSettings: ^CharacterContactSettings), 1920 OnContactRemoved: proc "c" (userData: rawptr, character: ^CharacterVirtual, bodyID2: BodyID, subShapeID2: SubShapeID), 1921 OnCharacterContactAdded: proc "c" (userData: rawptr, character: ^CharacterVirtual, otherCharacter: ^CharacterVirtual, subShapeID2: SubShapeID, contactPosition: ^RVec3, contactNormal: ^Vec3, ioSettings: ^CharacterContactSettings), 1922 OnCharacterContactPersisted: proc "c" (userData: rawptr, character: ^CharacterVirtual, otherCharacter: ^CharacterVirtual, subShapeID2: SubShapeID, contactPosition: ^RVec3, contactNormal: ^Vec3, ioSettings: ^CharacterContactSettings), 1923 OnCharacterContactRemoved: proc "c" (userData: rawptr, character: ^CharacterVirtual, otherCharacterID: CharacterID, subShapeID2: SubShapeID), 1924 OnContactSolve: proc "c" (userData: rawptr, character: ^CharacterVirtual, bodyID2: BodyID, subShapeID2: SubShapeID, contactPosition: ^RVec3, contactNormal: ^Vec3, contactVelocity: ^Vec3, contactMaterial: ^PhysicsMaterial, characterVelocity: ^Vec3, newCharacterVelocity: ^Vec3), 1925 OnCharacterContactSolve: proc "c" (userData: rawptr, character: ^CharacterVirtual, otherCharacter: ^CharacterVirtual, subShapeID2: SubShapeID, contactPosition: ^RVec3, contactNormal: ^Vec3, contactVelocity: ^Vec3, contactMaterial: ^PhysicsMaterial, characterVelocity: ^Vec3, newCharacterVelocity: ^Vec3), 1926 } 1927 1928 @(default_calling_convention="c", link_prefix="JPH_") 1929 foreign lib { 1930 CharacterContactListener_SetProcs :: proc(procs: ^CharacterContactListener_Procs) --- 1931 CharacterContactListener_Create :: proc(userData: rawptr) -> ^CharacterContactListener --- 1932 CharacterContactListener_Destroy :: proc(listener: ^CharacterContactListener) --- 1933 } 1934 1935 /* JPH_CharacterVsCharacterCollision */ 1936 CharacterVsCharacterCollision_Procs :: struct { 1937 CollideCharacter: proc "c" (userData: rawptr, character: ^CharacterVirtual, centerOfMassTransform: ^RMat4, collideShapeSettings: ^CollideShapeSettings, baseOffset: ^RVec3), 1938 CastCharacter: proc "c" (userData: rawptr, character: ^CharacterVirtual, centerOfMassTransform: ^RMat4, direction: ^Vec3, shapeCastSettings: ^ShapeCastSettings, baseOffset: ^RVec3), 1939 } 1940 1941 @(default_calling_convention="c", link_prefix="JPH_") 1942 foreign lib { 1943 CharacterVsCharacterCollision_SetProcs :: proc(procs: ^CharacterVsCharacterCollision_Procs) --- 1944 CharacterVsCharacterCollision_Create :: proc(userData: rawptr) -> ^CharacterVsCharacterCollision --- 1945 CharacterVsCharacterCollision_CreateSimple :: proc() -> ^CharacterVsCharacterCollision --- 1946 CharacterVsCharacterCollisionSimple_AddCharacter :: proc(characterVsCharacter: ^CharacterVsCharacterCollision, character: ^CharacterVirtual) --- 1947 CharacterVsCharacterCollisionSimple_RemoveCharacter :: proc(characterVsCharacter: ^CharacterVsCharacterCollision, character: ^CharacterVirtual) --- 1948 CharacterVsCharacterCollision_Destroy :: proc(listener: ^CharacterVsCharacterCollision) --- 1949 1950 /* CollisionDispatch */ 1951 CollisionDispatch_CollideShapeVsShape :: proc(shape1: ^Shape, shape2: ^Shape, scale1: ^Vec3, scale2: ^Vec3, centerOfMassTransform1: ^Mat4, centerOfMassTransform2: ^Mat4, collideShapeSettings: ^CollideShapeSettings, callback: CollideShapeCollectorCallback, userData: rawptr, shapeFilter: ^ShapeFilter) -> bool --- 1952 CollisionDispatch_CastShapeVsShapeLocalSpace :: proc(direction: ^Vec3, shape1: ^Shape, shape2: ^Shape, scale1InShape2LocalSpace: ^Vec3, scale2: ^Vec3, centerOfMassTransform1InShape2LocalSpace: ^Mat4, centerOfMassWorldTransform2: ^Mat4, shapeCastSettings: ^ShapeCastSettings, callback: CastShapeCollectorCallback, userData: rawptr, shapeFilter: ^ShapeFilter) -> bool --- 1953 CollisionDispatch_CastShapeVsShapeWorldSpace :: proc(direction: ^Vec3, shape1: ^Shape, shape2: ^Shape, scale1: ^Vec3, inScale2: ^Vec3, centerOfMassWorldTransform1: ^Mat4, centerOfMassWorldTransform2: ^Mat4, shapeCastSettings: ^ShapeCastSettings, callback: CastShapeCollectorCallback, userData: rawptr, shapeFilter: ^ShapeFilter) -> bool --- 1954 } 1955 1956 /* DebugRenderer */ 1957 DebugRenderer_Procs :: struct { 1958 DrawLine: proc "c" (userData: rawptr, from: ^RVec3, to: ^RVec3, color: Color), 1959 DrawTriangle: proc "c" (userData: rawptr, v1: ^RVec3, v2: ^RVec3, v3: ^RVec3, color: Color, castShadow: DebugRenderer_CastShadow), 1960 DrawText3D: proc "c" (userData: rawptr, position: ^RVec3, str: cstring, color: Color, height: f32), 1961 } 1962 1963 @(default_calling_convention="c", link_prefix="JPH_") 1964 foreign lib { 1965 DebugRenderer_SetProcs :: proc(procs: ^DebugRenderer_Procs) --- 1966 DebugRenderer_Create :: proc(userData: rawptr) -> ^DebugRenderer --- 1967 DebugRenderer_Destroy :: proc(renderer: ^DebugRenderer) --- 1968 DebugRenderer_NextFrame :: proc(renderer: ^DebugRenderer) --- 1969 DebugRenderer_SetCameraPos :: proc(renderer: ^DebugRenderer, position: ^RVec3) --- 1970 DebugRenderer_DrawLine :: proc(renderer: ^DebugRenderer, from: ^RVec3, to: ^RVec3, color: Color) --- 1971 DebugRenderer_DrawWireBox :: proc(renderer: ^DebugRenderer, box: ^AABox, color: Color) --- 1972 DebugRenderer_DrawWireBox2 :: proc(renderer: ^DebugRenderer, _matrix: ^RMat4, box: ^AABox, color: Color) --- 1973 DebugRenderer_DrawMarker :: proc(renderer: ^DebugRenderer, position: ^RVec3, color: Color, size: f32) --- 1974 DebugRenderer_DrawArrow :: proc(renderer: ^DebugRenderer, from: ^RVec3, to: ^RVec3, color: Color, size: f32) --- 1975 DebugRenderer_DrawCoordinateSystem :: proc(renderer: ^DebugRenderer, _matrix: ^RMat4, size: f32) --- 1976 DebugRenderer_DrawPlane :: proc(renderer: ^DebugRenderer, point: ^RVec3, normal: ^Vec3, color: Color, size: f32) --- 1977 DebugRenderer_DrawWireTriangle :: proc(renderer: ^DebugRenderer, v1: ^RVec3, v2: ^RVec3, v3: ^RVec3, color: Color) --- 1978 DebugRenderer_DrawWireSphere :: proc(renderer: ^DebugRenderer, center: ^RVec3, radius: f32, color: Color, level: i32) --- 1979 DebugRenderer_DrawWireUnitSphere :: proc(renderer: ^DebugRenderer, _matrix: ^RMat4, color: Color, level: i32) --- 1980 DebugRenderer_DrawTriangle :: proc(renderer: ^DebugRenderer, v1: ^RVec3, v2: ^RVec3, v3: ^RVec3, color: Color, castShadow: DebugRenderer_CastShadow) --- 1981 DebugRenderer_DrawBox :: proc(renderer: ^DebugRenderer, box: ^AABox, color: Color, castShadow: DebugRenderer_CastShadow, drawMode: DebugRenderer_DrawMode) --- 1982 DebugRenderer_DrawBox2 :: proc(renderer: ^DebugRenderer, _matrix: ^RMat4, box: ^AABox, color: Color, castShadow: DebugRenderer_CastShadow, drawMode: DebugRenderer_DrawMode) --- 1983 DebugRenderer_DrawSphere :: proc(renderer: ^DebugRenderer, center: ^RVec3, radius: f32, color: Color, castShadow: DebugRenderer_CastShadow, drawMode: DebugRenderer_DrawMode) --- 1984 DebugRenderer_DrawUnitSphere :: proc(renderer: ^DebugRenderer, _matrix: RMat4, color: Color, castShadow: DebugRenderer_CastShadow, drawMode: DebugRenderer_DrawMode) --- 1985 DebugRenderer_DrawCapsule :: proc(renderer: ^DebugRenderer, _matrix: ^RMat4, halfHeightOfCylinder: f32, radius: f32, color: Color, castShadow: DebugRenderer_CastShadow, drawMode: DebugRenderer_DrawMode) --- 1986 DebugRenderer_DrawCylinder :: proc(renderer: ^DebugRenderer, _matrix: ^RMat4, halfHeight: f32, radius: f32, color: Color, castShadow: DebugRenderer_CastShadow, drawMode: DebugRenderer_DrawMode) --- 1987 DebugRenderer_DrawOpenCone :: proc(renderer: ^DebugRenderer, top: ^RVec3, axis: ^Vec3, perpendicular: ^Vec3, halfAngle: f32, length: f32, color: Color, castShadow: DebugRenderer_CastShadow, drawMode: DebugRenderer_DrawMode) --- 1988 DebugRenderer_DrawSwingConeLimits :: proc(renderer: ^DebugRenderer, _matrix: ^RMat4, swingYHalfAngle: f32, swingZHalfAngle: f32, edgeLength: f32, color: Color, castShadow: DebugRenderer_CastShadow, drawMode: DebugRenderer_DrawMode) --- 1989 DebugRenderer_DrawSwingPyramidLimits :: proc(renderer: ^DebugRenderer, _matrix: ^RMat4, minSwingYAngle: f32, maxSwingYAngle: f32, minSwingZAngle: f32, maxSwingZAngle: f32, edgeLength: f32, color: Color, castShadow: DebugRenderer_CastShadow, drawMode: DebugRenderer_DrawMode) --- 1990 DebugRenderer_DrawPie :: proc(renderer: ^DebugRenderer, center: ^RVec3, radius: f32, normal: ^Vec3, axis: ^Vec3, minAngle: f32, maxAngle: f32, color: Color, castShadow: DebugRenderer_CastShadow, drawMode: DebugRenderer_DrawMode) --- 1991 DebugRenderer_DrawTaperedCylinder :: proc(renderer: ^DebugRenderer, inMatrix: ^RMat4, top: f32, bottom: f32, topRadius: f32, bottomRadius: f32, color: Color, castShadow: DebugRenderer_CastShadow, drawMode: DebugRenderer_DrawMode) --- 1992 } 1993 1994 /* Skeleton */ 1995 SkeletonJoint :: struct { 1996 name: cstring, 1997 parentName: cstring, 1998 parentJointIndex: i32, 1999 } 2000 2001 @(default_calling_convention="c", link_prefix="JPH_") 2002 foreign lib { 2003 Skeleton_Create :: proc() -> ^Skeleton --- 2004 Skeleton_Destroy :: proc(skeleton: ^Skeleton) --- 2005 Skeleton_AddJoint :: proc(skeleton: ^Skeleton, name: cstring) -> u32 --- 2006 Skeleton_AddJoint2 :: proc(skeleton: ^Skeleton, name: cstring, parentIndex: i32) -> u32 --- 2007 Skeleton_AddJoint3 :: proc(skeleton: ^Skeleton, name: cstring, parentName: cstring) -> u32 --- 2008 Skeleton_GetJointCount :: proc(skeleton: ^Skeleton) -> i32 --- 2009 Skeleton_GetJoint :: proc(skeleton: ^Skeleton, index: i32, joint: ^SkeletonJoint) --- 2010 Skeleton_GetJointIndex :: proc(skeleton: ^Skeleton, name: cstring) -> i32 --- 2011 Skeleton_CalculateParentJointIndices :: proc(skeleton: ^Skeleton) --- 2012 Skeleton_AreJointsCorrectlyOrdered :: proc(skeleton: ^Skeleton) -> bool --- 2013 2014 /* Ragdoll */ 2015 RagdollSettings_Create :: proc() -> ^RagdollSettings --- 2016 RagdollSettings_Destroy :: proc(settings: ^RagdollSettings) --- 2017 RagdollSettings_GetSkeleton :: proc(character: ^RagdollSettings) -> ^Skeleton --- 2018 RagdollSettings_SetSkeleton :: proc(character: ^RagdollSettings, skeleton: ^Skeleton) --- 2019 RagdollSettings_Stabilize :: proc(settings: ^RagdollSettings) -> bool --- 2020 RagdollSettings_DisableParentChildCollisions :: proc(settings: ^RagdollSettings, jointMatrices: ^Mat4, minSeparationDistance: f32) --- /*=nullptr*/ 2021 RagdollSettings_CalculateBodyIndexToConstraintIndex :: proc(settings: ^RagdollSettings) --- 2022 RagdollSettings_GetConstraintIndexForBodyIndex :: proc(settings: ^RagdollSettings, bodyIndex: i32) -> i32 --- 2023 RagdollSettings_CalculateConstraintIndexToBodyIdxPair :: proc(settings: ^RagdollSettings) --- 2024 RagdollSettings_CreateRagdoll :: proc(settings: ^RagdollSettings, system: ^PhysicsSystem, collisionGroup: CollisionGroupID, userData: u64) -> ^Ragdoll --- /*=0*/ 2025 Ragdoll_Destroy :: proc(ragdoll: ^Ragdoll) --- 2026 Ragdoll_AddToPhysicsSystem :: proc(ragdoll: ^Ragdoll, activationMode: Activation, lockBodies: bool) --- /*= JPH_ActivationActivate */ 2027 Ragdoll_RemoveFromPhysicsSystem :: proc(ragdoll: ^Ragdoll, lockBodies: bool) --- /* = true */ 2028 Ragdoll_Activate :: proc(ragdoll: ^Ragdoll, lockBodies: bool) --- /* = true */ 2029 Ragdoll_IsActive :: proc(ragdoll: ^Ragdoll, lockBodies: bool) -> bool --- /* = true */ 2030 Ragdoll_ResetWarmStart :: proc(ragdoll: ^Ragdoll) --- 2031 2032 /* JPH_EstimateCollisionResponse */ 2033 EstimateCollisionResponse :: proc(body1: ^Body, body2: ^Body, manifold: ^ContactManifold, combinedFriction: f32, combinedRestitution: f32, minVelocityForRestitution: f32, numIterations: u32, result: ^CollisionEstimationResult) --- 2034 } 2035 2036 WheelSettings :: struct {} 2037 WheelSettingsWV :: struct {} /* Inherits JPH_WheelSettings */ 2038 WheelSettingsTV :: struct {} /* Inherits JPH_WheelSettings */ 2039 Wheel :: struct {} 2040 WheelWV :: struct {} /* Inherits JPH_Wheel */ 2041 WheelTV :: struct {} /* Inherits JPH_Wheel */ 2042 VehicleTransmissionSettings :: struct {} 2043 VehicleCollisionTester :: struct {} 2044 VehicleCollisionTesterRay :: struct {} /* Inherits JPH_VehicleCollisionTester */ 2045 VehicleCollisionTesterCastSphere :: struct {} /* Inherits JPH_VehicleCollisionTester */ 2046 VehicleCollisionTesterCastCylinder :: struct {} /* Inherits JPH_VehicleCollisionTester */ 2047 VehicleConstraint :: struct {} /* Inherits JPH_Constraint */ 2048 VehicleControllerSettings :: struct {} 2049 WheeledVehicleControllerSettings :: struct {} /* Inherits JPH_VehicleControllerSettings */ 2050 MotorcycleControllerSettings :: struct {} /* Inherits JPH_WheeledVehicleControllerSettings */ 2051 TrackedVehicleControllerSettings :: struct {} /* Inherits JPH_VehicleControllerSettings */ 2052 WheeledVehicleController :: struct {} /* Inherits JPH_VehicleController */ 2053 MotorcycleController :: struct {} /* Inherits JPH_WheeledVehicleController */ 2054 TrackedVehicleController :: struct {} /* Inherits JPH_VehicleController */ 2055 VehicleController :: struct {} 2056 2057 VehicleAntiRollBar :: struct { 2058 leftWheel: i32, 2059 rightWheel: i32, 2060 stiffness: f32, 2061 } 2062 2063 VehicleConstraintSettings :: struct { 2064 base: ConstraintSettings, /* Inherits JPH_ConstraintSettings */ 2065 up: Vec3, 2066 forward: Vec3, 2067 maxPitchRollAngle: f32, 2068 wheelsCount: u32, 2069 wheels: ^^WheelSettings, 2070 antiRollBarsCount: u32, 2071 antiRollBars: ^VehicleAntiRollBar, 2072 controller: ^VehicleControllerSettings, 2073 } 2074 2075 VehicleEngineSettings :: struct { 2076 maxTorque: f32, 2077 minRPM: f32, 2078 maxRPM: f32, 2079 2080 //LinearCurve normalizedTorque; 2081 inertia: f32, 2082 angularDamping: f32, 2083 } 2084 2085 VehicleDifferentialSettings :: struct { 2086 leftWheel: i32, 2087 rightWheel: i32, 2088 differentialRatio: f32, 2089 leftRightSplit: f32, 2090 limitedSlipRatio: f32, 2091 engineTorqueRatio: f32, 2092 } 2093 2094 @(default_calling_convention="c", link_prefix="JPH_") 2095 foreign lib { 2096 VehicleConstraintSettings_Init :: proc(settings: ^VehicleConstraintSettings) --- 2097 VehicleConstraint_Create :: proc(body: ^Body, settings: ^VehicleConstraintSettings) -> ^VehicleConstraint --- 2098 VehicleConstraint_AsPhysicsStepListener :: proc(constraint: ^VehicleConstraint) -> ^PhysicsStepListener --- 2099 VehicleConstraint_SetMaxPitchRollAngle :: proc(constraint: ^VehicleConstraint, maxPitchRollAngle: f32) --- 2100 VehicleConstraint_SetVehicleCollisionTester :: proc(constraint: ^VehicleConstraint, tester: ^VehicleCollisionTester) --- 2101 VehicleConstraint_OverrideGravity :: proc(constraint: ^VehicleConstraint, value: ^Vec3) --- 2102 VehicleConstraint_IsGravityOverridden :: proc(constraint: ^VehicleConstraint) -> bool --- 2103 VehicleConstraint_GetGravityOverride :: proc(constraint: ^VehicleConstraint, result: ^Vec3) --- 2104 VehicleConstraint_ResetGravityOverride :: proc(constraint: ^VehicleConstraint) --- 2105 VehicleConstraint_GetLocalForward :: proc(constraint: ^VehicleConstraint, result: ^Vec3) --- 2106 VehicleConstraint_GetLocalUp :: proc(constraint: ^VehicleConstraint, result: ^Vec3) --- 2107 VehicleConstraint_GetWorldUp :: proc(constraint: ^VehicleConstraint, result: ^Vec3) --- 2108 VehicleConstraint_GetVehicleBody :: proc(constraint: ^VehicleConstraint) -> ^Body --- 2109 VehicleConstraint_GetController :: proc(constraint: ^VehicleConstraint) -> ^VehicleController --- 2110 VehicleConstraint_GetWheelsCount :: proc(constraint: ^VehicleConstraint) -> u32 --- 2111 VehicleConstraint_GetWheel :: proc(constraint: ^VehicleConstraint, index: u32) -> ^Wheel --- 2112 VehicleConstraint_GetWheelLocalBasis :: proc(constraint: ^VehicleConstraint, wheel: ^Wheel, outForward: ^Vec3, outUp: ^Vec3, outRight: ^Vec3) --- 2113 VehicleConstraint_GetWheelLocalTransform :: proc(constraint: ^VehicleConstraint, wheelIndex: u32, wheelRight: ^Vec3, wheelUp: ^Vec3, result: ^Mat4) --- 2114 VehicleConstraint_GetWheelWorldTransform :: proc(constraint: ^VehicleConstraint, wheelIndex: u32, wheelRight: ^Vec3, wheelUp: ^Vec3, result: ^RMat4) --- 2115 2116 /* Wheel */ 2117 WheelSettings_Create :: proc() -> ^WheelSettings --- 2118 WheelSettings_Destroy :: proc(settings: ^WheelSettings) --- 2119 WheelSettings_GetPosition :: proc(settings: ^WheelSettings, result: ^Vec3) --- 2120 WheelSettings_SetPosition :: proc(settings: ^WheelSettings, value: ^Vec3) --- 2121 WheelSettings_GetSuspensionForcePoint :: proc(settings: ^WheelSettings, result: ^Vec3) --- 2122 WheelSettings_SetSuspensionForcePoint :: proc(settings: ^WheelSettings, value: ^Vec3) --- 2123 WheelSettings_GetSuspensionDirection :: proc(settings: ^WheelSettings, result: ^Vec3) --- 2124 WheelSettings_SetSuspensionDirection :: proc(settings: ^WheelSettings, value: ^Vec3) --- 2125 WheelSettings_GetSteeringAxis :: proc(settings: ^WheelSettings, result: ^Vec3) --- 2126 WheelSettings_SetSteeringAxis :: proc(settings: ^WheelSettings, value: ^Vec3) --- 2127 WheelSettings_GetWheelUp :: proc(settings: ^WheelSettings, result: ^Vec3) --- 2128 WheelSettings_SetWheelUp :: proc(settings: ^WheelSettings, value: ^Vec3) --- 2129 WheelSettings_GetWheelForward :: proc(settings: ^WheelSettings, result: ^Vec3) --- 2130 WheelSettings_SetWheelForward :: proc(settings: ^WheelSettings, value: ^Vec3) --- 2131 WheelSettings_GetSuspensionMinLength :: proc(settings: ^WheelSettings) -> f32 --- 2132 WheelSettings_SetSuspensionMinLength :: proc(settings: ^WheelSettings, value: f32) --- 2133 WheelSettings_GetSuspensionMaxLength :: proc(settings: ^WheelSettings) -> f32 --- 2134 WheelSettings_SetSuspensionMaxLength :: proc(settings: ^WheelSettings, value: f32) --- 2135 WheelSettings_GetSuspensionPreloadLength :: proc(settings: ^WheelSettings) -> f32 --- 2136 WheelSettings_SetSuspensionPreloadLength :: proc(settings: ^WheelSettings, value: f32) --- 2137 WheelSettings_GetSuspensionSpring :: proc(settings: ^WheelSettings, result: ^SpringSettings) --- 2138 WheelSettings_SetSuspensionSpring :: proc(settings: ^WheelSettings, springSettings: ^SpringSettings) --- 2139 WheelSettings_GetRadius :: proc(settings: ^WheelSettings) -> f32 --- 2140 WheelSettings_SetRadius :: proc(settings: ^WheelSettings, value: f32) --- 2141 WheelSettings_GetWidth :: proc(settings: ^WheelSettings) -> f32 --- 2142 WheelSettings_SetWidth :: proc(settings: ^WheelSettings, value: f32) --- 2143 WheelSettings_GetEnableSuspensionForcePoint :: proc(settings: ^WheelSettings) -> bool --- 2144 WheelSettings_SetEnableSuspensionForcePoint :: proc(settings: ^WheelSettings, value: bool) --- 2145 Wheel_Create :: proc(settings: ^WheelSettings) -> ^Wheel --- 2146 Wheel_Destroy :: proc(wheel: ^Wheel) --- 2147 Wheel_GetSettings :: proc(wheel: ^Wheel) -> ^WheelSettings --- 2148 Wheel_GetAngularVelocity :: proc(wheel: ^Wheel) -> f32 --- 2149 Wheel_SetAngularVelocity :: proc(wheel: ^Wheel, value: f32) --- 2150 Wheel_GetRotationAngle :: proc(wheel: ^Wheel) -> f32 --- 2151 Wheel_SetRotationAngle :: proc(wheel: ^Wheel, value: f32) --- 2152 Wheel_GetSteerAngle :: proc(wheel: ^Wheel) -> f32 --- 2153 Wheel_SetSteerAngle :: proc(wheel: ^Wheel, value: f32) --- 2154 Wheel_HasContact :: proc(wheel: ^Wheel) -> bool --- 2155 Wheel_GetContactBodyID :: proc(wheel: ^Wheel) -> BodyID --- 2156 Wheel_GetContactSubShapeID :: proc(wheel: ^Wheel) -> SubShapeID --- 2157 Wheel_GetContactPosition :: proc(wheel: ^Wheel, result: ^RVec3) --- 2158 Wheel_GetContactPointVelocity :: proc(wheel: ^Wheel, result: ^Vec3) --- 2159 Wheel_GetContactNormal :: proc(wheel: ^Wheel, result: ^Vec3) --- 2160 Wheel_GetContactLongitudinal :: proc(wheel: ^Wheel, result: ^Vec3) --- 2161 Wheel_GetContactLateral :: proc(wheel: ^Wheel, result: ^Vec3) --- 2162 Wheel_GetSuspensionLength :: proc(wheel: ^Wheel) -> f32 --- 2163 Wheel_GetSuspensionLambda :: proc(wheel: ^Wheel) -> f32 --- 2164 Wheel_GetLongitudinalLambda :: proc(wheel: ^Wheel) -> f32 --- 2165 Wheel_GetLateralLambda :: proc(wheel: ^Wheel) -> f32 --- 2166 Wheel_HasHitHardPoint :: proc(wheel: ^Wheel) -> bool --- 2167 2168 /* VehicleAntiRollBar */ 2169 VehicleAntiRollBar_Init :: proc(antiRollBar: ^VehicleAntiRollBar) --- 2170 2171 /* VehicleEngine */ 2172 VehicleEngineSettings_Init :: proc(settings: ^VehicleEngineSettings) --- 2173 2174 /* VehicleDifferentialSettings */ 2175 VehicleDifferentialSettings_Init :: proc(settings: ^VehicleDifferentialSettings) --- 2176 2177 /* VehicleTransmission */ 2178 VehicleTransmissionSettings_Create :: proc() -> ^VehicleTransmissionSettings --- 2179 VehicleTransmissionSettings_Destroy :: proc(settings: ^VehicleTransmissionSettings) --- 2180 VehicleTransmissionSettings_GetMode :: proc(settings: ^VehicleTransmissionSettings) -> TransmissionMode --- 2181 VehicleTransmissionSettings_SetMode :: proc(settings: ^VehicleTransmissionSettings, value: TransmissionMode) --- 2182 VehicleTransmissionSettings_GetGearRatioCount :: proc(settings: ^VehicleTransmissionSettings) -> u32 --- 2183 VehicleTransmissionSettings_GetGearRatio :: proc(settings: ^VehicleTransmissionSettings, index: u32) -> f32 --- 2184 VehicleTransmissionSettings_SetGearRatio :: proc(settings: ^VehicleTransmissionSettings, index: u32, value: f32) --- 2185 VehicleTransmissionSettings_GetGearRatios :: proc(settings: ^VehicleTransmissionSettings) -> ^f32 --- 2186 VehicleTransmissionSettings_SetGearRatios :: proc(settings: ^VehicleTransmissionSettings, values: ^f32, count: u32) --- 2187 VehicleTransmissionSettings_GetReverseGearRatioCount :: proc(settings: ^VehicleTransmissionSettings) -> u32 --- 2188 VehicleTransmissionSettings_GetReverseGearRatio :: proc(settings: ^VehicleTransmissionSettings, index: u32) -> f32 --- 2189 VehicleTransmissionSettings_SetReverseGearRatio :: proc(settings: ^VehicleTransmissionSettings, index: u32, value: f32) --- 2190 VehicleTransmissionSettings_GetReverseGearRatios :: proc(settings: ^VehicleTransmissionSettings) -> ^f32 --- 2191 VehicleTransmissionSettings_SetReverseGearRatios :: proc(settings: ^VehicleTransmissionSettings, values: ^f32, count: u32) --- 2192 VehicleTransmissionSettings_GetSwitchTime :: proc(settings: ^VehicleTransmissionSettings) -> f32 --- 2193 VehicleTransmissionSettings_SetSwitchTime :: proc(settings: ^VehicleTransmissionSettings, value: f32) --- 2194 VehicleTransmissionSettings_GetClutchReleaseTime :: proc(settings: ^VehicleTransmissionSettings) -> f32 --- 2195 VehicleTransmissionSettings_SetClutchReleaseTime :: proc(settings: ^VehicleTransmissionSettings, value: f32) --- 2196 VehicleTransmissionSettings_GetSwitchLatency :: proc(settings: ^VehicleTransmissionSettings) -> f32 --- 2197 VehicleTransmissionSettings_SetSwitchLatency :: proc(settings: ^VehicleTransmissionSettings, value: f32) --- 2198 VehicleTransmissionSettings_GetShiftUpRPM :: proc(settings: ^VehicleTransmissionSettings) -> f32 --- 2199 VehicleTransmissionSettings_SetShiftUpRPM :: proc(settings: ^VehicleTransmissionSettings, value: f32) --- 2200 VehicleTransmissionSettings_GetShiftDownRPM :: proc(settings: ^VehicleTransmissionSettings) -> f32 --- 2201 VehicleTransmissionSettings_SetShiftDownRPM :: proc(settings: ^VehicleTransmissionSettings, value: f32) --- 2202 VehicleTransmissionSettings_GetClutchStrength :: proc(settings: ^VehicleTransmissionSettings) -> f32 --- 2203 VehicleTransmissionSettings_SetClutchStrength :: proc(settings: ^VehicleTransmissionSettings, value: f32) --- 2204 2205 /* VehicleCollisionTester */ 2206 VehicleCollisionTester_Destroy :: proc(tester: ^VehicleCollisionTester) --- 2207 VehicleCollisionTester_GetObjectLayer :: proc(tester: ^VehicleCollisionTester) -> ObjectLayer --- 2208 VehicleCollisionTester_SetObjectLayer :: proc(tester: ^VehicleCollisionTester, value: ObjectLayer) --- 2209 VehicleCollisionTesterRay_Create :: proc(layer: ObjectLayer, up: ^Vec3, maxSlopeAngle: f32) -> ^VehicleCollisionTesterRay --- 2210 VehicleCollisionTesterCastSphere_Create :: proc(layer: ObjectLayer, radius: f32, up: ^Vec3, maxSlopeAngle: f32) -> ^VehicleCollisionTesterCastSphere --- 2211 VehicleCollisionTesterCastCylinder_Create :: proc(layer: ObjectLayer, convexRadiusFraction: f32) -> ^VehicleCollisionTesterCastCylinder --- 2212 2213 /* VehicleControllerSettings/VehicleController */ 2214 VehicleControllerSettings_Destroy :: proc(settings: ^VehicleControllerSettings) --- 2215 VehicleController_GetConstraint :: proc(controller: ^VehicleController) -> ^VehicleConstraint --- 2216 2217 /* ---- WheelSettingsWV - WheelWV - WheeledVehicleController ---- */ 2218 WheelSettingsWV_Create :: proc() -> ^WheelSettingsWV --- 2219 WheelSettingsWV_GetInertia :: proc(settings: ^WheelSettingsWV) -> f32 --- 2220 WheelSettingsWV_SetInertia :: proc(settings: ^WheelSettingsWV, value: f32) --- 2221 WheelSettingsWV_GetAngularDamping :: proc(settings: ^WheelSettingsWV) -> f32 --- 2222 WheelSettingsWV_SetAngularDamping :: proc(settings: ^WheelSettingsWV, value: f32) --- 2223 WheelSettingsWV_GetMaxSteerAngle :: proc(settings: ^WheelSettingsWV) -> f32 --- 2224 WheelSettingsWV_SetMaxSteerAngle :: proc(settings: ^WheelSettingsWV, value: f32) --- 2225 2226 //JPH_CAPI JPH_LinearCurve* JPH_WheelSettingsWV_GetLongitudinalFriction(const JPH_WheelSettingsWV* settings); 2227 //JPH_CAPI void JPH_WheelSettingsWV_SetLongitudinalFriction(JPH_WheelSettingsWV* settings, const JPH_LinearCurve* value); 2228 //JPH_CAPI JPH_LinearCurve* JPH_WheelSettingsWV_GetLateralFriction(const JPH_WheelSettingsWV* settings); 2229 //JPH_CAPI void JPH_WheelSettingsWV_SetLateralFriction(JPH_WheelSettingsWV* settings, const JPH_LinearCurve* value); 2230 WheelSettingsWV_GetMaxBrakeTorque :: proc(settings: ^WheelSettingsWV) -> f32 --- 2231 WheelSettingsWV_SetMaxBrakeTorque :: proc(settings: ^WheelSettingsWV, value: f32) --- 2232 WheelSettingsWV_GetMaxHandBrakeTorque :: proc(settings: ^WheelSettingsWV) -> f32 --- 2233 WheelSettingsWV_SetMaxHandBrakeTorque :: proc(settings: ^WheelSettingsWV, value: f32) --- 2234 WheelWV_Create :: proc(settings: ^WheelSettingsWV) -> ^WheelWV --- 2235 WheelWV_GetSettings :: proc(wheel: ^WheelWV) -> ^WheelSettingsWV --- 2236 WheelWV_ApplyTorque :: proc(wheel: ^WheelWV, torque: f32, deltaTime: f32) --- 2237 WheeledVehicleControllerSettings_Create :: proc() -> ^WheeledVehicleControllerSettings --- 2238 WheeledVehicleControllerSettings_GetEngine :: proc(settings: ^WheeledVehicleControllerSettings, result: ^VehicleEngineSettings) --- 2239 WheeledVehicleControllerSettings_SetEngine :: proc(settings: ^WheeledVehicleControllerSettings, value: ^VehicleEngineSettings) --- 2240 WheeledVehicleControllerSettings_GetTransmission :: proc(settings: ^WheeledVehicleControllerSettings) -> ^VehicleTransmissionSettings --- 2241 WheeledVehicleControllerSettings_SetTransmission :: proc(settings: ^WheeledVehicleControllerSettings, value: ^VehicleTransmissionSettings) --- 2242 WheeledVehicleControllerSettings_GetDifferentialsCount :: proc(settings: ^WheeledVehicleControllerSettings) -> u32 --- 2243 WheeledVehicleControllerSettings_SetDifferentialsCount :: proc(settings: ^WheeledVehicleControllerSettings, count: u32) --- 2244 WheeledVehicleControllerSettings_GetDifferential :: proc(settings: ^WheeledVehicleControllerSettings, index: u32, result: ^VehicleDifferentialSettings) --- 2245 WheeledVehicleControllerSettings_SetDifferential :: proc(settings: ^WheeledVehicleControllerSettings, index: u32, value: ^VehicleDifferentialSettings) --- 2246 WheeledVehicleControllerSettings_SetDifferentials :: proc(settings: ^WheeledVehicleControllerSettings, values: ^VehicleDifferentialSettings, count: u32) --- 2247 WheeledVehicleControllerSettings_GetDifferentialLimitedSlipRatio :: proc(settings: ^WheeledVehicleControllerSettings) -> f32 --- 2248 WheeledVehicleControllerSettings_SetDifferentialLimitedSlipRatio :: proc(settings: ^WheeledVehicleControllerSettings, value: f32) --- 2249 WheeledVehicleController_SetDriverInput :: proc(controller: ^WheeledVehicleController, forward: f32, right: f32, brake: f32, handBrake: f32) --- 2250 WheeledVehicleController_SetForwardInput :: proc(controller: ^WheeledVehicleController, forward: f32) --- 2251 WheeledVehicleController_GetForwardInput :: proc(controller: ^WheeledVehicleController) -> f32 --- 2252 WheeledVehicleController_SetRightInput :: proc(controller: ^WheeledVehicleController, rightRatio: f32) --- 2253 WheeledVehicleController_GetRightInput :: proc(controller: ^WheeledVehicleController) -> f32 --- 2254 WheeledVehicleController_SetBrakeInput :: proc(controller: ^WheeledVehicleController, brakeInput: f32) --- 2255 WheeledVehicleController_GetBrakeInput :: proc(controller: ^WheeledVehicleController) -> f32 --- 2256 WheeledVehicleController_SetHandBrakeInput :: proc(controller: ^WheeledVehicleController, handBrakeInput: f32) --- 2257 WheeledVehicleController_GetHandBrakeInput :: proc(controller: ^WheeledVehicleController) -> f32 --- 2258 WheeledVehicleController_GetWheelSpeedAtClutch :: proc(controller: ^WheeledVehicleController) -> f32 --- 2259 2260 /* WheelSettingsTV - WheelTV - TrackedVehicleController */ 2261 /* TODO: Add VehicleTrack and VehicleTrackSettings */ 2262 WheelSettingsTV_Create :: proc() -> ^WheelSettingsTV --- 2263 WheelSettingsTV_GetLongitudinalFriction :: proc(settings: ^WheelSettingsTV) -> f32 --- 2264 WheelSettingsTV_SetLongitudinalFriction :: proc(settings: ^WheelSettingsTV, value: f32) --- 2265 WheelSettingsTV_GetLateralFriction :: proc(settings: ^WheelSettingsTV) -> f32 --- 2266 WheelSettingsTV_SetLateralFriction :: proc(settings: ^WheelSettingsTV, value: f32) --- 2267 WheelTV_Create :: proc(settings: ^WheelSettingsTV) -> ^WheelTV --- 2268 WheelTV_GetSettings :: proc(wheel: ^WheelTV) -> ^WheelSettingsTV --- 2269 TrackedVehicleControllerSettings_Create :: proc() -> ^TrackedVehicleControllerSettings --- 2270 TrackedVehicleControllerSettings_GetEngine :: proc(settings: ^TrackedVehicleControllerSettings, result: ^VehicleEngineSettings) --- 2271 TrackedVehicleControllerSettings_SetEngine :: proc(settings: ^TrackedVehicleControllerSettings, value: ^VehicleEngineSettings) --- 2272 TrackedVehicleControllerSettings_GetTransmission :: proc(settings: ^TrackedVehicleControllerSettings) -> ^VehicleTransmissionSettings --- 2273 TrackedVehicleControllerSettings_SetTransmission :: proc(settings: ^TrackedVehicleControllerSettings, value: ^VehicleTransmissionSettings) --- 2274 TrackedVehicleController_SetDriverInput :: proc(controller: ^TrackedVehicleController, forward: f32, leftRatio: f32, rightRatio: f32, brake: f32) --- 2275 TrackedVehicleController_GetForwardInput :: proc(controller: ^TrackedVehicleController) -> f32 --- 2276 TrackedVehicleController_SetForwardInput :: proc(controller: ^TrackedVehicleController, value: f32) --- 2277 TrackedVehicleController_GetLeftRatio :: proc(controller: ^TrackedVehicleController) -> f32 --- 2278 TrackedVehicleController_SetLeftRatio :: proc(controller: ^TrackedVehicleController, value: f32) --- 2279 TrackedVehicleController_GetRightRatio :: proc(controller: ^TrackedVehicleController) -> f32 --- 2280 TrackedVehicleController_SetRightRatio :: proc(controller: ^TrackedVehicleController, value: f32) --- 2281 TrackedVehicleController_GetBrakeInput :: proc(controller: ^TrackedVehicleController) -> f32 --- 2282 TrackedVehicleController_SetBrakeInput :: proc(controller: ^TrackedVehicleController, value: f32) --- 2283 2284 /* MotorcycleController */ 2285 MotorcycleControllerSettings_Create :: proc() -> ^MotorcycleControllerSettings --- 2286 MotorcycleControllerSettings_GetMaxLeanAngle :: proc(settings: ^MotorcycleControllerSettings) -> f32 --- 2287 MotorcycleControllerSettings_SetMaxLeanAngle :: proc(settings: ^MotorcycleControllerSettings, value: f32) --- 2288 MotorcycleControllerSettings_GetLeanSpringConstant :: proc(settings: ^MotorcycleControllerSettings) -> f32 --- 2289 MotorcycleControllerSettings_SetLeanSpringConstant :: proc(settings: ^MotorcycleControllerSettings, value: f32) --- 2290 MotorcycleControllerSettings_GetLeanSpringDamping :: proc(settings: ^MotorcycleControllerSettings) -> f32 --- 2291 MotorcycleControllerSettings_SetLeanSpringDamping :: proc(settings: ^MotorcycleControllerSettings, value: f32) --- 2292 MotorcycleControllerSettings_GetLeanSpringIntegrationCoefficient :: proc(settings: ^MotorcycleControllerSettings) -> f32 --- 2293 MotorcycleControllerSettings_SetLeanSpringIntegrationCoefficient :: proc(settings: ^MotorcycleControllerSettings, value: f32) --- 2294 MotorcycleControllerSettings_GetLeanSpringIntegrationCoefficientDecay :: proc(settings: ^MotorcycleControllerSettings) -> f32 --- 2295 MotorcycleControllerSettings_SetLeanSpringIntegrationCoefficientDecay :: proc(settings: ^MotorcycleControllerSettings, value: f32) --- 2296 MotorcycleControllerSettings_GetLeanSmoothingFactor :: proc(settings: ^MotorcycleControllerSettings) -> f32 --- 2297 MotorcycleControllerSettings_SetLeanSmoothingFactor :: proc(settings: ^MotorcycleControllerSettings, value: f32) --- 2298 MotorcycleController_GetWheelBase :: proc(controller: ^MotorcycleController) -> f32 --- 2299 MotorcycleController_IsLeanControllerEnabled :: proc(controller: ^MotorcycleController) -> bool --- 2300 MotorcycleController_EnableLeanController :: proc(controller: ^MotorcycleController, value: bool) --- 2301 MotorcycleController_IsLeanSteeringLimitEnabled :: proc(controller: ^MotorcycleController) -> bool --- 2302 MotorcycleController_EnableLeanSteeringLimit :: proc(controller: ^MotorcycleController, value: bool) --- 2303 MotorcycleController_GetLeanSpringConstant :: proc(controller: ^MotorcycleController) -> f32 --- 2304 MotorcycleController_SetLeanSpringConstant :: proc(controller: ^MotorcycleController, value: f32) --- 2305 MotorcycleController_GetLeanSpringDamping :: proc(controller: ^MotorcycleController) -> f32 --- 2306 MotorcycleController_SetLeanSpringDamping :: proc(controller: ^MotorcycleController, value: f32) --- 2307 MotorcycleController_GetLeanSpringIntegrationCoefficient :: proc(controller: ^MotorcycleController) -> f32 --- 2308 MotorcycleController_SetLeanSpringIntegrationCoefficient :: proc(controller: ^MotorcycleController, value: f32) --- 2309 MotorcycleController_GetLeanSpringIntegrationCoefficientDecay :: proc(controller: ^MotorcycleController) -> f32 --- 2310 MotorcycleController_SetLeanSpringIntegrationCoefficientDecay :: proc(controller: ^MotorcycleController, value: f32) --- 2311 MotorcycleController_GetLeanSmoothingFactor :: proc(controller: ^MotorcycleController) -> f32 --- 2312 MotorcycleController_SetLeanSmoothingFactor :: proc(controller: ^MotorcycleController, value: f32) --- 2313 } 2314