Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FastRay3d - Box3d intersection fails if Z-range of Box3d is zero #55

Open
madorjan opened this issue Mar 10, 2021 · 0 comments
Open

FastRay3d - Box3d intersection fails if Z-range of Box3d is zero #55

madorjan opened this issue Mar 10, 2021 · 0 comments

Comments

@madorjan
Copy link

madorjan commented Mar 10, 2021

Example:

let ray = FastRay3d(10.0 * V3d.OOI, -V3d.OOI)

let boxSucceeds = Box3d(-V3d.IIO, V3d(1.0,1.0,1e-8))
let mutable tmin = 0.0
let mutable tmax = Double.MaxValue
let intersects = ray.Intersects(boxSucceeds, &tmin, &tmax)
Assert.IsTrue intersects

let boxFails = Box3d(-V3d.IIO, V3d.IIO)
tmin <- 0.0
tmax <- Double.MaxValue
let intersects = ray.Intersects(boxFails, &tmin, &tmax)
Assert.IsTrue intersects //this assertion fails
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant