|
||||||||||
| 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 | |
|---|---|
float[] |
getRobustStack()
Used for algorithms which do bounding box based ray intersection. |
IntersectionState.StackNode[] |
getStack()
Get stack object for tree based AccelerationStructures. |
int |
getStackTop()
Index to use as the top of the stack, this is needed because of the two-level nature of ray-intersection (instances then primitive list). |
boolean |
hit()
Checks to see if a hit has been recorded. |
void |
setIntersection(int id,
float u,
float v)
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 final IntersectionState.StackNode[] getStack()
AccelerationStructures.
public final int getStackTop()
public final float[] getRobustStack()
public final boolean hit()
true if a hit has been recorded,
false otherwise
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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||