Boiler Plates

imports

import com.ms.dxmedia.*; all DirectAnimation classes
import java.awt.*; Dimension class
import java.net.*; URL class

An applet that instantiates the Album3D model

public class Album3D extends DXMApplet {
public void init() {
super.init() ;
setModel (new A3DM(this)) ;
}
}
class A3DM extends Model {
A3DM(DXMApplet dxma) {
Dimension dim = dxma.getSize();

The base unit of measure in DirectAnimation is the meter. Convert the size into meters by multiplying it with the pixelBvr.

_halfHeight = mul(toBvr(dim.height*0.5),pixelBvr);
_halfWidth = mul(toBvr(dim.width*0.5),pixelBvr);
}

Here we create the Album3D model.

public void createModel(BvrsToRun blst) {
}

stores the height of the applet viewport in the member variable.

private NumberBvr _halfHeight;
private NumberBvr _halfWidth;
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.