|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.gwoptics.graphics.Renderable org.gwoptics.graphics.graph3D.SurfaceTrace3D
public class SurfaceTrace3D
This class encapsulates a surface trace on a graph. It handles processing each point on the grid as well as colouring it it also handles relating graph space to world space(see below). This object is designed to work with the SurfaceGraph3D closely, or anything that uses Axis3D objects in a Cartesian form.
Firstly world space is the size of everything render in the sketch, so if we specify something has a length 100 its a 100 units long and at whatever position we set it at in units. Graph space on the other hand relates to the fact we can have axis ranges, for example -10 to 10, which is displayed along out axis which has a world length of 100. therefore 0 in graph space relates to 50 units along the axis in world space.
SquareGridMesh
,
IColourmap
Field Summary | |
---|---|
java.lang.String |
name
|
Fields inherited from class org.gwoptics.graphics.Renderable |
---|
position |
Constructor Summary | |
---|---|
SurfaceTrace3D(processing.core.PApplet parent,
Axis3D x,
Axis3D y,
Axis3D z,
int Xresolution,
int Yresolution,
IGraph3DCallback cb,
java.lang.String n,
IColourmap map)
To generate a surface trace all 3 cartesian axis that the trace is mapped onto need to be supplied, also the resolution of the grid in both X and Y directions. |
Method Summary | |
---|---|
void |
calculateSpacing()
This function must be called when an axis changes its range as the graph to world space constants will change. |
void |
draw()
Draws the surface trace |
void |
generateSurface()
This function calls the callback object set during the constructor, and applies the equation is represents to each of the points, relating graph space to world space for correctly position traces. |
float[] |
getLowestPoint()
|
float[] |
getMaximumPoint()
|
float |
getZValue(int X,
int Y)
|
void |
setAutoRangeZAxis(boolean value)
|
void |
setCallback(IGraph3DCallback cb)
|
void |
setIsSurfacedStroked(boolean b)
|
void |
setIsSurfaceFilled(boolean b)
|
void |
setSurfaceFill(GWColour c)
|
void |
setSurfaceStroke(GWColour c)
|
Methods inherited from class org.gwoptics.graphics.Renderable |
---|
setParent |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.lang.String name
Constructor Detail |
---|
public SurfaceTrace3D(processing.core.PApplet parent, Axis3D x, Axis3D y, Axis3D z, int Xresolution, int Yresolution, IGraph3DCallback cb, java.lang.String n, IColourmap map)
parent
- PApplet that will render this objectx
- Reference to X Axisy
- Reference to Y Axisz
- Reference to Z AxisXresolution
- Number of squares in X directionYresolution
- Number of squares in Z directioncb
- Callback object which defines the equation of the surfacen
- Name of the tracemap
- Colourmap used to colour surface. Can be null for for wireframe.Method Detail |
---|
public void setCallback(IGraph3DCallback cb)
public void setIsSurfacedStroked(boolean b)
public void setSurfaceStroke(GWColour c)
public void setIsSurfaceFilled(boolean b)
public void setSurfaceFill(GWColour c)
public void setAutoRangeZAxis(boolean value)
public float getZValue(int X, int Y)
public float[] getMaximumPoint()
public float[] getLowestPoint()
public void calculateSpacing()
public void generateSurface()
public void draw()
draw
in interface IRenderable
draw
in class Renderable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |