org.bouncycastle.graphics.rt.objects
Class Polygon
java.lang.Object
|
+--org.bouncycastle.graphics.rt.Renderable
|
+--org.bouncycastle.graphics.rt.Bounded
|
+--org.bouncycastle.graphics.rt.objects.Polygon
- All Implemented Interfaces:
- ColorCalculator, NormalCalculator, Partitionable, TextureMapper, Traceable
- public class Polygon
- extends Bounded
- implements NormalCalculator, TextureMapper
A polygon.
Example:
<Polygon color="1,0,0">
<Vertices>
0.000, 1.000, 0.000,
1.000, 1.000, 0.000,
1.000, 0.000, 0.000,
0.000, 0.000, 0.000
</Vertices>
</Polygon>
Document Type Definition:
<!ENTITY %Color3f "CDATA">
<!ELEMENT Polygon (Vertices)>
<!ATTLIST Polygon
color %Color3f; "1, 1, 1">
Fields inherited from class org.bouncycastle.graphics.rt.Bounded |
bBox |
Fields inherited from interface org.bouncycastle.graphics.rt.TextureMapper |
S, T |
Methods inherited from class org.bouncycastle.graphics.rt.Renderable |
createObjectSpaceRay, getColor, getColor, getShader, isSelfShadowing, processParameters, 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 |
Polygon
public Polygon(int nSides,
Point3f[] verts)
getInstance
public static Polygon getInstance(RMLReader in)
throws java.io.IOException
processObject
protected void processObject(java.lang.Object obj)
- Overrides:
processObject
in class Renderable
isShadowing
public boolean isShadowing(Ray r)
- Overrides:
isShadowing
in class Bounded
intersections
public HitList intersections(Ray r)
isIntersected
public boolean isIntersected(Ray r)
- Overrides:
isIntersected
in class Bounded
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
getST
public boolean getST(Tuple3f l,
float[] uv)
- Specified by:
getST
in interface TextureMapper