[This is preliminary documentation and is subject to change.]

Represents proximity data generated by a CrowdManager object during its update method.

Namespace: org.critterai.nav
Assembly: cai-nav (in cai-nav.dll) Version: 0.4.0.0 (0.4.0.0)

Syntax

         
 C#  Visual Basic  Visual C++ 
public sealed class CrowdProximityGrid
Public NotInheritable Class CrowdProximityGrid
public ref class CrowdProximityGrid sealed

Members

         
 All Members  Properties   Methods  
 Public

 Protected
 Instance

 Static 
 Declared

 Inherited
 XNA Framework Only 

 .NET Compact Framework Only 

 MemberDescription
Finalize()()()()
Destructor
(Overrides Object..::..Finalize()()()().)
GetBounds()()()()
Gets the bounds of the grid. [(minX, minY, maxX, maxY)]
GetCellSize()()()()
The cell size of the grid.
GetItemCountAt(Int32, Int32)
The item count at the specified grid location.
IsDisposed
True if the object has been disposed.

Remarks

Objects of this type can only be obtained from a CrowdManager object.

CopyC#
// Example: Iterating the proximity data.

// Where 'grid' is a CrowdProximityGrid object.

int[] bounds = new int[4];
grid.GetBounds(bounds);
float cs = grid.GetCellSize();

for (int y = bounds[1]; y <= bounds[3]; ++y)
{
    // y-bounds of the cell in world units.
    float minY = y * cs;
    float maxY = y * cs + cs;
    for (int x = bounds[0]; x <= bounds[2]; ++x)
    {
        int count = grid->getItemCountAt(x, y); 
        // x-bounds of the cell in world units.
        float minX = x * cs;
        float maxX = x * cs + cs;
    }
}

Behavior is undefined if used after disposal.

Inheritance Hierarchy

System..::..Object
  org.critterai.nav..::..CrowdProximityGrid

See Also