Update RingRayLib - raylib.c - Add Function : Mesh GenMeshKnot(float radius, float size, int radSeg, int sides)
@@ -5351,6 +5351,37 @@ RING_FUNC(ring_GenMeshTorus)
}
}
+
+RING_FUNC(ring_GenMeshKnot)
+{
+ if ( RING_API_PARACOUNT != 4 ) {
+ RING_API_ERROR(RING_API_MISS4PARA);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(1) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(2) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(3) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(4) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ {
+ Mesh *pValue ;
+ pValue = (Mesh *) ring_state_malloc(((VM *) pPointer)->pRingState,sizeof(Mesh)) ;
+ *pValue = GenMeshKnot( (float ) RING_API_GETNUMBER(1), (float ) RING_API_GETNUMBER(2), (int ) RING_API_GETNUMBER(3), (int ) RING_API_GETNUMBER(4));
+ RING_API_RETMANAGEDCPOINTER(pValue,"Mesh",ring_state_free);
+ }
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("initwindow",ring_InitWindow);
@@ -5651,4 +5682,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("genmeshhemisphere",ring_GenMeshHemiSphere);
ring_vm_funcregister("genmeshcylinder",ring_GenMeshCylinder);
ring_vm_funcregister("genmeshtorus",ring_GenMeshTorus);
+ ring_vm_funcregister("genmeshknot",ring_GenMeshKnot);
}
