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

◆ Hull()

MayaFlux::Nexus::Hull::Hull ( std::shared_ptr< Buffers::VKBuffer >  buf,
CrossingFn  on_enter = {},
CrossingFn  on_exit = {},
std::optional< uint32_t >  collection = std::nullopt 
)
explicit

Build from a buffer.

Blocks for a ComputeMeshBuffer.

Parameters
bufBuffer to wrap. Must not be null.
on_enterFired with the entity id when it enters. May be empty.
on_exitFired with the entity id when it leaves. May be empty.
collectionOne collection of a NetworkGeometryBuffer to wrap, for a buffer that holds several bodies. Unset wraps all of it.

Definition at line 8 of file Hull.cpp.

12 : Expanse(ContainsFn {}, std::move(on_enter), std::move(on_exit))
13 , m_buf(std::move(buf))
14 , m_collection(collection)
15{
16 if (!m_buf) {
18 "Hull needs a buffer");
19 return;
20 }
21
23 if (!m_local) {
25 "Hull contains nothing: no geometry could be read from the buffer");
26 }
27}
#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
std::function< bool(const glm::vec3 &)> ContainsFn
Definition Expanse.hpp:57
Expanse(ContainsFn contains, CrossingFn on_enter, CrossingFn on_exit)
Construct with a containment predicate and crossing actions.
Definition Expanse.hpp:66
std::optional< uint32_t > m_collection
Definition Hull.hpp:62
std::optional< Kinesis::AABB3D > m_local
Definition Hull.hpp:63
std::shared_ptr< Buffers::VKBuffer > m_buf
Definition Hull.hpp:61
@ 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

References MayaFlux::Journal::Init, m_buf, m_collection, m_local, MF_ERROR, MF_WARN, MayaFlux::Journal::Nexus, and MayaFlux::Nexus::read_bounds().

+ Here is the call graph for this function: