|
JPBRT 0.5 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jpbrt.core.Primitive
org.jpbrt.core.GeometricPrimitive
public class GeometricPrimitive
GeometricPrimitive represents a single shape (e.g., a sphere) in the
scene. One geometric primitive is allocated for each shape in the scene
description provided by the user.
References:
M. Pharr, G. Humphreys. (2004). Physically Based Rendering. Morgan Kaufmann.
Section 4.1.1, Page 173.
| Field Summary |
|---|
| Fields inherited from class org.jpbrt.core.Primitive |
|---|
primitiveId |
| Constructor Summary | |
|---|---|
GeometricPrimitive(Shape shape,
Material material,
AreaLight areaLight)
|
|
| Method Summary | |
|---|---|
boolean |
canIntersect()
Returns true if the underlying geometry is intersectable. |
AreaLight |
getAreaLight()
Returns an AreaLight that describes the primitive's emission
distribution if the primitive itself is a light source. |
BSDF |
getBSDF(DifferentialGeometry dg,
Transform objectToWorld)
Returns a representation of the light scattering properties of the material at the given point on the surface in a BSDF object. |
BSSRDF |
getBSSRDF(DifferentialGeometry dg,
Transform objectToWorld)
?. |
BBox |
getWorldBounds()
Returns a box that encloses the primitive's geometry in world space. |
boolean |
intersect(Ray r,
Intersection isect)
Returns true if the ray intersects any of the primitives. |
boolean |
intersectP(Ray ray)
Returns true if the ray intersects any of the primitives, without providing intersection information. |
void |
refine(java.util.LinkedList<Primitive> refined)
Adds refined primitives to the supplied list. |
java.lang.String |
toString()
|
| Methods inherited from class org.jpbrt.core.Primitive |
|---|
fullyRefine |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public GeometricPrimitive(Shape shape,
Material material,
AreaLight areaLight)
| Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.Objectpublic BBox getWorldBounds()
Primitive
getWorldBounds in class Primitive
public boolean intersect(Ray r,
Intersection isect)
Primitive
intersect in class Primitiver - The ray for intersection testing. This method updates
ray.maxt if an intersection has been found.isect - Intersection geometry describing the geometry and
material properties at the intersection point.
public boolean canIntersect()
Primitive
Only primitives which are intersectable support the methods
Primitive.intersect(org.jpbrt.core.Ray, org.jpbrt.core.Intersection) and Primitive.intersectP(org.jpbrt.core.Ray).
Only primitives which are non-intersectable support the method
Primitive.refine(java.util.LinkedList.
The default implementation returns true.
canIntersect in class Primitivepublic boolean intersectP(Ray ray)
PrimitiveSince no additional information needs to be provided, this method is faster than intersect. It is used for determining shadow rays.
intersectP in class Primitiveray - The ray for intersection testing. This method updates
ray.maxt if an intersection has been found. (?)public void refine(java.util.LinkedList<Primitive> refined)
Primitive
refine in class Primitivepublic AreaLight getAreaLight()
PrimitiveAreaLight that describes the primitive's emission
distribution if the primitive itself is a light source.
If the primitive is not emissive, this method returns null.
getAreaLight in class Primitive
public BSDF getBSDF(DifferentialGeometry dg,
Transform objectToWorld)
PrimitiveBSDF object.
getBSDF in class Primitive
public BSSRDF getBSSRDF(DifferentialGeometry dg,
Transform objectToWorld)
Primitive
getBSSRDF in class Primitive
|
Copyright 2010 © by the authors and contributors of the JPBRT project. Some rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||