org.bouncycastle.graphics.rt.objects
Class Sphere
java.lang.Object
|
+--org.bouncycastle.graphics.rt.Renderable
|
+--org.bouncycastle.graphics.rt.Bounded
|
+--org.bouncycastle.graphics.rt.objects.SimpleObject
|
+--org.bouncycastle.graphics.rt.objects.Sphere
- All Implemented Interfaces:
- ColorCalculator, NormalCalculator, Partitionable, Traceable
- public class Sphere
- extends SimpleObject
- implements NormalCalculator
a sphere.
Example:
<Sphere color="1, 1, 1" radius="1" center="0, 0, 0"/>
Document Type Definition:
<!ENTITY %Color3f "CDATA">
<!ENTITY %Float "CDATA">
<!ENTITY %Point3f "CDATA">
<!ELEMENT Sphere EMPTY>
<!ATTLIST Sphere
color %Color3f; "1, 1, 1"
radius %Float; "1"
center %Point3f; "0, 0, 0">
Fields inherited from class org.bouncycastle.graphics.rt.Bounded |
bBox |
Methods inherited from class org.bouncycastle.graphics.rt.Renderable |
createObjectSpaceRay, getColor, getColor, getShader, isSelfShadowing, processObject, readObject, setColor, setColor, setSelfShadowing, setShader, toObjectSpace, toObjectSpace, transformNormal |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Sphere
public Sphere(Point3d c,
double r)
Sphere
public Sphere(Point3f c,
double r)
getInstance
public static Sphere getInstance(RMLReader in)
throws java.io.IOException
processParameters
protected void processParameters(ParametersMap params)
- Overrides:
processParameters
in class Renderable
isObjectIntersected
protected boolean isObjectIntersected(Ray r)
- Overrides:
isObjectIntersected
in class SimpleObject
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