Banuba SDK
Loading...
Searching...
No Matches
bnb::interfaces::transformation Class Referenceabstract
Inheritance diagram for bnb::interfaces::transformation:
bnb::transformation

Public Member Functions

virtual std::shared_ptr< transformationchain_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< transformationinverse_j () const =0
 Get the inverse of the transformation.
 
virtual std::shared_ptr< transformationclone_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< transformationmake_identity ()
 Constructs identity transform.
 
static std::shared_ptr< transformationmake_data (const std::vector< float > &mat)
 Constructs from mat_t.
 
static std::shared_ptr< transformationmake_rot (rotation rot)
 Constructs rotate transformation.
 
static std::shared_ptr< transformationmake_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< transformationmake_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.
 

Detailed Description

Definition at line 20 of file transformation.hpp.

Constructor & Destructor Documentation

◆ ~transformation()

virtual bnb::interfaces::transformation::~transformation ( )
inlinevirtual

Definition at line 22 of file transformation.hpp.

22{}

Member Function Documentation

◆ chain_right()

virtual std::shared_ptr< transformation > bnb::interfaces::transformation::chain_right ( const std::shared_ptr< transformation > & t) const
pure virtual

Applies transform t after this e.g.

{rotate >> translate;} rotates first: (initial -> rotated) >> (rotated -> translated) = (initial -> translated)

◆ clone_j()

virtual std::shared_ptr< transformation > bnb::interfaces::transformation::clone_j ( ) const
pure virtual

Clone the transformation.

Implemented in bnb::transformation.

◆ get_mat_j()

virtual std::vector< float > bnb::interfaces::transformation::get_mat_j ( ) const
pure virtual

Returns 3x3 row-maj transform matrix.

Implemented in bnb::transformation.

◆ inverse_j()

virtual std::shared_ptr< transformation > bnb::interfaces::transformation::inverse_j ( ) const
pure virtual

Get the inverse of the transformation.

Exceptions
std::logic_errorwhen matrix is singular

Implemented in bnb::transformation.

◆ transform_point()

virtual point2d bnb::interfaces::transformation::transform_point ( const point2d & p) const
pure virtual

Apply transform to point.

Implemented in bnb::transformation.


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