GenMeshCubicmap, Organized model functions, GetModelBoundingBox, DrawModelWires and DrawModelWiresEx and LoadMaterials.

This commit is contained in:
jussi
2023-11-09 20:48:16 +02:00
parent 28ac27fae1
commit ef75e2530d
7 changed files with 1124 additions and 899 deletions

View File

@@ -1860,7 +1860,7 @@ void luaRegister() {
assingGlobalFunction( "GetPixelDataSize", ltexturesGetPixelDataSize );
/* Models. */
/* Basic. */
/* Basic geometric 3D shapes drawing functions. */
assingGlobalFunction( "DrawLine3D", lmodelsDrawLine3D );
assingGlobalFunction( "DrawPoint3D", lmodelsDrawPoint3D );
assingGlobalFunction( "DrawCircle3D", lmodelsDrawCircle3D );
@@ -1880,7 +1880,35 @@ void luaRegister() {
assingGlobalFunction( "DrawQuad3DTexture", lmodelDrawQuad3DTexture );
assingGlobalFunction( "DrawRay", lmodelsDrawRay );
assingGlobalFunction( "DrawGrid", lmodelsDrawGrid );
/* Mesh. */
/* Model management functions. */
assingGlobalFunction( "LoadModel", lmodelsLoadModel );
assingGlobalFunction( "LoadModelFromMesh", lmodelsLoadModelFromMesh );
assingGlobalFunction( "IsModelReady", lmodelsIsModelReady );
assingGlobalFunction( "UnloadModel", lmodelsUnloadModel );
assingGlobalFunction( "GetModelBoundingBox", lmodelsGetModelBoundingBox );
assingGlobalFunction( "SetModelMaterial", lmodelsSetModelMaterial );
assingGlobalFunction( "SetModelMeshMaterial", lmodelsSetModelMeshMaterial );
assingGlobalFunction( "SetModelTransform", lmodelsSetModelTransform );
assingGlobalFunction( "GetModelTransform", lmodelsGetModelTransform );
/* Model drawing functions. */
assingGlobalFunction( "DrawModel", lmodelsDrawModel );
assingGlobalFunction( "DrawModelEx", lmodelsDrawModelEx );
assingGlobalFunction( "DrawModelWires", lmodelsDrawModelWires );
assingGlobalFunction( "DrawModelWiresEx", lmodelsDrawModelWiresEx );
assingGlobalFunction( "DrawBoundingBox", lmodelsDrawBoundingBox );
assingGlobalFunction( "DrawBillboard", lmodelsDrawBillboard );
assingGlobalFunction( "DrawBillboardRec", lmodelsDrawBillboardRec );
assingGlobalFunction( "DrawBillboardPro", lmodelsDrawBillboardPro );
/* Mesh management functions. */
assingGlobalFunction( "UpdateMesh", lmodelsUpdateMesh );
assingGlobalFunction( "UnloadMesh", lmodelsUnloadMesh );
assingGlobalFunction( "DrawMesh", lmodelsDrawMesh );
assingGlobalFunction( "DrawMeshInstanced", lmodelsDrawMeshInstanced );
assingGlobalFunction( "SetMeshColor", lmodelsSetMeshColor );
assingGlobalFunction( "ExportMesh", lmodelsExportMesh );
assingGlobalFunction( "GetMeshBoundingBox", lmodelsGetMeshBoundingBox );
assingGlobalFunction( "GenMeshTangents", lmodelsGenMeshTangents );
/* Mesh generation functions. */
assingGlobalFunction( "GenMeshPoly", lmodelsGenMeshPoly );
assingGlobalFunction( "GenMeshPlane", lmodelsGenMeshPlane );
assingGlobalFunction( "GenMeshCube", lmodelsGenMeshCube );
@@ -1891,15 +1919,8 @@ void luaRegister() {
assingGlobalFunction( "GenMeshKnot", lmodelsGenMeshKnot );
assingGlobalFunction( "GenMeshHeightmap", lmodelsGenMeshHeightmap );
assingGlobalFunction( "GenMeshCustom", lmodelsGenMeshCustom );
assingGlobalFunction( "UpdateMesh", lmodelsUpdateMesh );
assingGlobalFunction( "UnloadMesh", lmodelsUnloadMesh );
assingGlobalFunction( "DrawMesh", lmodelsDrawMesh );
assingGlobalFunction( "DrawMeshInstanced", lmodelsDrawMeshInstanced );
assingGlobalFunction( "SetMeshColor", lmodelsSetMeshColor );
assingGlobalFunction( "ExportMesh", lmodelsExportMesh );
assingGlobalFunction( "GetMeshBoundingBox", lmodelsGetMeshBoundingBox );
assingGlobalFunction( "GenMeshTangents", lmodelsGenMeshTangents );
/* Material. */
/* Material management functions. */
assingGlobalFunction( "LoadMaterials", lmodelsLoadMaterials );
assingGlobalFunction( "GetMaterialDefault", lmodelsGetMaterialDefault );
assingGlobalFunction( "LoadMaterialDefault", lmodelsLoadMaterialDefault );
assingGlobalFunction( "CreateMaterial", lmodelsCreateMaterial );
@@ -1915,27 +1936,13 @@ void luaRegister() {
assingGlobalFunction( "GetMaterialValue", lmodelsGetMaterialValue );
assingGlobalFunction( "GetMaterialShader", lmodelsGetMaterialShader );
assingGlobalFunction( "GetMaterialParams", lmodelsGetMaterialParams );
/* Model. */
assingGlobalFunction( "LoadModel", lmodelsLoadModel );
assingGlobalFunction( "LoadModelFromMesh", lmodelsLoadModelFromMesh );
assingGlobalFunction( "IsModelReady", lmodelsIsModelReady );
assingGlobalFunction( "UnloadModel", lmodelsUnloadModel );
assingGlobalFunction( "DrawModel", lmodelsDrawModel );
assingGlobalFunction( "DrawModelEx", lmodelsDrawModelEx );
assingGlobalFunction( "SetModelMaterial", lmodelsSetModelMaterial );
assingGlobalFunction( "SetModelMeshMaterial", lmodelsSetModelMeshMaterial );
assingGlobalFunction( "DrawBillboard", lmodelsDrawBillboard );
assingGlobalFunction( "DrawBillboardRec", lmodelsDrawBillboardRec );
assingGlobalFunction( "DrawBillboardPro", lmodelsDrawBillboardPro );
assingGlobalFunction( "SetModelTransform", lmodelsSetModelTransform );
assingGlobalFunction( "GetModelTransform", lmodelsGetModelTransform );
/* Animations. */
/* Model animations management functions. */
assingGlobalFunction( "LoadModelAnimations", lmodelsLoadModelAnimations );
assingGlobalFunction( "UpdateModelAnimation", lmodelsUpdateModelAnimation );
assingGlobalFunction( "IsModelAnimationValid", lmodelsIsModelAnimationValid );
assingGlobalFunction( "GetModelAnimationBoneCount", lmodelsGetModelAnimationBoneCount );
assingGlobalFunction( "GetModelAnimationFrameCount", lmodelsGetModelAnimationFrameCount );
/* Collision. */
/* Collision detection functions. */
assingGlobalFunction( "CheckCollisionSpheres", lmodelsCheckCollisionSpheres );
assingGlobalFunction( "CheckCollisionBoxes", lmodelsCheckCollisionBoxes );
assingGlobalFunction( "CheckCollisionBoxSphere", lmodelsCheckCollisionBoxSphere );

File diff suppressed because it is too large Load Diff

View File

@@ -395,7 +395,7 @@ int ltextDrawTextCodepoints( lua_State *L ) {
/*
> mouseCharId = RL.DrawTextBoxed(Font font, string text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint )
Draw text using font inside rectangle limits. Return character from mouse position. Function from raylib [text] example - Rectangle bounds.
Draw text using font inside rectangle limits. Return character id from mouse position (default -1). Function from raylib [text] example - Rectangle bounds.
- Success return int
*/
@@ -416,7 +416,7 @@ int ltextDrawTextBoxed( lua_State *L ) {
/*
> mouseCharId = RL.DrawTextBoxedTinted( Font font, string text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tints, Color backTints )
Draw text using font inside rectangle limits with support for tint and background tint for each character. Return character from mouse position
Draw text using font inside rectangle limits with support for tint and background tint for each character. Return character id from mouse position (default -1)
- Success return int
*/