![]() |
Banuba SDK
|
Public Member Functions | |
| virtual std::shared_ptr< transformation > | chain_right (const std::shared_ptr< transformation > &t) const =0 |
| Applies transform t after this e.g. | |
| virtual point2d | transform_point (const point2d &p) const =0 |
| Apply transform to point. | |
| virtual pixel_rect | transform_rect (const pixel_rect &rect) const =0 |
| virtual bool | equals (const std::shared_ptr< transformation > &t) const =0 |
| virtual std::shared_ptr< transformation > | inverse_j () const =0 |
| Get the inverse of the transformation. | |
| virtual std::shared_ptr< transformation > | clone_j () const =0 |
| Clone the transformation. | |
| virtual std::vector< float > | get_mat_j () const =0 |
| Returns 3x3 row-maj transform matrix. | |
Static Public Member Functions | |
| static std::shared_ptr< transformation > | make_identity () |
| Constructs identity transform. | |
| static std::shared_ptr< transformation > | make_data (const std::vector< float > &mat) |
| Constructs from mat_t. | |
| static std::shared_ptr< transformation > | make_rot (rotation rot) |
| Constructs rotate transformation. | |
| static std::shared_ptr< transformation > | make_affine (float scale_x, float scale_y, float t_x, float t_y, rotation rot, bool flip_x, bool flip_y) |
| Constructs affine transformation. | |
| static std::shared_ptr< transformation > | make_rects (const pixel_rect &source_rect, const pixel_rect &target_rect, rotation rot, bool flip_x, bool flip_y) |
| Constructs transformation from source to target rectangle Rotation and flips are around rectangles' center. | |
Definition at line 20 of file transformation.hpp.
|
inlinevirtual |
Definition at line 22 of file transformation.hpp.
|
pure virtual |
Applies transform t after this e.g.
{rotate >> translate;} rotates first: (initial -> rotated) >> (rotated -> translated) = (initial -> translated)
|
pure virtual |
Clone the transformation.
Implemented in bnb::transformation.
|
pure virtual |
Returns 3x3 row-maj transform matrix.
Implemented in bnb::transformation.
|
pure virtual |
Get the inverse of the transformation.
| std::logic_error | when matrix is singular |
Implemented in bnb::transformation.
|
pure virtual |
Apply transform to point.
Implemented in bnb::transformation.