01: /*
02: * $RCSfile: Light.java,v $
03: *
04: * @(#)Light.java 1.4 98/11/05 20:34:37
05: *
06: * Copyright (c) 1996-1998 Sun Microsystems, Inc. All Rights Reserved.
07: *
08: * Sun grants you ("Licensee") a non-exclusive, royalty free, license to use,
09: * modify and redistribute this software in source and binary code form,
10: * provided that i) this copyright notice and license appear on all copies of
11: * the software; and ii) Licensee does not utilize the software in a manner
12: * which is disparaging to Sun.
13: *
14: * This software is provided "AS IS," without a warranty of any kind. ALL
15: * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY
16: * IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
17: * NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE
18: * LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
19: * OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS
20: * LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT,
21: * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
22: * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF
23: * OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE
24: * POSSIBILITY OF SUCH DAMAGES.
25: *
26: * This software is not designed or intended for use in on-line control of
27: * aircraft, air traffic, aircraft navigation or aircraft communications; or in
28: * the design, construction, operation or maintenance of any nuclear
29: * facility. Licensee represents and warrants that it will not use or
30: * redistribute the Software for such purposes.
31: * $Revision: 1.2 $
32: * $Date: 2005/02/03 23:06:57 $
33: * $State: Exp $
34: */
35: /*
36: * @Author: Rick Goldberg
37: * @Author: Doug Gehringer
38: *
39: */
40: package org.jdesktop.j3d.loaders.vrml97.impl;
41:
42: import javax.media.j3d.Link;
43:
44: import javax.media.j3d.SharedGroup;
45:
46: // Base class for VRML lights-- implements J3D interface for getting lights
47: /** Description of the Class */
48: public abstract class Light extends Node {
49:
50: SharedGroup sharedGroup;
51: javax.media.j3d.AmbientLight ambLight;
52: javax.media.j3d.Light light;
53:
54: /**
55: *Constructor for the Light object
56: *
57: *@param loader Description of the Parameter
58: */
59: Light(Loader loader) {
60: super (loader);
61: loader.addLight(this );
62: }
63:
64: /**
65: * Gets the ambientLight attribute of the Light object
66: *
67: *@return The ambientLight value
68: */
69: public javax.media.j3d.AmbientLight getAmbientLight() {
70: return ambLight;
71: }
72:
73: /**
74: * Gets the light attribute of the Light object
75: *
76: *@return The light value
77: */
78: public javax.media.j3d.Light getLight() {
79: return light;
80: }
81:
82: /**
83: * Gets the implNode attribute of the Light object
84: *
85: *@return The implNode value
86: */
87: public javax.media.j3d.Node getImplNode() {
88: return new Link(sharedGroup);
89: }
90:
91: /**
92: * Description of the Method
93: *
94: *@return Description of the Return Value
95: */
96: public vrml.BaseNode wrap() {
97: return new org.jdesktop.j3d.loaders.vrml97.node.Light(this);
98: }
99: }
|