|
Omnidome
Fulldome Mapping Software Toolkit
|
A warp grid is a 2D bezier grid with MxN points Default size 6x6 points. Selected points are also stored: More...
#include <WarpGrid.h>

Public Types | |
| enum | Interpolation { Interpolation::BICUBIC, Interpolation::LINEAR } |
Public Member Functions | |
| WarpGrid () | |
| Default constructor. More... | |
| void | reset () |
| Resets all points to form a regular grid. More... | |
| void | resize (int _horz, int _vert) |
| Resize grid with given horizontal and vertical resolution. More... | |
| int | vertical () const |
| Return vertical resolution. More... | |
| int | horizontal () const |
| Return horizontal resolution. More... | |
| Interpolation | interpolation () const |
| Return interpolation type (BICUBIC is default) More... | |
| void | setInterpolation (Interpolation) |
| Interpolation value. More... | |
| bool | isReset () const |
| Returns true if all warp points are in regular position. More... | |
| bool | hasChanged () const |
| Return true if warp grid has changed. More... | |
| void | selectAll () |
| Select all points. More... | |
| WarpPoint * | selectNearest (const QPointF &_p) |
| Select nearest point, does not clear selection, returns pointer to. More... | |
| void | selectNone () |
| Clear selection. More... | |
| std::set< WarpPoint * > | getSelected () |
| Returns pointer set of selected points. More... | |
| std::set< WarpPoint const * > | getSelected () const |
| Returns pointer set of selected points (const version) More... | |
| WarpPoint * | getPoint (int x, int y) |
| Get point with x and y index. More... | |
| WarpPoint const * | getPoint (int x, int y) const |
| Get point with x and y index (const version) More... | |
| QVector2D | getWarpPointPos (int x, int y) const |
| Return position of warp point. More... | |
| QVector2D | getWarpPointPos (int x, int y, float u, float v) const |
| Return interpolated position of warp point x, y. More... | |
| QVector2D | getTexCoord (int _x, int _y) const |
| Return texture coordinate on x,y index. More... | |
| std::vector< WarpPoint > const & | points () const |
| Return const reference to warp points. More... | |
Private Types | |
| typedef std::array< QVector2D, 4 > | array4_type |
Private Member Functions | |
| size_t | getNearest (const QPointF &_p) const |
| Return index to nearest point. More... | |
| QVector2D | cubicInterpolate (const array4_type &_points, float t) const |
| Interpolate four points. More... | |
Private Attributes | |
| int | horizontal_ = 4 |
| int | vertical_ = 4 |
| bool | hasChanged_ = true |
| Interpolation | interpolation_ = Interpolation::BICUBIC |
| std::vector< WarpPoint > | points_ |
Friends | |
| bool | operator== (WarpGrid const &, WarpGrid const &) |
| Test for equality (is equal if all warp points are equal. More... | |
A warp grid is a 2D bezier grid with MxN points Default size 6x6 points. Selected points are also stored:
|
private |
|
strong |
| omni::WarpGrid::WarpGrid | ( | ) |
Default constructor.
|
private |
|
private |
Return index to nearest point.
| WarpPoint * omni::WarpGrid::getPoint | ( | int | x, |
| int | y | ||
| ) |
Get point with x and y index.
| WarpPoint const * omni::WarpGrid::getPoint | ( | int | x, |
| int | y | ||
| ) | const |
Get point with x and y index (const version)
| std::set< WarpPoint * > omni::WarpGrid::getSelected | ( | ) |
Returns pointer set of selected points.
| std::set< WarpPoint const * > omni::WarpGrid::getSelected | ( | ) | const |
Returns pointer set of selected points (const version)
| QVector2D omni::WarpGrid::getTexCoord | ( | int | _x, |
| int | _y | ||
| ) | const |
Return texture coordinate on x,y index.
| QVector2D omni::WarpGrid::getWarpPointPos | ( | int | x, |
| int | y | ||
| ) | const |
Return position of warp point.
| QVector2D omni::WarpGrid::getWarpPointPos | ( | int | x, |
| int | y, | ||
| float | u, | ||
| float | v | ||
| ) | const |
Return interpolated position of warp point x, y.
| bool omni::WarpGrid::hasChanged | ( | ) | const |
Return true if warp grid has changed.
| int omni::WarpGrid::horizontal | ( | ) | const |
Return horizontal resolution.
| WarpGrid::Interpolation omni::WarpGrid::interpolation | ( | ) | const |
Return interpolation type (BICUBIC is default)
| bool omni::WarpGrid::isReset | ( | ) | const |
Returns true if all warp points are in regular position.
| std::vector< WarpPoint > const & omni::WarpGrid::points | ( | ) | const |
Return const reference to warp points.
| void omni::WarpGrid::reset | ( | ) |
Resets all points to form a regular grid.
| void omni::WarpGrid::resize | ( | int | _horz, |
| int | _vert | ||
| ) |
Resize grid with given horizontal and vertical resolution.
| void omni::WarpGrid::selectAll | ( | ) |
Select all points.
| WarpPoint * omni::WarpGrid::selectNearest | ( | const QPointF & | _p | ) |
Select nearest point, does not clear selection, returns pointer to.
| void omni::WarpGrid::selectNone | ( | ) |
Clear selection.
| void omni::WarpGrid::setInterpolation | ( | Interpolation | _interpolation | ) |
Interpolation value.
| int omni::WarpGrid::vertical | ( | ) | const |
Return vertical resolution.
Test for equality (is equal if all warp points are equal.
|
private |
|
private |
|
private |
|
private |
|
private |
1.8.6