Write colour and thickness for the interpolated path.
- Parameters
-
| points | Control point source. |
| num_points | Control point count. |
Definition at line 131 of file TopologyGeneratorNode.cpp.
134{
136 return;
137 }
138
139 const size_t num_segments = num_points - 1;
141 const auto span =
static_cast<float>(
count - 1);
142
143 for (
size_t i = 0; i + 1 <
count; ++i) {
144 const float t0 = static_cast<float>(i) / span;
145 const float t1 = static_cast<float>(i + 1) / span;
146
147 const auto s0 = std::min<size_t>(
148 static_cast<size_t>(t0 * static_cast<float>(num_segments)), num_segments - 1);
149 const auto s1 = std::min<size_t>(
150 static_cast<size_t>(t1 * static_cast<float>(num_segments)), num_segments - 1);
151
154
157
160 }
161}
std::vector< glm::vec2 > * points
std::vector< LineVertex > m_vertices
bool m_force_uniform_color
If true, all vertices use m_line_color instead of per-vertex color.
bool m_force_uniform_thickness
If true, all vertices use m_line_thickness instead of per-vertex thickness.
Kakshya::LineVertex LineVertex
References MayaFlux::Kakshya::LineVertex::color, count, m_force_uniform_color, m_force_uniform_thickness, m_line_color, m_line_thickness, m_vertices, points, and MayaFlux::Kakshya::LineVertex::thickness.
Referenced by build_interpolated_path(), and refresh_attributes().