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

📄 wireframe.java

📁 j3me java
💻 JAVA
字号:
/* * J3DME Fast 3D software rendering for small devices * Copyright (C) 2001 Onno Hommes * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */package net.jscience.j3dme;/** * This class implements the explicit geometry Wireframe. * The Wireframe geometry allows a model to be rendered as a wireframe. * This class adds the necessary wire definitions to the Geometry class * to allow the Renderer to draw the correct projection onto the viewport. * Since it only contains the wire definitions the drawn model will be * transparent (i.e. all wires will be visible at all times regardless * of the model orientation). The wire definition is implemented using * an array of int's containing an index into the coordinate stream. * The int's always come in pairs. The first of the pair represents the * index for the start coordinate and the second index represents the end * of the wire. Both the start and end index point to just the x component * of the coordinate. * @see Model * @see ViewPort */public class Wireframe extends Geometry{  protected int[] wires_from;  protected int[] wires_to;  /**   * Return a Wireframe geometry<p>   * This constructor uses the supplied coordinate stream and wirestream   * (both arrays of int's) to build a Wireframe geometry. In addition   * to assigning the stream data it determines the bounding radius.   *   * @param     c The array of int's representing the coordinate stream   * @param     w The array of int's representing the wire stream indices   */  public Wireframe(int[] x,int[] y,int[] z, int[] wf, int[] wt){     this.x = x;     this.y = y;     this.z = z;     wires_from = wf;     wires_to = wt;     bounding_radius = this.setBoundingRadius();  }}

⌨️ 快捷键说明

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