mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-22 19:18:31 +00:00
RENAMED: MeshTangents() -> GenMeshTangents()
RENAMED: MeshBinormals() -> GenMeshBinormals()
This commit is contained in:
@@ -2646,7 +2646,7 @@ BoundingBox GetMeshBoundingBox(Mesh mesh)
|
|||||||
// Compute mesh tangents
|
// Compute mesh tangents
|
||||||
// NOTE: To calculate mesh tangents and binormals we need mesh vertex positions and texture coordinates
|
// NOTE: To calculate mesh tangents and binormals we need mesh vertex positions and texture coordinates
|
||||||
// Implementation base don: https://answers.unity.com/questions/7789/calculating-tangents-vector4.html
|
// Implementation base don: https://answers.unity.com/questions/7789/calculating-tangents-vector4.html
|
||||||
void MeshTangents(Mesh *mesh)
|
void GenMeshTangents(Mesh *mesh)
|
||||||
{
|
{
|
||||||
if (mesh->tangents == NULL) mesh->tangents = (float *)RL_MALLOC(mesh->vertexCount*4*sizeof(float));
|
if (mesh->tangents == NULL) mesh->tangents = (float *)RL_MALLOC(mesh->vertexCount*4*sizeof(float));
|
||||||
else TRACELOG(LOG_WARNING, "MESH: Tangents data already available, re-writting");
|
else TRACELOG(LOG_WARNING, "MESH: Tangents data already available, re-writting");
|
||||||
@@ -2726,7 +2726,7 @@ void MeshTangents(Mesh *mesh)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Compute mesh binormals (aka bitangent)
|
// Compute mesh binormals (aka bitangent)
|
||||||
void MeshBinormals(Mesh *mesh)
|
void GenMeshBinormals(Mesh *mesh)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < mesh->vertexCount; i++)
|
for (int i = 0; i < mesh->vertexCount; i++)
|
||||||
{
|
{
|
||||||
|
@@ -1435,8 +1435,8 @@ RLAPI Mesh GenMeshCubicmap(Image cubicmap, Vector3 cubeSize);
|
|||||||
|
|
||||||
// Mesh manipulation functions
|
// Mesh manipulation functions
|
||||||
RLAPI BoundingBox GetMeshBoundingBox(Mesh mesh); // Compute mesh bounding box limits
|
RLAPI BoundingBox GetMeshBoundingBox(Mesh mesh); // Compute mesh bounding box limits
|
||||||
RLAPI void MeshTangents(Mesh *mesh); // Compute mesh tangents
|
RLAPI void GenMeshTangents(Mesh *mesh); // Compute mesh tangents
|
||||||
RLAPI void MeshBinormals(Mesh *mesh); // Compute mesh binormals
|
RLAPI void GenMeshBinormals(Mesh *mesh); // Compute mesh binormals
|
||||||
|
|
||||||
// Model drawing functions
|
// Model drawing functions
|
||||||
RLAPI void DrawModel(Model model, Vector3 position, float scale, Color tint); // Draw a model (with texture if set)
|
RLAPI void DrawModel(Model model, Vector3 position, float scale, Color tint); // Draw a model (with texture if set)
|
||||||
|
Reference in New Issue
Block a user