Tagged Questions
3
votes
5answers
750 views
Normalization of Vectors: Return a copy of the result or alter the object itself?
When calculating the normal of a vector, which is considered canon:
Returning a copy:
Vector2D Vector2D::Normalize() const {
double a1 = GetX();
double a2 = GetY();
double a3 = GetZ();
...
1
vote
2answers
1k views
Calculating the 2D edge normals of a triangle
What's a reliable way to calculate a 2D normal vector for each edge of a triangle, so that each normal is pointing outwards from the triangle?
To clarify, given any triangle - for each edge (e.g ...
5
votes
1answer
401 views
How can I calculate a vertex normal for a hard edge?
Here is a picture of a lovely polygon:
Circled is a vertex, and numbered are its adjacent faces. I have calculated the normals of those faces as such (not yet normalized, 0-indexed):
Vertex 1 ...