|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgov.nist.microanalysis.NISTMonte.SumShape
public class SumShape
An implementation of the Shape interface for the union of the volume
encompassed by multiple Shape instances. While the constituent Shape
instances need not strictly overlap, there is little reason to use this class
if they don't. When a trajectory exits a Shape, the trajectory is assumed to
return to the Shape's parent Shape. This leads to incorrect default behavior
if two child Shape instances overlap. To handle this situation, use the
MCSS_SumShape to represent the overlapping child Shapes as a single Shape.
The trajectory will remain inside the MCSS_SumShape until it exits all the
Shapes that define the MCSS_SumShape.
Note: MCSS_SumShape is not particularly efficient.
Copyright: Pursuant to title 17 Section 105 of the United States Code this software is not subject to copyright protection and is in the public domain
Company: National Institute of Standards and Technology
| Constructor Summary | |
|---|---|
SumShape(MonteCarloSS.Shape[] shapes)
MCSS_SumShape - Creates a sum shape that represents the sum of an array of Shapes. |
|
SumShape(MonteCarloSS.Shape a,
MonteCarloSS.Shape b)
MCSS_SumShape - Create a sum shape that represents the sum of two shapes. |
|
| Method Summary | |
|---|---|
boolean |
contains(double[] pos)
contains - See MonteCarloSS.Shape.contains |
double |
getFirstIntersection(double[] pos0,
double[] pos1)
getFirstIntersection - See MonteCarloSS.Shape.getFirstItersection |
void |
render(TrajectoryVRML.RenderContext rc,
java.io.Writer wr)
Render the SumShape by rendering each of the sub-Shapes. |
void |
rotate(double[] pivot,
double phi,
double theta,
double psi)
rotate - Rotate the object around the specified point by phi about the z-axis followed by theta round the y-axis followed by psi around the z-axis. |
void |
translate(double[] distance)
translate - Translate this object by the distance specified. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SumShape(MonteCarloSS.Shape a,
MonteCarloSS.Shape b)
a - Shapeb - Shapepublic SumShape(MonteCarloSS.Shape[] shapes)
shapes - Shape[]| Method Detail |
|---|
public boolean contains(double[] pos)
contains in interface MonteCarloSS.Shapepos - double[]
public double getFirstIntersection(double[] pos0,
double[] pos1)
getFirstIntersection in interface MonteCarloSS.Shapepos0 - double[]pos1 - double[]
public void rotate(double[] pivot,
double phi,
double theta,
double psi)
ITransform| [ | cos(phi)*cos(th)*cos(psi)-sin(phi)*sin(psi) | -sin(phi)*cos(th)*cos(psi)-cos(phi)*sin(psi) | sin(th)*cos(psi) | ] |
| [ | sin(phi)*cos(psi)+cos(phi)*cos(th)*sin(psi) | -sin(phi)*cos(th)*sin(psi)+cos(phi)*cos(psi) | sin(th)*sin(psi) | ] |
| [ | -cos(phi)*sin(th) | sin(th)*sin(phi) | cos(th) | ] |
rotate in interface ITransformpivot - double[] - a three-vector specifying the point around which
the rotation is performedphi - doubletheta - doublepsi - doublepublic void translate(double[] distance)
ITransform
translate in interface ITransformdistance - double[] - A three-vector specifying how much to translate
public void render(TrajectoryVRML.RenderContext rc,
java.io.Writer wr)
throws java.io.IOException
render in interface TrajectoryVRML.IRenderrc - wr -
java.io.IOExceptionTrajectoryVRML.IRender.render(gov.nist.microanalysis.NISTMonte.TrajectoryVRML.RenderContext,
java.io.Writer)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||