public final class IntersectionState
extends java.lang.Object
AccelerationStructure
objects with
traversal.Modifier and Type | Class | Description |
---|---|---|
static class |
IntersectionState.StackNode |
Traversal stack node, helps with tree-based
AccelerationStructure
traversal. |
Constructor | Description |
---|---|
IntersectionState() |
Initializes all traversal stacks.
|
Modifier and Type | Method | Description |
---|---|---|
IntersectionState.StackNode[] |
getStack() |
Get stack object for tree based
AccelerationStructure s. |
float |
getTime() |
Returns the time at which the intersection should be calculated.
|
boolean |
hit() |
Checks to see if a hit has been recorded.
|
void |
setIntersection(int id) |
Record an intersection with the specified primitive id.
|
void |
setIntersection(int id,
float u,
float v) |
Record an intersection with the specified primitive id.
|
void |
setIntersection(int id,
float u,
float v,
float w) |
Record an intersection with the specified primitive id.
|
public float getTime()
public final IntersectionState.StackNode[] getStack()
AccelerationStructure
s.public final boolean hit()
true
if a hit has been recorded,
false
otherwisepublic final void setIntersection(int id)
id
- primitive id of the intersected objectpublic final void setIntersection(int id, float u, float v)
id
- primitive id of the intersected objectu
- u surface paramater of the intersection pointv
- v surface parameter of the intersection pointpublic final void setIntersection(int id, float u, float v, float w)
id
- primitive id of the intersected objectu
- u surface paramater of the intersection pointv
- v surface parameter of the intersection point