org.autochthonous.graphics.rt.objects
Class Blobby
java.lang.Object
org.autochthonous.graphics.rt.Renderable
org.autochthonous.graphics.rt.Bounded
org.autochthonous.graphics.rt.objects.Blobby
- All Implemented Interfaces:
- java.lang.Cloneable, ColorCalculator, NormalCalculator, Partitionable, Traceable
- public class Blobby
- extends Bounded
- implements NormalCalculator
Based on, "ray tracing implicit surfaces resulting from the summation
of bounded volume polynomial functions", By David Tonnesen, Tech Report
no 89003, Rensselear Design Research Center, Rensselaer Polytechnic
Institute, Troy, Nw York, 12180.
Example:
<Blobby color="1, 0, 0" threshold="0.5">
<Metaball center="-1.0, 0.0, -4.0" radius="1.0" strength="0.8"/>
<Metaball center="0.0, 0.0, -4.0" radius="1.0" strength="0.8"/>
<Metaball center="1.0, 0.0, -4.0" radius="1.0" strength="0.8"/>
</Blobby>
Document Type Definition:
<!ENTITY %Color3f "CDATA">
<!ENTITY %Float "CDATA">
<!ELEMENT Blobby (Metaball)+ >
<!ATTLIST Blobby
color %Color3f; "1, 1, 1"
threshold %Float; "1">
Fields inherited from class org.autochthonous.graphics.rt.Bounded |
bBox |
Methods inherited from class org.autochthonous.graphics.rt.Renderable |
clone, createObjectSpaceRay, getColor, getColor, getShader, hasShader, isSelfShadowing, readObject, setColor, setColor, setSelfShadowing, setShader, toObjectSpace, toObjectSpace, transformNormal |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.autochthonous.graphics.rt.Traceable |
clone |
Blobby
public Blobby()
getInstance
public static Blobby getInstance(RMLReader in)
throws java.io.IOException
- Throws:
java.io.IOException
processParameters
protected void processParameters(ParametersMap params)
- Overrides:
processParameters
in class Renderable
processObject
protected void processObject(java.lang.Object obj)
- Overrides:
processObject
in class Renderable
getN
public void getN(Hit hit,
Vector3f n)
- Description copied from interface:
NormalCalculator
- set the normal for this hit point (object space) in hd
the value is returned in n
- Specified by:
getN
in interface NormalCalculator
isObjectIntersected
public boolean isObjectIntersected(Ray r)
isIntersected
public boolean isIntersected(Ray r)
- Specified by:
isIntersected
in interface Traceable
- Specified by:
isIntersected
in class Bounded
intersections
public HitList intersections(Ray r)
- Specified by:
intersections
in interface Traceable
isShadowing
public boolean isShadowing(Ray r)
- Specified by:
isShadowing
in interface Traceable
- Specified by:
isShadowing
in class Bounded