|
||||||||||
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 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. |
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()
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |