summaryrefslogtreecommitdiff
path: root/API.md
diff options
context:
space:
mode:
authorjussi2023-12-07 22:38:13 +0200
committerjussi2023-12-07 22:38:13 +0200
commiteb7873be2be3d0ac4808c7416b190888a0e94145 (patch)
tree31fef2d03e258c998a810d802345bcf55332bf06 /API.md
parent6ecbbcc282bb25fae4bcd2e9f394adb74ac60ae7 (diff)
downloadreilua-enhanced-eb7873be2be3d0ac4808c7416b190888a0e94145.tar.gz
reilua-enhanced-eb7873be2be3d0ac4808c7416b190888a0e94145.tar.bz2
reilua-enhanced-eb7873be2be3d0ac4808c7416b190888a0e94145.zip
More Model management functions, BoneInfo and Transform.
Diffstat (limited to 'API.md')
-rw-r--r--API.md107
1 files changed, 103 insertions, 4 deletions
diff --git a/API.md b/API.md
index 99e6035..66c7827 100644
--- a/API.md
+++ b/API.md
@@ -221,6 +221,18 @@ GlyphInfo, font characters glyphs info
---
+> BoneInfo = { name = string[32], parent = int }
+
+Bone, skeletal animation bone
+
+---
+
+> Transform = { translation = Vector3, rotation = Quaternion, scale = Vector3 }
+
+Transform, vertex transformation data
+
+---
+
> Wave = Userdata
Wave, audio wave data
@@ -2977,7 +2989,7 @@ GL_COMPUTE_SHADER
---
-## Defines - RLGL GlVersion
+## Defines - RLGL GL blending factors
> RL_ZERO = 0
GL_ZERO
@@ -6585,9 +6597,24 @@ Compute model bounding box limits (considers all meshes)
---
+> RL.SetModelTransform( Model model, Matrix transform )
+
+Set model transform matrix
+
+---
+
+> success = RL.SetModelMesh( Model model, int meshId, Mesh mesh )
+
+Get model mesh. Return as lightuserdata
+
+- Failure return false
+- Success return true
+
+---
+
> success = RL.SetModelMaterial( Model model, int modelMaterialId, Material material )
-Copies material to model material. (Model material is the material id in models.)
+Copies material to model material
- Failure return false
- Success return true
@@ -6600,9 +6627,21 @@ Set material for a mesh (Mesh and material on this model)
---
-> RL.SetModelTransform( Model model, Matrix transform )
+> success = RL.SetModelBone( Model model, int boneId, BoneInfo bone )
-Set model transform matrix
+Set model bone information (skeleton)
+
+- Failure return false
+- Success return true
+
+---
+
+> success = RL.SetModelBindPose( Model model, int boneId, Transform pose )
+
+Set model bones base transformation (pose)
+
+- Failure return false
+- Success return true
---
@@ -6614,6 +6653,66 @@ Get model transform matrix
---
+> meshCount = RL.GetModelMeshCount( Model model )
+
+Get model number of meshes
+
+- Success return int
+
+---
+
+> meshCount = RL.GetModelMaterialCount( Model model )
+
+Get model number of materials
+
+- Success return int
+
+---
+
+> mesh = RL.GetModelMesh( Model model, int meshId )
+
+Get model mesh. Return as lightuserdata
+
+- Failure return nil
+- Success return Mesh
+
+---
+
+> material = RL.GetModelMaterial( Model model, int materialId )
+
+Get model material. Return as lightuserdata
+
+- Failure return nil
+- Success return Material
+
+---
+
+> boneCount = RL.GetModelBoneCount( Model model )
+
+Get model number of bones
+
+- Success return int
+
+---
+
+> bone = RL.GetModelBone( Model model, int boneId )
+
+Get model bones information (skeleton)
+
+- Failure return nil
+- Success return BoneInfo
+
+---
+
+> pose = RL.GetModelBindPose( Model model, int boneId )
+
+Get models bones base transformation (pose)
+
+- Failure return nil
+- Success return Transform
+
+---
+
## Models - Model drawing functions
---