Skip to content
This repository was archived by the owner on Oct 24, 2023. It is now read-only.
This repository was archived by the owner on Oct 24, 2023. It is now read-only.

the way tMax is calculated covers only one quadrant of directions #7

@elena-pascal

Description

@elena-pascal

I'm trying to understand the suggestion on how to compute tMax which is describes as below

// grid.minBound.x is the lower left corner of the grid.
// current_X_index is the current X index where the ray begins. If it starts outside, this is 1.
// ray_origin.x is the x-coordinate of where the ray originates.
// ray.direction.x is the x-direction of the ray’s travel path.
tMax = (grid.minBound.x + current_X_index - ray_origin.x) / ray.direction.x);

I think this implies that the direction of travel is always up right. If the travel direction is to the right then I believe it should be:

tMax = (grid.minBound.x + current_X_index - 1 + ray_origin.x) / ray.direction.x);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions