SecondHalfGames / JoltC

C wrapper for Jolt Physics
Apache License 2.0
17 stars 3 forks source link

Use Concrete `Shape` types in constructors? #11

Open LPGhatguy opened 7 months ago

LPGhatguy commented 7 months ago

Currently, all of the shapes are constructed with an API that looks like this:

JPC_API bool JPC_FooShapeSettings_Create(const JPC_FooShapeSettings* self, JPC_Shape** outShape, JPC_String** outError);

but I wonder if we should treat this, conceptually, as binding to the constructors of the shape types themselves:

JPC_API bool JPC_FooShape_new(const JPC_FooShapeSettings* settings, JPC_FooShape** outShape, JPC_String** outError);