|
The Vish Visualization Shell 0.3
Vish
|
A data-driven description of a Brush to select points from a set of points, providing an list of indices. More...
#include <ocean/Anemonia/Brush.hpp>
Classes | |
| struct | Metric |
| For analytical shapes of a brush, allows to model spheres, ellipsoids, ellipses, cylinders... More... | |
Public Member Functions | |
| RefPtr< Eagle::BoundingBox > | computeBoundingBoxInScreenOverlaySpace () const |
| The shape of the brush extruded in depth, given in overlay coordinates on the screen. | |
| RefPtr< Eagle::BoundingBox > | computeBoundingBoxInWorldSpace () const |
| The bounding box of the brush as it appears in world coordinates which will naturally have larger volume than in screen space to encompass perspective effects. | |
| PointDataChunk | getBrushInWorldSpace (double screen_depth) const |
| Get the selection polygon in world space using the current view with screen depth between 0.0 (front cutoff of the view volume) and 1.0 (back cutoff of the view volume). | |
| RefPtr< Chunk< size_t > > | getSelection (const RefPtr< Chunk< Eagle::PhysicalSpace::point > > &WorldCoordinates, const std::function< bool(Eagle::PhysicalSpace::point)> &RegionOfInterest) const |
| The core function: Given a chunk of world coordinates, determine the indices of the points that are selected by this brush (the polygon coordinates and the projection in ScreenView ). | |
| operator bool () const | |
| Check whether this Brush is valid. | |
| bool | operator! () const |
| Check whether this Brush is invalid. | |
Static Public Member Functions | |
| static void | connectBrushAsInput (VObject *Owner, TypedSlot< Brush > &inBrush, const string &BrushCreatorName="Brush") |
| To automatically connect a Brush instance to a VObject that uses a brush, call this function in the constructor of the respective VObject. | |
Public Attributes | |
| PointDataChunk | PolygonOnScreen |
| Points of the brush outline in OverlayCoordinate. | |
A data-driven description of a Brush to select points from a set of points, providing an list of indices.
Call Brush::connectBrushAsInput() in a VObject using a Brush as input to automatically have it connect to an existing Brush instance or to create one if none exists yet.
| RefPtr< BoundingBox > Wizt::Brush::computeBoundingBoxInScreenOverlaySpace | ( | ) | const |
The shape of the brush extruded in depth, given in overlay coordinates on the screen.
Don't confuse with pointer coordinates on the screen, use OverlayToPointer() to convert into pointer coordinates.
References Wizt::View::CameraSettings, Eagle::norm(), Eagle::P0(), Eagle::P1(), PolygonOnScreen, and Wizt::VCamera::viewdir().
Referenced by computeBoundingBoxInWorldSpace().
|
static |
To automatically connect a Brush instance to a VObject that uses a brush, call this function in the constructor of the respective VObject.
If no Brush exists yet, it will be created.
This function utilites the VObject::addSetup() function to find a unique object that provides a Brush, and if found, attaches it as input, otherwise it creates a new object fitting the Brush, equivalent to the following code segment:
References Wizt::VConnectable::attach(), Wizt::VObject::attachNewObject(), and Wizt::VObject::findUniqueOutputObject().
| RefPtr< Chunk< size_t > > Wizt::Brush::getSelection | ( | const RefPtr< Chunk< Eagle::PhysicalSpace::point > > & | WorldCoordinates, |
| const std::function< bool(Eagle::PhysicalSpace::point)> & | RegionOfInterest | ||
| ) | const |
The core function: Given a chunk of world coordinates, determine the indices of the points that are selected by this brush (the polygon coordinates and the projection in ScreenView ).
An optional arbitrary function to constrain the region of interest may be specified additionally.
References PolygonOnScreen.