|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoptics.Optics
optics.OpticalSurface
public abstract class OpticalSurface
Abstract class to hold an general optical surface and the methods used to access the surface.
This is the base class of all the optical surfaces.
Field Summary | |
---|---|
static int |
CLEAR
Integer to specifies a clear aperture surface. |
protected OpticalGroup |
group
Which OpticalGroup does surface belongs to. |
static int |
REFLECTING
Integer to specified a reflecting surface |
static int |
REFRACTING
Integer to specified a refracting surface |
protected RefractiveIndex |
refractiveIndex
Refractive index on the image side. |
protected Position |
surfacePoint
Reference point for the surface from which other measures are made. |
protected int |
surfaceType
The surface type, being CLEAR, RERFACTING or REFLECTING. |
Fields inherited from class optics.Optics |
---|
DEFAULT_WAVELENGTH, errorStream, fmt, MICRONS |
Constructor Summary | |
---|---|
OpticalSurface()
|
Method Summary | |
---|---|
abstract double |
distance(Position p,
Director u)
Abstract method to get the distance from a point to the surface. |
double |
distance(RayVector r)
Method to get the distance from a RayVector to the surface. |
void |
edit()
Method to invoke the Surface Editor |
CircularAperture |
entranceAperture()
Method to get the entrance aperture of the surface begin cented on the surface at the edge-plane. |
CircularAperture |
exitAperture()
Method to get the exit aperture of the surface begin cented on the surface at the edge-plane. |
static OpticalSurface |
fromString(java.lang.String s)
Static method to get a OpticalSurface from a specifying String. |
static OpticalSurface |
fromTokens(java.util.StringTokenizer tokens)
Static method get an OpticalSurface from a tokenized String. |
abstract double |
getCurvature()
Abstract to get the curvature |
abstract double |
getEdgePlane()
Abstract to get the edge plane |
OpticalGroup |
getGroup()
Method to get the OpticalGroup to which the
surface belongs. |
double |
getIndex(double lambda)
Method to get the numerical value of the refractive index at a specified wavelength. |
abstract double |
getMaxRadius()
Abstract to get the maximum radius of the surface |
abstract Director |
getNormal(Position p)
Abstract method to get normal at specified point. |
Director |
getNormal(RayVector r)
Method to get the Normal at point specified by a RayVector. |
Position |
getPoint()
Method to get the surface reference point in global package coordinates taking the surface reference point as an offset from the OpticalGoup reference point. |
RefractiveIndex |
getRefractiveIndex()
Method to get the RefractiveIndex ,
may be null for non-refracting surface. |
Position |
getSurfacePoint()
Method to get the surface point |
int |
getSurfaceType()
Method to get the surface type |
int |
getSurfaceType(Position p)
Method to get the surface type at a particular position. |
void |
makeStandAlone()
Method to make the current surface standalone by nulling the group and setting the local reference point to be as the same location as the group/old local point combination. |
abstract javax.vecmath.Point2d |
pointInPlane(Position p,
Director u)
Abstract Method to calculate the point in two-dimensional point in the plane intersected by a ray with current position and direction. |
javax.vecmath.Point2d |
pointInPlane(RayVector r)
Method to calculate the point in two-dimensional point in the plane intersected by a RayVector |
void |
scale(double a)
Method to scale the surface by specified factor. |
void |
setGroup(OpticalGroup g)
Method to set the OpticalGroup
to which the surface belongs
It can be null for a standalone surface. |
abstract void |
setMaxRadius(double d)
Abstract to set the maximum radius of the surface |
void |
setRefractiveIndex(RefractiveIndex index)
Method to set the RefarctiveIndex . |
void |
setSurfacePoint(Position p)
Method to set the surface reference point |
void |
setSurfaceType(int type)
Method to set the surface type |
Methods inherited from class optics.Optics |
---|
getDefaultWaveLength, getErrorStream, getFormatString, getName, getStaticName, getVersion, printError, setDefaultWaveLength, setErrorStream, setFormatString, setMicrons |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int CLEAR
public static final int REFRACTING
public static final int REFLECTING
protected Position surfacePoint
protected RefractiveIndex refractiveIndex
protected int surfaceType
protected OpticalGroup group
Constructor Detail |
---|
public OpticalSurface()
Method Detail |
---|
public void setSurfacePoint(Position p)
p
- the surface pointpublic Position getSurfacePoint()
Position
the surface pointpublic void setSurfaceType(int type)
type
- the typepublic int getSurfaceType()
int
the surface typepublic int getSurfaceType(Position p)
p
- the position
int
the surface typegetSurfaceType()
public void scale(double a)
a
- scale factorpublic void setGroup(OpticalGroup g)
OpticalGroup
to which the surface belongs
It can be null for a standalone surface.
g
- The OpticalGrouppublic OpticalGroup getGroup()
OpticalGroup
to which the
surface belongs.
It may be null for a standalone surface.
OpticalGroup
this surface belongs.public Position getPoint()
OpticalGoup
reference point.
If the surface is stand
alone, then its surface reference point is returned.
For most applications this is the correct method to access the surface reference point.
Position
absolute surface reference point.public void setRefractiveIndex(RefractiveIndex index)
RefarctiveIndex
.
May be null for
a non refracting surface. If index set to null, then
surface type gets set to CLEAR.
index
- The Refractive Indexpublic RefractiveIndex getRefractiveIndex()
RefractiveIndex
,
may be null for non-refracting surface.
RefractiveIndex
The refractive indexpublic double getIndex(double lambda)
If the surface is not refracting, then
Double.NaN
is returned.
lambda
- the wavelength in microns.
double
value of refractive index.public abstract Director getNormal(Position p)
p
- the point, assumed to be on the surface.
Must be implemented by extending classes.
Director
the surface normal.public Director getNormal(RayVector r)
r
- the specifying RayVector.
Director
the surface normal.public abstract double distance(Position p, Director u)
Must be implemented by extending classes.
p
- the positionu
- the direction from the point.
double
the distance.public double distance(RayVector r)
r
- the RayVector.
double
the distancepublic abstract void setMaxRadius(double d)
Must be implemented by extending classes
d
- the maximum radiuspublic abstract double getMaxRadius()
double
the maximum radiuspublic abstract double getCurvature()
double
the curvature.public abstract double getEdgePlane()
double
plane containing the edge.public CircularAperture entranceAperture()
The returned CircularAperture will be in the same OpticalGroup as the current OpticalSurface, which can be null for a standalone surface.
CircularAperture
the entrance aperturepublic CircularAperture exitAperture()
For a single surface this is the same as the entrance aperture.
CircularAperture
the exit aperturepublic void makeStandAlone()
public abstract javax.vecmath.Point2d pointInPlane(Position p, Director u)
p
- the positionu
- the direction
Point2d
the position in the planepublic javax.vecmath.Point2d pointInPlane(RayVector r)
r
- the ray
Point2d
the position in the planepublic static OpticalSurface fromString(java.lang.String s)
s
- specifying String
OpticalSurface
fails to nullpublic static OpticalSurface fromTokens(java.util.StringTokenizer tokens)
tokens
- the token list
OpticalSurface
fails to nullpublic void edit()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |