0.44.0
|
#include <iView.h>
Public Member Functions | |
iView ()=default | |
virtual | ~iView () |
void | setScene (iScenePtr scene) |
iScenePtr | getScene () |
void | setName (const iaString &name) |
const iaString & | getName () const |
float64 | getAspectRatio () const |
void | registerRenderDelegate (iDrawDelegate renderDelegate) |
void | unregisterRenderDelegate (iDrawDelegate renderDelegate) |
void | setViewportRelative (iaRectanglef rect) |
iaRectanglei | getViewport () const |
void | setPerspective (float32 viewAngel) |
void | setOrthogonal (float32 left, float32 right, float32 bottom, float32 top) |
void | setClipPlanes (float32 nearPlain, float32 farPlain) |
void | setClearColorActive (bool active) |
bool | isClearColorActive () const |
void | setUpdateViewport (bool enabled) |
bool | isUpdatingViewport () const |
void | setClearColor (const iaColor4f &color) |
void | setClearColor (float32 r, float32 g, float32 b, float32 a) |
const iaColor4f & | getClearColor () const |
void | setClearDepthActive (bool active) |
bool | isClearDepthActive () const |
void | setClearDepth (float32 depth) |
float32 | getClearDepth () const |
void | setVisible (bool visible=true) |
bool | isVisible () const |
void | setWireframeVisible (bool wireframe=true) |
bool | isWireframeVisible () const |
void | setBoundingBoxVisible (bool boundingBox=true) |
bool | isBoundingBoxVisible () const |
void | setOctreeVisible (bool octree=true) |
bool | isOctreeVisible () const |
void | setCamera (iNodeID cameraID) |
iNodeID | getCamera () const |
iaVector3d | unProject (const iaVector3d &screenpos, const iaMatrixd &modelMatrix) |
iaVector3d | project (const iaVector3d &worldSpacePos, const iaMatrixd &cameraMatrix) |
uint64 | pickColorID (uint32 posx, uint32 posy) |
uint64 | pickColorID (const iaVector2i &pos) |
void | pickColorID (const iaRectanglei &rectangle, std::vector< uint64 > &colorIDs) |
int32 | getZIndex () const |
bool | isPerspective () const |
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
|
default |
does nothing
|
virtual |
checks consistency
float64 igor::iView::getAspectRatio | ( | ) | const |
iNodeID igor::iView::getCamera | ( | ) | const |
const iaColor4f & igor::iView::getClearColor | ( | ) | const |
float32 igor::iView::getClearDepth | ( | ) | const |
const iaString & igor::iView::getName | ( | ) | const |
iScenePtr igor::iView::getScene | ( | ) |
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::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::pickColorID | ( | const iaRectanglei & | rectangle, |
std::vector< uint64 > & | colorIDs | ||
) |
renders view in offscreen buffer using the colorID material and returns the color IDs from given rectangle
uint64 igor::iView::pickColorID | ( | const iaVector2i & | pos | ) |
same as pickColorID 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, |
const iaMatrixd & | cameraMatrix | ||
) |
project world position to screen coordinates
worldSpacePos | the position in world space to project |
cameraMatrix | the camera matrix |
void igor::iView::registerRenderDelegate | ( | iDrawDelegate | renderDelegate | ) |
registers delegate to render event
renderDelegate | delegate to register |
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::setCamera | ( | iNodeID | cameraID | ) |
sets current camera by id
cameraID | the camery id |
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::setPerspective | ( | float32 | viewAngel | ) |
activates perspective mode and sets the view_angle
viewAngel | values in degrees 0 < viewAngel < 180 |
void igor::iView::setScene | ( | iScenePtr | scene | ) |
sets the scene to be rendered with this view
scene | scene to be rendered |
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, |
const iaMatrixd & | modelMatrix | ||
) |
unprojects screen position to object space
screenpos | screen position in pixels (vertical origin is at top of window) |
modelMatrix | the camera matrix to create the model view matrix from |
void igor::iView::unregisterRenderDelegate | ( | iDrawDelegate | renderDelegate | ) |
unregister delegate from render event
renderDelegate | delegate to unregister |
|
friend |
|
friend |