Write colour and thickness for the interpolated path.
- Parameters
-
| points | Control point source. |
| num_points | Control point count. |
Definition at line 106 of file TopologyGeneratorNode.cpp.
109{
111 return;
112 }
113
114 const size_t num_segments = num_points - 1;
116 const auto span =
static_cast<float>(
count - 1);
117
118 for (
size_t i = 0; i + 1 <
count; ++i) {
119 const float t0 = static_cast<float>(i) / span;
120 const float t1 = static_cast<float>(i + 1) / span;
121
122 const auto s0 = std::min<size_t>(
123 static_cast<size_t>(t0 * static_cast<float>(num_segments)), num_segments - 1);
124 const auto s1 = std::min<size_t>(
125 static_cast<size_t>(t1 * static_cast<float>(num_segments)), num_segments - 1);
126
129
132
135 }
136}
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().