ray

Negating the truthiness of a boolean evaluation causing 5x slowdown?

I'm trying to implement an octree, and for that, I need a fast AABB-ray intersection algorithm. After some searching, I came across this paper that seemed to offer that. From the source code, available here, I translated the pluecker_cls_cff function to C# as this: public bool Intersect_2(ref RayPluecker r) { switch (r.Classification)...

What is a ray intersection interval?

In the context of ray/box intersection, what exactly is "a valid intersection interval"? I've been searching through different tutorials, but it seems they mostly seem to expect this as a priori knowledge. ...

Ray transformation for ray-triangle intersection

In openGL, I have a 3D model I'm performing a ray-triangle intersection on, using the code explained in the paper "Fast, Minimum Storage Ray/Triangle Intersection" ( http://jgt.akpeters.com/papers/MollerTrumbore97/ ). My cursor position is unprojected into world space using the following code: bool SCamera::unproject(Vector3 input, Ve...

How to best store lines in a kd-tree

I know kd-trees are traditionally used to store points, but I want to store lines instead. Would it be best to split the line at every intersection with the splitting of the kd-tree? or would storing just the end-points into kd-suffice for nearest neighbor finding? ...