⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.java

📁 基于java的3d开发库。对坐java3d的朋友有很大的帮助。
💻 JAVA
字号:
//===========================================================================import vsdk.toolkit.processing.SpharmonicKitWrapper;class main {    public static void    main(String[] args)    {        byte image[];        double sphericalHarmonicsR[];        double sphericalHarmonicsI[];        int i, x, y;        sphericalHarmonicsR = new double[16];        sphericalHarmonicsI = new double[16];        image = new byte[64*64];        for ( i = 0, y = 0; y < 64; y++ ) {            for ( x = 0; x < 64; x++, i++ ) {                if ( x < 32 && y < 32 || x > 32 && y > 32 ) {                    image[i] = 0;                }                else {                    image[i] = -1;                }            }        }        boolean status =         SpharmonicKitWrapper.calculateSphericalHarmonics(            image, sphericalHarmonicsR, sphericalHarmonicsI);        if ( !status ) {            System.err.println("Error calling native method.\n");        }        else {            for ( i = 0; i < sphericalHarmonicsR.length; i++ ) {                System.out.printf("  - <%.2f, %.2f>\n",                    sphericalHarmonicsR[i], sphericalHarmonicsI[i]);            }        }    }}//===========================================================================//= EOF                                                                     =//===========================================================================

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -