Inherits DD::Image::BasicGrid.
Public Member Functions | |
GridCell & | cell (unsigned int x, unsigned int y, unsigned int z) |
GridCell & | cell (unsigned int index) |
void | rebuild (const std::vector< GeoInfo * > &objects, bool buildPoints) |
void | rebuild (const std::vector< DrawableGeo > &objects, bool buildPoints) |
void | rebuild (const GeometryList &objects, bool buildPoints) |
virtual bool | getCandidateGridCells (ViewerContext *ctx, const Box &selection, std::list< unsigned int > &candidates) |
bool | testRayIntersection (ViewerContext *ctx, Ray &ray, PrimitiveTestCache &primTested, std::vector< bool > &tested, CollisionResult *collisionInfo=NULL) |
bool | testRayIntersection (ViewerContext *ctx, Ray &ray, PrimitiveTestCache &primTested, CollisionResult *collisionInfo=NULL) |
bool | screenToWorldRayTest (ViewerContext *ctx, unsigned int screenX, unsigned int screenY, PrimitiveTestCache &primTested, CollisionResult *collisionInfo) |
virtual bool | processCell (ViewerContext *ctx, unsigned int cellIndex, const Ray &ray, std::vector< bool > &tested, PrimitiveTestCache &primTested) |
virtual Vector4 | cellColor (unsigned int index) const |
void | draw_wireframe (ViewerContext *vtx) const |
Static Public Member Functions | |
static void | getScreenToWorldRay (ViewerContext *ctx, unsigned int screenX, unsigned int screenY, Ray &ray) |
A Regular grid is used to perform ray intersection with an array of DrawableGeo. Multiple threads can query for ray intersection, all the ray test intersection methods are thread safe. Please note that the rebuild method is not thread safe and must be called before any ray intersection test.