Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add transformation to handle PxClientID #2

Open
PathogenDavid opened this issue Sep 10, 2020 · 0 comments
Open

Add transformation to handle PxClientID #2

PathogenDavid opened this issue Sep 10, 2020 · 0 comments

Comments

@PathogenDavid
Copy link
Member

PxClientID is a typedef used for IDs assigned by PxScene. Right now I'm pretty sure that they don't get translated at all (or maybe they're completely untyped.)

We should transform the PxClientID typedef from this:

typedef PxU8 PxClientID;
static const PxClientID PX_DEFAULT_CLIENT = 0;
static const PxClientID PX_MAX_CLIENTS = 128;

Into something like this:

struct PxClientID
{
    public readonly ubyte Id;

    private PxClientId(ubyte id)
        => Id = id;

    //TODO: Operators?

    public static readonly PxClientID Default = new PxClientID(0);
    public static readonly PxClientID MaxValue = new PxClientId(128);
}
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

No branches or pull requests

1 participant