Skip to content

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

@madorjan

Description

@madorjan

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions