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

A

addRandomColors(Mesh) - Static method in class m3g04.mesh.MeshUtils
Assigns a random color to each vertex of a mesh.
AMBIENT - Static variable in class m3g08.MaterialsSample
Material color for ambient reflection.
ambientLight - Variable in class m3g08.MaterialsSample
Ambient light for the scene.

B

backCommand - Variable in class m3g08.Main
Back command.
bakedTexture() - Method in class m3g08.EmulatingLightSample
Creates a new mesh with lighting baked into the texture.
Bezier - Class in m3g04.mesh
Calculations for Bezier surfaces.
Bezier(int, boolean) - Constructor for class m3g04.mesh.Bezier
Initializes class.

C

COLOR_ALL - Static variable in class m3g08.MaterialsSample
Color target full.
COLOR_AMBIENT - Static variable in class m3g08.MaterialsSample
Color target diffuse.
COLOR_DIFFUSE - Static variable in class m3g08.MaterialsSample
Color target specular.
COLOR_EMISSIVE - Static variable in class m3g08.MaterialsSample
Color target ambient.
COLOR_SPECULAR - Static variable in class m3g08.MaterialsSample
Color target emissive.
colorTarget - Variable in class m3g08.MaterialsSample
Current color target.
commandAction(Command, Displayable) - Method in class m3g08.Main
Receives command actions from the selection screen as well as the samples.
CONTROL_POINTS - Static variable in class m3g04.mesh.Teapot
The actual control points of the teapot.
copyTexCoords(Mesh, int, int) - Static method in class m3g04.mesh.MeshUtils
Duplicates texture coordinates from one unit to another.
create(int, boolean, boolean) - Static method in class m3g04.mesh.Teapot
Creates a new teapot with the given subdivisions in s and t direction.
createCube(boolean, boolean, boolean) - Static method in class m3g04.mesh.MeshFactory3D
Creates a cube with three separate vertices for each corner.
createCylinder(int, boolean, boolean) - Static method in class m3g04.mesh.MeshFactory3D
Creates a cylinder with a radius of one unit and a height of two units.
createDisc(int) - Static method in class m3g04.mesh.MeshFactory2D
Creates a disc with radius one on the x-y plane.
createMesh(int) - Method in class m3g08.EmulatingLightSample
Creates a new mesh according to the given lighting mode.
createMinimalCube() - Static method in class m3g04.mesh.MeshFactory3D
Creates a cube with one vertex per corner.
createNormals(short[], short[], short[], int) - Method in class m3g04.mesh.Bezier
Calculates normals.
createPositions(short[], short[], short[], int) - Method in class m3g04.mesh.Bezier
Calculates the vertex positions of a cubic Bezier surface (16 control points).
createQuad(boolean) - Static method in class m3g04.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 m3g04.mesh.MeshFactory3D
Creates a sphere that's subdivided with the given number of slices and stacks.
createTexCoords(byte[], int, boolean) - Method in class m3g04.mesh.Bezier
Calculates texture coordinates.
createTriangle() - Static method in class m3g04.mesh.MeshFactory2D
Creates a triangle on the x-y plane.
createTriStrips(int, int[], int[], int, boolean) - Method in class m3g04.mesh.Bezier
Calculates triangle strips for the evaluated Bezier surface.
cross(short[], int, short[], int, short[], int) - Static method in class m3g04.mesh.Bezier
Builds the cross product of two vectors.
currentLighting - Variable in class m3g08.EmulatingLightSample
Current lighting mode.
currentSample - Variable in class m3g08.Main
Currently displayed sample.

D

destroy() - Method in class m3g08.EmulatingLightSample
Destroys the sample.
destroy() - Method in class m3g08.LightingSample
Destroys the sample.
destroy() - Method in class m3g08.MaterialsSample
Destroys the sample.
destroy() - Method in interface m3g08.Sample
Tells the sample to destroy itself.
destroyApp(boolean) - Method in class m3g08.Main
Enters the destroyed state.
diffsS - Variable in class m3g04.mesh.Bezier
Buffers for storing intermediate data.
diffsT - Variable in class m3g04.mesh.Bezier
Buffers for storing intermediate data.
DIFFUSE - Static variable in class m3g08.MaterialsSample
Material color for diffuse reflection.
drawMenu(Graphics) - Method in class m3g08.EmulatingLightSample
Draws a menu for the current key assignments.
drawMenu(Graphics) - Method in class m3g08.LightingSample
Draws a menu for the current key assignments.
drawMenu(Graphics) - Method in class m3g08.MaterialsSample
Draws a menu for the current key assignments.
dynamicLight() - Method in class m3g08.EmulatingLightSample
Creates a new mesh for real lighting.

E

EMISSIVE - Static variable in class m3g08.MaterialsSample
Material color for emission.
EmulatingLightSample - Class in m3g08
Shows alternatives to real lighting.
EmulatingLightSample() - Constructor for class m3g08.EmulatingLightSample
Constructor.
evaluateCubicCurve(short[], int, int, int, int, short[], int, int, float, float, float) - Static method in class m3g04.mesh.Bezier
Evaluates a cubic Bezier curve (four control points).
evaluateQuadraticCurve(short[], int, int, int, short[], int, int, float, float) - Static method in class m3g04.mesh.Bezier
Evaluates a quadratic Bezier curve (three control points).
exitCommand - Variable in class m3g08.Main
Exit command.

G

graphics - Variable in class m3g08.EmulatingLightSample
2D graphics singleton used for rendering.
graphics - Variable in class m3g08.LightingSample
2D graphics singleton used for rendering.
graphics - Variable in class m3g08.MaterialsSample
2D graphics singleton used for rendering.
graphics3d - Variable in class m3g08.EmulatingLightSample
3D graphics singleton used for rendering.
graphics3d - Variable in class m3g08.LightingSample
3D graphics singleton used for rendering.
graphics3d - Variable in class m3g08.MaterialsSample
3D graphics singleton used for rendering.

I

init() - Method in class m3g08.EmulatingLightSample
Initializes the sample.
init() - Method in class m3g08.LightingSample
Initializes the sample.
init() - Method in class m3g08.MaterialsSample
Initializes the sample.
init() - Method in interface m3g08.Sample
Tells the sample to initialize itself.
intermediatePointsS - Variable in class m3g04.mesh.Bezier
Buffers for storing intermediate data.
intermediatePointsT - Variable in class m3g04.mesh.Bezier
Buffers for storing intermediate data.
isVertexTrackingEnabled - Variable in class m3g08.MaterialsSample
Flag whether vertex tracking is enabled.

K

keyPressed(int) - Method in class m3g08.EmulatingLightSample
Handles key presses.
keyPressed(int) - Method in class m3g08.LightingSample
Handles key presses.
keyPressed(int) - Method in class m3g08.MaterialsSample
Handles key presses.

L

light - Variable in class m3g08.LightingSample
Light for the scene.
light - Variable in class m3g08.MaterialsSample
First light for the scene.
LIGHT_AMBIENT - Static variable in class m3g08.LightingSample
Light mode ambient.
LIGHT_DIRECTIONAL - Static variable in class m3g08.LightingSample
Light mode directional.
LIGHT_OMNI - Static variable in class m3g08.LightingSample
Light mode omni.
LIGHT_SPOT - Static variable in class m3g08.LightingSample
Light mode spot.
LIGHTING_BAKED_TEXTURE - Static variable in class m3g08.EmulatingLightSample
Texture baking.
LIGHTING_DYNAMIC - Static variable in class m3g08.EmulatingLightSample
Real lighting.
LIGHTING_LIGHT_MAP - Static variable in class m3g08.EmulatingLightSample
Light map
LIGHTING_VERTEX_COLORS - Static variable in class m3g08.EmulatingLightSample
Vertex colors.
LightingSample - Class in m3g08
A sphere lit with different light sources.
LightingSample() - Constructor for class m3g08.LightingSample
Constructor.
lightMap() - Method in class m3g08.EmulatingLightSample
Creates a new mesh with a light map applied.
lightMode - Variable in class m3g08.LightingSample
Current light mode.
lightRotY - Variable in class m3g08.LightingSample
Current rotation value.
lightRotY - Variable in class m3g08.MaterialsSample
Current rotation value.
lightTransform - Variable in class m3g08.LightingSample
The light's transformation.
lightTransform - Variable in class m3g08.MaterialsSample
The first light's transformation.

M

m3g04.mesh - package m3g04.mesh
 
m3g08 - package m3g08
 
Main - Class in m3g08
Application that runs the samples available in this chapter.
Main() - Constructor for class m3g08.Main
Constructor.
material - Variable in class m3g08.MaterialsSample
Current material.
MaterialsSample - Class in m3g08
Demonstrates how different materials change the look of a mesh.
MaterialsSample() - Constructor for class m3g08.MaterialsSample
Constructor.
mesh - Variable in class m3g08.EmulatingLightSample
Mesh for display.
mesh - Variable in class m3g08.LightingSample
Mesh for display.
mesh - Variable in class m3g08.MaterialsSample
The mesh for display.
MeshFactory2D - Class in m3g04.mesh
Factory methods for 2D meshes.
MeshFactory2D() - Constructor for class m3g04.mesh.MeshFactory2D
Constructor has private access because class contains static methods exclusively.
MeshFactory3D - Class in m3g04.mesh
Factory methods for 3D meshes.
MeshFactory3D() - Constructor for class m3g04.mesh.MeshFactory3D
Constructor has private access because class contains static methods exclusively.
meshTransform - Variable in class m3g08.EmulatingLightSample
The mesh's transformation.
meshTransform - Variable in class m3g08.LightingSample
The mesh's transformation.
meshTransform - Variable in class m3g08.MaterialsSample
The mesh's transformation.
MeshUtils - Class in m3g04.mesh
Utility methods for meshes.
MeshUtils() - Constructor for class m3g04.mesh.MeshUtils
Constructor has private access because class contains static methods exclusively.

N

NUMBER_OF_COLOR_TARGETS - Static variable in class m3g08.MaterialsSample
Number of color targets.
NUMBER_OF_LIGHTING_MODES - Static variable in class m3g08.EmulatingLightSample
Number of light modes.
NUMBER_OF_LIGHTS - Static variable in class m3g08.LightingSample
Number of light sources.
NUMBER_OF_PATCHES - Static variable in class m3g04.mesh.Teapot
Number of patches, including reflected ones.
numVertices - Variable in class m3g04.mesh.Bezier
Number of vertices per curve.

P

PATCH_DATA - Static variable in class m3g04.mesh.Teapot
Defines the Bezier patches for the teapot.
pauseApp() - Method in class m3g08.Main
Enters the paused state.

R

reflect(short[], int, int, int, int) - Static method in class m3g04.mesh.Bezier
Reflects an array of vectors around the given axis.
REFLECT_DATA - Static variable in class m3g04.mesh.Teapot
Specifies on what axis a patch needs to be reflected.
REFLECT_X - Static variable in class m3g04.mesh.Bezier
Reflection on the x axis.
REFLECT_Y - Static variable in class m3g04.mesh.Bezier
Reflection on the y axis.
REFLECT_Z - Static variable in class m3g04.mesh.Bezier
Reflection on the z axis.
render(Graphics) - Method in class m3g08.EmulatingLightSample
Renders the sample.
render(Graphics) - Method in class m3g08.LightingSample
Renders the sample.
render(Graphics) - Method in class m3g08.MaterialsSample
Renders the sample.
rotY - Variable in class m3g08.EmulatingLightSample
Current rotation value.

S

Sample - Interface in m3g08
Interface that needs to be implemented by samples.
SAMPLES - Static variable in class m3g08.Main
List of samples.
SCALE - Static variable in class m3g04.mesh.Teapot
The scale of the vertices in CONTROL_POINTS.
selectionScreen - Variable in class m3g08.Main
Screen for selecting samples.
setLight(Transform, float) - Method in class m3g08.LightingSample
Transforms the light and adds it to the Graphics3D context.
setLight(Light, Light, Transform, float) - Method in class m3g08.MaterialsSample
Transforms the light and adds it to the Graphics3D context.
setLightMode(Light, int) - Method in class m3g08.LightingSample
Sets the light mode.
setMaterial(Mesh, Material, int) - Method in class m3g08.MaterialsSample
Sets the mesh's material.
SHININESS - Static variable in class m3g08.MaterialsSample
Shininess constant for specular reflection.
SPECULAR - Static variable in class m3g08.MaterialsSample
Material color for specular reflection.
startApp() - Method in class m3g08.Main
Enters the active state.
step1 - Variable in class m3g04.mesh.Bezier
Pre-computed values for curve evaluation.
step2 - Variable in class m3g04.mesh.Bezier
Pre-computed values for curve evaluation.
step3 - Variable in class m3g04.mesh.Bezier
Pre-computed values for curve evaluation.
steps - Variable in class m3g04.mesh.Bezier
Number of interpolation steps.
sub(short[], int, short[], int, int) - Static method in class m3g04.mesh.Bezier
Subtracts two vectors.
switchSample(Sample) - Method in class m3g08.Main
Destroys the current sample if it exists and displays a new one.

T

tangentsS - Variable in class m3g04.mesh.Bezier
Buffers for storing intermediate data.
tangentsT - Variable in class m3g04.mesh.Bezier
Buffers for storing intermediate data.
Teapot - Class in m3g04.mesh
Creates a new mesh based on the Bezier patches for the Utah Teapot.
Teapot() - Constructor for class m3g04.mesh.Teapot
Constructor has private access because class contains static methods exclusively.

V

VERTEX_COLORS - Static variable in class m3g08.EmulatingLightSample
Vertex colors with lighting information.
vertexColors() - Method in class m3g08.EmulatingLightSample
Creates a new mesh with lighting information in the vertex colors.
verticesPerCurve(int) - Static method in class m3g04.mesh.Bezier
Returns the number of vertices for a curve that is evaluated with the given number of steps.

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