GenMeshCubicmap, Organized model functions, GetModelBoundingBox, DrawModelWires and DrawModelWiresEx and LoadMaterials.
This commit is contained in:
350
API.md
350
API.md
@@ -6060,7 +6060,7 @@ Draw multiple character (codepoint)
|
||||
|
||||
> 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
|
||||
|
||||
@@ -6068,7 +6068,7 @@ Draw text using font inside rectangle limits. Return character from mouse positi
|
||||
|
||||
> 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
|
||||
|
||||
@@ -6143,7 +6143,7 @@ Get font texture atlas containing the glyphs. Return as lightuserdata
|
||||
|
||||
---
|
||||
|
||||
## Models - Basic
|
||||
## Models - Basic geometric 3D shapes drawing functions
|
||||
|
||||
---
|
||||
|
||||
@@ -6261,7 +6261,189 @@ Draw a grid (Centered at ( 0, 0, 0 ))
|
||||
|
||||
---
|
||||
|
||||
## Models - Mesh
|
||||
## Models - Model management functions
|
||||
|
||||
---
|
||||
|
||||
> model = RL.LoadModel( string fileName )
|
||||
|
||||
Load model from files (Meshes and materials)
|
||||
|
||||
- Failure return nil
|
||||
- Success return Model
|
||||
|
||||
---
|
||||
|
||||
> model = RL.LoadModelFromMesh( Mesh mesh )
|
||||
|
||||
Load model from generated mesh (Default material)
|
||||
|
||||
- Success return Model
|
||||
|
||||
---
|
||||
|
||||
> isReady = RL.IsModelReady( Model model )
|
||||
|
||||
Check if a model is ready
|
||||
|
||||
- Success return bool
|
||||
|
||||
---
|
||||
|
||||
> RL.UnloadModel( Model model )
|
||||
|
||||
Unload model (including meshes) from memory (RAM and/or VRAM)
|
||||
|
||||
---
|
||||
|
||||
> boundingBox = RL.GetModelBoundingBox( Model model )
|
||||
|
||||
Compute model bounding box limits (considers all meshes)
|
||||
|
||||
- Success return BoundingBox
|
||||
|
||||
---
|
||||
|
||||
> RL.SetModelMaterial( Model model, Material modelMaterial, Material material )
|
||||
|
||||
Copies material to model material. (Model material is the material id in models.)
|
||||
|
||||
---
|
||||
|
||||
> RL.SetModelMeshMaterial( Model model, int meshId, int materialId )
|
||||
|
||||
Set material for a mesh (Mesh and material on this model)
|
||||
|
||||
---
|
||||
|
||||
> RL.SetModelTransform( Model model, Matrix transform )
|
||||
|
||||
Set model transform matrix
|
||||
|
||||
---
|
||||
|
||||
> transform = RL.GetModelTransform( Model model )
|
||||
|
||||
Get model transform matrix
|
||||
|
||||
- Success return Matrix
|
||||
|
||||
---
|
||||
|
||||
## Models - Model drawing functions
|
||||
|
||||
---
|
||||
|
||||
> RL.DrawModel( Model model, Vector3 position, float scale, Color tint )
|
||||
|
||||
Draw a model (With texture if set)
|
||||
|
||||
---
|
||||
|
||||
> RL.DrawModelEx( Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint )
|
||||
|
||||
Draw a model with extended parameters
|
||||
|
||||
---
|
||||
|
||||
> RL.DrawModelWires( Model model, Vector3 position, float scale, Color tint )
|
||||
|
||||
Draw a model wires (with texture if set)
|
||||
|
||||
---
|
||||
|
||||
> RL.DrawModelWiresEx( Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint )
|
||||
|
||||
Draw a model wires (with texture if set) with extended parameters
|
||||
|
||||
---
|
||||
|
||||
> RL.DrawBoundingBox( BoundingBox box, Color color )
|
||||
|
||||
Draw bounding box (wires)
|
||||
|
||||
---
|
||||
|
||||
> RL.DrawBillboard( Camera3D camera, Texture texture, Vector3 position, float size, Color tint )
|
||||
|
||||
Draw a billboard texture
|
||||
|
||||
---
|
||||
|
||||
> RL.DrawBillboardRec( Camera3D camera, Texture texture, Rectangle source, Vector3 position, Vector2 size, Color tint )
|
||||
|
||||
Draw a billboard texture defined by source
|
||||
|
||||
---
|
||||
|
||||
> RL.DrawBillboardPro( Camera3D camera, Texture texture, Rectangle source, Vector3 position, Vector3 up, Vector2 size, Vector2 origin, float rotation, Color tint )
|
||||
|
||||
Draw a billboard texture defined by source and rotation
|
||||
|
||||
---
|
||||
|
||||
## Models - Mesh management functions
|
||||
|
||||
---
|
||||
|
||||
> RL.UpdateMesh( Mesh mesh, Mesh{} meshData )
|
||||
|
||||
Update mesh vertex data in GPU.
|
||||
Note! Mainly intented to be used with custom meshes.
|
||||
|
||||
---
|
||||
|
||||
> RL.UnloadMesh( Mesh mesh )
|
||||
|
||||
Unload mesh data from CPU and GPU
|
||||
|
||||
---
|
||||
|
||||
> RL.DrawMesh( Mesh mesh, Material material, Matrix transform )
|
||||
|
||||
Draw a 3d mesh with material and transform
|
||||
|
||||
---
|
||||
|
||||
> RL.DrawMeshInstanced( Mesh mesh, Material material, Matrix{} transforms, int instances )
|
||||
|
||||
Draw multiple mesh instances with material and different transforms
|
||||
|
||||
---
|
||||
|
||||
> success = RL.SetMeshColor( Mesh mesh, Color color )
|
||||
|
||||
Updades mesh color vertex attribute buffer
|
||||
NOTE: Currently only works on custom mesh
|
||||
|
||||
- Failure return false
|
||||
- Success return true
|
||||
|
||||
---
|
||||
|
||||
> success = RL.ExportMesh( Mesh mesh, string fileName )
|
||||
|
||||
Export mesh data to file, returns true on success
|
||||
|
||||
- Success return bool
|
||||
|
||||
---
|
||||
|
||||
> boundingBox = RL.GetMeshBoundingBox( Mesh mesh )
|
||||
|
||||
Compute mesh bounding box limits
|
||||
|
||||
- Success return BoundingBox
|
||||
|
||||
---
|
||||
|
||||
> RL.GenMeshTangents( Mesh mesh )
|
||||
|
||||
Compute mesh tangents
|
||||
|
||||
---
|
||||
|
||||
## Models - Mesh generation functions
|
||||
|
||||
---
|
||||
|
||||
@@ -6337,6 +6519,14 @@ Generate heightmap mesh from image data
|
||||
|
||||
---
|
||||
|
||||
> mesh = RL.GenMeshCubicmap( Image cubicmap, Vector3 cubeSize )
|
||||
|
||||
Generate cubes-based map mesh from image data
|
||||
|
||||
- Success return Mesh
|
||||
|
||||
---
|
||||
|
||||
> mesh = RL.GenMeshCustom( Mesh{} meshData, bool dynamic )
|
||||
|
||||
Generate custom mesh from vertex attribute data and uploads it into a VAO (if supported) and VBO
|
||||
@@ -6345,64 +6535,15 @@ Generate custom mesh from vertex attribute data and uploads it into a VAO (if su
|
||||
|
||||
---
|
||||
|
||||
> RL.UpdateMesh( Mesh mesh, Mesh{} meshData )
|
||||
|
||||
Update mesh vertex data in GPU.
|
||||
Note! Mainly intented to be used with custom meshes.
|
||||
## Models - Material management functions
|
||||
|
||||
---
|
||||
|
||||
> RL.UnloadMesh( Mesh mesh )
|
||||
> materials = RL.LoadMaterials( string fileName )
|
||||
|
||||
Unload mesh data from CPU and GPU
|
||||
Load materials from model file
|
||||
|
||||
---
|
||||
|
||||
> RL.DrawMesh( Mesh mesh, Material material, Matrix transform )
|
||||
|
||||
Draw a 3d mesh with material and transform
|
||||
|
||||
---
|
||||
|
||||
> RL.DrawMeshInstanced( Mesh mesh, Material material, Matrix{} transforms, int instances )
|
||||
|
||||
Draw multiple mesh instances with material and different transforms
|
||||
|
||||
---
|
||||
|
||||
> success = RL.SetMeshColor( Mesh mesh, Color color )
|
||||
|
||||
Updades mesh color vertex attribute buffer
|
||||
NOTE: Currently only works on custom mesh
|
||||
|
||||
- Failure return false
|
||||
- Success return true
|
||||
|
||||
---
|
||||
|
||||
> success = RL.ExportMesh( Mesh mesh, string fileName )
|
||||
|
||||
Export mesh data to file, returns true on success
|
||||
|
||||
- Success return bool
|
||||
|
||||
---
|
||||
|
||||
> boundingBox = RL.GetMeshBoundingBox( Mesh mesh )
|
||||
|
||||
Compute mesh bounding box limits
|
||||
|
||||
- Success return BoundingBox
|
||||
|
||||
---
|
||||
|
||||
> RL.GenMeshTangents( Mesh mesh )
|
||||
|
||||
Compute mesh tangents
|
||||
|
||||
---
|
||||
|
||||
## Models - Material
|
||||
- Success return Material{}
|
||||
|
||||
---
|
||||
|
||||
@@ -6514,98 +6655,7 @@ Get material parameters
|
||||
|
||||
---
|
||||
|
||||
## Models - Model
|
||||
|
||||
---
|
||||
|
||||
> model = RL.LoadModel( string fileName )
|
||||
|
||||
Load model from files (Meshes and materials)
|
||||
|
||||
- Failure return nil
|
||||
- Success return Model
|
||||
|
||||
---
|
||||
|
||||
> model = RL.LoadModelFromMesh( Mesh mesh )
|
||||
|
||||
Load model from generated mesh (Default material)
|
||||
|
||||
- Success return Model
|
||||
|
||||
---
|
||||
|
||||
> isReady = RL.IsModelReady( Model model )
|
||||
|
||||
Check if a model is ready
|
||||
|
||||
- Success return bool
|
||||
|
||||
---
|
||||
|
||||
> RL.UnloadModel( Model model )
|
||||
|
||||
Unload model (including meshes) from memory (RAM and/or VRAM)
|
||||
|
||||
---
|
||||
|
||||
> RL.DrawModel( Model model, Vector3 position, float scale, Color tint )
|
||||
|
||||
Draw a model (With texture if set)
|
||||
|
||||
---
|
||||
|
||||
> RL.DrawModelEx( Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint )
|
||||
|
||||
Draw a model with extended parameters
|
||||
|
||||
---
|
||||
|
||||
> RL.SetModelMaterial( Model model, Material modelMaterial, Material material )
|
||||
|
||||
Copies material to model material. (Model material is the material id in models.)
|
||||
|
||||
---
|
||||
|
||||
> RL.SetModelMeshMaterial( Model model, int meshId, int materialId )
|
||||
|
||||
Set material for a mesh (Mesh and material on this model)
|
||||
|
||||
---
|
||||
|
||||
> RL.DrawBillboard( Camera3D camera, Texture texture, Vector3 position, float size, Color tint )
|
||||
|
||||
Draw a billboard texture
|
||||
|
||||
---
|
||||
|
||||
> RL.DrawBillboardRec( Camera3D camera, Texture texture, Rectangle source, Vector3 position, Vector2 size, Color tint )
|
||||
|
||||
Draw a billboard texture defined by source
|
||||
|
||||
---
|
||||
|
||||
> RL.DrawBillboardPro( Camera3D camera, Texture texture, Rectangle source, Vector3 position, Vector3 up, Vector2 size, Vector2 origin, float rotation, Color tint )
|
||||
|
||||
Draw a billboard texture defined by source and rotation
|
||||
|
||||
---
|
||||
|
||||
> RL.SetModelTransform( Model model, Matrix transform )
|
||||
|
||||
Set model transform matrix
|
||||
|
||||
---
|
||||
|
||||
> transform = RL.GetModelTransform( Model model )
|
||||
|
||||
Get model transform matrix
|
||||
|
||||
- Success return Matrix
|
||||
|
||||
---
|
||||
|
||||
## Model - Animations
|
||||
## Model - Model animations management functions
|
||||
|
||||
---
|
||||
|
||||
@@ -6648,7 +6698,7 @@ Return modelAnimation frame count
|
||||
|
||||
---
|
||||
|
||||
## Model - Collision
|
||||
## Model - Collision detection functions
|
||||
|
||||
---
|
||||
|
||||
|
||||
369
ReiLua_API.lua
369
ReiLua_API.lua
@@ -3434,7 +3434,7 @@ function RL.DrawTextCodepoint( font, codepoint, position, fontSize, tint ) end
|
||||
---@return any RL.DrawTextCodepoints
|
||||
function RL.DrawTextCodepoints( font, codepoints, position, fontSize, spacing, tint ) end
|
||||
|
||||
---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
|
||||
---@param font any
|
||||
---@param text string
|
||||
@@ -3446,7 +3446,7 @@ function RL.DrawTextCodepoints( font, codepoints, position, fontSize, spacing,
|
||||
---@return any mouseCharId
|
||||
function RL.DrawTextBoxed( font, text, rec, fontSize, spacing, wordWrap, tint ) end
|
||||
|
||||
---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
|
||||
---@param font any
|
||||
---@param text string
|
||||
@@ -3516,7 +3516,7 @@ function RL.GetFontGlyphPadding( font ) end
|
||||
---@return any texture
|
||||
function RL.GetFontTexture( font ) end
|
||||
|
||||
-- Models - Basic
|
||||
-- Models - Basic geometric 3D shapes drawing functions
|
||||
|
||||
---Draw a line in 3D world space
|
||||
---@param startPos table
|
||||
@@ -3674,7 +3674,197 @@ function RL.DrawRay( ray, color ) end
|
||||
---@return any RL.DrawGrid
|
||||
function RL.DrawGrid( slices, spacing ) end
|
||||
|
||||
-- Models - Mesh
|
||||
-- Models - Model management functions
|
||||
|
||||
---Load model from files (Meshes and materials)
|
||||
---- Failure return nil
|
||||
---- Success return Model
|
||||
---@param fileName string
|
||||
---@return any model
|
||||
function RL.LoadModel( fileName ) end
|
||||
|
||||
---Load model from generated mesh (Default material)
|
||||
---- Success return Model
|
||||
---@param mesh any
|
||||
---@return any model
|
||||
function RL.LoadModelFromMesh( mesh ) end
|
||||
|
||||
---Check if a model is ready
|
||||
---- Success return bool
|
||||
---@param model any
|
||||
---@return any isReady
|
||||
function RL.IsModelReady( model ) end
|
||||
|
||||
---Unload model (including meshes) from memory (RAM and/or VRAM)
|
||||
---@param model any
|
||||
---@return any RL.UnloadModel
|
||||
function RL.UnloadModel( model ) end
|
||||
|
||||
---Compute model bounding box limits (considers all meshes)
|
||||
---- Success return BoundingBox
|
||||
---@param model any
|
||||
---@return any boundingBox
|
||||
function RL.GetModelBoundingBox( model ) end
|
||||
|
||||
---Copies material to model material. (Model material is the material id in models.)
|
||||
---@param model any
|
||||
---@param modelMaterial any
|
||||
---@param material any
|
||||
---@return any RL.SetModelMaterial
|
||||
function RL.SetModelMaterial( model, modelMaterial, material ) end
|
||||
|
||||
---Set material for a mesh (Mesh and material on this model)
|
||||
---@param model any
|
||||
---@param meshId integer
|
||||
---@param materialId integer
|
||||
---@return any RL.SetModelMeshMaterial
|
||||
function RL.SetModelMeshMaterial( model, meshId, materialId ) end
|
||||
|
||||
---Set model transform matrix
|
||||
---@param model any
|
||||
---@param transform table
|
||||
---@return any RL.SetModelTransform
|
||||
function RL.SetModelTransform( model, transform ) end
|
||||
|
||||
---Get model transform matrix
|
||||
---- Success return Matrix
|
||||
---@param model any
|
||||
---@return any transform
|
||||
function RL.GetModelTransform( model ) end
|
||||
|
||||
-- Models - Model drawing functions
|
||||
|
||||
---Draw a model (With texture if set)
|
||||
---@param model any
|
||||
---@param position table
|
||||
---@param scale number
|
||||
---@param tint table
|
||||
---@return any RL.DrawModel
|
||||
function RL.DrawModel( model, position, scale, tint ) end
|
||||
|
||||
---Draw a model with extended parameters
|
||||
---@param model any
|
||||
---@param position table
|
||||
---@param rotationAxis table
|
||||
---@param rotationAngle number
|
||||
---@param scale table
|
||||
---@param tint table
|
||||
---@return any RL.DrawModelEx
|
||||
function RL.DrawModelEx( model, position, rotationAxis, rotationAngle, scale, tint ) end
|
||||
|
||||
---Draw a model wires (with texture if set)
|
||||
---@param model any
|
||||
---@param position table
|
||||
---@param scale number
|
||||
---@param tint table
|
||||
---@return any RL.DrawModelWires
|
||||
function RL.DrawModelWires( model, position, scale, tint ) end
|
||||
|
||||
---Draw a model wires (with texture if set) with extended parameters
|
||||
---@param model any
|
||||
---@param position table
|
||||
---@param rotationAxis table
|
||||
---@param rotationAngle number
|
||||
---@param scale table
|
||||
---@param tint table
|
||||
---@return any RL.DrawModelWiresEx
|
||||
function RL.DrawModelWiresEx( model, position, rotationAxis, rotationAngle, scale, tint ) end
|
||||
|
||||
---Draw bounding box (wires)
|
||||
---@param box any
|
||||
---@param color table
|
||||
---@return any RL.DrawBoundingBox
|
||||
function RL.DrawBoundingBox( box, color ) end
|
||||
|
||||
---Draw a billboard texture
|
||||
---@param camera any
|
||||
---@param texture any
|
||||
---@param position table
|
||||
---@param size number
|
||||
---@param tint table
|
||||
---@return any RL.DrawBillboard
|
||||
function RL.DrawBillboard( camera, texture, position, size, tint ) end
|
||||
|
||||
---Draw a billboard texture defined by source
|
||||
---@param camera any
|
||||
---@param texture any
|
||||
---@param source table
|
||||
---@param position table
|
||||
---@param size table
|
||||
---@param tint table
|
||||
---@return any RL.DrawBillboardRec
|
||||
function RL.DrawBillboardRec( camera, texture, source, position, size, tint ) end
|
||||
|
||||
---Draw a billboard texture defined by source and rotation
|
||||
---@param camera any
|
||||
---@param texture any
|
||||
---@param source table
|
||||
---@param position table
|
||||
---@param up table
|
||||
---@param size table
|
||||
---@param origin table
|
||||
---@param rotation number
|
||||
---@param tint table
|
||||
---@return any RL.DrawBillboardPro
|
||||
function RL.DrawBillboardPro( camera, texture, source, position, up, size, origin, rotation, tint ) end
|
||||
|
||||
-- Models - Mesh management functions
|
||||
|
||||
---Update mesh vertex data in GPU.
|
||||
---Note! Mainly intented to be used with custom meshes.
|
||||
---@param mesh any
|
||||
---@param meshData table
|
||||
---@return any RL.UpdateMesh
|
||||
function RL.UpdateMesh( mesh, meshData ) end
|
||||
|
||||
---Unload mesh data from CPU and GPU
|
||||
---@param mesh any
|
||||
---@return any RL.UnloadMesh
|
||||
function RL.UnloadMesh( mesh ) end
|
||||
|
||||
---Draw a 3d mesh with material and transform
|
||||
---@param mesh any
|
||||
---@param material any
|
||||
---@param transform table
|
||||
---@return any RL.DrawMesh
|
||||
function RL.DrawMesh( mesh, material, transform ) end
|
||||
|
||||
---Draw multiple mesh instances with material and different transforms
|
||||
---@param mesh any
|
||||
---@param material any
|
||||
---@param transforms table
|
||||
---@param instances integer
|
||||
---@return any RL.DrawMeshInstanced
|
||||
function RL.DrawMeshInstanced( mesh, material, transforms, instances ) end
|
||||
|
||||
---Updades mesh color vertex attribute buffer
|
||||
---NOTE: Currently only works on custom mesh
|
||||
---- Failure return false
|
||||
---- Success return true
|
||||
---@param mesh any
|
||||
---@param color table
|
||||
---@return any success
|
||||
function RL.SetMeshColor( mesh, color ) end
|
||||
|
||||
---Export mesh data to file, returns true on success
|
||||
---- Success return bool
|
||||
---@param mesh any
|
||||
---@param fileName string
|
||||
---@return any success
|
||||
function RL.ExportMesh( mesh, fileName ) end
|
||||
|
||||
---Compute mesh bounding box limits
|
||||
---- Success return BoundingBox
|
||||
---@param mesh any
|
||||
---@return any boundingBox
|
||||
function RL.GetMeshBoundingBox( mesh ) end
|
||||
|
||||
---Compute mesh tangents
|
||||
---@param mesh any
|
||||
---@return any RL.GenMeshTangents
|
||||
function RL.GenMeshTangents( mesh ) end
|
||||
|
||||
-- Models - Mesh generation functions
|
||||
|
||||
---Generate polygonal mesh
|
||||
---- Success return Mesh
|
||||
@@ -3747,6 +3937,13 @@ function RL.GenMeshKnot( radius, size, radSeg, sides ) end
|
||||
---@return any mesh
|
||||
function RL.GenMeshHeightmap( heightmap, size ) end
|
||||
|
||||
---Generate cubes-based map mesh from image data
|
||||
---- Success return Mesh
|
||||
---@param cubicmap any
|
||||
---@param cubeSize table
|
||||
---@return any mesh
|
||||
function RL.GenMeshCubicmap( cubicmap, cubeSize ) end
|
||||
|
||||
---Generate custom mesh from vertex attribute data and uploads it into a VAO (if supported) and VBO
|
||||
---- Success return Mesh
|
||||
---@param meshData table
|
||||
@@ -3754,61 +3951,13 @@ function RL.GenMeshHeightmap( heightmap, size ) end
|
||||
---@return any mesh
|
||||
function RL.GenMeshCustom( meshData, dynamic ) end
|
||||
|
||||
---Update mesh vertex data in GPU.
|
||||
---Note! Mainly intented to be used with custom meshes.
|
||||
---@param mesh any
|
||||
---@param meshData table
|
||||
---@return any RL.UpdateMesh
|
||||
function RL.UpdateMesh( mesh, meshData ) end
|
||||
-- Models - Material management functions
|
||||
|
||||
---Unload mesh data from CPU and GPU
|
||||
---@param mesh any
|
||||
---@return any RL.UnloadMesh
|
||||
function RL.UnloadMesh( mesh ) end
|
||||
|
||||
---Draw a 3d mesh with material and transform
|
||||
---@param mesh any
|
||||
---@param material any
|
||||
---@param transform table
|
||||
---@return any RL.DrawMesh
|
||||
function RL.DrawMesh( mesh, material, transform ) end
|
||||
|
||||
---Draw multiple mesh instances with material and different transforms
|
||||
---@param mesh any
|
||||
---@param material any
|
||||
---@param transforms table
|
||||
---@param instances integer
|
||||
---@return any RL.DrawMeshInstanced
|
||||
function RL.DrawMeshInstanced( mesh, material, transforms, instances ) end
|
||||
|
||||
---Updades mesh color vertex attribute buffer
|
||||
---NOTE: Currently only works on custom mesh
|
||||
---- Failure return false
|
||||
---- Success return true
|
||||
---@param mesh any
|
||||
---@param color table
|
||||
---@return any success
|
||||
function RL.SetMeshColor( mesh, color ) end
|
||||
|
||||
---Export mesh data to file, returns true on success
|
||||
---- Success return bool
|
||||
---@param mesh any
|
||||
---Load materials from model file
|
||||
---- Success return Material{}
|
||||
---@param fileName string
|
||||
---@return any success
|
||||
function RL.ExportMesh( mesh, fileName ) end
|
||||
|
||||
---Compute mesh bounding box limits
|
||||
---- Success return BoundingBox
|
||||
---@param mesh any
|
||||
---@return any boundingBox
|
||||
function RL.GetMeshBoundingBox( mesh ) end
|
||||
|
||||
---Compute mesh tangents
|
||||
---@param mesh any
|
||||
---@return any RL.GenMeshTangents
|
||||
function RL.GenMeshTangents( mesh ) end
|
||||
|
||||
-- Models - Material
|
||||
---@return any materials
|
||||
function RL.LoadMaterials( fileName ) end
|
||||
|
||||
---Default material for reference. Return as lightuserdata
|
||||
---- Success return Material
|
||||
@@ -3903,109 +4052,7 @@ function RL.GetMaterialShader( material ) end
|
||||
---@return any params
|
||||
function RL.GetMaterialParams( material ) end
|
||||
|
||||
-- Models - Model
|
||||
|
||||
---Load model from files (Meshes and materials)
|
||||
---- Failure return nil
|
||||
---- Success return Model
|
||||
---@param fileName string
|
||||
---@return any model
|
||||
function RL.LoadModel( fileName ) end
|
||||
|
||||
---Load model from generated mesh (Default material)
|
||||
---- Success return Model
|
||||
---@param mesh any
|
||||
---@return any model
|
||||
function RL.LoadModelFromMesh( mesh ) end
|
||||
|
||||
---Check if a model is ready
|
||||
---- Success return bool
|
||||
---@param model any
|
||||
---@return any isReady
|
||||
function RL.IsModelReady( model ) end
|
||||
|
||||
---Unload model (including meshes) from memory (RAM and/or VRAM)
|
||||
---@param model any
|
||||
---@return any RL.UnloadModel
|
||||
function RL.UnloadModel( model ) end
|
||||
|
||||
---Draw a model (With texture if set)
|
||||
---@param model any
|
||||
---@param position table
|
||||
---@param scale number
|
||||
---@param tint table
|
||||
---@return any RL.DrawModel
|
||||
function RL.DrawModel( model, position, scale, tint ) end
|
||||
|
||||
---Draw a model with extended parameters
|
||||
---@param model any
|
||||
---@param position table
|
||||
---@param rotationAxis table
|
||||
---@param rotationAngle number
|
||||
---@param scale table
|
||||
---@param tint table
|
||||
---@return any RL.DrawModelEx
|
||||
function RL.DrawModelEx( model, position, rotationAxis, rotationAngle, scale, tint ) end
|
||||
|
||||
---Copies material to model material. (Model material is the material id in models.)
|
||||
---@param model any
|
||||
---@param modelMaterial any
|
||||
---@param material any
|
||||
---@return any RL.SetModelMaterial
|
||||
function RL.SetModelMaterial( model, modelMaterial, material ) end
|
||||
|
||||
---Set material for a mesh (Mesh and material on this model)
|
||||
---@param model any
|
||||
---@param meshId integer
|
||||
---@param materialId integer
|
||||
---@return any RL.SetModelMeshMaterial
|
||||
function RL.SetModelMeshMaterial( model, meshId, materialId ) end
|
||||
|
||||
---Draw a billboard texture
|
||||
---@param camera any
|
||||
---@param texture any
|
||||
---@param position table
|
||||
---@param size number
|
||||
---@param tint table
|
||||
---@return any RL.DrawBillboard
|
||||
function RL.DrawBillboard( camera, texture, position, size, tint ) end
|
||||
|
||||
---Draw a billboard texture defined by source
|
||||
---@param camera any
|
||||
---@param texture any
|
||||
---@param source table
|
||||
---@param position table
|
||||
---@param size table
|
||||
---@param tint table
|
||||
---@return any RL.DrawBillboardRec
|
||||
function RL.DrawBillboardRec( camera, texture, source, position, size, tint ) end
|
||||
|
||||
---Draw a billboard texture defined by source and rotation
|
||||
---@param camera any
|
||||
---@param texture any
|
||||
---@param source table
|
||||
---@param position table
|
||||
---@param up table
|
||||
---@param size table
|
||||
---@param origin table
|
||||
---@param rotation number
|
||||
---@param tint table
|
||||
---@return any RL.DrawBillboardPro
|
||||
function RL.DrawBillboardPro( camera, texture, source, position, up, size, origin, rotation, tint ) end
|
||||
|
||||
---Set model transform matrix
|
||||
---@param model any
|
||||
---@param transform table
|
||||
---@return any RL.SetModelTransform
|
||||
function RL.SetModelTransform( model, transform ) end
|
||||
|
||||
---Get model transform matrix
|
||||
---- Success return Matrix
|
||||
---@param model any
|
||||
---@return any transform
|
||||
function RL.GetModelTransform( model ) end
|
||||
|
||||
-- Model - Animations
|
||||
-- Model - Model animations management functions
|
||||
|
||||
---Load model animations from file
|
||||
---- Failure return nil
|
||||
@@ -4040,7 +4087,7 @@ function RL.GetModelAnimationBoneCount( animation ) end
|
||||
---@return any frameCount
|
||||
function RL.GetModelAnimationFrameCount( animation ) end
|
||||
|
||||
-- Model - Collision
|
||||
-- Model - Collision detection functions
|
||||
|
||||
---Check collision between two spheres
|
||||
---- Success return bool
|
||||
|
||||
@@ -42,6 +42,11 @@ DETAILED CHANGES:
|
||||
- ADDED: ExportBuffer and LoadBufferFromFile.
|
||||
- REMOVED: DrawTextBoxedSelectable.
|
||||
- ADDED: DrawTextBoxedTinted.
|
||||
- ADDED: GenMeshCubicmap.
|
||||
- CHANGED: Organized model functions.
|
||||
- ADDED: GetModelBoundingBox.
|
||||
- ADDED: DrawModelWires and DrawModelWiresEx.
|
||||
- ADDED: LoadMaterials.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
Release: ReiLua version 0.5.0 Using Raylib 4.5
|
||||
|
||||
@@ -7,7 +7,7 @@ void UnloadModelKeepMeshes( Model model );
|
||||
void DrawBillboardProNoRatio( Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector3 up, Vector2 size, Vector2 origin, float rotation, Color tint );
|
||||
void DrawBillboardRecNoRatio( Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector2 size, Color tint );
|
||||
|
||||
/* Basic. */
|
||||
/* Basic geometric 3D shapes drawing functions. */
|
||||
int lmodelsDrawLine3D( lua_State *L );
|
||||
int lmodelsDrawPoint3D( lua_State *L );
|
||||
int lmodelsDrawCircle3D( lua_State *L );
|
||||
@@ -27,7 +27,35 @@ int lmodelsDrawPlane( lua_State *L );
|
||||
int lmodelDrawQuad3DTexture( lua_State *L );
|
||||
int lmodelsDrawRay( lua_State *L );
|
||||
int lmodelsDrawGrid( lua_State *L );
|
||||
/* Mesh. */
|
||||
/* Model management functions. */
|
||||
int lmodelsLoadModel( lua_State *L );
|
||||
int lmodelsLoadModelFromMesh( lua_State *L );
|
||||
int lmodelsIsModelReady( lua_State *L );
|
||||
int lmodelsUnloadModel( lua_State *L );
|
||||
int lmodelsGetModelBoundingBox( lua_State *L );
|
||||
int lmodelsSetModelMaterial( lua_State *L );
|
||||
int lmodelsSetModelMeshMaterial( lua_State *L );
|
||||
int lmodelsSetModelTransform( lua_State *L );
|
||||
int lmodelsGetModelTransform( lua_State *L );
|
||||
/* Model drawing functions. */
|
||||
int lmodelsDrawModel( lua_State *L );
|
||||
int lmodelsDrawModelEx( lua_State *L );
|
||||
int lmodelsDrawModelWires( lua_State *L );
|
||||
int lmodelsDrawModelWiresEx( lua_State *L );
|
||||
int lmodelsDrawBoundingBox( lua_State *L );
|
||||
int lmodelsDrawBillboard( lua_State *L );
|
||||
int lmodelsDrawBillboardRec( lua_State *L );
|
||||
int lmodelsDrawBillboardPro( lua_State *L );
|
||||
/* Mesh management functions. */
|
||||
int lmodelsUpdateMesh( lua_State *L );
|
||||
int lmodelsUnloadMesh( lua_State *L );
|
||||
int lmodelsDrawMesh( lua_State *L );
|
||||
int lmodelsDrawMeshInstanced( lua_State *L );
|
||||
int lmodelsSetMeshColor( lua_State *L );
|
||||
int lmodelsExportMesh( lua_State *L );
|
||||
int lmodelsGetMeshBoundingBox( lua_State *L );
|
||||
int lmodelsGenMeshTangents( lua_State *L );
|
||||
/* Mesh generation functions. */
|
||||
int lmodelsGenMeshPoly( lua_State *L );
|
||||
int lmodelsGenMeshPlane( lua_State *L );
|
||||
int lmodelsGenMeshCube( lua_State *L );
|
||||
@@ -37,16 +65,10 @@ int lmodelsGenMeshCone( lua_State *L );
|
||||
int lmodelsGenMeshTorus( lua_State *L );
|
||||
int lmodelsGenMeshKnot( lua_State *L );
|
||||
int lmodelsGenMeshHeightmap( lua_State *L );
|
||||
int lmodelsGenMeshCubicmap( lua_State *L );
|
||||
int lmodelsGenMeshCustom( lua_State *L );
|
||||
int lmodelsUpdateMesh( lua_State *L );
|
||||
int lmodelsUnloadMesh( lua_State *L );
|
||||
int lmodelsDrawMesh( lua_State *L );
|
||||
int lmodelsDrawMeshInstanced( lua_State *L );
|
||||
int lmodelsSetMeshColor( lua_State *L );
|
||||
int lmodelsExportMesh( lua_State *L );
|
||||
int lmodelsGetMeshBoundingBox( lua_State *L );
|
||||
int lmodelsGenMeshTangents( lua_State *L );
|
||||
/* Material. */
|
||||
/* Material management functions. */
|
||||
int lmodelsLoadMaterials( lua_State *L );
|
||||
int lmodelsGetMaterialDefault( lua_State *L );
|
||||
int lmodelsLoadMaterialDefault( lua_State *L );
|
||||
int lmodelsCreateMaterial( lua_State *L );
|
||||
@@ -62,27 +84,13 @@ int lmodelsGetMaterialColor( lua_State *L );
|
||||
int lmodelsGetMaterialValue( lua_State *L );
|
||||
int lmodelsGetMaterialShader( lua_State *L );
|
||||
int lmodelsGetMaterialParams( lua_State *L );
|
||||
/* Model. */
|
||||
int lmodelsLoadModel( lua_State *L );
|
||||
int lmodelsLoadModelFromMesh( lua_State *L );
|
||||
int lmodelsIsModelReady( lua_State *L );
|
||||
int lmodelsUnloadModel( lua_State *L );
|
||||
int lmodelsDrawModel( lua_State *L );
|
||||
int lmodelsDrawModelEx( lua_State *L );
|
||||
int lmodelsSetModelMaterial( lua_State *L );
|
||||
int lmodelsSetModelMeshMaterial( lua_State *L );
|
||||
int lmodelsDrawBillboard( lua_State *L );
|
||||
int lmodelsDrawBillboardRec( lua_State *L );
|
||||
int lmodelsDrawBillboardPro( lua_State *L );
|
||||
int lmodelsSetModelTransform( lua_State *L );
|
||||
int lmodelsGetModelTransform( lua_State *L );
|
||||
/* Animations. */
|
||||
/* Model animations management functions. */
|
||||
int lmodelsLoadModelAnimations( lua_State *L );
|
||||
int lmodelsUpdateModelAnimation( lua_State *L );
|
||||
int lmodelsIsModelAnimationValid( lua_State *L );
|
||||
int lmodelsGetModelAnimationBoneCount( lua_State *L );
|
||||
int lmodelsGetModelAnimationFrameCount( lua_State *L );
|
||||
/* Collision. */
|
||||
/* Collision detection functions. */
|
||||
int lmodelsCheckCollisionSpheres( lua_State *L );
|
||||
int lmodelsCheckCollisionBoxes( lua_State *L );
|
||||
int lmodelsCheckCollisionBoxSphere( lua_State *L );
|
||||
|
||||
@@ -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 );
|
||||
|
||||
1172
src/models.c
1172
src/models.c
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user