MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ region_of() [1/2]

MAYAFLUX_API std::optional< Kinesis::AABB2D > MayaFlux::Portal::Forma::region_of ( const RadialPlacementInputs & placement,
std::string & error )
nodiscard

The surface region a radial placement covers: the box around its circle.

Parameters
errorReceives the reason when nullopt is returned: the radius must be positive.

Definition at line 15 of file PlacementInputs.cpp.

16{
17 if (!(placement.radius > 0.F)) {
18 error = "radius needs to be positive";
19 return std::nullopt;
20 }
21 return Kinesis::AABB2D::from_ndc(placement.center, glm::vec2(placement.radius));
22}
static AABB2D from_ndc(glm::vec2 center, glm::vec2 half) noexcept
Definition Bounds.hpp:94

References MayaFlux::Portal::Forma::RadialPlacementInputs::center, MayaFlux::Kinesis::AABB2D::from_ndc(), and MayaFlux::Portal::Forma::RadialPlacementInputs::radius.

Here is the call graph for this function: