Skip to content

Commit

Permalink
Add comments for public fields and properties
Browse files Browse the repository at this point in the history
  • Loading branch information
toore committed Aug 6, 2023
1 parent 60064df commit 40a2621
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion src/cs/MonoGame.Extended.Collisions/QuadTree/QuadTree.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,24 @@ namespace MonoGame.Extended.Collisions
/// </summary>
public class Quadtree
{
/// <summary>
/// The default maximum depth.
/// </summary>
public const int DefaultMaxDepth = 7;

/// <summary>
/// The default maximum objects per node.
/// </summary>
public const int DefaultMaxObjectsPerNode = 25;

/// <summary>
/// Contains the children of this node.
/// </summary>
protected List<Quadtree> Children = new List<Quadtree>();

/// <summary>
/// Contains the data for this node in the quadtree.
/// </summary>
protected HashSet<QuadtreeData> Contents = new HashSet<QuadtreeData>();

/// <summary>
Expand All @@ -24,9 +38,17 @@ public Quadtree(RectangleF bounds)
NodeBounds = bounds;
}

/// <summary>
/// Gets or sets the current depth for this node in the quadtree.
/// </summary>
protected int CurrentDepth { get; set; }
/// <summary>
/// Gets or sets the maximum depth of the quadtree.
/// </summary>
protected int MaxDepth { get; set; } = DefaultMaxDepth;

/// <summary>
/// Gets or sets the maximum objects per node in this quadtree.
/// </summary>
protected int MaxObjectsPerNode { get; set; } = DefaultMaxObjectsPerNode;

/// <summary>
Expand Down

0 comments on commit 40a2621

Please sign in to comment.