A list of shading styles for rendering scene objects in OpenGL. These coincide with the ShadeStyle types in DzDrawStyle, and are provided here for scriptability.
Dz3DViewport::activeCameraChanged | ( | DzCamera | cam | ) | [signal] |
Signature: "activeCameraChanged(DzCamera*)"
Transmitted when a new active camera has been changed for this viewport.
cam | The new camera for this viewport. |
void Dz3DViewport::aimCamera | ( | ) |
Aim the viewport's camera at the primary selection in the scene. If the scene does not have a primary selection this function does nothing.
Dz3DViewport::aspectOnChanged | ( | Boolean | onOff | ) | [signal] |
Signature: "aspectOnChanged(bool)"
Emitted when the draw state for the aspect frame changes
onOff | The new state of the aspect frame on property. |
Dz3DViewport::axesOnChanged | ( | Boolean | onOff | ) | [signal] |
Signature: "axesOnChanged(bool)"
Emitted when the draw state for the origin axes changes
onOff | The new state of the axes on property. |
Dz3DViewport::backgroundColorChanged | ( | Color | color | ) | [signal] |
Signature: "backgroundColorChanged(const QColor&)"
Emitted when the background color of the viewport changes
color | The new background color. |
QImage Dz3DViewport::captureImage | ( | ) |
Captures the current contents from the OpenGL frame buffer as an image.
// Get the image manager var oImgMgr = App.getImageMgr(); // If there is a main window if( MainWindow ){ // Get the active viewport var oViewportMgr = MainWindow.getViewportMgr(); var oViewport = oViewportMgr.getActiveViewport().get3DViewport(); // Capture the contents of the active viewport var oImg = oViewport.captureImage(); // Save the image to a file oImgMgr.saveImage( String( "%1/viewport.png" ).arg( App.getDocumentsPath() ) , oImg ); }
Signature: "contextMenuAboutToShow(DzMenu*,QPoint)"
Emitted when the viewport is about to display a context menu. Other objects can connect to this signal to add custom items to the menu that is displayed to the user. Only connect to this signal if you only want to affect this particular viewport - otherwise connect to DzViewportMgr::contextMenuAboutToShow().
menu | The menu that will be displayed | |
pos | The position in the viewport where the context menu was triggered. |
Dz3DViewport::drawStyleChanged | ( | DzDrawStyle | style | ) | [signal] |
Signature: "drawStyleChanged(DzDrawStyle*)"
Transmitted when the draw style of the viewport has changed.
style | The new draw style of the viewport. |
void Dz3DViewport::floorStyleChanged | ( | FloorStyle | style | ) | [signal] |
Signature: "floorStyleChanged(FloorStyle)"
Emitted when the floor style of the viewport changes
style | The new floor style for the viewport. |
void Dz3DViewport::frameCamera | ( | ) |
Frame the viewport's camera at the primary selection in the scene. If the scene does not have a primary selection this function does nothing.
Rect Dz3DViewport::getAspectFrameRect | ( | ) |
DzCamera Dz3DViewport::getCamera | ( | ) |
// Get the active viewport var oViewportMgr = MainWindow.getViewportMgr(); var oViewport = oViewportMgr.getActiveViewport().get3DViewport(); // Get the active camera var oCamera = oViewport.getCamera(); // Reset the camera oCamera.reset();
DzViewport Dz3DViewport::getViewport | ( | ) |
Boolean Dz3DViewport::hardwareRender | ( | DzRenderHandler | handler | ) |
Performs a hardware assisted OpenGL render in this viewport with the given settings.
handler | The render handler for the rendering operation. |
Boolean Dz3DViewport::isHardwareRenderable | ( | ) |
Performs a gizmo picking operation through this viewport. View tools (see DzViewTool) can draw a 'gizmo' in the viewport for the user to interact with. The tool can assign different parts of the gizmo to specific indices, so as to tell what part of the gizmo was clicked by the user.
pnt | The point in the viewport to pick on. |
DzMaterial Dz3DViewport::pickOnMaterial | ( | Point | pnt | ) |
Performs a material picking operation on the scene through this viewport. This example shows the mousePress() implementation from a view tool (see DzViewTool) that sets the color of any material that the user clicks in the viewport.
pnt | The pixel coordinates of the point in the viewport to pick on. |
Performs a node picking operation on the scene through this viewport. View tools (see DzViewTool) will commonly use this function to determine what node (if any) that the user clicks on. This example shows the mousePress() implementation from a view tool that selects the node that the user clicks in the viewport.
pnt | The pixel coordinates of the point in the viewport to pick on. |
Boolean Dz3DViewport::renderThumbnail | ( | DzRenderHandler | handler | ) |
Performs a quick render of the scene suitable for a thumbnail image.
handler | The render handler for the rendering operation. |
void Dz3DViewport::resetCamera | ( | ) |
Reset the viewport's camera to its default state.
void Dz3DViewport::setCamera | ( | String | cam | ) |
Set the camera for the view. If a matching camera is not found, this function does nothing.
cam | The name (not label) of a view camera, or a scene camera. |
void Dz3DViewport::setCamera | ( | DzCamera | cam | ) |
Set the camera for the view. The pointer passed in must be a camera in the scene, or one of the view cameras from DzViewportMgr.
cam | The camera to use for viewing in the viewport. |
// Get the active viewport var oViewportMgr = MainWindow.getViewportMgr(); var oViewport = oViewportMgr.getActiveViewport().get3DViewport(); // Create a new camera var oCam = new DzBasicCamera( oCam.GENERAL_CAMERA ); oCam.setName( "Test Camera" ); // Add the camera to the scene Scene.addNode( oCam ); // Set the active viewport to view through the new camera oViewport.setCamera( oCam );
Dz3DViewport::toolBarDocked | ( | Boolean | onOff | ) | [signal] |
Signature: "toolBarDocked(bool)"
Emitted when the view tool bar is docked or undocked
onOff | true if the view tool bar is docked, false if it is undocked. |
void Dz3DViewport::viewChanged | ( | ) | [signal] |
Signature: "viewChanged()"
Transmitted when the area this viewport displays has changed.
This property determines whether or not the aspect frame is drawn in the viewport.
This property determines whether or not the origin axes are drawn in the viewport.
This property holds the background color of the viewport
This property determines whether or not the view tool bar is docked.
This property holds the style of the floor that is drawn in the viewport.
This property holds the shading style of the viewport.
This property determines whether or not the navigation bar is shown.
This property determines whether or not the viewport bar is shown.
This property controls the location of the view tool bar