cz.cuni.jagrlib
Class CSGLeaf
java.lang.Object
cz.cuni.jagrlib.DefaultSceneNode
cz.cuni.jagrlib.CSGCommonNode
cz.cuni.jagrlib.CSGLeaf
- All Implemented Interfaces:
- TimeDependent, IntersectionAttributes, SceneNode
public class CSGLeaf
- extends CSGCommonNode
Leaf node (holding elementary solid) of CSG scene representation.
- Since:
- 0.11
- Version:
- 0.26 $Rev: 918 $ $Date: 2010-04-08 03:18:02 +0200 (čt, 08 IV 2010) $ $Author: pepca $
- See Also:
- CSGLeaf.java,
Solid
,
CSGNode
Field Summary |
Solid |
solid
Solid which is assigned to this leaf-node. |
Constructor Summary |
CSGLeaf(Solid _solid)
Initializing constructor. |
Method Summary |
List<MicroFacet> |
intersection(double[] P0,
double[] P1)
Computes all intersections of the given ray with the solid. |
void |
setTime(double time)
Sets the actual time value for the scene (used in animations). |
Methods inherited from class cz.cuni.jagrlib.CSGCommonNode |
assertAttributes, getAttribute, getAttributes, getOrder, getParent, getTime, getTimeInterval, isObjectRoot, selfAttribute, setAttribute, setObjectRoot, setOrder, setParent |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
solid
public Solid solid
- Solid which is assigned to this leaf-node.
One Solid instance can be shared among multiple
CSGLeaf
Nodes.
CSGLeaf
public CSGLeaf(Solid _solid)
- Initializing constructor.
intersection
public List<MicroFacet> intersection(double[] P0,
double[] P1)
- Computes all intersections of the given ray with the solid.
- Specified by:
intersection
in interface SceneNode
- Overrides:
intersection
in class DefaultSceneNode
- Parameters:
P0
- Ray origin (double[3]
or double[4]
).P1
- Direction vector of the ray (double[3]
or double[4]
).
- Returns:
- List of all intersections with the solid.
setTime
public void setTime(double time)
- Sets the actual time value for the scene (used in animations).
- Specified by:
setTime
in interface TimeDependent
- Overrides:
setTime
in class CSGCommonNode
- Parameters:
time
- New scene time (in seconds).- See Also:
CSGCommonNode.getTime()
,
CSGCommonNode.getTimeInterval(double[])