import graphics3d.Graphics3DFramework; import Graphics3D; import Math; // 円周率(PI)の値を使うため // プログラムの最初に呼び出される関数 void onStart ( int rendererID ) { // 画面サイズや背景色の設定(省略可能) setWindowSize( 800, 600 ); setBackgroundColor( 0, 0, 0, 255 ); // ローカル座標系を生成 int coord = newCoordinate( ); // ローカル座標系をワールド座標系に配置 mountCoordinate( coord, rendererID ); // ローカル座標系をX軸方向へ移動させる moveCoordinate( coord, 1.0, 0.0, 0.0 ); // ローカル座標系をZ軸まわりに45度回転 rotCoordinateZ( coord, PI/4.0 ); // ローカル座標系上に座標軸モデルを配置 int axis1 = newAxisModel( 1.5, 1.5, 1.5 ); mountModel( axis1, rendererID, coord ); // ワールド座標系上に座標軸モデルを配置 int axis2 = newAxisModel( 3.0, 3.0, 3.0 ); mountModel( axis2, rendererID ); }