14 s.writer->set_vertices(data, byte_count);
21 "Cannot attach null buffer");
#define MF_ERROR(comp, ctx,...)
void set_vertices(const void *data, size_t byte_count)
Set pre-packed interleaved vertex bytes to all registered render sinks.
void detach()
Release the attached buffer and reset its placement.
void attach(const std::shared_ptr< Buffers::VKBuffer > &buf, const AttachConfig &config={})
Make an existing, already rendered buffer the look of this object.
std::optional< glm::vec3 > m_position
void recenter()
Read the attached buffer's geometry again and move the anchor to match.
std::optional< Attachment > m_attachment
std::vector< RenderSink > m_render_sinks
@ Init
Engine/subsystem initialization.
@ Nexus
Spatial indexing and scheduling for user-defined behaviour.
void recenter_attachment(Attachment &attachment, std::optional< glm::vec3 > &position, const std::optional< glm::quat > &orientation)
Read the buffer's geometry again and move the anchor to match.
void follow_attachment(Attachment &attachment, std::optional< glm::vec3 > &position, const std::optional< glm::quat > &orientation)
Set position from the buffer, or fold an outside move into the attachment.
void release_attachment(Attachment &attachment)
Give every placed render processor back the geometry transform it had.
Attachment make_attachment(std::shared_ptr< Buffers::VKBuffer > buf, const AttachConfig &config, const std::optional< glm::quat > &orientation)
Build an attachment to buf.
How an Agent attaches to a buffer that already exists.