OCCT-Light 0.1
C ABI and C++ veneer for multi-language CAD workflows
Loading...
Searching...
No Matches
occtl::viz::View Class Reference

RAII wrapper for a native or offscreen view. More...

#include <viz.hpp>

Public Member Functions

 View (Viewer &theViewer, const ViewOptions &theOptions=ViewOptions{})
 
 View (const View &)=delete
 
Viewoperator= (const View &)=delete
 
 View (View &&theOther) noexcept
 
Viewoperator= (View &&theOther) noexcept
 
void display (Presentable &thePresentable)
 Displays a presentable in this view.
 
void erase (Presentable &thePresentable)
 Erases a presentable from this view.
 
void resize (const int32_t theWidth, const int32_t theHeight)
 Resizes the view.
 
void redraw ()
 Redraws the view.
 
void fit_all ()
 Fits all displayed content into view.
 
void set_background (const ::occtl_color_rgba_t &theColor)
 Sets the view background colour.
 
void set_camera (const Camera &theCamera)
 Sets the camera.
 
Camera get_camera () const
 Returns the current camera.
 
void set_standard_view (const StandardView theView)
 Sets a standard camera orientation.
 
void pan (const int32_t theDx, const int32_t theDy)
 Pans the camera by screen-space pixels.
 
void zoom (const int32_t theX1, const int32_t theY1, const int32_t theX2, const int32_t theY2)
 Zooms using two screen-space points.
 
void orbit_start (const int32_t theX, const int32_t theY)
 Starts an orbit interaction at a screen point.
 
void orbit_update (const int32_t theX, const int32_t theY)
 Updates an orbit interaction at a screen point.
 
void activate_selection (Presentable &thePresentable, const SelectionMode theMode)
 Activates graph-native selection for a presentable.
 
void pick (const int32_t theX, const int32_t theY, const bool theSelect, PickResult &theResult)
 Picks or selects at a screen point and returns graph identity.
 
std::vector< std::uint8_t > read_pixels_rgba ()
 Reads view pixels as tightly packed RGBA bytes (two-call buffer pattern).
 
void dump_image (const std::string &thePath)
 Dumps a view image to a PNG path when OCCT image codecs are available.
 
::occtl_viz_view_tget () const noexcept
 

Detailed Description

RAII wrapper for a native or offscreen view.

A View borrows its parent Viewer and must not outlive it.


The documentation for this class was generated from the following file: