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

◆ contains()

bool MayaFlux::Nexus::Hull::contains ( const glm::vec3 &  p) const
overridevirtual

Test whether a world position lies within the buffer's bounds as drawn.

Reimplemented from MayaFlux::Nexus::Expanse.

Definition at line 29 of file Hull.cpp.

30{
31 if (!m_buf || !m_local) {
32 return false;
33 }
34
35 const glm::mat4 drawn = read_placement(m_buf);
36 const float det = glm::determinant(glm::mat3(drawn));
37 if (det == 0.0F || !std::isfinite(det)) {
38 return false;
39 }
40
41 return m_local->contains(glm::vec3(glm::inverse(drawn) * glm::vec4(p, 1.0F)));
42}
std::optional< Kinesis::AABB3D > m_local
Definition Hull.hpp:63
std::shared_ptr< Buffers::VKBuffer > m_buf
Definition Hull.hpp:61
glm::mat4 read_placement(const std::shared_ptr< Buffers::VKBuffer > &buf)
Where a buffer is drawn: the geometry transform of its primary render processor.
Definition Survey.cpp:303

References m_buf, m_local, and MayaFlux::Nexus::read_placement().

+ Here is the call graph for this function: