A B C D E G H I K L M N O P R S T V W

A

addRandomColors(Mesh) - Static method in class m3g05.mesh.MeshUtils
Assigns a random color to each vertex of a mesh.

B

backCommand - Variable in class m3g05.Main
Back command.
Bezier - Class in m3g05.mesh
Calculations for Bezier surfaces.
Bezier(int, boolean) - Constructor for class m3g05.mesh.Bezier
Initializes class.

C

camera - Variable in class m3g05.ViewTransformationsSample
Camera.
camera - Variable in class m3g05.WireframeEngine
Camera object that represents the viewer of the 3D scene.
cameraParallel - Variable in class m3g05.ProjectionSample
Camera with parallel projection.
cameraPerspective - Variable in class m3g05.ProjectionSample
Camera with perspective projection.
cameraTransform - Variable in class m3g05.ProjectionSample
The camera's transformation.
cameraTransform - Variable in class m3g05.ViewTransformationsSample
The camera's transformation.
commandAction(Command, Displayable) - Method in class m3g05.Main
Receives command actions from the selection screen as well as the samples.
CONTROL_POINTS - Static variable in class m3g05.mesh.Teapot
The actual control points of the teapot.
copyTexCoords(Mesh, int, int) - Static method in class m3g05.mesh.MeshUtils
Duplicates texture coordinates from one unit to another.
create(int, boolean, boolean) - Static method in class m3g05.mesh.Teapot
Creates a new teapot with the given subdivisions in s and t direction.
createCube(boolean, boolean, boolean) - Static method in class m3g05.mesh.MeshFactory3D
Creates a cube with three separate vertices for each corner.
createCylinder(int, boolean, boolean) - Static method in class m3g05.mesh.MeshFactory3D
Creates a cylinder with a radius of one unit and a height of two units.
createDisc(int) - Static method in class m3g05.mesh.MeshFactory2D
Creates a disc with radius one on the x-y plane.
createMesh(int) - Method in class m3g05.WireframeSample
Creates a mesh based on the given ID.
createMinimalCube() - Static method in class m3g05.mesh.MeshFactory3D
Creates a cube with one vertex per corner.
createNormals(short[], short[], short[], int) - Method in class m3g05.mesh.Bezier
Calculates normals.
createPositions(short[], short[], short[], int) - Method in class m3g05.mesh.Bezier
Calculates the vertex positions of a cubic Bezier surface (16 control points).
createQuad(boolean) - Static method in class m3g05.mesh.MeshFactory2D
Creates a quad with a side length of two units on the x-y plane.
createSphere(int, int, boolean, boolean) - Static method in class m3g05.mesh.MeshFactory3D
Creates a sphere that's subdivided with the given number of slices and stacks.
createTexCoords(byte[], int, boolean) - Method in class m3g05.mesh.Bezier
Calculates texture coordinates.
createTriangle() - Static method in class m3g05.mesh.MeshFactory2D
Creates a triangle on the x-y plane.
createTriStrips(int, int[], int[], int, boolean) - Method in class m3g05.mesh.Bezier
Calculates triangle strips for the evaluated Bezier surface.
cross(short[], int, short[], int, short[], int) - Static method in class m3g05.mesh.Bezier
Builds the cross product of two vectors.
currentMesh - Variable in class m3g05.WireframeSample
Current mesh.
currentSample - Variable in class m3g05.Main
Currently displayed sample.
currentTransformation - Variable in class m3g05.ModelTransformationsSample
Current transformation.

D

DepthBufferSample - Class in m3g05
Sample demonstrating the depth buffer.
DepthBufferSample() - Constructor for class m3g05.DepthBufferSample
Constructor.
destroy() - Method in class m3g05.DepthBufferSample
Destroys the sample.
destroy() - Method in class m3g05.ModelTransformationsSample
Destroys the sample.
destroy() - Method in class m3g05.ProjectionSample
Destroys the sample.
destroy() - Method in interface m3g05.Sample
Tells the sample to destroy itself.
destroy() - Method in class m3g05.ViewTransformationsSample
Destroys the sample.
destroy() - Method in class m3g05.WireframeSample
Destroys the sample.
destroyApp(boolean) - Method in class m3g05.Main
Enters the destroyed state.
diffsS - Variable in class m3g05.mesh.Bezier
Buffers for storing intermediate data.
diffsT - Variable in class m3g05.mesh.Bezier
Buffers for storing intermediate data.
draw(Graphics, float[], int[], int[]) - Method in class m3g05.WireframeEngine
Draws a wireframe model on the given graphics context.
drawMenu(Graphics) - Method in class m3g05.DepthBufferSample
Draws a menu for the current key assignments.
drawMenu(Graphics) - Method in class m3g05.ModelTransformationsSample
Draws a menu for the current key assignments.
drawMenu(Graphics) - Method in class m3g05.ProjectionSample
Draws a menu for the current key assignments.
drawMenu(Graphics) - Method in class m3g05.ViewTransformationsSample
Draws a menu for the current key assignments.
drawMenu(Graphics) - Method in class m3g05.WireframeSample
Draws a menu for the current key assignments.

E

evaluateCubicCurve(short[], int, int, int, int, short[], int, int, float, float, float) - Static method in class m3g05.mesh.Bezier
Evaluates a cubic Bezier curve (four control points).
evaluateQuadraticCurve(short[], int, int, int, short[], int, int, float, float) - Static method in class m3g05.mesh.Bezier
Evaluates a quadratic Bezier curve (three control points).
exitCommand - Variable in class m3g05.Main
Exit command.

G

getLastTriangleIndices() - Static method in class m3g05.mesh.MeshUtils
Access to the triangle indices of the mesh generated last.
getLastTriangleLengths() - Static method in class m3g05.mesh.MeshUtils
Access to the strip lengths of the mesh generated last.
graphics - Variable in class m3g05.DepthBufferSample
2D graphics singleton used for rendering.
graphics - Variable in class m3g05.ModelTransformationsSample
2D graphics singleton used for rendering.
graphics - Variable in class m3g05.ProjectionSample
2D graphics singleton used for rendering.
graphics - Variable in class m3g05.ViewTransformationsSample
2D graphics singleton used for rendering.
graphics - Variable in class m3g05.WireframeSample
2D graphics singleton used for rendering.
graphics3d - Variable in class m3g05.DepthBufferSample
3D graphics singleton used for rendering.
graphics3d - Variable in class m3g05.ModelTransformationsSample
3D graphics singleton used for rendering.
graphics3d - Variable in class m3g05.ProjectionSample
3D graphics singleton used for rendering.
graphics3d - Variable in class m3g05.ViewTransformationsSample
3D graphics singleton used for rendering.

H

halfViewportHeight - Variable in class m3g05.WireframeEngine
Half the viewport height.
halfViewportWidth - Variable in class m3g05.WireframeEngine
Half the viewport width.

I

init() - Method in class m3g05.DepthBufferSample
Initializes the sample.
init() - Method in class m3g05.ModelTransformationsSample
Initializes the sample.
init() - Method in class m3g05.ProjectionSample
Initializes the sample.
init() - Method in interface m3g05.Sample
Tells the sample to initialize itself.
init() - Method in class m3g05.ViewTransformationsSample
Initializes the sample.
init() - Method in class m3g05.WireframeSample
Initializes the sample.
intermediatePointsS - Variable in class m3g05.mesh.Bezier
Buffers for storing intermediate data.
intermediatePointsT - Variable in class m3g05.mesh.Bezier
Buffers for storing intermediate data.
invertedCameraTransform - Variable in class m3g05.WireframeEngine
Transformation for camera.
isDepthBufferEnabled - Variable in class m3g05.DepthBufferSample
Flag whether depth buffer is enabled.
isPerspective - Variable in class m3g05.ProjectionSample
Flag whether perspective or parallel projection is used.

K

keyPressed(int) - Method in class m3g05.DepthBufferSample
Handles key presses.
keyPressed(int) - Method in class m3g05.ModelTransformationsSample
Handles key presses.
keyPressed(int) - Method in class m3g05.ProjectionSample
Handles key presses.
keyPressed(int) - Method in class m3g05.ViewTransformationsSample
Handles key presses.
keyPressed(int) - Method in class m3g05.WireframeSample
Handles key presses.

L

lastTriIndices - Static variable in class m3g05.mesh.MeshUtils
Holds the triangle indices of the mesh generated last.
lastTriLengths - Static variable in class m3g05.mesh.MeshUtils
Holds the strip lengths of the mesh generated last.

M

m3g05 - package m3g05
 
m3g05.mesh - package m3g05.mesh
 
Main - Class in m3g05
Application that runs the samples available in this chapter.
Main() - Constructor for class m3g05.Main
Constructor.
mesh - Variable in class m3g05.DepthBufferSample
Mesh for display.
mesh - Variable in class m3g05.ModelTransformationsSample
Mesh for display.
mesh - Variable in class m3g05.ProjectionSample
Mesh to display.
mesh - Variable in class m3g05.ViewTransformationsSample
Mesh for display.
mesh - Variable in class m3g05.WireframeSample
The mesh for display.
MESH_CUBE - Static variable in class m3g05.WireframeSample
Cube is displayed.
MESH_CYLINDER - Static variable in class m3g05.WireframeSample
Cylinder is displayed.
MESH_SPHERE - Static variable in class m3g05.WireframeSample
Sphere is displayed.
MESH_TEAPOT - Static variable in class m3g05.WireframeSample
Teapot is displayed.
MeshFactory2D - Class in m3g05.mesh
Factory methods for 2D meshes.
MeshFactory2D() - Constructor for class m3g05.mesh.MeshFactory2D
Constructor has private access because class contains static methods exclusively.
MeshFactory3D - Class in m3g05.mesh
Factory methods for 3D meshes.
MeshFactory3D() - Constructor for class m3g05.mesh.MeshFactory3D
Constructor has private access because class contains static methods exclusively.
meshTransform - Variable in class m3g05.ModelTransformationsSample
The mesh's transformation.
meshTransform - Variable in class m3g05.ProjectionSample
The mesh's transformation.
meshTransform - Variable in class m3g05.ViewTransformationsSample
The mesh's transformation.
meshTransform - Variable in class m3g05.WireframeSample
The mesh's transformation.
MeshUtils - Class in m3g05.mesh
Utility methods for meshes.
MeshUtils() - Constructor for class m3g05.mesh.MeshUtils
Constructor has private access because class contains static methods exclusively.
ModelTransformationsSample - Class in m3g05
Sample displaying a cube that can be transformed interactively.
ModelTransformationsSample() - Constructor for class m3g05.ModelTransformationsSample
Constructor.

N

NUMBER_OF_MESHES - Static variable in class m3g05.WireframeSample
Number of meshes.
NUMBER_OF_PATCHES - Static variable in class m3g05.mesh.Teapot
Number of patches, including reflected ones.
numVertices - Variable in class m3g05.mesh.Bezier
Number of vertices per curve.

O

orientationPortrait - Variable in class m3g05.ViewTransformationsSample
True indicates portrait orientation, false landscape.

P

PATCH_DATA - Static variable in class m3g05.mesh.Teapot
Defines the Bezier patches for the teapot.
pauseApp() - Method in class m3g05.Main
Enters the paused state.
ProjectionSample - Class in m3g05
Sample demonstrating parallel and perspective projection.
ProjectionSample() - Constructor for class m3g05.ProjectionSample
Constructor.

R

reflect(short[], int, int, int, int) - Static method in class m3g05.mesh.Bezier
Reflects an array of vectors around the given axis.
REFLECT_DATA - Static variable in class m3g05.mesh.Teapot
Specifies on what axis a patch needs to be reflected.
REFLECT_X - Static variable in class m3g05.mesh.Bezier
Reflection on the x axis.
REFLECT_Y - Static variable in class m3g05.mesh.Bezier
Reflection on the y axis.
REFLECT_Z - Static variable in class m3g05.mesh.Bezier
Reflection on the z axis.
render(Graphics) - Method in class m3g05.DepthBufferSample
Renders the sample.
render(Graphics) - Method in class m3g05.ModelTransformationsSample
Renders the sample.
render(Graphics) - Method in class m3g05.ProjectionSample
Renders the sample.
render(Graphics) - Method in class m3g05.ViewTransformationsSample
Renders the sample.
render(Graphics, Mesh, Transform, int[], int[]) - Method in class m3g05.WireframeEngine
Renders a 3D model as wireframe.
render(Graphics) - Method in class m3g05.WireframeSample
Renders the sample.
rotateBeforeTransform - Variable in class m3g05.ModelTransformationsSample
Flag for swapping order of rotation and translation.
rotX - Variable in class m3g05.ModelTransformationsSample
Current rotation value.
rotX - Variable in class m3g05.WireframeSample
Current rotation value.
rotY - Variable in class m3g05.ModelTransformationsSample
Current rotation value.
rotY - Variable in class m3g05.ViewTransformationsSample
Current rotation value.
rotY - Variable in class m3g05.WireframeSample
Current rotation value.
rotZ - Variable in class m3g05.ModelTransformationsSample
Current rotation value.

S

Sample - Interface in m3g05
Interface that needs to be implemented by samples.
SAMPLES - Static variable in class m3g05.Main
List of samples.
SCALE - Static variable in class m3g05.mesh.Teapot
The scale of the vertices in CONTROL_POINTS.
scaleX - Variable in class m3g05.ModelTransformationsSample
Current scale value.
scaleY - Variable in class m3g05.ModelTransformationsSample
Current scale value.
scaleZ - Variable in class m3g05.ModelTransformationsSample
Current scale value.
selectionScreen - Variable in class m3g05.Main
Screen for selecting samples.
setCamera() - Method in class m3g05.ViewTransformationsSample
Sets the camera in the Graphics3D context and initializes it with the current orientation and transformation parameters.
setCamera(Camera, Transform) - Method in class m3g05.WireframeEngine
Sets the camera that's used to represent the viewer of the scene.
setLastTriangleIndices(int[]) - Static method in class m3g05.mesh.MeshUtils
Sets the triangle indices of the mesh generated last.
setLastTriangleLengths(int[]) - Static method in class m3g05.mesh.MeshUtils
Sets the strip lengths of the mesh generated last.
setTransformationValues(int, int, boolean) - Method in class m3g05.ModelTransformationsSample
Updates the current transformation values.
shearTransform - Variable in class m3g05.ModelTransformationsSample
Current shear matrix.
startApp() - Method in class m3g05.Main
Enters the active state.
step1 - Variable in class m3g05.mesh.Bezier
Pre-computed values for curve evaluation.
step2 - Variable in class m3g05.mesh.Bezier
Pre-computed values for curve evaluation.
step3 - Variable in class m3g05.mesh.Bezier
Pre-computed values for curve evaluation.
steps - Variable in class m3g05.mesh.Bezier
Number of interpolation steps.
sub(short[], int, short[], int, int) - Static method in class m3g05.mesh.Bezier
Subtracts two vectors.
switchSample(Sample) - Method in class m3g05.Main
Destroys the current sample if it exists and displays a new one.

T

tangentsS - Variable in class m3g05.mesh.Bezier
Buffers for storing intermediate data.
tangentsT - Variable in class m3g05.mesh.Bezier
Buffers for storing intermediate data.
Teapot - Class in m3g05.mesh
Creates a new mesh based on the Bezier patches for the Utah Teapot.
Teapot() - Constructor for class m3g05.mesh.Teapot
Constructor has private access because class contains static methods exclusively.
transform(Transform) - Method in class m3g05.ModelTransformationsSample
Applies the current transformation values to the given Transform object.
transform(Mesh, Transform, Camera, Transform) - Method in class m3g05.WireframeEngine
Transforms vertices from 3D to 2D.
TRANSFORMATION_ROTATE - Static variable in class m3g05.ModelTransformationsSample
Indicates rotation.
TRANSFORMATION_SCALE - Static variable in class m3g05.ModelTransformationsSample
Indicates scaling.
TRANSFORMATION_SHEAR - Static variable in class m3g05.ModelTransformationsSample
Indicates shearing.
TRANSFORMATION_TRANSLATE - Static variable in class m3g05.ModelTransformationsSample
Indicates translation.
TRANSFORMATION_X_AXIS - Static variable in class m3g05.ModelTransformationsSample
Indicates transformation along x axis.
TRANSFORMATION_Y_AXIS - Static variable in class m3g05.ModelTransformationsSample
Indicates transformation along y axis.
TRANSFORMATION_Z_AXIS - Static variable in class m3g05.ModelTransformationsSample
Indicates transformation along z axis.
transX - Variable in class m3g05.ModelTransformationsSample
Current translation value.
transY - Variable in class m3g05.ModelTransformationsSample
Current translation value.
transZ - Variable in class m3g05.ModelTransformationsSample
Current translation value.

V

verticesPerCurve(int) - Static method in class m3g05.mesh.Bezier
Returns the number of vertices for a curve that is evaluated with the given number of steps.
viewportX - Variable in class m3g05.WireframeEngine
Viewport x.
viewportY - Variable in class m3g05.WireframeEngine
Viewport y.
ViewTransformationsSample - Class in m3g05
Demonstrates switching between portrait and landscape rendering by changing the camera transformation.
ViewTransformationsSample() - Constructor for class m3g05.ViewTransformationsSample
Constructor.

W

WireframeEngine - Class in m3g05
Wireframe engine that displays 3D models as line drawings.
WireframeEngine(int, int, int, int) - Constructor for class m3g05.WireframeEngine
Creates a new WireframeEngine with the given viewport attributes.
wireframeEngine - Variable in class m3g05.WireframeSample
Engine that does the actual drawing.
WireframeSample - Class in m3g05
Demonstrates manual transformation of vertices by displaying wireframe objects.
WireframeSample() - Constructor for class m3g05.WireframeSample
Constructor.

A B C D E G H I K L M N O P R S T V W