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

📄 lightset.java

📁 JAVA3D矩陈的相关类
💻 JAVA
字号:
/* * $RCSfile: LightSet.java,v $ * * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. * * Use is subject to license terms. * * $Revision: 1.4 $ * $Date: 2007/02/09 17:18:08 $ * $State: Exp $ */package javax.media.j3d;import javax.vecmath.*;import java.util.Vector;class LightSet extends Object {    /**     * The Lights that make up this set     */    LightRetained[] lights = null;     // The number of lights in this lightset, may be less than lights.length    int nlights = 0;    // A reference to the next LightSet    LightSet next = null;     // A reference to the previous LightSet    LightSet prev = null;    // A flag that indicates that lighting is on    boolean lightingOn = true;    // A flag that indicates that this light set has changed.    boolean isDirty = true;    /**     * Constructs a new LightSet      */    LightSet(RenderBin rb, RenderAtom ra, LightRetained[] lights, 	     int nlights, boolean lightOn) {	this.reset(rb, ra, lights, nlights, lightOn);    }    void reset(RenderBin rb, RenderAtom ra, LightRetained[] lights, 	       int nlights, boolean lightOn) {	int i;	this.isDirty = true;	this.lightingOn = lightOn;	if (this.lights == null || this.lights.length < nlights) {	   this.lights = new LightRetained[nlights];	}	for (i=0; i<nlights; i++) {	    this.lights[i] = lights[i];	}	this.nlights = nlights;	        //lists = new RenderList(ro);        //lists.prims[ro.geometry.geoType-1] = ro;    }	    boolean equals(RenderBin rb, LightRetained[] lights, int nlights,		   boolean lightOn) {	int i, j;	LightRetained light;	if (this.nlights != nlights)	   return(false);		if (this.lightingOn != lightOn)	   return(false);	for (i=0; i<nlights; i++) {	   for (j=0; j<this.nlights; j++) {	      if (this.lights[j] == lights[i]) {		 break;	      }	   }	   if (j==this.nlights) {	      return(false);	   }	}	return(true);    }}

⌨️ 快捷键说明

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