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

Method getGlobalBounds

include/Core/Graphics/Shapes.hpp:82–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80 }
81
82 template <class T> Transform::Rect BaseShape<T>::getGlobalBounds() const
83 {
84 sf::FloatRect bounds = static_cast<const T&>(*this).shape.getGlobalBounds();
85 const auto position = Transform::UnitVector(
86 bounds.left, bounds.top, Transform::Units::ScenePixels);
87 const auto size = Transform::UnitVector(
88 bounds.width, bounds.height, Transform::Units::ScenePixels);
89 return Transform::Rect(position, size);
90 }
91
92 template <class T> void BaseShape<T>::setRotation(float angle)
93 {

Callers

nothing calls this directly

Calls 2

UnitVectorClass · 0.85
RectClass · 0.70

Tested by

no test coverage detected