|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgov.nist.microanalysis.NISTMonte.Sphere
public class Sphere
Implements the MonteCarloSS.Shape interface for a sphere.
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 | |
|---|---|
Sphere(double[] center,
double radius)
Sphere - Constructs a Sphere object with the specified center and radius. |
|
| Method Summary | |
|---|---|
boolean |
contains(double[] pos)
contains - Is the specified point inside the item represented by this Shape interface? A point on the interface between two Shapes is considered to be inside both Shapes. |
double |
getFirstIntersection(double[] pos0,
double[] pos1)
getFirstIntersection - Consider a ray starting at pos0 towards pos1. |
double[] |
getInitialPoint()
getInitialPoint - Used when Sphere represents the chamber region. |
double[] |
getPointAt(double phi,
double theta,
double frac)
getPointAt - Returns the coordinates of the boundary point at the specified zenith (phi) and azimuthal (theta) angles. |
double |
getRadius()
getRadius - Returns the sphere's radius |
void |
render(TrajectoryVRML.RenderContext vra,
java.io.Writer wr)
render - Renders the object. |
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 Sphere(double[] center,
double radius)
center - double[] - The x,y & z coordinates of the center of the
sphere (meters)radius - double - The radius of the sphere in meters.| Method Detail |
|---|
public boolean contains(double[] pos)
MonteCarloSS.Shape
contains in interface MonteCarloSS.Shapepos - double[] - a three item array
public double getRadius()
public double getFirstIntersection(double[] pos0,
double[] pos1)
MonteCarloSS.Shape
getFirstIntersection in interface MonteCarloSS.Shapepos0 - double[] - three element arraypos1 - double[] - three element array
public double[] getInitialPoint()
public double[] getPointAt(double phi,
double theta,
double frac)
phi - doubletheta - doublefrac - double fraction of the total radius
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 vra,
java.io.Writer wr)
throws java.io.IOException
TrajectoryVRML.IRender
render in interface TrajectoryVRML.IRendervra - The RenderContext objectwr - The Writer into which to output the results
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||