VisimBox 1.0 VisimBox 3d simulation and visualisation ToolBox

- Main Page
- Packages
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | Properties
VisiMath.Collisions.Grid2D< TObject, TGridCell > Class Template Reference

Generic uniform 2D grid partioning system. More...

Inheritance diagram for VisiMath.Collisions.Grid2D< TObject, TGridCell >:

List of all members.

## Public Member Functions
| Grid2D (int sizex, int sizey, Vector3 center, float scalex, float scaley)
| Grid2D (int sizex, int sizey, Vector3 center, float scalex, float scaley, float floor, float ceiling)
override ISpatialCell< TObject > | GetNode (ref Vector3 position)
| Returns spatial portion which contains position.
override ISpatialCell< TObject > | GetNode (ref Vector3 center, float radius)
| Returns smallest spatial portion which fully contains sphere.
override ISpatialCell< TObject > | GetNode (ref Vector3 minimum, ref Vector3 maximum)
| Returns smallest spatial portion which fully contains bounding box.
override ISpatialCell< TObject > | GetNode (ref ISpatialIndex index)
| Returns smallest spatial portion which fully contains spatial index.
override ISpatialIndex | GetSubNodeIndex (int index)
| Returns spatial index for subnode.
override ISpatialCell< TObject > | GetSubNode (int index)
| Returns subnode with specified integer index.
override ISpatialCell< TObject > | GetSubNode (ref ISpatialIndex index)
| Returns this or subnode with specified spatial index (unlike GetNode doesn't move up in hiearchy)
## Protected Member Functions
bool | TransformPosition (Vector3 position, out int i, out int j)
bool | GetNodeIndex (int index, out int i, out int j)
## Properties
override int | SubNodeCount`[get]`
| Number of the subnodes in indexer for hiearchical indexing.

## Detailed Description

### template<TObject, TGridCell>
class VisiMath::Collisions::Grid2D< TObject, TGridCell >

Generic uniform 2D grid partioning system.

Template Parameters:

  TObject |
  TGridCell |

Type Constraints

  TGridCell | : | ISpatialCell<TObject> |
  TObject | : | ISpatialyIndexable |

## Member Function Documentation

template<TObject , TGridCell >

override ISpatialCell<TObject> VisiMath.Collisions.Grid2D< TObject, TGridCell >.GetNode | ( | ref Vector3 | position | ) | `[virtual]`

Returns spatial portion which contains position.

Parameters:

  position | Position vector

Returns:
  Spatial node containing object

Reimplemented from VisiMath.Collisions.SpatialCell< TObject >.

template<TObject , TGridCell >

override ISpatialCell<TObject> VisiMath.Collisions.Grid2D< TObject, TGridCell >.GetNode | ( | ref Vector3 | center,
|  | float | radius
| ) |  | `[virtual]`

Returns smallest spatial portion which fully contains sphere.

Parameters:

  center | Sphere center
  radius | Radius of the sphere

Returns:
  Spatial node fully containing object

Reimplemented from VisiMath.Collisions.SpatialCell< TObject >.

template<TObject , TGridCell >

override ISpatialCell<TObject> VisiMath.Collisions.Grid2D< TObject, TGridCell >.GetNode | ( | ref Vector3 | minimum,
|  | ref Vector3 | maximum
| ) |  | `[virtual]`

Returns smallest spatial portion which fully contains bounding box.

Parameters:

  minimum | Minimal corner of the box
  maximum | Maximal corner of the box

Returns:
  Spatial node fully containing object

Reimplemented from VisiMath.Collisions.SpatialCell< TObject >.

template<TObject , TGridCell >

override ISpatialCell<TObject> VisiMath.Collisions.Grid2D< TObject, TGridCell >.GetNode | ( | ref ISpatialIndex | index | ) | `[virtual]`

Returns smallest spatial portion which fully contains spatial index.

Parameters:

  index | Spatial index

Reimplemented from VisiMath.Collisions.SpatialCell< TObject >.

template<TObject , TGridCell >

bool VisiMath.Collisions.Grid2D< TObject, TGridCell >.GetNodeIndex | ( | int | index,
|  | out int | i,
|  | out int | j
| ) |  | `[protected]`

template<TObject , TGridCell >

override ISpatialCell<TObject> VisiMath.Collisions.Grid2D< TObject, TGridCell >.GetSubNode | ( | int | index | ) | `[virtual]`

Returns subnode with specified integer index.

Parameters:

  index | index of the subnode (valid are 0 to SubNodeCount

Returns:
  Subnode

Implements VisiMath.Collisions.HierarchicalSpatialCell< TObject, TSubCell >.

template<TObject , TGridCell >

override ISpatialCell<TObject> VisiMath.Collisions.Grid2D< TObject, TGridCell >.GetSubNode | ( | ref ISpatialIndex | index | ) | `[virtual]`

Returns this or subnode with specified spatial index (unlike GetNode doesn't move up in hiearchy)

Parameters:

  index | Spatial index

Returns:
  Subnode containg index or this

!! wrong probably

Reimplemented from VisiMath.Collisions.HierarchicalSpatialCell< TObject, TSubCell >.

template<TObject , TGridCell >

override ISpatialIndex VisiMath.Collisions.Grid2D< TObject, TGridCell >.GetSubNodeIndex | ( | int | index | ) | `[virtual]`

Returns spatial index for subnode.

Parameters:

  index | index of the subnode (valid are 0 to SubNodeCount

Returns:
  Spatial index

Reimplemented from VisiMath.Collisions.HierarchicalSpatialCell< TObject, TSubCell >.

template<TObject , TGridCell >

VisiMath.Collisions.Grid2D< TObject, TGridCell >.Grid2D | ( | int | sizex,
|  | int | sizey,
|  | Vector3 | center,
|  | float | scalex,
|  | float | scaley,
|  | float | floor,
|  | float | ceiling
| ) |  |

template<TObject , TGridCell >

VisiMath.Collisions.Grid2D< TObject, TGridCell >.Grid2D | ( | int | sizex,
|  | int | sizey,
|  | Vector3 | center,
|  | float | scalex,
|  | float | scaley
| ) |  |

template<TObject , TGridCell >

bool VisiMath.Collisions.Grid2D< TObject, TGridCell >.TransformPosition | ( | Vector3 | position,
|  | out int | i,
|  | out int | j
| ) |  | `[protected]`

## Property Documentation

template<TObject , TGridCell >

override int VisiMath.Collisions.Grid2D< TObject, TGridCell >.SubNodeCount`[get]`

Number of the subnodes in indexer for hiearchical indexing.

Reimplemented from VisiMath.Collisions.HierarchicalSpatialCell< TObject, TSubCell >.

The documentation for this class was generated from the following file:

- Grid.cs

All Classes Namespaces Files Functions Variables Enumerations Properties Events