Tagged Questions
3
votes
5answers
705 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
1answer
268 views
Why isn't my lighting working properly? Are my normals messed up?
I'm relatively new to OpenGL and I am trying to draw a 3D model (loaded from a 3ds file using lib3ds) using OpenGL with lighting, but about half of it is drawn in black.
I set up the light as such:
...
0
votes
3answers
936 views
Fastest solution to compute normal
A physics engine return a deformed mesh (only geometry vertices).
I take this mesh to render the geometry (~500000 vertices).
What is the fastest solution and the least expensive to compute normal ...