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

WIP: Added some missing field info to the EngineApi interface #2241

Closed
wants to merge 1 commit into from

Conversation

lukaspj
Copy link
Contributor

@lukaspj lukaspj commented Apr 6, 2018

This probably doesn't have any effect on how the engine works, but it is nice for documentation and engine API export purposes.

@@ -63,11 +63,12 @@ extern bool VectorResize(U32 *aSize, U32 *aCount, void **arrayPtr, U32 newCount,
template<class T>
class Vector
{
protected:
public:
Copy link
Contributor

Choose a reason for hiding this comment

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

quite dangerous, completely breaks encapsulation...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes I forgot I made that change in there, wanted to bring it up and ask if there were another way to do it.. Maybe moving the Implement Struct to somewhere associated with Vector?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

An alternative solution is hard-coding the offsets:

IMPLEMENT_STRUCT( Vector< bool >,
   BoolVector,,
   "" )
   {"elementCount", "", 1, TYPE<U32>(), 0},
   {"arraySize", "", 1, TYPE<U32>(), 4},
   {"array", "", 1, TYPE<bool*>(), 8},
   //FIELD(mElementCount, elementCount, 1, "")
   //FIELD(mArraySize, arraySize, 1, "")
   //FIELD(mArray, elements, 1, "")
END_IMPLEMENT_STRUCT;

Copy link
Contributor Author

@lukaspj lukaspj Apr 8, 2018

Choose a reason for hiding this comment

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

Or the offsets could be computed and defined in tVector.h, but that sort of breaks encapsulation as well.

@lukaspj lukaspj changed the title Added some missing field info to the EngineApi interface WIP: Added some missing field info to the EngineApi interface Apr 8, 2018
@lukaspj
Copy link
Contributor Author

lukaspj commented Apr 8, 2018

Added WIP tag, until we can figure out how to handle Vector stuff.

@lukaspj
Copy link
Contributor Author

lukaspj commented Apr 18, 2018

Structs that have access permission issues:

  • Vectors (IntVector, FloatVector, BoolVector)
  • UUID
  • MatrixF

@lukaspj
Copy link
Contributor Author

lukaspj commented Aug 3, 2019

Closed in favor of #2366

@lukaspj lukaspj closed this Aug 3, 2019
@lukaspj lukaspj mentioned this pull request Aug 3, 2019
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