public class PamShapes3D
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static javax.vecmath.Color3f |
black |
static javax.vecmath.Color3f |
blue |
static javax.vecmath.Color3f |
green |
static javax.vecmath.Color3f |
grey |
static javax.vecmath.Color3f |
orange |
static javax.vecmath.Color3f[] |
pamColours3D |
static javax.vecmath.Color3f |
purple |
static javax.vecmath.Color3f |
red |
static javax.vecmath.Color3f |
white |
static javax.vecmath.Color3f |
yellow |
Constructor and Description |
---|
PamShapes3D() |
Modifier and Type | Method and Description |
---|---|
static javax.media.j3d.Shape3D |
create3DCross(float x,
float y,
float z,
javax.media.j3d.Appearance lineApp)
Creates a 3D cross, with each axis of the cross the size specified by x, y and z.
|
static javax.media.j3d.BranchGroup |
createAxis(float v1,
float v2,
float v3,
float textSize,
java.lang.String l1,
java.lang.String l2,
java.lang.String l3,
javax.vecmath.Color3f col)
Creates a set of labelled axis showing each 3D dimension.
|
static javax.media.j3d.BranchGroup |
createHydrophoneArray(java.util.ArrayList<javax.vecmath.Point3d> hydrophones) |
static javax.media.j3d.BranchGroup |
createSeaSurface(float width,
javax.vecmath.Color3f colour)
Creates a semi-transparent square surface of specified width and colour.
|
static javax.media.j3d.Shape3D |
createSphere(javax.media.j3d.Appearance ap,
float size)
Create a sphere with appearance ap and specified size.
|
static javax.media.j3d.TransformGroup |
createSphere(javax.vecmath.Point3f point3f,
javax.media.j3d.Appearance ap,
float size)
Create a sphere of appearance ap moved to a position specified by point3f.
|
static javax.media.j3d.Geometry |
createStripGeomtry(java.util.ArrayList<javax.vecmath.Point3f[]> strips)
Creates the geometry for a shape defined by a series of circular strips.
|
static javax.vecmath.Color3f |
getPamColour3D(int i)
Get a colour form a set colour array
|
static javax.media.j3d.Appearance |
lineAppearance(float LineWidth,
boolean AntiAliasing,
javax.vecmath.Color3f colour)
Specific function for setting the appearance of a line.
|
static javax.media.j3d.Shape3D |
linePolygon3D(java.util.ArrayList<javax.vecmath.Point3f> Data,
javax.media.j3d.Appearance app)
Creates a joined series of lines specified by an array of 3D points.
|
static javax.media.j3d.Appearance |
PointAppearance(float size,
javax.vecmath.Color3f colour)
Create an appearance for a pointArray.
|
static javax.media.j3d.Shape3D |
pointArray3D(java.util.ArrayList<javax.vecmath.Point3f> Data,
javax.media.j3d.Appearance app)
Creates a series of points specified by an array of 3d points of appearance ap
|
static javax.vecmath.Color3f |
randomBlue()
Creates a random colour of blue.
|
static javax.vecmath.Color3f |
randomGreen() |
static javax.vecmath.Color3f |
randomRed()
Creates a random colour of blue.
|
static javax.media.j3d.Appearance |
sphereAppearance(javax.vecmath.Color3f col)
Creates an appearance.
|
static javax.media.j3d.Appearance |
sphereAppearanceMatt(javax.vecmath.Color3f col)
Creates a sphere appearance.
|
static javax.media.j3d.Appearance |
surfaceAppearance(javax.vecmath.Color3f colour,
float alpha)
Simple appearance for surface.
|
public static javax.vecmath.Color3f red
public static javax.vecmath.Color3f blue
public static javax.vecmath.Color3f green
public static javax.vecmath.Color3f black
public static javax.vecmath.Color3f white
public static javax.vecmath.Color3f grey
public static javax.vecmath.Color3f purple
public static javax.vecmath.Color3f yellow
public static javax.vecmath.Color3f orange
public static javax.vecmath.Color3f[] pamColours3D
public static javax.media.j3d.BranchGroup createHydrophoneArray(java.util.ArrayList<javax.vecmath.Point3d> hydrophones)
public static javax.media.j3d.TransformGroup createSphere(javax.vecmath.Point3f point3f, javax.media.j3d.Appearance ap, float size)
point3f-the
- desired position of the sphereap-
- the sphere appearance.size-
- the size of the sphere.public static javax.media.j3d.Shape3D createSphere(javax.media.j3d.Appearance ap, float size)
ap-
- appearance of the sphere.size
- - size of the spherepublic static javax.media.j3d.Appearance sphereAppearance(javax.vecmath.Color3f col)
col-
- colour of the sphere.public static javax.media.j3d.Appearance sphereAppearanceMatt(javax.vecmath.Color3f col)
col
- public static javax.media.j3d.BranchGroup createSeaSurface(float width, javax.vecmath.Color3f colour)
width-
- width of surface.colour-colour
- of surfacepublic static javax.media.j3d.Shape3D create3DCross(float x, float y, float z, javax.media.j3d.Appearance lineApp)
x-
- size of the cross in xy-
- size of the cross in yz-
- size of the cross in zlineapp
- - appearance of the cross.public static javax.media.j3d.Appearance lineAppearance(float LineWidth, boolean AntiAliasing, javax.vecmath.Color3f colour)
LineWidth
- AntiAliasing
- colour
- public static javax.vecmath.Color3f randomGreen()
public static javax.vecmath.Color3f randomBlue()
public static javax.vecmath.Color3f randomRed()
public static javax.media.j3d.Shape3D linePolygon3D(java.util.ArrayList<javax.vecmath.Point3f> Data, javax.media.j3d.Appearance app)
Data=
- an array of 3D pointsLine
- appearancepublic static javax.media.j3d.Shape3D pointArray3D(java.util.ArrayList<javax.vecmath.Point3f> Data, javax.media.j3d.Appearance app)
Data.
- An array of the points to create the shape3D.app.
- Appearance of the point array.public static javax.media.j3d.Appearance PointAppearance(float size, javax.vecmath.Color3f colour)
size-
- size of each point within point array.colour-colour
- of each point within point array.public static javax.media.j3d.BranchGroup createAxis(float v1, float v2, float v3, float textSize, java.lang.String l1, java.lang.String l2, java.lang.String l3, javax.vecmath.Color3f col)
v1-x
- axis sizev2-y
- axis sizev3-z
- axis size-often depthl1-
- x axis textl2-
- y axis textl3-
- z axis textcol-colour
- public static javax.media.j3d.Geometry createStripGeomtry(java.util.ArrayList<javax.vecmath.Point3f[]> strips)
strips
- public static javax.media.j3d.Appearance surfaceAppearance(javax.vecmath.Color3f colour, float alpha)
colour-
- colour of the surfacealpha-
- tranparancy.public static javax.vecmath.Color3f getPamColour3D(int i)
i-
- sepcifies which colour to get. If greater than the length of the array then takes remainder index.