summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo.mondi@ideasonboard.com>2023-10-19 16:01:28 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2023-10-23 16:06:02 +0300
commit8bb0f472c3c23963fa72396caa818931ee416407 (patch)
tree5277406055b5257d624aef03fa79d324c704901b /include
parentb54c935dd764ac3348bcedb9ff67d53a26cfaceb (diff)
libcamera: transform: Add operations with Orientation
Add two operations that allows to combine Transform with Orientation. - Transform operator/(const Orientation &o1, const Orientation &o2) allows to easily get back the Transform that needs to be applied to Orientation2 to get Orientation1 - Orientation operator*(const Orientation &o, const Transform &t) allows to apply a Transform to an Orientation and obtain the combination of the two These two operations allow applications to use Transforms to manipulate the Orientation inside the CameraConfiguration, if they wish. 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>
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/transform.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/libcamera/transform.h b/include/libcamera/transform.h
index 14f1db0e..9eb10e15 100644
--- a/include/libcamera/transform.h
+++ b/include/libcamera/transform.h
@@ -74,6 +74,9 @@ Transform transformFromRotation(int angle, bool *success = nullptr);
Transform transformFromOrientation(const Orientation &orientation);
Orientation transformToOrientation(const Transform &transform);
+Transform operator/(const Orientation &o1, const Orientation &o2);
+Orientation operator*(const Orientation &o, const Transform &t);
+
const char *transformToString(Transform t);
} /* namespace libcamera */