|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectGeomRep.Ellipsoid
public class Ellipsoid
Class ellipsoid. This object represents an ellipsoid described by the equation: (X/mA)^2 + (Y/mB)^2 + (Z/mC)^2 = 1
To get a general ellipse, use transformations, for instance, the draw functions take a transformation matrix to transform the ellipsoid.
Implements GeomObject interface.
GeomObject| Field Summary | |
|---|---|
private float |
mA
semi major axis length along X. |
private float |
mB
semi major axis length along Y. |
private float |
mC
semi major axis length along Z. |
private java.awt.Color |
mEdgeColor
|
private java.lang.String |
mFileName
|
private OutputPanelInterface |
mOutPanel
|
private java.awt.Color |
mSurfaceColor
|
| Constructor Summary | |
|---|---|
Ellipsoid()
Class constructor. |
|
Ellipsoid(float a,
float b,
float c)
Class constructor. |
|
| Method Summary | |
|---|---|
void |
ComputeMaximumDelta()
|
void |
CutAcrossLine(float[] transMatrix,
float slope,
float intercept)
|
void |
CutAcrossPlane(float[] plane_coeff,
boolean retainPositive)
|
void |
DrawCameraImage(DrawingCanvasInterface canvas,
java.awt.Graphics g,
float[] transMatrix,
boolean onlySurface)
Draws the surface model with camera positioned at (X, Y, Z). |
void |
DrawCrinkleCut(DrawingCanvasInterface canvas,
java.awt.Graphics g,
float[] plane,
float[] transMatrix)
Draw cut plane of ellipsoid using supplied transformation. |
void |
DrawSurface(DrawingCanvasInterface canvas,
java.awt.Graphics g,
float[] transMatrix)
Draw surface model of ellipsoid using supplied transformation. |
void |
DrawSurfaceOnly(DrawingCanvasInterface canvas,
java.awt.Graphics g,
float[] transMatrix)
Draw only the surface model for object, without edges. |
void |
DrawWireFrame(DrawingCanvasInterface canvas,
java.awt.Graphics g,
float[] transMatrix)
Draw wireframe model of ellipsoid using supplied transformation. |
float[] |
GetCentroidCoor()
|
float |
GetCentroidX()
|
float |
GetCentroidY()
|
float |
GetCentroidZ()
|
java.awt.Color |
GetEdgeColor()
|
java.lang.String |
GetFileName()
|
float |
GetMaxDelta()
|
float |
GetMinX()
|
float |
GetMinY()
|
float |
GetMinZ()
|
java.awt.Color |
GetSurfaceColor()
|
void |
SetEdgeColor(java.awt.Color col)
|
void |
SetFileName(java.lang.String fileName)
|
void |
SetOutputPanel(OutputPanelInterface outPanel)
|
void |
SetSurfaceColor(java.awt.Color col)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private float mA
private float mB
private float mC
private java.lang.String mFileName
private java.awt.Color mSurfaceColor
private java.awt.Color mEdgeColor
private OutputPanelInterface mOutPanel
| Constructor Detail |
|---|
Ellipsoid()
Ellipsoid(float a,
float b,
float c)
a - semi major axis along X.b - semi major axis along Y.c - semi major axis along Z.| Method Detail |
|---|
public void SetFileName(java.lang.String fileName)
SetFileName in interface GeomObjectpublic java.lang.String GetFileName()
GetFileName in interface GeomObjectpublic void SetSurfaceColor(java.awt.Color col)
SetSurfaceColor in interface GeomObjectpublic java.awt.Color GetSurfaceColor()
GetSurfaceColor in interface GeomObjectpublic void SetEdgeColor(java.awt.Color col)
SetEdgeColor in interface GeomObjectpublic java.awt.Color GetEdgeColor()
GetEdgeColor in interface GeomObject
public void DrawWireFrame(DrawingCanvasInterface canvas,
java.awt.Graphics g,
float[] transMatrix)
DrawWireFrame in interface GeomObjectcanvas - DrawingCanvasInterfaceg - Graphics instancetransMatrix - A transformation matrix containing 16 elements,
i.e. 4X4 matrix.DrawingCanvasInterface,
DrawingCanvas
public void DrawSurface(DrawingCanvasInterface canvas,
java.awt.Graphics g,
float[] transMatrix)
DrawSurface in interface GeomObjectcanvas - DrawingCanvasInterfaceg - Graphics instancetransMatrix - A transformation matrix containing 16 elements,
i.e. 4X4 matrix.DrawingCanvasInterface,
DrawingCanvas
public void DrawSurfaceOnly(DrawingCanvasInterface canvas,
java.awt.Graphics g,
float[] transMatrix)
GeomObject
DrawSurfaceOnly in interface GeomObjectcanvas - Instance of DrawingCanvas (@see GridView.DrawingCanvas)g - Graphics instance to draw to.transMatrix - Transformation matrixDrawingCanvasInterface
public void DrawCameraImage(DrawingCanvasInterface canvas,
java.awt.Graphics g,
float[] transMatrix,
boolean onlySurface)
DrawCameraImage in interface GeomObject
public void DrawCrinkleCut(DrawingCanvasInterface canvas,
java.awt.Graphics g,
float[] plane,
float[] transMatrix)
DrawCrinkleCut in interface GeomObjectcanvas - DrawingCanvasInterfaceg - Graphics instanceplane - Cutting plane. Transformation is not applied to cutting
plane. Array of coefficients defining plane as:
plane[0]*X + plane[1]*Y + plane[2]*Z + plane[3] = 0
transMatrix - A transformation matrix containing 16 elements,
i.e. 4X4 matrix.DrawingCanvasInterface,
DrawingCanvas
public void CutAcrossPlane(float[] plane_coeff,
boolean retainPositive)
CutAcrossPlane in interface GeomObject
public void CutAcrossLine(float[] transMatrix,
float slope,
float intercept)
CutAcrossLine in interface GeomObjectpublic void ComputeMaximumDelta()
ComputeMaximumDelta in interface GeomObjectpublic float GetMinX()
GetMinX in interface GeomObjectpublic float GetMinY()
GetMinY in interface GeomObjectpublic float GetMinZ()
GetMinZ in interface GeomObjectpublic float[] GetCentroidCoor()
GetCentroidCoor in interface GeomObjectpublic float GetCentroidX()
GetCentroidX in interface GeomObjectpublic float GetCentroidY()
GetCentroidY in interface GeomObjectpublic float GetCentroidZ()
GetCentroidZ in interface GeomObjectpublic float GetMaxDelta()
GetMaxDelta in interface GeomObjectpublic void SetOutputPanel(OutputPanelInterface outPanel)
SetOutputPanel in interface GeomObject
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||