From 62ba7a1eb0adf8d5496859dc65fa3b873e0649ab Mon Sep 17 00:00:00 2001 From: David Saltares Date: Sun, 8 Oct 2017 11:14:09 +0100 Subject: [PATCH] [DOCS] Document GridMap [ci skip] --- modules/gridmap/doc_classes/GridMap.xml | 26 +++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/modules/gridmap/doc_classes/GridMap.xml b/modules/gridmap/doc_classes/GridMap.xml index cd01233ce4f..ed8c27e5d04 100644 --- a/modules/gridmap/doc_classes/GridMap.xml +++ b/modules/gridmap/doc_classes/GridMap.xml @@ -1,8 +1,13 @@ + Node for 3D tile-based maps. + GridMap lets you place meshes on a grid interactively. It works both from the editor and can help you create in-game level editors. + GridMaps use a [MeshLibrary] which contain a list of tiles: meshes with materials plus optional collisions and extra elements. + A GridMap contains a collection of cells. Each grid cell refers to a [MeshLibrary] item. All cells in the map have the same dimensions. + A GridMap is split into a sparse collection of octants for efficient rendering and physics processing. Every octant has the same dimensions and can contain several cells. @@ -13,6 +18,7 @@ + Clear all cells. @@ -25,6 +31,7 @@ + The [MeshLibrary] item index located at the grid-based X, Y and Z coordinates. If the cell is empty, [INVALID_CELL_ITEM] will be returned. @@ -37,54 +44,63 @@ + The orientation of the cell at the grid-based X, Y and Z coordinates. -1 is retuned if the cell is empty. + The dimensions of the grid's cells. + Returns whether or not grid items are centered on the X axis. + Returns whether or not grid items are centered on the Y axis. + Returns whether or not grid items are centered on the Z axis. + Array of [Transform] and [Mesh] references corresponding to the non empty cells in the grid. The transforms are specified in world space. + The size of each octant measured in number of cells. This applies to all three axis. + The assigned [MeshLibrary]. + Array of [Vector3] with the non empty cell coordinates in the grid map. @@ -109,6 +125,9 @@ + Set the mesh index for the cell referenced by its grid-based X, Y and Z coordinates. + A negative item index will clear the cell. + Optionally, the item's orientation can be passed. @@ -117,6 +136,7 @@ + Sets the height, width and depth of the grid's cells. @@ -125,6 +145,7 @@ + Set grid items to be centered on the X axis. By default it is enabled. @@ -133,6 +154,7 @@ + Set grid items to be centered on the Y axis. By default it is enabled. @@ -141,6 +163,7 @@ + Set grid items to be centered on the Z axis. By default it is enabled. @@ -163,6 +186,7 @@ + Sets the size for each octant measured in number of cells. This applies to all three axis. @@ -171,11 +195,13 @@ + Sets the collection of meshes for the map. + Invalid cell item that can be used in [method set_cell_item] to clear cells (or represent an empty cell in [method get_cell_item]).