1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-16 18:01:40 +00:00

Fixes and proper tangent space

This commit is contained in:
Gefüllte Taubenbrust 2024-11-11 17:07:52 +01:00
parent 6ad43575ff
commit 2fd22c1850
12 changed files with 417 additions and 70 deletions

View file

@ -42,6 +42,26 @@ public:
virtual void recalculateNormals(IMeshBuffer *buffer,
bool smooth = false, bool angleWeighted = false) const = 0;
//! Recalculates tangents, requires a tangent mesh
/** \param mesh Mesh on which the operation is performed.
\param recalculateNormals If the normals shall be recalculated, otherwise original normals of the mesh are used unchanged.
\param smooth If the normals shall be smoothed.
\param angleWeighted If the normals shall be smoothed in relation to their angles. More expensive, but also higher precision.
*/
virtual void recalculateTangents(IMesh* mesh,
bool recalculateNormals = false, bool smooth = false,
bool angleWeighted = false) const = 0;
//! Recalculates tangents, requires a tangent mesh buffer
/** \param buffer Meshbuffer on which the operation is performed.
\param recalculateNormals If the normals shall be recalculated, otherwise original normals of the buffer are used unchanged.
\param smooth If the normals shall be smoothed.
\param angleWeighted If the normals shall be smoothed in relation to their angles. More expensive, but also higher precision.
*/
virtual void recalculateTangents(IMeshBuffer* buffer,
bool recalculateNormals = false, bool smooth = false,
bool angleWeighted = false) const = 0;
//! Scales the actual mesh, not a scene node.
/** \param mesh Mesh on which the operation is performed.
\param factor Scale factor for each axis. */