亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? cuboid.java

?? 《Java 3D編程》的源代碼
?? JAVA
字號:
// Based on Sun's Box.java 1.13 98/11/23 10:23:02// Work around for the Box bug when rendered in Wireframe mode.package org.selman.java3d.book.cuboidtest;import com.sun.j3d.utils.geometry.*;import javax.media.j3d.*;import javax.vecmath.*;/** * Cuboid is a geometry primitive created with a given length, width, and height. * It is centered at the origin. By default, it lies within the bounding  * Cuboid, [-1,-1,-1] and [1,1,1]. * * When a texture is applied to a Cuboid, it is map CCW like on a Cylinder. * A texture is mapped CCW from the back of the * body. The top and bottom faces are mapped such that the texture appears * front facing when the faces are rotated 90 toward the viewer. */public class Cuboid extends Primitive {	protected int numTris = 0;	protected int numVerts = 0;	/**	* Primitive flags.	*/	protected int flags;	/**	* Used to designate the front side of the Cuboid when using	* getShape().	*	* @see Cuboid#getShape	*/	public static final int FRONT = 0;	/**	* Used to designate the back side of the Cuboid when using	* getShape().	*	* @see Cuboid#getShape	*/	public static final int BACK = 1;	/**	* Used to designate the right side of the Cuboid when using	* getShape().	*	* @see Cuboid#getShape	*/	public static final int RIGHT = 2;	/**	* Used to designate the left side of the Cuboid when using	* getShape().	*	* @see Cuboid#getShape	*/	public static final int LEFT = 3;	/**	* Used to designate the top side of the Cuboid when using	* getShape().	*	* @see Cuboid#getShape	*/	public static final int TOP = 4;	/**	* Used to designate the bottom side of the Cuboid when using	* getShape().	*	* @see Cuboid#getShape	*/	public static final int BOTTOM = 5;	float xDim, yDim, zDim;	/**	* Constructs a default Cuboid of 1.0 in all dimensions. 	*/	public Cuboid( )	{		this( 1.0f, 1.0f, 1.0f, GENERATE_NORMALS, null );	}	public Appearance getAppearance( int index )	{		return null;	}	/** 	* Constructs a Cuboid of a given dimension and appearance.	*	* @param xdim X-dimension size.	* @param ydim Y-dimension size.	* @param zdim Z-dimension size.	* @param ap Appearance	*/	public Cuboid( float xdim, float ydim, float zdim, Appearance ap )	{		this( xdim, ydim, zdim, GENERATE_NORMALS, ap );	}	/** 	* Constructs a Cuboid of a given dimension, flags, and appearance.	*	* @param xdim X-dimension size.	* @param ydim Y-dimension size.	* @param zdim Z-dimension size.	* @param primflags primitive flags.	* @param ap Appearance	*/	public Cuboid( float xdim, float ydim, float zdim, int primflags,		Appearance ap )	{		int i;		double sign;		xDim = xdim;		yDim = ydim;		zDim = zdim;		flags = primflags;		//Depending on whether normal inward bit is set.		if ((flags & GENERATE_NORMALS_INWARD) != 0)			sign = -1.0;		else sign = 1.0;		TransformGroup objTrans = new TransformGroup( );		objTrans.setCapability( ALLOW_CHILDREN_READ );		this.addChild( objTrans );		Shape3D shape[] = new Shape3D[6];		for (i = FRONT; i <= BOTTOM; i++)		{			OldGeomBuffer gbuf = new OldGeomBuffer( 4 );			gbuf.begin( OldGeomBuffer.QUAD_STRIP );			for (int j = 0; j < 2; j++)			{				gbuf.normal3d( (double) normals[i].x*sign, 					(double) normals[i].y*sign, 					(double) normals[i].z*sign );				gbuf.texCoord2d( tcoords[i*8 + j*2], tcoords[i*8 + j*2 + 1] );				gbuf.vertex3d( (double) verts[i*12 + j*3]*xdim, 					(double) verts[i*12+ j*3 + 1]*ydim,					(double) verts[i*12+ j*3 + 2]*zdim );			}			for (int j = 3; j > 1; j--)			{				gbuf.normal3d( (double) normals[i].x*sign, 					(double) normals[i].y*sign, 					(double) normals[i].z*sign );				gbuf.texCoord2d( tcoords[i*8 + j*2], tcoords[i*8 + j*2 + 1] );				gbuf.vertex3d( (double) verts[i*12 + j*3]*xdim, 					(double) verts[i*12+ j*3 + 1]*ydim,					(double) verts[i*12+ j*3 + 2]*zdim );			}			gbuf.end( );			shape[i] = new Shape3D( gbuf.getGeom( flags ) );			numVerts = gbuf.getNumVerts( );			numTris = gbuf.getNumTris( );			if ((flags & ENABLE_APPEARANCE_MODIFY) != 0)			{				(shape[i]).setCapability( Shape3D.ALLOW_APPEARANCE_READ );				(shape[i] ).setCapability( Shape3D.ALLOW_APPEARANCE_WRITE );			}			objTrans.addChild( shape[i] );		}		if (ap == null)		{			setAppearance( );		}		else setAppearance( ap );	}	/**	*  Gets one of the faces (Shape3D) from the Cuboid that contains the	*  geometry and appearance. This allows users to modify the 	*  appearance or geometry of individual parts. 	* @param partId The part to return.	* @return The Shape3D object associated with the partID.  If an	* invalid partId is passed in, null is returned.	*/	public Shape3D getShape( int partId )	{		if ((partId >= FRONT) && (partId <= BOTTOM))			return ( Shape3D )(((Group)getChild( 0 )).getChild( partId ));		return null;	}	/**	*  Sets appearance of the Cuboid. This will set each face of the	*  Cuboid to the same appearance. To set each face's appearance 	*  separately, use getShape(partId) to get the	*  individual shape and call shape.setAppearance(ap). 	*/	public void setAppearance( Appearance ap )	{		((Shape3D)((Group)getChild( 0 )).getChild( TOP )).setAppearance( ap );		((Shape3D)((Group)getChild( 0 )).getChild( LEFT )).setAppearance( ap );		((Shape3D)((Group)getChild( 0 )).getChild( RIGHT )).setAppearance( ap );		((Shape3D)((Group)getChild( 0 )).getChild( FRONT )).setAppearance( ap );		((Shape3D)((Group)getChild( 0 )).getChild( BACK )).setAppearance( ap );		((Shape3D)((Group)getChild( 0 )).getChild( BOTTOM )).setAppearance( ap );	}	private static final float[] verts = {    // front face    1.0f, -1.0f,  1.0f,    1.0f,  1.0f,  1.0f,-1.0f,  1.0f,  1.0f,-1.0f, -1.0f,  1.0f,    // back face-1.0f, -1.0f, -1.0f,-1.0f,  1.0f, -1.0f,    1.0f,  1.0f, -1.0f,    1.0f, -1.0f, -1.0f,    // right face    1.0f, -1.0f, -1.0f,    1.0f,  1.0f, -1.0f,    1.0f,  1.0f,  1.0f,    1.0f, -1.0f,  1.0f,    // left face-1.0f, -1.0f,  1.0f,-1.0f,  1.0f,  1.0f,-1.0f,  1.0f, -1.0f,-1.0f, -1.0f, -1.0f,    // top face    1.0f,  1.0f,  1.0f,    1.0f,  1.0f, -1.0f,-1.0f,  1.0f, -1.0f,-1.0f,  1.0f,  1.0f,    // bottom face-1.0f, -1.0f,  1.0f,-1.0f, -1.0f, -1.0f,    1.0f, -1.0f, -1.0f,    1.0f, -1.0f,  1.0f,  };	private static final double[] tcoords = {    // front    1.0, 0.0,    1.0, 1.0,    0.0, 1.0,    0.0, 0.0,    // back    1.0, 0.0,    1.0, 1.0,    0.0, 1.0,    0.0, 0.0,    //right    1.0, 0.0,    1.0, 1.0,    0.0, 1.0,    0.0, 0.0,    // left    1.0, 0.0,    1.0, 1.0,    0.0, 1.0,    0.0, 0.0,    // top    1.0, 0.0,    1.0, 1.0,    0.0, 1.0,    0.0, 0.0,    // bottom    0.0, 1.0,    0.0, 0.0,    1.0, 0.0,    1.0, 1.0  };	private static final Vector3f[] normals = {    new Vector3f( 0.0f,  0.0f,  1.0f),	// front face    new Vector3f( 0.0f,  0.0f, -1.0f),	// back face    new Vector3f( 1.0f,  0.0f,  0.0f),	// right face    new Vector3f(-1.0f,  0.0f,  0.0f),	// left face    new Vector3f( 0.0f,  1.0f,  0.0f),	// top face    new Vector3f( 0.0f, -1.0f,  0.0f),	// bottom face  };	/**	* Used to create a new instance of the node.  This routine is called	* by <code>cloneTree</code> to duplicate the current node.	* <code>cloneNode</code> should be overridden by any user subclassed	* objects.  All subclasses must have their <code>cloneNode</code>	* method consist of the following lines:	* <P><blockquote><pre>	*     public Node cloneNode(boolean forceDuplicate) {	*         UserSubClass usc = new UserSubClass();	*         usc.duplicateNode(this, forceDuplicate);	*         return usc;	*     }	* </pre></blockquote>	* @param forceDuplicate when set to <code>true</code>, causes the	*  <code>duplicateOnCloneTree</code> flag to be ignored.  When	*  <code>false</code>, the value of each node's	*  <code>duplicateOnCloneTree</code> variable determines whether	*  NodeComponent data is duplicated or copied.	*	* @see Node#cloneTree	* @see Node#duplicateNode	* @see NodeComponent#setDuplicateOnCloneTree	*/	public Node cloneNode( boolean forceDuplicate )	{		Cuboid b = new Cuboid( xDim, yDim, zDim, flags, getAppearance( ) );		b.duplicateNode( this, forceDuplicate );		return b;	}	/**	* Copies all node information from <code>originalNode</code> into	* the current node.  This method is called from the	* <code>cloneNode</code> method which is, in turn, called by the	* <code>cloneTree</code> method.	* <P>	* For any <i>NodeComponent</i> objects	* contained by the object being duplicated, each <i>NodeComponent</i>	* object's <code>duplicateOnCloneTree</code> value is used to determine	* whether the <i>NodeComponent</i> should be duplicated in the new node	* or if just a reference to the current node should be placed in the	* new node.  This flag can be overridden by setting the	* <code>forceDuplicate</code> parameter in the <code>cloneTree</code>	* method to <code>true</code>.	*	* @param originalNode the original node to duplicate.	* @param forceDuplicate when set to <code>true</code>, causes the	*  <code>duplicateOnCloneTree</code> flag to be ignored.  When	*  <code>false</code>, the value of each node's	*  <code>duplicateOnCloneTree</code> variable determines whether	*  NodeComponent data is duplicated or copied.	*	* @see Node#cloneTree	* @see Node#cloneNode	* @see NodeComponent#setDuplicateOnCloneTree	*/	public void duplicateNode( Node originalNode, boolean forceDuplicate )	{		super.duplicateNode( originalNode, forceDuplicate );	}}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美国产日韩在线观看| 久久精品视频一区二区| 91偷拍与自偷拍精品| 久久99国产精品麻豆| 蜜臀国产一区二区三区在线播放| 亚洲一区二区偷拍精品| 亚洲一区视频在线观看视频| 亚洲一二三四久久| 亚洲一区二区成人在线观看| 一区二区成人在线观看| 午夜国产不卡在线观看视频| 喷白浆一区二区| 另类小说综合欧美亚洲| 九九在线精品视频| 国产大片一区二区| 91麻豆6部合集magnet| 在线中文字幕不卡| 欧美精品 国产精品| 精品乱码亚洲一区二区不卡| 久久久精品黄色| 欧美国产国产综合| 一区二区三区.www| 免费在线看一区| 大胆欧美人体老妇| 欧美日韩国产高清一区二区三区 | 欧美亚洲动漫制服丝袜| 在线观看国产一区二区| 欧美日韩成人综合在线一区二区| 日韩欧美一区中文| 日本一区二区三区四区在线视频| 亚洲精品ww久久久久久p站| 同产精品九九九| 高清不卡在线观看av| 日韩免费电影一区| 国产精品美日韩| 天堂成人国产精品一区| 国产高清视频一区| 欧洲精品中文字幕| 久久亚洲影视婷婷| 亚洲电影第三页| 成人av免费在线播放| 日韩一区二区三区四区| 亚洲男人电影天堂| 国产成人免费视频网站| 正在播放一区二区| 亚洲视频 欧洲视频| 国产一区在线视频| 欧美高清视频一二三区 | 一区二区三区在线观看国产| 久久av资源网| 欧美日韩国产精选| 中文字幕在线不卡视频| 国内欧美视频一区二区| 欧美性猛交xxxx乱大交退制版| 国产欧美综合在线观看第十页| 日韩中文字幕麻豆| 91论坛在线播放| 亚洲国产精华液网站w| 麻豆91精品91久久久的内涵| 色综合久久久网| 中文字幕久久午夜不卡| 久久国产精品99久久久久久老狼| 欧美日本一道本| 亚洲一卡二卡三卡四卡| 97精品国产露脸对白| 国产情人综合久久777777| 免费人成精品欧美精品| 欧美日韩一区二区在线观看| 亚洲最色的网站| 91丝袜国产在线播放| 国产精品久久久久四虎| 成人毛片在线观看| 中文一区在线播放| 成人性色生活片| 国产欧美日韩视频在线观看| 国产尤物一区二区在线| 2023国产精品视频| 国产中文字幕精品| 久久久91精品国产一区二区精品| 极品少妇xxxx精品少妇偷拍| 欧美一级高清片| 免费看欧美女人艹b| 亚洲精品一区二区三区福利| 久久成人综合网| 欧美国产日韩一二三区| 成人黄色在线网站| 亚洲摸摸操操av| 欧美裸体一区二区三区| 天天综合网天天综合色| 欧美一级欧美三级| 国产综合色精品一区二区三区| 精品国产免费人成电影在线观看四季| 国产麻豆精品在线| 亚洲欧洲精品一区二区三区不卡| 99精品国产一区二区三区不卡| 中文字幕制服丝袜成人av| 91女神在线视频| 日韩av电影免费观看高清完整版 | 中文字幕制服丝袜成人av| 色综合天天综合网天天狠天天| 亚洲色图制服诱惑| 欧美性大战久久| 精品一区二区三区欧美| 国产精品乱人伦中文| 在线一区二区三区四区五区| 日日夜夜精品视频天天综合网| 精品福利在线导航| 99视频精品免费视频| 偷窥少妇高潮呻吟av久久免费| 久久久久久久综合| 欧美性做爰猛烈叫床潮| 国内精品免费在线观看| 亚洲理论在线观看| 久久综合狠狠综合久久激情| 色婷婷av一区| 国内成人自拍视频| 亚洲伊人伊色伊影伊综合网| 久久一二三国产| 欧美日韩亚洲丝袜制服| 菠萝蜜视频在线观看一区| 丝袜国产日韩另类美女| 日韩一区日韩二区| 26uuu国产在线精品一区二区| 在线中文字幕一区二区| 国产99久久久久久免费看农村| 日韩和欧美一区二区三区| 国产三级三级三级精品8ⅰ区| 欧美婷婷六月丁香综合色| 成人禁用看黄a在线| 韩国精品久久久| 日韩av一级片| 亚洲成a人片在线观看中文| 国产清纯白嫩初高生在线观看91 | 日韩午夜中文字幕| 欧美日韩一区二区三区免费看| 成人av中文字幕| 国产精品123| 韩国成人精品a∨在线观看| 免费在线成人网| 日韩不卡在线观看日韩不卡视频| 一区二区三区成人| 亚洲乱码国产乱码精品精98午夜 | 国产做a爰片久久毛片| 日韩精品视频网站| 一个色综合网站| 亚洲乱码国产乱码精品精可以看 | 粉嫩av亚洲一区二区图片| 久久国产精品一区二区| 青椒成人免费视频| 免费成人在线观看视频| 美女视频网站久久| 亚洲成va人在线观看| 亚洲成人免费看| 日韩高清国产一区在线| 美女性感视频久久| 麻豆国产精品视频| 国精产品一区一区三区mba视频| 久久99国产乱子伦精品免费| 久久99久久99小草精品免视看| 精品一二三四在线| 国产成人免费视频网站| 99久免费精品视频在线观看| 丰满白嫩尤物一区二区| 91热门视频在线观看| 欧美色电影在线| 日韩片之四级片| 久久精品日韩一区二区三区| 国产精品网曝门| 亚洲精品久久久久久国产精华液| 亚洲成人资源网| 精品在线免费视频| 成人午夜视频网站| 色网综合在线观看| 欧美一区日韩一区| 精品福利一区二区三区免费视频| 欧美精品一区二区三区高清aⅴ| 中文字幕第一区| 亚洲一区二区免费视频| 免费日韩伦理电影| 99久久国产综合色|国产精品| 欧美伊人久久久久久久久影院| 91精品国产综合久久久蜜臀粉嫩 | 日韩精品一二三区| 国产精品99久久久| 欧美视频一区二区三区| 欧美精品一区二区三区久久久| 18涩涩午夜精品.www| 一区二区不卡在线播放 | 国产九色精品成人porny| aa级大片欧美| 日韩欧美在线综合网| 国产精品久久久久四虎| 全国精品久久少妇| 成人国产在线观看| 日韩欧美中文字幕公布| 亚洲激情在线激情| 国产精品中文字幕一区二区三区| 色噜噜偷拍精品综合在线| 久久夜色精品国产噜噜av| 亚洲国产va精品久久久不卡综合 |