#include <DrawMgr.H>
Static Public Member Functions | |
static void | registerObj (DrawObjRef o, int drawingPass=0) |
static void | register2DObj (DrawObjRef o, int drawingPass=0) |
Add a 2D DrawObj to the manager. | |
static void | registerShadowModel (G3D::PosedModelRef m) |
static void | registerShadowModels (Array< PosedModelRef > models) |
static bool | removeObj (DrawObjRef o, int drawingPass=0) |
Remove a 3D DrawObj from the manager. | |
static bool | remove2DObj (DrawObjRef o, int drawingPass=0) |
Remove a 2D DrawObj from the manager. | |
static bool | removeShadowModel (G3D::PosedModelRef m) |
Remove shadow obj. | |
static void | clearShadowModels () |
static bool | useShadows () |
static void | contextInit () |
static void | drawFrame () |
Called by the ISVREngine to draw the frame. | |
static void | drawThisObject (DrawObjRef d) |
static void | contextInitThisObject (DrawObjRef d) |
static int | getNumDrawObjects (int drawingPass=0) |
static DrawObjRef | getDrawObject (int objNum, int drawingPass=0) |
static int | getNum2DDrawObjects (int drawingPass=0) |
static DrawObjRef | get2DDrawObject (int objNum, int drawingPass=0) |
static void | setShowFPS (bool b) |
static void | setShowPolygonCount (bool b) |
static void | drawFullscreenTexture (TextureRef t, float xmin, float ymin, float xmax, float ymax) |
Fast draw of a texture that takes up the whole screen. | |
static void | drawBackground () |
background texture stuff | |
static void | drawShadows () |
static void | setBackgroundTexture (TextureRef t) |
static void | setBackgroundRepeat (float r) |
static void | setBackgroundOffsetX (float o) |
static void | setBackgroundOffsetY (float o) |
static TextureRef | getBackgroundTexture () |
static float | getBackgroundRepeat () |
static float | getBackgroundOffgetX () |
static float | getBackgroundOffsetY () |
static void | pushAndPostMultiplyObjectToWorld (CoordinateFrame postMultFrame) |
static void | pushAndReplaceObjectToWorld (CoordinateFrame newObjToWorld) |
static CoordinateFrame | popObjectToWorld () |
static CoordinateFrame | getRoomToVirtualSpaceFrame () |
static double | getRoomToVirtualSpaceScale () |
static void | setRoomToVirtualSpaceFrame (const CoordinateFrame &roomToVirtual) |
static void | setRoomToVirtualSpaceScale (const double scale) |
static Vector3 | roomPointToVirtualSpace (const Vector3 &v) |
static Vector3 | roomVectorToVirtualSpace (const Vector3 &v) |
static Vector3 | roomNormalToVirtualSpace (const Vector3 &v) |
static Vector3 | virtualPointToRoomSpace (const Vector3 &v) |
static Vector3 | virtualVectorToRoomSpace (const Vector3 &v) |
static Vector3 | virtualNormalToRoomSpace (const Vector3 &v) |
static Ray | roomToVirtualSpace (const Ray &r) |
static Ray | virtualToRoomSpace (const Ray &r) |
static CoordinateFrame | roomToVirtualSpace (const CoordinateFrame &c) |
static Vector2 | screenPointToG3DCoords (const Vector2 &screenPt) |
static Vector2 | roomSpacePointToScreenPoint (const Vector3 &roomPt) |
static Vector3 | screenPointToRoomSpacePoint (const Vector2 &v, bool &hitGeometry) |
static Vector3 | screenPointToRoomSpaceXYPlane (const Vector2 &v) |
static Vector3 | screenPointToRoomSpaceZEqualsPlane (const Vector2 &v, double z) |
static Vector3 | screenPointToRoomSpaceFilmplane (const Vector2 &v) |
static Plane | getFilmplane () |
static void IS3D::DrawMgr::registerObj | ( | DrawObjRef | o, | |
int | drawingPass = 0 | |||
) | [static] |
Add a 3D DrawObj to the manager, once it is added its draw() method will get called each frame.
static void IS3D::DrawMgr::register2DObj | ( | DrawObjRef | o, | |
int | drawingPass = 0 | |||
) | [static] |
Add a 2D DrawObj to the manager.
static void IS3D::DrawMgr::registerShadowModel | ( | G3D::PosedModelRef | m | ) | [static] |
static void IS3D::DrawMgr::registerShadowModels | ( | Array< PosedModelRef > | models | ) | [static] |
static bool IS3D::DrawMgr::removeObj | ( | DrawObjRef | o, | |
int | drawingPass = 0 | |||
) | [static] |
Remove a 3D DrawObj from the manager.
static bool IS3D::DrawMgr::remove2DObj | ( | DrawObjRef | o, | |
int | drawingPass = 0 | |||
) | [static] |
Remove a 2D DrawObj from the manager.
static bool IS3D::DrawMgr::removeShadowModel | ( | G3D::PosedModelRef | m | ) | [static] |
Remove shadow obj.
static void IS3D::DrawMgr::clearShadowModels | ( | ) | [static] |
static bool IS3D::DrawMgr::useShadows | ( | ) | [static] |
static void IS3D::DrawMgr::contextInit | ( | ) | [static] |
Called by the ISVREngine before the first frame is drawn but after the OpenGL context(s) are active
static void IS3D::DrawMgr::drawFrame | ( | ) | [static] |
static void IS3D::DrawMgr::drawThisObject | ( | DrawObjRef | d | ) | [static] |
Wrapper around drawing an object. Checks visibility of the object, whether contextInit has been called on it, etc.. before calling the object's draw() method. Intended only for use within this class, But, can be used if your DrawObj wants to manage its own collection of "sub-DrawObjects".
static void IS3D::DrawMgr::contextInitThisObject | ( | DrawObjRef | d | ) | [static] |
Wrapper around calling contextInit on a DrawObj. Sets the object's contextInitialized flag to true.
static int IS3D::DrawMgr::getNumDrawObjects | ( | int | drawingPass = 0 |
) | [static] |
static DrawObjRef IS3D::DrawMgr::getDrawObject | ( | int | objNum, | |
int | drawingPass = 0 | |||
) | [static] |
static int IS3D::DrawMgr::getNum2DDrawObjects | ( | int | drawingPass = 0 |
) | [static] |
static DrawObjRef IS3D::DrawMgr::get2DDrawObject | ( | int | objNum, | |
int | drawingPass = 0 | |||
) | [static] |
static void IS3D::DrawMgr::setShowFPS | ( | bool | b | ) | [inline, static] |
controls whether the current framerate is displayed at the top left of the screen.
static void IS3D::DrawMgr::setShowPolygonCount | ( | bool | b | ) | [inline, static] |
static void IS3D::DrawMgr::drawFullscreenTexture | ( | TextureRef | t, | |
float | xmin, | |||
float | ymin, | |||
float | xmax, | |||
float | ymax | |||
) | [static] |
Fast draw of a texture that takes up the whole screen.
static void IS3D::DrawMgr::drawBackground | ( | ) | [static] |
background texture stuff
static void IS3D::DrawMgr::drawShadows | ( | ) | [static] |
static void IS3D::DrawMgr::setBackgroundTexture | ( | TextureRef | t | ) | [inline, static] |
static void IS3D::DrawMgr::setBackgroundRepeat | ( | float | r | ) | [inline, static] |
static void IS3D::DrawMgr::setBackgroundOffsetX | ( | float | o | ) | [inline, static] |
static void IS3D::DrawMgr::setBackgroundOffsetY | ( | float | o | ) | [inline, static] |
static TextureRef IS3D::DrawMgr::getBackgroundTexture | ( | ) | [inline, static] |
static float IS3D::DrawMgr::getBackgroundRepeat | ( | ) | [inline, static] |
static float IS3D::DrawMgr::getBackgroundOffgetX | ( | ) | [inline, static] |
static float IS3D::DrawMgr::getBackgroundOffsetY | ( | ) | [inline, static] |
static void IS3D::DrawMgr::pushAndPostMultiplyObjectToWorld | ( | CoordinateFrame | postMultFrame | ) | [static] |
static void IS3D::DrawMgr::pushAndReplaceObjectToWorld | ( | CoordinateFrame | newObjToWorld | ) | [static] |
static CoordinateFrame IS3D::DrawMgr::popObjectToWorld | ( | ) | [static] |
static CoordinateFrame IS3D::DrawMgr::getRoomToVirtualSpaceFrame | ( | ) | [static] |
This is the transformation between RoomSpace and VirtualSpace. Initially, the two spaces are the same. As the user navigates around VirtualSpace changes, but RoomSpace stays fixed to the physical Cave, monitor, screen, trackers, etc.. This transformation is composed of two parts: 1. a uniform scale factor, 2. a rigid-body CoordinateFrame transformation.
static double IS3D::DrawMgr::getRoomToVirtualSpaceScale | ( | ) | [static] |
static void IS3D::DrawMgr::setRoomToVirtualSpaceFrame | ( | const CoordinateFrame & | roomToVirtual | ) | [static] |
Sets the rigid-body CoordinateFrame transformation between the Room and Virtual spaces.
static void IS3D::DrawMgr::setRoomToVirtualSpaceScale | ( | const double | scale | ) | [static] |
Sets the uniform scale factor between tne Room and Virtual spaces. Increasing the RoomToVirtualSpaceScale has the effect of shrinking the virtual space w.r.t the Room - zooming out.
static Vector3 IS3D::DrawMgr::roomPointToVirtualSpace | ( | const Vector3 & | v | ) | [static] |
Use these to convert from RoomSpace to VirtualSpace, applies a CoordinateFrame transformation as well as a scale.
static Vector3 IS3D::DrawMgr::roomVectorToVirtualSpace | ( | const Vector3 & | v | ) | [static] |
static Vector3 IS3D::DrawMgr::roomNormalToVirtualSpace | ( | const Vector3 & | v | ) | [static] |
static Vector3 IS3D::DrawMgr::virtualPointToRoomSpace | ( | const Vector3 & | v | ) | [static] |
Use these to convert from VirtualSpace to RoomSpace, applies a CoordinateFrame transformation as well as a scale.
static Vector3 IS3D::DrawMgr::virtualVectorToRoomSpace | ( | const Vector3 & | v | ) | [static] |
static Vector3 IS3D::DrawMgr::virtualNormalToRoomSpace | ( | const Vector3 & | v | ) | [static] |
static Ray IS3D::DrawMgr::roomToVirtualSpace | ( | const Ray & | r | ) | [static] |
static Ray IS3D::DrawMgr::virtualToRoomSpace | ( | const Ray & | r | ) | [static] |
static CoordinateFrame IS3D::DrawMgr::roomToVirtualSpace | ( | const CoordinateFrame & | c | ) | [static] |
static Vector2 IS3D::DrawMgr::screenPointToG3DCoords | ( | const Vector2 & | screenPt | ) | [static] |
Converts IS3D's screen space coordinates into G3D's coordinates, which are in pixels rather than floating point.
static Vector2 IS3D::DrawMgr::roomSpacePointToScreenPoint | ( | const Vector3 & | roomPt | ) | [static] |
Projects a Room space point onto the filmplane, then returns it in Screen coordinates.
static Vector3 IS3D::DrawMgr::screenPointToRoomSpacePoint | ( | const Vector2 & | v, | |
bool & | hitGeometry | |||
) | [static] |
This converts a screenspace point, like the coordinates of the mouse to a 3D point by reading back the current Z-buffer to find the first piece of geometry that is intersected by the point on the screen. If there is no geometry at the location then the point returned will lie roughly on the far clipping plane and hitGeometry will be set to false.
static Vector3 IS3D::DrawMgr::screenPointToRoomSpaceXYPlane | ( | const Vector2 & | v | ) | [static] |
This converts a screenspace point, like the coordinates of the mouse to a 3D point that lies in the RoomSpace XY plane (Z=0).
static Vector3 IS3D::DrawMgr::screenPointToRoomSpaceZEqualsPlane | ( | const Vector2 & | v, | |
double | z | |||
) | [static] |
This converts a screenspace point, like the coordinates of the mouse to a 3D point that lies in the RoomSpace plane Z=z.
static Vector3 IS3D::DrawMgr::screenPointToRoomSpaceFilmplane | ( | const Vector2 & | v | ) | [static] |
This converts a screenspace point, like the coordinates of the mouse to a 3D point that lies in IS3DEngine's current notion of where the filmplane is in RoomSpace. By the way, the filmplane location and size will only change if you resize the rendering window.
static Plane IS3D::DrawMgr::getFilmplane | ( | ) | [static] |
The filmplane, in projected VR, the same as the plane of the screen. Returned in RoomSpace coordinates.