On Saturday, 1 April 2023 at 15:32:27 UTC, Dennis wrote:
On Friday, 31 March 2023 at 13:11:58 UTC, z wrote:
I've tried to search before but was only able to find articles
for 3D triangles, and documentation for OpenGL, which i don't
use.
The first function you posted takes a 3D triangle as
On Friday, 31 March 2023 at 13:11:58 UTC, z wrote:
I've tried to search before but was only able to find articles
for 3D triangles, and documentation for OpenGL, which i don't
use.
The first function you posted takes a 3D triangle as input, so I
assumed you're working in 3D. What are you
On Thursday, 30 March 2023 at 12:59:31 UTC, Dennis wrote:
On Thursday, 30 March 2023 at 10:29:25 UTC, z wrote:
Is this code correct or logically sound?
You need to be exact on what 'correct' is. The comment above
`triangleFacesCamera` says:
Indicates wether a triangle faces an imaginary
On Thursday, 30 March 2023 at 10:29:25 UTC, z wrote:
Is this code correct or logically sound?
You need to be exact on what 'correct' is. The comment above
`triangleFacesCamera` says:
Indicates wether a triangle faces an imaginary view point.
There's no view point / camera position
Is this code correct or logically sound?
```D
import std;
enum {side/depth/height and side/height
x,//0
y,//1
z //2
}
/**
Indicates wether a triangle faces an imaginary view point.
*/
bool triangleFacesCamera(float[3] tA, float[3] tB, float[3] tC) {
float r1, r2;
r1 = atan2(tB[x] - tA[x