Replace NULL with nullptr
This commit is contained in:
@@ -854,7 +854,7 @@ void SurfaceTool::mikktSetTSpaceDefault(const SMikkTSpaceContext *pContext, cons
|
||||
const tbool bIsOrientationPreserving, const int iFace, const int iVert) {
|
||||
|
||||
TangentGenerationContextUserData &triangle_data = *reinterpret_cast<TangentGenerationContextUserData *>(pContext->m_pUserData);
|
||||
Vertex *vtx = NULL;
|
||||
Vertex *vtx = nullptr;
|
||||
if (triangle_data.indices.size() > 0) {
|
||||
int index = triangle_data.indices[iFace * 3 + iVert]->get();
|
||||
if (index < triangle_data.vertices.size()) {
|
||||
@@ -864,7 +864,7 @@ void SurfaceTool::mikktSetTSpaceDefault(const SMikkTSpaceContext *pContext, cons
|
||||
vtx = &triangle_data.vertices[iFace * 3 + iVert]->get();
|
||||
}
|
||||
|
||||
if (vtx != NULL) {
|
||||
if (vtx != nullptr) {
|
||||
vtx->tangent = Vector3(fvTangent[0], fvTangent[1], fvTangent[2]);
|
||||
vtx->binormal = Vector3(-fvBiTangent[0], -fvBiTangent[1], -fvBiTangent[2]); // for some reason these are reversed, something with the coordinate system in Godot
|
||||
}
|
||||
@@ -882,7 +882,7 @@ void SurfaceTool::generate_tangents() {
|
||||
mkif.m_getPosition = mikktGetPosition;
|
||||
mkif.m_getTexCoord = mikktGetTexCoord;
|
||||
mkif.m_setTSpace = mikktSetTSpaceDefault;
|
||||
mkif.m_setTSpaceBasic = NULL;
|
||||
mkif.m_setTSpaceBasic = nullptr;
|
||||
|
||||
SMikkTSpaceContext msc;
|
||||
msc.m_pInterface = &mkif;
|
||||
|
||||
Reference in New Issue
Block a user