libcamera: transform: Add functions to convert Orientation
Add two helper functions to the transform.cpp file that allows to convert to and from an Orientation. Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
568569b081
commit
250577878b
2 changed files with 64 additions and 0 deletions
|
@ -11,6 +11,8 @@
|
|||
|
||||
namespace libcamera {
|
||||
|
||||
enum class Orientation;
|
||||
|
||||
enum class Transform : int {
|
||||
Identity = 0,
|
||||
Rot0 = Identity,
|
||||
|
@ -69,6 +71,8 @@ constexpr Transform operator~(Transform t)
|
|||
}
|
||||
|
||||
Transform transformFromRotation(int angle, bool *success = nullptr);
|
||||
Transform transformFromOrientation(const Orientation &orientation);
|
||||
Orientation transformToOrientation(const Transform &transform);
|
||||
|
||||
const char *transformToString(Transform t);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue