Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
3
votes
Accepted
Reorder a set of points in order to draw a triangle fan (example)
}
And after getting all the angles, I sorted the vector:
std::sort(lightPoints.begin(), lightPoints.end(),
[](const Point& p1, const Point& p2) {
return p1.myAngle < p2.myAngle;
});
And the sorting …
4
votes
1
answer
1k
views
Reorder a set of points in order to draw a triangle fan (example)
I'm doing a light engine (c++, using sfml), and to connect the light vertices, I thought about drawing a triangle fan.
Here is a representation of a triangle fan (sfml documentation):
The point …