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

◆ add_axis()

void MayaFlux::Nodes::GpuSync::LineSegmentsNode::add_axis ( const LineVertex origin,
const glm::vec3 &  direction,
float  length 
)

Add a directed axis segment originating from a point.

Emits one segment from origin along direction scaled to length, using current color and thickness.

Parameters
originBase position.
directionUnit or non-unit direction vector (not normalised internally).
lengthScalar length of the emitted segment.

Definition at line 33 of file LineSegmentsNode.cpp.

34{
35 LineVertex tip = origin;
36 tip.position = origin.position + direction * length;
37 m_segments.push_back(origin);
38 m_segments.push_back(tip);
40}
bool m_vertex_data_dirty
Flag: vertex data or layout changed since last GPU upload.
Kakshya::LineVertex LineVertex
Definition VertexSpec.hpp:8

References m_segments, MayaFlux::Nodes::GpuSync::GeometryWriterNode::m_vertex_data_dirty, and MayaFlux::Kakshya::LineVertex::position.