Skip to content

Comments

Add set/get shape to body interface.#21

Closed
OndraVoves wants to merge 1 commit intozig-gamedev:mainfrom
cyberegoorg:add_set_get_shape
Closed

Add set/get shape to body interface.#21
OndraVoves wants to merge 1 commit intozig-gamedev:mainfrom
cyberegoorg:add_set_get_shape

Conversation

@OndraVoves
Copy link

No description provided.

@OndraVoves
Copy link
Author

Ouch duplicate of #19

@hazeycode
Copy link
Member

Merged #19

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds getShape and setShape methods to the body interface, allowing users to retrieve and update the shape of a physics body at runtime. These methods are exposed through the Zig API with corresponding C bindings.

Changes:

  • Added getShape and setShape functions to the BodyInterface in the Zig bindings
  • Declared corresponding C API functions in the JoltPhysicsC header
  • Implemented the C wrapper functions in JoltPhysicsC.cpp

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/zphysics.zig Added getShape and setShape methods to BodyInterface with proper type casting and parameter handling
libs/JoltC/JoltPhysicsC.h Declared C API function signatures for JPC_BodyInterface_GetShape and JPC_BodyInterface_SetShape
libs/JoltC/JoltPhysicsC.cpp Implemented C wrapper functions to bridge between C API and underlying C++ Jolt Physics library

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@zig-gamedev zig-gamedev deleted a comment from Copilot AI Jan 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants