MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / Referential

Class Referential

include/Core/Transform/Referential.hpp:23–232  ·  view source on GitHub ↗

* \brief Set or Get Position using Referentials */

Source from the content-addressed store, hash-verified

21 * \brief Set or Get Position using Referentials
22 */
23 class Referential
24 {
25 private:
26 double m_refX;
27 double m_refY;
28
29 public:
30 Referential();
31 Referential(double refX, double refY);
32 Referential(const Referential& ref);
33
34 bool operator==(const Referential& ref) const;
35 bool operator!=(const Referential& ref) const;
36
37 /**
38 * \brief Get the opposite Referential in a Rect
39 * \return The opposite of the given Referential (BottomRight => TopLeft
40 * for example)
41 */
42 [[nodiscard]] Referential flip(FlipAxis axis = FlipAxis::Both) const;
43 /**
44 * \brief Get if the Referential is on the left side of a normalized
45 * Rect
46 * \return true if Referential is on left side, false otherwise
47 */
48 [[nodiscard]] bool isOnLeftSide() const;
49 /**
50 * \brief Get if the Referential is on the right side of a normalized
51 * Rect
52 * \return true if Referential is on right side, false otherwise
53 */
54 [[nodiscard]] bool isOnRightSide() const;
55 /**
56 * \brief Get if the Referential is on the top side of a normalized Rect
57 * \return true if Referential is on top side, false otherwise
58 */
59 [[nodiscard]] bool isOnTopSide() const;
60 /**
61 * \brief Get if the Referential is on the bottom side of a normalized
62 * Rect
63 * \return true if Referential is on bottom side, false otherwise
64 */
65 [[nodiscard]] bool isOnBottomSide() const;
66 /**
67 * \brief Get if the Referential is on a corner of a normalized Rect
68 * \return true if Referential is on a corner, false otherwise
69 */
70 [[nodiscard]] bool isOnCorner() const;
71 /**
72 * \brief Get if the Referential is on a side of a normalized Rect
73 * \return true if Referential is on a side, false otherwise
74 */
75 [[nodiscard]] bool isOnSide() const;
76 /**
77 * \brief Get if the Referential is one of the 9 known referentials
78 * (TopLeft, Top, TopRight, Left, Center, Right, BottomLeft, Bottom,
79 * BottomRight)
80 * \return true is the Referential is one of the 9 known

Callers 4

Referential.cppFile · 0.85
flipMethod · 0.85
FromStringMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected