voxel Class Reference

file : ../lugre/lua/lib.voxel.lua (this is just a pseudo class used for grouping global functions) More...

List of all members.

Static Public Member Functions

static mixed VoxelMeshCalcTriIntersectList (mixed ltri, mixed x, mixed y, mixed z, mixed dx, mixed dy, mixed dz)
static mixed VoxelMeshKeyToPos (mixed key)
static mixed VoxelMeshKey (mixed x, mixed y, mixed z)
static mixed VoxelMeshFromTo (mixed grid, mixed minx, mixed miny, mixed minz, mixed maxx, mixed maxy, mixed maxz, mixed cx, mixed cy, mixed cz, mixed ax, mixed ay, mixed az, mixed bx, mixed by, mixed bz, mixed steps)
 dont call this directly
static mixed VoxelMeshCalcRay (mixed ltri, mixed grid, mixed minx, mixed miny, mixed minz, mixed maxx, mixed maxy, mixed maxz, mixed cx, mixed cy, mixed cz, mixed x, mixed y, mixed z, mixed dx, mixed dy, mixed dz, mixed steps)
static mixed VoxelMesh (mixed meshname, mixed cx, mixed cy, mixed cz)
static mixed CalcVoxelGrid (mixed gfx, mixed cx, mixed cy, mixed cz, mixed gridsize)
static mixed ForEachVoxel (mixed voxelgrid, mixed fun)
static mixed TransformVoxelGrid (mixed voxelgrid, mixed px, mixed py, mixed pz, mixed qw, mixed qx, mixed qy, mixed qz, mixed sx, mixed sy, mixed sz, mixed gridsize)
static mixed VoxelGridIntersection (mixed voxelgrid1, mixed voxelgrid2)
 compares two voxel grids and returns true if they intersect
static mixed DrawVoxelGrid (mixed voxelgrid, mixed parentgfx, mixed gridsize)
 creates and returns returns array of (green) billboard gfx for every voxel "inside"
static mixed GfxVoxelLine (mixed gfx, mixed gridsize, mixed numcells, mixed rx, mixed ry, mixed rz, mixed rvx, mixed rvy, mixed rvz)


Detailed Description

file : ../lugre/lua/lib.voxel.lua (this is just a pseudo class used for grouping global functions)

Definition at line 5859 of file lua_pseudo_code.cpp.


Member Function Documentation

static mixed voxel::VoxelMeshCalcTriIntersectList ( mixed  ltri,
mixed  x,
mixed  y,
mixed  z,
mixed  dx,
mixed  dy,
mixed  dz 
) [inline, static]

simple mesh voxel stuff collects a list of intersections with the given triangles ltri and the ray from x,y,z with direction dx,dy,dz return list element: {tri = {ax,ay,az, bx,by,bz, cx,cy,cz}, dist = dist} ordered by distance from smallest to greatest

Definition at line 5865 of file lua_pseudo_code.cpp.

static mixed voxel::VoxelMeshKeyToPos ( mixed  key  )  [inline, static]

Definition at line 5867 of file lua_pseudo_code.cpp.

static mixed voxel::VoxelMeshKey ( mixed  x,
mixed  y,
mixed  z 
) [inline, static]

Definition at line 5869 of file lua_pseudo_code.cpp.

static mixed voxel::VoxelMeshFromTo ( mixed  grid,
mixed  minx,
mixed  miny,
mixed  minz,
mixed  maxx,
mixed  maxy,
mixed  maxz,
mixed  cx,
mixed  cy,
mixed  cz,
mixed  ax,
mixed  ay,
mixed  az,
mixed  bx,
mixed  by,
mixed  bz,
mixed  steps 
) [inline, static]

dont call this directly

Definition at line 5872 of file lua_pseudo_code.cpp.

static mixed voxel::VoxelMeshCalcRay ( mixed  ltri,
mixed  grid,
mixed  minx,
mixed  miny,
mixed  minz,
mixed  maxx,
mixed  maxy,
mixed  maxz,
mixed  cx,
mixed  cy,
mixed  cz,
mixed  x,
mixed  y,
mixed  z,
mixed  dx,
mixed  dy,
mixed  dz,
mixed  steps 
) [inline, static]

voxels along a given ray dont call this directly

Definition at line 5876 of file lua_pseudo_code.cpp.

static mixed voxel::VoxelMesh ( mixed  meshname,
mixed  cx,
mixed  cy,
mixed  cz 
) [inline, static]

voxels a mesh, cx,cy,cz is the voxel grid size each mesh part must be closed

Definition at line 5880 of file lua_pseudo_code.cpp.

static mixed voxel::CalcVoxelGrid ( mixed  gfx,
mixed  cx,
mixed  cy,
mixed  cz,
mixed  gridsize 
) [inline, static]

obsolete, or at least unused voxel-like mesh analysis, used for collision/interesection detection in shipeditor fine grids generated from raw geometry superseeded by shipvoxelgrid.lua TODO : 2d voxel : 1,3, 1,5, 3,1, 3,7, 5,1, 5,7, 7,3, 7,5, *e , e=1/8 -- a circle of points that is not hit by lines on a 1/2 grid returns 3 dimensional array, zero based, [xi][yi][zi] = 0 means outside, = 1 means inside gfx must start at 0,0,0 and not go into negative coords WARNING ! only works on simple (convex) forms

Definition at line 5890 of file lua_pseudo_code.cpp.

static mixed voxel::ForEachVoxel ( mixed  voxelgrid,
mixed  fun 
) [inline, static]

calls fun(voxelstate,x,y,z) with every voxel the process is aborted and returns the first value of what fun returns if it is something other than nil

Definition at line 5894 of file lua_pseudo_code.cpp.

static mixed voxel::TransformVoxelGrid ( mixed  voxelgrid,
mixed  px,
mixed  py,
mixed  pz,
mixed  qw,
mixed  qx,
mixed  qy,
mixed  qz,
mixed  sx,
mixed  sy,
mixed  sz,
mixed  gridsize 
) [inline, static]

returns a new voxel grid sx,sy,sz should be integers (e.g. mirrors, or scale by two) qw,qx,qy,qz should be an orthogonal rotation (e.g. 90 degrees to the right,...)

Definition at line 5899 of file lua_pseudo_code.cpp.

static mixed voxel::VoxelGridIntersection ( mixed  voxelgrid1,
mixed  voxelgrid2 
) [inline, static]

compares two voxel grids and returns true if they intersect

Definition at line 5902 of file lua_pseudo_code.cpp.

static mixed voxel::DrawVoxelGrid ( mixed  voxelgrid,
mixed  parentgfx,
mixed  gridsize 
) [inline, static]

creates and returns returns array of (green) billboard gfx for every voxel "inside"

Definition at line 5905 of file lua_pseudo_code.cpp.

static mixed voxel::GfxVoxelLine ( mixed  gfx,
mixed  gridsize,
mixed  numcells,
mixed  rx,
mixed  ry,
mixed  rz,
mixed  rvx,
mixed  rvy,
mixed  rvz 
) [inline, static]

ray must be padded with gridsize at the start and at the end to avoid rounding errors returns voxel-cells along ray, arr[zi] (where 0 <= zi < numcells) (2 means border, 0 means outside, 1 means inside)

Definition at line 5909 of file lua_pseudo_code.cpp.


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

Generated on Fri Mar 29 05:41:10 2013 for lua by  doxygen 1.5.6