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

◆ Mantle() [1/3]

MayaFlux::Nexus::Mantle::Mantle ( const Kinesis::AABB3D &  bounds,
std::shared_ptr< Buffers::VKBuffer >  buf,
Portal::Graphics::FitMode  fit = Portal::Graphics::FitMode::STRETCH,
CrossingFn  on_enter = {},
CrossingFn  on_exit = {} 
)

Build from a box and a buffer.

Blocks for a ComputeMeshBuffer.

Parameters
boundsWorld-space box.
bufBuffer to place. Must not be null.
fitHow the buffer's geometry fills the box.
on_enterFired with the entity id when it enters. May be empty.
on_exitFired with the entity id when it leaves. May be empty.

Definition at line 61 of file Mantle.cpp.

66 : Expanse(bounds, std::move(on_enter), std::move(on_exit))
67 , m_look { .buf = std::move(buf), .transform = std::make_shared<glm::mat4>(1.0F) }
68 , m_fit(fit)
69{
70 if (!m_look.buf) {
72 "Mantle needs a buffer");
73 return;
74 }
75
78 "Mantle fits tiling modes as STRETCH: tiling has no meaning for geometry");
79 }
80
82 if (!m_local) {
84 "Mantle leaves the buffer where it is: no geometry could be read from it");
85 return;
86 }
87
88 refresh();
89}
#define MF_ERROR(comp, ctx,...)
#define MF_WARN(comp, ctx,...)
Expanse::CrossingFn on_enter
Definition Decoder.cpp:518
Expanse::CrossingFn on_exit
Definition Decoder.cpp:519
const std::optional< Kinesis::AABB3D > & bounds() const
The box, if set.
Definition Expanse.hpp:153
Expanse(ContainsFn contains, CrossingFn on_enter, CrossingFn on_exit)
Construct with a containment predicate and crossing actions.
Definition Expanse.hpp:66
std::optional< Kinesis::AABB3D > m_local
Definition Mantle.hpp:77
Portal::Graphics::FitMode m_fit
Definition Mantle.hpp:76
@ Init
Engine/subsystem initialization.
@ Nexus
Spatial indexing and scheduling for user-defined behaviour.
std::optional< Kinesis::AABB3D > read_bounds(const std::shared_ptr< Buffers::VKBuffer > &buf, const std::optional< uint32_t > &collection)
Bounds of a buffer's geometry in its own stored coordinates.
Definition Survey.cpp:256
@ TILE_MIRRORED
Source repeated, every other tile mirrored.
@ TILE
Source repeated at its own size.
std::shared_ptr< Buffers::VKBuffer > buf

References MayaFlux::Nexus::Attachment::buf, MayaFlux::Journal::Init, m_local, m_look, MF_ERROR, MF_WARN, MayaFlux::Journal::Nexus, MayaFlux::Nexus::read_bounds(), refresh(), MayaFlux::Portal::Graphics::TILE, and MayaFlux::Portal::Graphics::TILE_MIRRORED.

+ Here is the call graph for this function: