Fixed additional typos

Went through the source with VNNCC to correct as many found typos as possible

Co-Authored-By: VNC <52937757+VNNCC@users.noreply.github.com>
This commit is contained in:
W2.Wizard
2021-01-05 02:14:21 +01:00
parent f7c17d96ce
commit 4d8cc9aef7
22 changed files with 53 additions and 53 deletions

View File

@@ -22,7 +22,7 @@ bool CSG::Mesh::Triangulate(RawData& data, Array<RawModelVertex>& cacheVB) const
Array<RawModelVertex> surfaceCacheVB(32);
// Cache submeshes by material to lay them down
// key- brush index, value- direcotry for surafecs (key: surface index, value: list with start vertex per triangle)
// key- brush index, value- direcotry for surfaces (key: surface index, value: list with start vertex per triangle)
Dictionary<int32, Dictionary<int32, Array<int32>>> polygonsPerBrush(64);
// Build index buffer
@@ -115,8 +115,8 @@ bool CSG::Mesh::Triangulate(RawData& data, Array<RawModelVertex>& cacheVB) const
tangent.Normalize();
// Gram-Schmidt orthogonalize
Vector3 newTangentUnormalized = tangent - normal * Vector3::Dot(normal, tangent);
const float length = newTangentUnormalized.Length();
Vector3 newTangentUnnormalized = tangent - normal * Vector3::Dot(normal, tangent);
const float length = newTangentUnnormalized.Length();
// Workaround to handle degenerated case
if (Math::IsZero(length))
@@ -129,7 +129,7 @@ bool CSG::Mesh::Triangulate(RawData& data, Array<RawModelVertex>& cacheVB) const
}
else
{
tangent = newTangentUnormalized / length;
tangent = newTangentUnnormalized / length;
bitangent.Normalize();
}
@@ -217,12 +217,12 @@ bool CSG::Mesh::Triangulate(RawData& data, Array<RawModelVertex>& cacheVB) const
auto& vertex = cacheVB[triangleStartVertex + k];
Vector3 projected = Vector3::Project(vertex.Position, 0, 0, 1000, 1000, 0, 1, vp);
Vector2 projectecXY = Vector2(projected);
Vector2 projectedXY = Vector2(projected);
min = Vector2::Min(projectecXY, min);
max = Vector2::Max(projectecXY, max);
min = Vector2::Min(projectedXY, min);
max = Vector2::Max(projectedXY, max);
pointsCache.Add(projectecXY);
pointsCache.Add(projectedXY);
}
}

View File

@@ -38,7 +38,7 @@ void CSG::Mesh::PerformOperation(Mesh* other)
{
case Mode::Additive:
{
// Check if both meshes do not intesect
// Check if both meshes do not intersect
if (AABB::IsOutside(_bounds, other->GetBounds())) // TODO: test every sub bounds not whole _bounds
{
// Add vertices to the mesh without any additional calculations
@@ -57,7 +57,7 @@ void CSG::Mesh::PerformOperation(Mesh* other)
case Mode::Subtractive:
{
// Check if both meshes do not intesect
// Check if both meshes do not intersect
if (AABB::IsOutside(_bounds, other->GetBounds())) // TODO: test every sub bounds not whole _bounds
{
// Do nothing
@@ -141,7 +141,7 @@ void CSG::Mesh::intersect(const Mesh* other, PolygonOperation insideOp, PolygonO
// insideOp - operation for polygons being inside the other brush
// outsideOp - operation for polygons being outside the other brush
// Prevent from redudant action
// Prevent from redundant action
if (insideOp == Keep && outsideOp == Keep)
return;
@@ -180,7 +180,7 @@ void CSG::Mesh::intersectSubMesh(const Mesh* other, int32 subMeshIndex, PolygonO
int32 startBrushSurface = brushMeta.StartSurfaceIndex;
int32 endBrushSurface = startBrushSurface + brushMeta.SurfacesCount;
// Check every polygon (itereate fron end since we can ass new polygons and we don't want to process them)
// Check every polygon (iterate from end since we can ass new polygons and we don't want to process them)
for (int32 i = _polygons.Count() - 1; i >= 0; i--)
{
auto& polygon = _polygons[i];