|
Bouncy Castle Rendering Toolkit 1.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.bouncycastle.graphics.rt.Hit
Field Summary | |
ColorCalculator |
colorCalc
|
Ray |
i
|
NormalCalculator |
normCalc
|
Renderable |
obj
|
Shader |
shader
|
TextureMapper |
stMapper
|
boolean |
subtractedSurface
|
float |
t
|
int |
timeSlice
|
float |
tTotal
|
Method Summary | |
Color3f |
color()
return the base color for the surface this hit is on. |
Ray |
continuationRay()
set r so that it represents a continuation of the incident one, i.e. |
void |
dispose()
|
float |
distance()
return the distance traveled to this hit. |
static Hit |
getInstance(Renderable obj,
float t,
ColorCalculator colorCalc,
NormalCalculator normCalc,
TextureMapper stMapper,
Shader shader)
return an instance of a Hit object, with passed in values set. |
Vector3f |
I()
return the incident ray direction vector. |
boolean |
isInside()
returns whether or not the incident ray is inside some object. |
int |
level()
return the recursion level of this hit. |
Vector3f |
N()
return the current shading normal. |
float |
NDotI()
return the dot product of the shading normal N with the direction of the incident ray I. |
Renderable |
object()
return the object we hit. |
Vector3f |
oN()
return the object space normal. |
Point3f |
oP()
return the hit location in object coordinates |
Point3f |
P()
return the hit location in world coordinates |
void |
perturbN(float factor)
Perturb the current shading normal by adding some random deviation perpendicular to the tip of the current shading normal, scaled by the factor factor. |
void |
perturbN(float u,
float v)
Perturb the current shading normal by adding a deviation perpendicular to the tip of the current shading normal, given by the vector (u, v, 0), after being aligned so that it is transformed to being perpendicular to the axis of the shading normal. |
void |
perturbN(Vector3f pTurb)
Perturb the current shading normal by adding some vector to it in object space and then transforming it to our current world space. |
Ray |
reflectedRay()
return the reflected ray for the incident one and the current shading normal |
Ray |
refractedRay(float riIn,
float riOut)
return a refracted ray for the incident one and the shading normal. |
float |
S()
return the s texture coordinate. |
float |
size()
return the rough area covered by this object in screen space. |
float |
T()
return the t texture coordinate. |
LightDataList |
visibleLights(World world)
return a visible light list for this hit for the given world |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public Renderable obj
public float t
public float tTotal
public NormalCalculator normCalc
public ColorCalculator colorCalc
public TextureMapper stMapper
public Shader shader
public int timeSlice
public Ray i
public boolean subtractedSurface
Method Detail |
public static Hit getInstance(Renderable obj, float t, ColorCalculator colorCalc, NormalCalculator normCalc, TextureMapper stMapper, Shader shader)
obj
- the object hit.t
- the distance traveled to this hit.colorCalc
- the base color calculator for the hit.normCalc
- the normal calculator for the hit.stMapper
- the mapper to get texture coordinates fromshader
- the shader to invoke for the hitpublic void dispose()
public LightDataList visibleLights(World world)
public final int level()
public Vector3f N()
public Vector3f oN()
public void perturbN(float factor)
Note: this method changes the stored surface normal.
factor
- the scale for the perturbation.public void perturbN(float u, float v)
Note: this method changes the stored surface normal.
factor
- the scale for the perturbation.public void perturbN(Vector3f pTurb)
Note: this method changes the stored surface normal.
pTurb
- the vector to be used to perturb the shading
normal.public Vector3f I()
public float NDotI()
public float S()
public float T()
public Color3f color()
public Point3f oP()
public Point3f P()
public float distance()
public float size()
public Renderable object()
public boolean isInside()
public Ray continuationRay()
r
- the ray to contain the result.public Ray reflectedRay()
public Ray refractedRay(float riIn, float riOut)
riIn
- index of refraction for current material.riOut
- index of refraction for material we are entering.
|
Bouncy Castle Rendering Toolkit 1.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |