0.45.0
![]() |
#include <iView.h>
Friends | |
class | iWindow |
class | iWidgetViewport |
represents a view rectangle within a window and projection of the scene
similar to what the combination of glViewport and glFrustum do
igor::iView::iView | ( | ) |
init
|
virtual |
does nothing
float64 igor::iView::getAspectRatio | ( | ) | const |
const iEntityPtr igor::iView::getCamera | ( | ) | const |
either the scene's active camera or the override camera if set
const iaColor4f & igor::iView::getClearColor | ( | ) | const |
float32 igor::iView::getClearDepth | ( | ) | const |
const iaString & igor::iView::getName | ( | ) | const |
iPreRenderEvent & igor::iView::getPreRenderEvent | ( | ) |
iRenderEvent & igor::iView::getRenderEvent | ( | ) |
const iEntitySceneID & igor::iView::getSceneID | ( | ) | const |
const iaRectanglei & igor::iView::getViewport | ( | ) | const |
int32 igor::iView::getZIndex | ( | ) | const |
bool igor::iView::isBoundingBoxVisible | ( | ) | const |
bool igor::iView::isClearColorActive | ( | ) | const |
bool igor::iView::isClearDepthActive | ( | ) | const |
bool igor::iView::isEmbedded | ( | ) |
bool igor::iView::isOctreeVisible | ( | ) | const |
bool igor::iView::isPerspective | ( | ) | const |
else it must be a orthogonal projection
bool igor::iView::isUpdatingViewport | ( | ) | const |
bool igor::iView::isVisible | ( | ) | const |
bool igor::iView::isWireframeVisible | ( | ) | const |
void igor::iView::pickEntityID | ( | const iaRectanglei & | rectangle, |
std::vector< iEntityID > & | entityIDs | ||
) |
renders view in offscreen buffer using the colorID material and returns the color IDs from given rectangle
iEntityID igor::iView::pickEntityID | ( | const iaVector2i & | pos | ) |
same as pickEntityID but with different parameters
pos | the position to pick a color from |
renders view in an offscreen buffer using the colorID material and returns the color id at given point.
Top left is origin.
posx | horizontal position of point in pixel |
posy | vertical position of point in pixel |
iaVector3d igor::iView::project | ( | const iaVector3d & | worldSpacePos | ) |
project world position to screen coordinates
worldSpacePos | the position in world space to project |
iaVector3d igor::iView::project | ( | const iaVector3d & | worldSpacePos, |
const iaMatrixd & | cameraMatrix | ||
) |
project world position to screen coordinates
worldSpacePos | the position in world space to project |
cameraMatrix | the camera matrix |
void igor::iView::setBoundingBoxVisible | ( | bool | boundingBox = true | ) |
defines if bounding boxes are shown or not
boundingBox | if true bounding boxes are shown |
void igor::iView::setClearColor | ( | const iaColor4f & | color | ) |
specifies the the color the color buffer will be cleared with
color | the clear color |
specifies the the color the color buffer will be cleared with
r | red channel of clear color |
g | green channel of clear color |
b | blue channel of clear color |
a | alpha channel of clear color |
void igor::iView::setClearColorActive | ( | bool | active | ) |
sets the clear color bit.
active | true: color buffer will be cleared every frame; false: it will not |
void igor::iView::setClearDepth | ( | float32 | depth | ) |
sets the clear depth value
depth | the clear depth value |
void igor::iView::setClearDepthActive | ( | bool | active | ) |
sets the clear buffer bit.
active | true: depth buffer will be cleared every frame; false: it will not |
defines the near and far clipping planes
nearPlain | near clipping plane |
farPlain | far clipping plane |
void igor::iView::setName | ( | const iaString & | name | ) |
sets name of view
name | name of the view |
void igor::iView::setOctreeVisible | ( | bool | octree = true | ) |
defines if octree is shown or not
octree | if true octree is shown |
activates othogonal projection mode
left | left value of orthogonal projection |
right | right value of orthogonal projection |
bottom | bottom value of orthogonal projection |
top | top value of orthogonal projection |
void igor::iView::setOverrideCamera | ( | iEntityPtr | camera | ) |
specifies a camera to override the active cam of the scene
camera is allowed to not be from the same scene as the view scene
camera | camera entity to use |
void igor::iView::setPerspective | ( | float32 | viewAngel | ) |
activates perspective mode and sets the view_angle
viewAngel | values in degrees 0 < viewAngel < 180 |
void igor::iView::setScene | ( | const iEntitySceneID & | entitySceneID | ) |
sets the entity scene to render with this view
entitySceneID | entity scene ID to render |
void igor::iView::setScene | ( | iEntityScenePtr | entityScene | ) |
sets the entity scene to render with this view
entityScene | entity scene to render |
void igor::iView::setUpdateViewport | ( | bool | enabled | ) |
sets if the viewport will be updated during draw call
enabled | if true viewport will be updated before drawing (enabled is default) |
void igor::iView::setViewportRelative | ( | iaRectanglef | rect | ) |
sets the view port within a window.
values have to be from 0.0 to 1.0 and represent a resolution independent unit.
TODO need a pixel version of this
rect | rectangle with view port boundings using relative values 0.0 - 1.0 |
void igor::iView::setVisible | ( | bool | visible = true | ) |
sets view visible
visible | the visible flag |
void igor::iView::setWireframeVisible | ( | bool | wireframe = true | ) |
shows all rendering in wireframe mode or normal mode
wireframe | if true all rendering is using wireframe |
iaVector3d igor::iView::unProject | ( | const iaVector3d & | screenpos | ) |
unprojects screen position to object space
screenpos | screen position in pixels (vertical origin is at top of window) |
iaVector3d igor::iView::unProject | ( | const iaVector3d & | screenpos, |
const iaMatrixd & | cameraMatrix | ||
) |
unprojects screen position to object space
screenpos | screen position in pixels (vertical origin is at top of window) |
cameraMatrix | the camera matrix to create the model view matrix from |
iaVector3d igor::iView::unProject | ( | const iaVector3d & | screenpos, |
iEntityPtr | camera | ||
) |
|
friend |
|
friend |