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

@@ -410,7 +410,7 @@ namespace FlaxEditor.Modules
{
if (request.Settings != null && entry.TryOverrideSettings(request.Settings))
{
// Use overriden settings
// Use overridden settings
}
else if (!request.SkipSettingsDialog)
{

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];

View File

@@ -36,7 +36,7 @@ namespace Log
/// </summary>
/// <param name="additionalInfo">Additional information that help describe error</param>
Exception(const String& additionalInfo)
: Exception(TEXT("An exception has occured."), additionalInfo)
: Exception(TEXT("An exception has occurred."), additionalInfo)
{
}

View File

@@ -100,7 +100,7 @@ public:
public:
/// <summary>
/// Determinates whenever this emitter uses lights rendering.
/// Determinate whenever this emitter uses lights rendering.
/// </summary>
/// <returns>True if emitter uses lights rendering, otherwise false.</returns>
FORCE_INLINE bool UsesLightRendering() const

View File

@@ -115,7 +115,7 @@ int32 ParticleSystemInstance::GetParticlesCount() const
const auto desc = GPUBufferDescription::Buffer(Emitters.Count() * sizeof(uint32), GPUBufferFlags::None, PixelFormat::Unknown, nullptr, sizeof(uint32), GPUResourceUsage::StagingReadback);
if (GPUParticlesCountReadback->Init(desc))
{
LOG(Error, "Failed to create GPU particles coun readback buffer.");
LOG(Error, "Failed to create GPU particles count readback buffer.");
}
}

View File

@@ -33,7 +33,7 @@ Font::~Font()
void Font::GetCharacter(Char c, FontCharacterEntry& result)
{
// Try get character or cache it if cannot find
// Try to get the character or cache it if cannot be found
if (!_characters.TryGet(c, result))
{
// This thread race condition may happen in editor but in game we usually do all stuff with fonts on main thread (chars caching)

View File

@@ -214,7 +214,7 @@ bool FontManager::AddNewEntry(Font* font, Char c, FontCharacterEntry& entry)
return false;
}
// Copy glyph data after rasterize (row by row)
// Copy glyph data after rasterization (row by row)
for (int32 row = 0; row < glyphHeight; row++)
{
Platform::MemoryCopy(&GlyphImageData[row * glyphWidth], &bitmap->buffer[row * bitmap->pitch], glyphWidth);

View File

@@ -37,9 +37,9 @@ public:
public:
/// <summary>
/// Returns true if error occured during reading/writing to the stream
/// Returns true if error occurred during reading/writing to the stream
/// </summary>
/// <returns>True if error occured during reading/writing to the stream</returns>
/// <returns>True if error occurred during reading/writing to the stream</returns>
virtual bool HasError() const
{
return _hasError;

View File

@@ -92,7 +92,7 @@ void UpdateResource(StreamableResource* resource, DateTime now)
}
}
// Calculate residency level to stream in (resources may want to incease/decrease it's quality in steps rather than at once)
// Calculate residency level to stream in (resources may want to increase/decrease it's quality in steps rather than at once)
int32 requestedResidency = handler->CalculateRequestedResidency(resource, targetResidency);
// Create streaming task (resource type specific)

View File

@@ -64,7 +64,7 @@ void MaterialLayer::Prepare()
Guid MaterialLayer::GetMappedParamId(const Guid& id)
{
// TODO: test ParamIdsMappings using Dictionary. will performance change? mamybe we don't wont to allocate too much memory
// TODO: test ParamIdsMappings using Dictionary. will performance change? maybe we don't wont to allocate too much memory
for (int32 i = 0; i < ParamIdsMappings.Count(); i++)
{

View File

@@ -355,7 +355,7 @@ bool ProcessMesh(AssimpImporterData& data, const aiMesh* aMesh, MeshData& mesh,
mesh.BlendIndices.SetAll(Int4::Zero);
mesh.BlendWeights.SetAll(Vector4::Zero);
// Build skinning clusters and fill controls points data stutcture
// Build skinning clusters and fill controls points data structure
for (unsigned boneId = 0; boneId < aMesh->mNumBones; boneId++)
{
const auto aBone = aMesh->mBones[boneId];

View File

@@ -316,7 +316,7 @@ bool TextureTool::Convert(TextureData& dst, const TextureData& src, const PixelF
}
if (src.Format == dstFormat)
{
LOG(Warning, "Soure data and destination format are the same. Cannot perform conversion.");
LOG(Warning, "Source data and destination format are the same. Cannot perform conversion.");
return true;
}
if (src.Depth != 1)
@@ -343,7 +343,7 @@ bool TextureTool::Resize(TextureData& dst, const TextureData& src, int32 dstWidt
}
if (src.Width == dstWidth && src.Height == dstHeight)
{
LOG(Warning, "Soure data and destination dimensions are the same. Cannot perform resizing.");
LOG(Warning, "Source data and destination dimensions are the same. Cannot perform resizing.");
return true;
}
if (src.Depth != 1)

View File

@@ -26,7 +26,7 @@ namespace FlaxEngine.GUI
public Action<int> ItemClicked;
/// <summary>
/// Occurs when popup losts focus.
/// Occurs when popup lost focus.
/// </summary>
public Action LostFocus;

View File

@@ -636,7 +636,7 @@ namespace FlaxEngine.GUI
}
/// <summary>
/// Draws the children. Can be overriden to provide some customizations. Draw is performed with applied clipping mask for the client area.
/// Draws the children. Can be overridden to provide some customizations. Draw is performed with applied clipping mask for the client area.
/// </summary>
protected virtual void DrawChildren()
{

View File

@@ -12,12 +12,12 @@ namespace FlaxEngine.GUI
/// <summary>
/// The splitter size (in pixels).
/// </summary>
public const int SpliterSize = 4;
public const int SplitterSize = 4;
/// <summary>
/// The splitter half size (in pixels).
/// </summary>
private const int SpliterSizeHalf = SpliterSize / 2;
private const int SplitterSizeHalf = SplitterSize / 2;
private Orientation _orientation;
private float _splitterValue;
@@ -105,12 +105,12 @@ namespace FlaxEngine.GUI
if (_orientation == Orientation.Horizontal)
{
var split = Mathf.RoundToInt(_splitterValue * Width);
_splitterRect = new Rectangle(Mathf.Clamp(split - SpliterSizeHalf, 0.0f, Width), 0, SpliterSize, Height);
_splitterRect = new Rectangle(Mathf.Clamp(split - SplitterSizeHalf, 0.0f, Width), 0, SplitterSize, Height);
}
else
{
var split = Mathf.RoundToInt(_splitterValue * Height);
_splitterRect = new Rectangle(0, Mathf.Clamp(split - SpliterSizeHalf, 0.0f, Height), Width, SpliterSize);
_splitterRect = new Rectangle(0, Mathf.Clamp(split - SplitterSizeHalf, 0.0f, Height), Width, SplitterSize);
}
}
@@ -226,14 +226,14 @@ namespace FlaxEngine.GUI
if (_orientation == Orientation.Horizontal)
{
var split = Mathf.RoundToInt(_splitterValue * Width);
Panel1.Bounds = new Rectangle(0, 0, split - SpliterSizeHalf, Height);
Panel2.Bounds = new Rectangle(split + SpliterSizeHalf, 0, Width - split - SpliterSizeHalf, Height);
Panel1.Bounds = new Rectangle(0, 0, split - SplitterSizeHalf, Height);
Panel2.Bounds = new Rectangle(split + SplitterSizeHalf, 0, Width - split - SplitterSizeHalf, Height);
}
else
{
var split = Mathf.RoundToInt(_splitterValue * Height);
Panel1.Bounds = new Rectangle(0, 0, Width, split - SpliterSizeHalf);
Panel2.Bounds = new Rectangle(0, split + SpliterSizeHalf, Width, Height - split - SpliterSizeHalf);
Panel1.Bounds = new Rectangle(0, 0, Width, split - SplitterSizeHalf);
Panel2.Bounds = new Rectangle(0, split + SplitterSizeHalf, Width, Height - split - SplitterSizeHalf);
}
}
}

View File

@@ -262,14 +262,14 @@ namespace FlaxEngine.GUI
return false;
// Change focused control
Control prevous = _focusedControl;
Control previous = _focusedControl;
_focusedControl = c;
// Fire events
if (prevous != null)
if (previous != null)
{
prevous.OnLostFocus();
Assert.IsFalse(prevous.IsFocused);
previous.OnLostFocus();
Assert.IsFalse(previous.IsFocused);
}
if (_focusedControl != null)
{

View File

@@ -50,7 +50,7 @@ public:
/// <summary>
/// Checks if can exit from that state
/// </summary>
/// <param name="nextState">Next state to ener after exit from the current state</param>
/// <param name="nextState">Next state to enter after exit from the current state</param>
/// <returns>True if can exit from that state, otherwise false</returns>
virtual bool CanExit(State* nextState) const
{

View File

@@ -22,7 +22,7 @@ namespace Flax.Build.Plugins
private void OnGenerateCppScriptWrapperFunction(Builder.BuildData buildData, ClassInfo classInfo, FunctionInfo functionInfo, int scriptVTableSize, int scriptVTableIndex, StringBuilder contents)
{
// Generate C++ wrapper function to invoke Visual Script instead of overriden native function (with support for base method callback)
// Generate C++ wrapper function to invoke Visual Script instead of overridden native function (with support for base method callback)
BindingsGenerator.CppIncludeFiles.Add("Engine/Content/Assets/VisualScript.h");

View File

@@ -225,7 +225,7 @@ namespace Flax.Build
}
/// <summary>
/// Setups the target building environment (native C++). Allows to modify compiler and linker options. Options applied here are used by all modules included into this target (can be overriden per module).
/// Setups the target building environment (native C++). Allows to modify compiler and linker options. Options applied here are used by all modules included into this target (can be overridden per module).
/// </summary>
/// <param name="options">The build options.</param>
public virtual void SetupTargetEnvironment(BuildOptions options)

View File

@@ -75,14 +75,14 @@ namespace Flax.Stats
/// <summary>
/// Gets total amount of memory used by that node and all child nodes
/// </summary>
public long TotaSizeOnDisk
public long TotalSizeOnDisk
{
get
{
long result = SizeOnDisk;
for (int i = 0; i < Children.Length; i++)
{
result += Children[i].TotaSizeOnDisk;
result += Children[i].TotalSizeOnDisk;
}
return result;
}
@@ -153,15 +153,15 @@ namespace Flax.Stats
/// <summary>
/// Gets total amount of lines of code per language
/// </summary>
/// <param name="languge">Language</param>
/// <param name="language">Language</param>
/// <returns>Result amount of lines</returns>
public long GetTotalLinesOfCode(Languages languge)
public long GetTotalLinesOfCode(Languages language)
{
long result = 0;
result += LinesOfCode[(int)languge];
result += LinesOfCode[(int)language];
for (int i = 0; i < Children.Length; i++)
{
result += Children[i].GetTotalLinesOfCode(languge);
result += Children[i].GetTotalLinesOfCode(language);
}
return result;
}
@@ -270,9 +270,9 @@ namespace Flax.Stats
public void CleanupDirectories()
{
var chld = Children.ToList();
chld.RemoveAll(e => ignoredFolders.Contains(e.ShortName.ToLower()));
Children = chld.ToArray();
var child = Children.ToList();
child.RemoveAll(e => ignoredFolders.Contains(e.ShortName.ToLower()));
Children = child.ToArray();
foreach (var a in Children)
{

View File

@@ -103,7 +103,7 @@ namespace Flax.Stats
}
/// <summary>
/// Write string in UTF-8 encoding to the stream and ofset data
/// Write string in UTF-8 encoding to the stream and offset data
/// </summary>
/// <param name="fs">File stream</param>
/// <param name="data">Data to write</param>
@@ -292,7 +292,7 @@ namespace Flax.Stats
}
/// <summary>
/// Write arry of Guids to the stream
/// Write array of Guids to the stream
/// </summary>
/// <param name="fs">File stream</param>
/// <param name="val">Value to write</param>