mirror of
https://github.com/odin-lang/Odin.git
synced 2026-10-08 22:01:47 -04:00
Changing #by_ptr to a pointer to avoid potential bugs when copying the HullData struct #7612
In the example given in #7612 the issue was caused by the lines box_hull2 := b3d.MakeBoxHull(1, 1, 1) b3d.Shape_SetHull(box_shape, box_hull2.base) There is a note about potential errors during copy in the box3d code that seems to be causing the issue /// A convex hull. /// @note This data structure has data hanging off the end and cannot be directly copied. typedef struct b3HullData update to include Shape_SetMesh as well
This commit is contained in:
1 parent
8ca9cc4486
commit
f8749e08e0
1 file changed
+2
-2
Vendored
+2
-2
@@ -1089,12 +1089,12 @@ foreign lib {
|
||||
// Allows you to change a shape to be a hull or update the current hull.
|
||||
// This does not modify the mass properties.
|
||||
// @see Body_ApplyMassFromShapes
|
||||
Shape_SetHull :: proc(shapeId: ShapeId, #by_ptr hull: HullData) ---
|
||||
Shape_SetHull :: proc(shapeId: ShapeId, hull: ^HullData) ---
|
||||
|
||||
// Allows you to change a shape to be a mesh or update the current mesh.
|
||||
// This does not modify the mass properties.
|
||||
// @see Body_ApplyMassFromShapes
|
||||
Shape_SetMesh :: proc(shapeId: ShapeId, #by_ptr meshData: MeshData, scale: Vec3) ---
|
||||
Shape_SetMesh :: proc(shapeId: ShapeId, meshData: ^MeshData, scale: Vec3) ---
|
||||
|
||||
// Get the maximum capacity required for retrieving all the touching contacts on a shape
|
||||
Shape_GetContactCapacity :: proc(shapeId: ShapeId) -> c.int ---
|
||||
|
||||
Reference in new issue
Block a user