Grid_FrameWork

m

Abstract

GFGrid

r

All grids inherit from the GFGrid class. GFGrid is an abstract class, which means it cannot do anything on its own and it cannot be attached to any object. Rather it serves as a template for what its children, the specific grids, have to be able to do, but not how they do it. You say that GFRectGrid, GFHexGrid and GFPolarGrid “implement” GFGrid.Of course you can still reference any grid by its respective type like this:var myGrid: GFRectGrid // UnityScriptGFRectGrid myGrid // C#The downside is that if you change your opinion and want another kind of grid you need to change your source code as well. Or maybe you don’t know what type of grid you are dealing with. Writing var myGrid: GFGrid lets you use any sort of grid you desire and always picks the right implementation of the function. So the following code will always return the appropriate vector for any grid type:var myGrid: GFGrid;var myVec: Vector3 = myGrid.NearestVertexW(transform.position);Please see the scripting reference sections for detailed information on the API.

implements

GFRectGrid

layered

GFHexGrid

GFPolarGrid

GFLayeredGrid

functions

Vector3

Co-ordinate

WorldToGrid (worldPoint)

GridToWorld (gridPoint)

Nearest

return

WorldPos

NearestVertexW (worldPoint)

NearestFaceW (worldPoint)

NearestBoxW (worldPoint)

GridPos

NearestVertexG (worldPoint)

NearestFaceG (worldPoint)

NearestBoxG (worldPoint)

Other

Void

Render

members

enum

GridPlane

boolean

relativeSize

Set this to true if you want the drawing to have relative size, i.e. to scale with the spacing/radius or whatever the specific grid uses. Otherwise set it to false.

useCustomRenderRange

renderLineWidth

Vector3

size

r

Defines the size of the drawing and rendering of the grid. Keep in mind that the grid is infinitely large, the drawing is just a visual representation, stretching on all three directions from the origin. The size is either absolute or relative to the grid's other parameters, depending on the value of relativeSize. If you set useCustomRenderRange to true that range will override this size.

renderFrom

renderTo

Unity

Data Source

Textures

Advanced

Set to Read/Write

No compression

RGB16

Not RGBA16

Alpha channel compressed???

Color Threshold

Green

2

G=253 to G=255 okay