|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sunflow.core.IntersectionState
public final class IntersectionState
This class is used to store ray/object intersections. It also provides
additional data to assist AccelerationStructure objects with
traversal.
| Nested Class Summary | |
|---|---|
static class |
IntersectionState.StackNode
Traversal stack node, helps with tree-based AccelerationStructure
traversal. |
| Constructor Summary | |
|---|---|
IntersectionState()
Initializes all traversal stacks. |
|
| Method Summary | |
|---|---|
IntersectionState.StackNode[] |
getStack()
Get stack object for tree based AccelerationStructures. |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IntersectionState()
| Method Detail |
|---|
public float getTime()
public final IntersectionState.StackNode[] getStack()
AccelerationStructures.
public final boolean hit()
true if a hit has been recorded,
false otherwisepublic final void setIntersection(int id)
id - primitive id of the intersected object
public 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 point
public 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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||