|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectDrawHills.SingleHill
public class SingleHill
This is a basic super class for all 3D-paint procedures.
Field Summary | |
---|---|
protected int |
altitudeCos
Values not used when |angle| < .01 |
protected int |
altitudeSin
Values not used when |angle| < .01 |
protected int |
aziRotationShift
|
java.awt.Color |
BackgroundColor
|
protected int |
center_x
|
protected int |
center_y
|
protected int |
CosRotationAngle
|
protected int |
CurrFactor
|
protected int |
CurrScreenX
|
protected int |
CurrScreenY
|
protected boolean |
debug
Set this for debug mode |
protected boolean |
displayAxes
Labels: Axis, ... |
protected int |
firstMeshDrawIx
|
static boolean |
flagTrianglesVsSquares
|
protected int |
frameNumber
Analog of hills internal time: Number of calls to hill: Can be used if external synch is not supplied. |
static int |
funFlippedParabola
|
static int |
funGaussBell
|
static int |
funLowSphere
|
int |
funN
|
static int |
funPolinomials
|
static int |
funTerrain
Functions templates: There are two ways to use functions. |
static int |
funUpperSphere
|
static int |
funY2mX2
|
protected java.awt.Graphics |
g
|
protected java.awt.Color |
hillAxisColor
|
protected int |
hOOx
hOO - Pos in Observer basis respectively to Obs. |
protected int |
hOOy
hOO - Pos in Observer basis respectively to Obs. |
protected int |
hOOz
hOO - Pos in Observer basis respectively to Obs. |
protected int |
lastMeshDrawIx
|
protected int |
lightX
|
protected int |
lightY
|
protected int |
lightZ
|
protected int |
MoonHalfPeriod
|
protected int |
MoonHorizontalRadius
|
protected int |
MoonXStart
|
protected int |
MoonZ
|
protected int[] |
n2X
|
protected int[] |
n2Y
|
protected int[] |
n2Z
|
protected int[] |
nX
|
protected int[] |
nY
|
protected int[] |
nZ
|
protected double |
oAltitudeViewAngle
|
protected int |
obsX
obs - Pos of Obs in Flat Valley. |
protected int |
obsY
obs - Pos of Obs in Flat Valley. |
protected int |
obsZ
obs - Pos of Obs in Flat Valley. |
java.awt.Color |
OwnColor
|
protected int |
phase_sig
|
protected int |
phase_sub
|
protected int |
posX
pos - Pos of Hill in Flat Valley. |
protected int |
posY
pos - Pos of Hill in Flat Valley. |
protected int |
posZ
pos - Pos of Hill in Flat Valley. |
protected int |
radius
|
protected int[][] |
Real_current
|
protected int[][] |
Real_previous
|
protected int |
ReservedDomain
Remember: Xsize * Yrange < ReservedDomain |
protected int |
REventX
|
protected int |
REventY
|
protected int |
RotatedYAuxilairy
|
protected int |
RotationModula
|
protected int |
safeModule
|
protected int |
safeScale
|
protected int[][] |
screen_current
|
protected int[][] |
screen_upper
|
protected int[][] |
screenMesh2X
This is a mesh: "patches" on function's surface: See triangles ABC and ACD below in ContructHill method. |
protected int[][] |
screenMesh2Z
For second triangle. |
protected int[][] |
screenMeshX
|
protected int[][] |
screenMeshZ
|
protected int |
ScreenXL
|
protected int |
ScreenYL
|
protected double |
shieldRadius
|
protected int |
SinRotationAngle
|
protected SPad |
sp
Labels: Text area ... |
protected SPad |
spOwn
Labels: Text area ... |
protected int |
tangentOfVision
|
protected int |
Xmax
|
protected int |
Xmin
|
protected int |
Xsize
|
protected int |
Xstep
|
protected int |
Ymax
|
int |
YMaxMin
|
protected int |
Ymin
|
protected int |
Yrange
|
protected int |
Ystep
|
Constructor Summary | |
---|---|
SingleHill()
|
|
SingleHill(SPad sp,
SPad spOwn,
int ScreenXL,
int ScreenYL,
int center_x,
int center_y,
int funN)
|
Method Summary | |
---|---|
protected void |
ConstructHill()
|
protected void |
DisplayMoon()
|
protected void |
DrawAxisToHill()
|
protected void |
DrawCoordinateAxis()
|
void |
DrawLegendedLine(int X1,
int Y1,
int Z1,
int X2,
int Y2,
int Z2,
java.awt.Color c,
java.lang.String LTitle)
|
void |
DrawLegendedLine(int X1,
int Y1,
int Z1,
int X2,
int Y2,
int Z2,
int Col1,
int Col2,
int Col3,
java.lang.String LTitle)
|
protected void |
FindMoonPhase(int HalfPeriod)
|
int |
FindScreenX(int X,
int Y,
int Z)
|
int |
FindScreenY(int X,
int Y,
int Z)
|
int |
Fun(int funNumb,
int X,
int Y)
|
void |
InsertSubHill(int iii,
int frontDistance)
Just a template for children classes. |
void |
ms(java.lang.String s)
|
int |
ObsToSX(int X,
int Y,
int Z)
|
protected void |
PaintAuxSigns()
|
protected void |
PaintFunction()
|
void |
paintHill(int obsX,
int obsY,
int obsZ,
double obsY1,
double obsY2,
double obsY3,
int ExternalFrameNumber,
boolean fillScrBackgroundBeforeDraw,
boolean dispalyMoon,
boolean displayAxes,
double oAltitudeViewAngle)
This is main interface to paint procedures, main gate. |
protected void |
paintHillInternally(boolean recalculate_function,
boolean fillScrBackgroundBeforeDraw,
boolean dispalyMoon,
boolean displayAxes)
|
protected void |
PositionMoon()
|
void |
ProjectObsSpaceLineToS(int X1,
int Y1,
int Z1,
int X2,
int Y2,
int Z2,
java.awt.Color c,
java.lang.String LTitle)
|
void |
ProjectObsSpaceLineToScr(int X1,
int Y1,
int Z1,
int X2,
int Y2,
int Z2,
int Col1,
int Col2,
int Col3,
java.lang.String LTitle)
|
void |
releaseGraphics()
|
int |
root(int t)
|
int |
RotateArgToFunctDomainBasisX(int X,
int Y)
|
void |
supplyGraphics()
Make sure that this is executed after contructor after own Scratch Pad Graphics is supplied. |
int |
XRotated(int X,
int Y)
|
int |
YRotated()
|
int |
YRotatedBack()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static boolean flagTrianglesVsSquares
protected boolean debug
protected boolean displayAxes
protected int safeModule
protected int safeScale
protected int tangentOfVision
protected int posX
pos - Pos of Hill in Flat Valley. Iww, in Flat Local Scene. They are set at function definition. They are not used in internal paint procedures. They are used only to define hOO.
protected int posY
pos - Pos of Hill in Flat Valley. Iww, in Flat Local Scene. They are set at function definition. They are not used in internal paint procedures. They are used only to define hOO.
protected int posZ
pos - Pos of Hill in Flat Valley. Iww, in Flat Local Scene. They are set at function definition. They are not used in internal paint procedures. They are used only to define hOO.
protected int obsX
protected int obsY
protected int obsZ
protected int hOOx
protected int hOOy
protected int hOOz
protected int altitudeCos
protected int altitudeSin
protected double oAltitudeViewAngle
public static final int funTerrain
public static final int funFlippedParabola
public static final int funY2mX2
public static final int funGaussBell
public static final int funPolinomials
public static final int funUpperSphere
public static final int funLowSphere
public int funN
protected double shieldRadius
protected int Xmin
protected int Xmax
protected int Xstep
protected int Ymin
protected int Ymax
protected int Ystep
public int YMaxMin
protected int aziRotationShift
protected int RotationModula
protected int SinRotationAngle
protected int CosRotationAngle
protected int RotatedYAuxilairy
protected int center_x
protected int center_y
protected int ScreenXL
protected int ScreenYL
protected int CurrScreenX
protected int CurrScreenY
protected int CurrFactor
protected int ReservedDomain
protected int Xsize
protected int Yrange
protected int firstMeshDrawIx
protected int lastMeshDrawIx
protected int[][] screenMeshX
protected int[][] screenMeshZ
protected int[][] screenMesh2X
protected int[][] screenMesh2Z
protected int[] nX
protected int[] nY
protected int[] nZ
protected int[] n2X
protected int[] n2Y
protected int[] n2Z
protected int[][] screen_current
protected int[][] Real_current
protected int[][] Real_previous
protected int[][] screen_upper
public java.awt.Color BackgroundColor
public java.awt.Color OwnColor
protected java.awt.Color hillAxisColor
protected int phase_sub
protected int phase_sig
protected int MoonZ
protected int MoonHorizontalRadius
protected int MoonHalfPeriod
protected int MoonXStart
protected int lightZ
protected int lightY
protected int lightX
protected int REventX
protected int REventY
protected int radius
protected java.awt.Graphics g
protected SPad sp
protected SPad spOwn
protected int frameNumber
Constructor Detail |
---|
public SingleHill()
public SingleHill(SPad sp, SPad spOwn, int ScreenXL, int ScreenYL, int center_x, int center_y, int funN)
Method Detail |
---|
public void supplyGraphics()
public void releaseGraphics()
public void paintHill(int obsX, int obsY, int obsZ, double obsY1, double obsY2, double obsY3, int ExternalFrameNumber, boolean fillScrBackgroundBeforeDraw, boolean dispalyMoon, boolean displayAxes, double oAltitudeViewAngle)
This is main interface to paint procedures, main gate.
obsX
- Observer's X-position in Flat Valley.ExternalFrameNumber
- synchronize with external state frame number
if < 0 then internal frame numeration is used.obsY1
- projection of n on axis X = Cos(FI)obsY2
- projection of n on axis Y = Sin(FI)obsY3
- projection of n on axis Z = Cos(PSY) - not used
If observer turns the head clockwise, then FI > 0
The Hill turns couterclockwise, so x'=xCos(FI)-ySin(FI)
Here: obsY1=nx=Cos(FI), ny=obsY2=Sin(FI), nz=obsY3=Cos(PSY).
vector n=observer's direction after observer's turn.
(Note: if to measure obs turn respect to axis X, FI|X, then
FI|Y = FI|X - PI/2.)fillScrBackgroundBeforeDraw
- protected void paintHillInternally(boolean recalculate_function, boolean fillScrBackgroundBeforeDraw, boolean dispalyMoon, boolean displayAxes)
protected void ConstructHill()
protected void PaintFunction()
protected void DrawCoordinateAxis()
protected void DrawAxisToHill()
public void ProjectObsSpaceLineToScr(int X1, int Y1, int Z1, int X2, int Y2, int Z2, int Col1, int Col2, int Col3, java.lang.String LTitle)
public void ProjectObsSpaceLineToS(int X1, int Y1, int Z1, int X2, int Y2, int Z2, java.awt.Color c, java.lang.String LTitle)
public void DrawLegendedLine(int X1, int Y1, int Z1, int X2, int Y2, int Z2, int Col1, int Col2, int Col3, java.lang.String LTitle)
public void DrawLegendedLine(int X1, int Y1, int Z1, int X2, int Y2, int Z2, java.awt.Color c, java.lang.String LTitle)
public int XRotated(int X, int Y)
public int YRotated()
public int RotateArgToFunctDomainBasisX(int X, int Y)
public int YRotatedBack()
public int FindScreenX(int X, int Y, int Z)
public int FindScreenY(int X, int Y, int Z)
public int ObsToSX(int X, int Y, int Z)
protected void FindMoonPhase(int HalfPeriod)
protected void PositionMoon()
protected void DisplayMoon()
public void ms(java.lang.String s)
protected void PaintAuxSigns()
public int Fun(int funNumb, int X, int Y)
public int root(int t)
public void InsertSubHill(int iii, int frontDistance)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |