-
Notifications
You must be signed in to change notification settings - Fork 43
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
function declaration without name for arguments #7
Comments
Hi, Victor. You really need of enum qualifier, or the problem is the So, try if it works (removing IMGUI_API bool gizmo3D(const char*, quat&, float=IMGUIZMO_DEF_SIZE, int=imguiGizmo::mode3Axes|imguiGizmo::cubeAtOrigin); If it don't works, and if I assign the enum qualifier like: enum gizmoModes { //0b0000'0000, //C++14 notation
mode3Axes = 0x0001, //0b0000'0001,
modeDirection = 0x0002, //0b0000'0010,
modeDirPlane = 0x0004, //0b0000'0100,
modeDual = 0x0008, //0b0000'1000,
modePanDolly = 0x0010, //0b0001'0000,
modeMask = 0x00ff,
cubeAtOrigin = 0x0100, //0b0000'0000,
sphereAtOrigin = 0x0200, //0b0001'0000,
noSolidAtOrigin = 0x0400, //0b0010'0000,
modeFullAxes = 0x0800,
axesModeMask = 0xff00
}; the following code works fine, anyway? IMGUI_API bool gizmo3D(const char*, quat&, float=IMGUIZMO_DEF_SIZE, int=imguiGizmo::mode3Axes|imguiGizmo::cubeAtOrigin); ... or do you need a more specific assignment, like this one? IMGUI_API bool gizmo3D(const char*, quat&, float=IMGUIZMO_DEF_SIZE, int=imguiGizmo::gizmoModes::mode3Axes|imguiGizmo::gizmoModes::cubeAtOrigin); Let me know, |
I used #8 But I dont know if used from C++ it makes use of I used the patched imGuIZMOquat.h (had to move it to example/src/tools ) for compiling qjSet without problem. Should that be enough test? May be it is because it is used in uiMainDlg.cpp I just found another stopper not for cimgizmo_quat in LuaJIT-ImGui but for LuaJIT-ImGui in anima: typedef struct vec2 { double x, y; } vec2;
typedef struct vec3 { double x, y, z; } vec3;
typedef struct vec4 { double x, y, z, w; } vec4; But cimguizmo_quat automatic building needs: typedef struct vec3 { float x, y, z; } vec3;
typedef struct vec4 { float x, y, z, w; } vec4; so LuaJIT says It is probably a bad idea using such common names both in anima and in imGuIZMO.quat I have managed to solve it with substitution of vec3 for G3Dvec3 in the LuaJIT-ImGui automated build process (not touching cimguizmo_quat) |
Your syntax
Yes, you have right: I use a symbolic link in my computer, so, for me, the
In origin the widget used glm math library (widely used in OpenGL): it uses the GLSL types name convention, so the difference is between I don't know if it can help... //------------------------------------------------------------------------------
// uncomment to avoid vgMath.h add follow line code:
// using namespace vgm | glm; // if (!VGIZMO_USES_GLM | VGIZMO_USES_GLM)
//
// Automatically "using namespace" is added to the end vgMath.h:
// it help to maintain compatibilty between vgMath & glm declaration types,
// but can go in confict with other pre-exist data types in your project
//
// note: this is only if you use vgMath.h in your project, for your data types:
// it have no effect for vGizmo | imGuIZMO internal use
//
// Default ==> vgMath.h add: using namespace vgm | glm;
//------------------------------------------------------------------------------
//#define VGM_DISABLE_AUTO_NAMESPACE Using
I read this after (Sorry, I already answered above)
Now I start working on the |
This are the functions auto generated. typedef ImVector<vec3> ImVector_vec3;
CIMGUI_API void imguiGizmo_buildPlane(const float size,const float thickness);
CIMGUI_API void imguiGizmo_buildCube(const float size);
CIMGUI_API void imguiGizmo_buildPolygon(const vec3 size,ImVector_vec3* vtx,ImVector_vec3* norm);
CIMGUI_API void imguiGizmo_buildSphere(const float radius,const int tessFactor);
CIMGUI_API void imguiGizmo_buildCone(const float x0,const float x1,const float radius,const int slices);
CIMGUI_API void imguiGizmo_buildCylinder(const float x0,const float x1,const float radius,const int slices);
CIMGUI_API void imguiGizmo_resizeAxesOf(const vec3 newSize);
CIMGUI_API void imguiGizmo_restoreAxesSize(void);
CIMGUI_API void imguiGizmo_resizeSolidOf(float newSize);
CIMGUI_API void imguiGizmo_restoreSolidSize(void);
CIMGUI_API void imguiGizmo_setDirectionColorU32U32(ImU32 dColor,const ImU32 pColor);
CIMGUI_API void imguiGizmo_setDirectionColorVec4Vec4(const ImVec4 dColor,const ImVec4 pColor);
CIMGUI_API void imguiGizmo_setDirectionColorU32(ImU32 color);
CIMGUI_API void imguiGizmo_setDirectionColorVec4(const ImVec4 color);
CIMGUI_API void imguiGizmo_restoreDirectionColor(void);
CIMGUI_API void imguiGizmo_setSphereColorsVec4(const ImVec4 a,const ImVec4 b);
CIMGUI_API void imguiGizmo_setSphereColorsU32(ImU32 a,ImU32 b);
CIMGUI_API void imguiGizmo_restoreSphereColors(void);
CIMGUI_API void imguiGizmo_setGizmoFeelingRot(float f);
CIMGUI_API float imguiGizmo_getGizmoFeelingRot(void);
CIMGUI_API void imguiGizmo_setPanModifier(vgModifiers v);
CIMGUI_API void imguiGizmo_setDollyModifier(vgModifiers v);
CIMGUI_API void imguiGizmo_setDollyScale(float scale);
CIMGUI_API float imguiGizmo_getDollyScale(void);
CIMGUI_API void imguiGizmo_setPanScale(float scale);
CIMGUI_API float imguiGizmo_getPanScale(void);
CIMGUI_API bool imguiGizmo_drawFunc(imguiGizmo* self,const char* label,float size);
CIMGUI_API void imguiGizmo_modeSettings(imguiGizmo* self,int mode);
CIMGUI_API void imguiGizmo_setDualMode(imguiGizmo* self,const int mode);
CIMGUI_API bool imguiGizmo_getTransformsvec3(imguiGizmo* self,quat* q,const char* label,vec3* dir,float size);
CIMGUI_API bool imguiGizmo_getTransformsvec4(imguiGizmo* self,quat* q,const char* label,vec4* axis_angle,float size);
CIMGUI_API bool iggizmo3DquatFloatInt(const char* label,quat* a,float size,const int mode);
CIMGUI_API bool iggizmo3Dvec4(const char* label,vec4* a,float size,const int mode);
CIMGUI_API bool iggizmo3Dvec3FloatInt(const char* label,vec3* a,float size,const int mode);
CIMGUI_API bool iggizmo3DquatquatFloatInt(const char* label,quat* a,quat* b,float size,const int mode);
CIMGUI_API bool iggizmo3Dquatvec4FloatInt(const char* label,quat* a,vec4* b,float size,const int mode);
CIMGUI_API bool iggizmo3Dquatvec3FloatInt(const char* label,quat* a,vec3* b,float size,const int mode);
CIMGUI_API bool iggizmo3Dvec3quatFloatInt(const char* label,vec3* a,quat* b,float size,const int mode);
CIMGUI_API bool iggizmo3Dvec3vec4FloatInt(const char* label,vec3* a,vec4* b,float size,const int mode);
CIMGUI_API bool iggizmo3Dvec3vec3FloatInt(const char* label,vec3* a,vec3* b,float size,const int mode);
CIMGUI_API bool iggizmo3Dvec3quatquat(const char* label,vec3* a,quat* b,quat* c,float size,const int mode);
CIMGUI_API bool iggizmo3Dvec3quatvec4(const char* label,vec3* a,quat* b,vec4* c,float size,const int mode);
CIMGUI_API bool iggizmo3Dvec3quatvec3(const char* label,vec3* a,quat* b,vec3* c,float size,const int mode); I guess that some of them are not useful as for example CIMGUI_API void imguiGizmo_buildPlane(const float size,const float thickness);
CIMGUI_API void imguiGizmo_buildCube(const float size);
CIMGUI_API void imguiGizmo_buildPolygon(const vec3 size,ImVector_vec3* vtx,ImVector_vec3* norm);
CIMGUI_API void imguiGizmo_buildSphere(const float radius,const int tessFactor);
CIMGUI_API void imguiGizmo_buildCone(const float x0,const float x1,const float radius,const int slices);
CIMGUI_API void imguiGizmo_buildCylinder(const float x0,const float x1,const float radius,const int slices);
CIMGUI_API bool imguiGizmo_drawFunc(imguiGizmo* self,const char* label,float size);
CIMGUI_API void imguiGizmo_modeSettings(imguiGizmo* self,int mode);
CIMGUI_API void imguiGizmo_setDualMode(imguiGizmo* self,const int mode);
CIMGUI_API bool imguiGizmo_getTransformsvec3(imguiGizmo* self,quat* q,const char* label,vec3* dir,float size);
CIMGUI_API bool imguiGizmo_getTransformsvec4(imguiGizmo* self,quat* q,const char* label,vec4* axis_angle,float size); They can be eliminated if you confirm that they are not useful (or may be keep someone) I have made changes to cimgui in order to allow not named arguments and not tagged enums so now cimguizmo_quat is automatically generated, adding names would be still desirable for better clarity. |
So much time without contibutions makes me worry: Hope you are well!! |
Hi Michele,
I am trying to have https://github.com/cimgui/cimguizmo_quat programmatically generated, having https://github.com/BrutPitt/imGuIZMO.quat/blob/master/imGuIZMO.quat/imGuIZMOquat.h#L317 without argument names while it is valid C is a problem for the generator, it asumes that it is not happening and uses this name arguments in the whole process. I could detect this situation and generate the names myself, but I feel that this would make the parser less robust.
Could you please assign names to this arguments?
Something similar happens with https://github.com/BrutPitt/imGuIZMO.quat/blob/master/imGuIZMO.quat/imGuIZMOquat.h#L78
where parser expects an enum tag. Could a tag be added as
enum iGq_MODES_ {
or similar?
The text was updated successfully, but these errors were encountered: