Lines Matching defs:segments
92 inline std::vector<float> lengths (const std::vector<Segment>& segments) { return members(segments, &Segment::length); }
120 * length and the requirement that the additional segments be placed
126 * no additional segments are present, i.e. there's just one segment.
128 * i.e. all segments had same length.
150 << " and should equal the number of segments, i.e. number of vertices minus 1" << tcu::TestLog::EndMessage
163 std::vector<Segment> segments(finalLevel);
165 segments[i] = Segment(i, sortedCoords[i+1] - sortedCoords[i]);
167 failNote += "\nNote: segment lengths are, from left to right:\n " + containerStr(lengths(segments));
170 // Divide segments to two different groups based on length.
174 segmentsA.push_back(segments[0]);
176 for (int segNdx = 1; segNdx < static_cast<int>(segments.size()); ++segNdx)
179 const Segment& seg = segments[segNdx];
187 log << tcu::TestLog::Message << "Failure: couldn't divide segments to 2 groups by length; "
197 // All segments should be of equal length.
200 log << tcu::TestLog::Message << "Failure: clamped and final tessellation level are equal, but not all segments are of equal length." << tcu::TestLog::EndMessage
206 if (segmentsA.empty() || segmentsB.empty()) // All segments have same length. This is ok.
208 *pOutAdditionalSegmentLength = (segments.size() == 1 ? -1.0f : segments[0].length);
215 log << tcu::TestLog::Message << "Failure: when dividing the segments to 2 groups by length, neither of the two groups has exactly 2 or 0 segments in it" << tcu::TestLog::EndMessage
224 // \note For 4-segment lines both segmentsA and segmentsB have 2 segments each.
225 // Thus, we can't be sure which ones were meant as the additional segments.
233 log << tcu::TestLog::Message << "Failure: the two additional segments are longer than the other segments" << tcu::TestLog::EndMessage
245 // Check that the additional segments are placed symmetrically.
246 if (segmentsB[0].index + segmentsB[1].index + 1 != static_cast<int>(segments.size()))
248 log << tcu::TestLog::Message << "Failure: the two additional segments aren't placed symmetrically; "
250 << " (note: the two indexes should sum to " << static_cast<int>(segments.size())-1 << ", i.e. numberOfSegments-1)" << tcu::TestLog::EndMessage
260 : -1; // \note -1 when can't reliably decide which ones are the additional segments, a or b.
304 log << tcu::TestLog::Message << "Failure: additional segments not located identically for two edges with identical clamped tessellation levels" << tcu::TestLog::EndMessage
307 << "; but first additional segments located at indices "