From d5db0aef1f1b195cb6aa40da870163c587501057 Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Mon, 4 Apr 2011 13:00:12 +0000 Subject: [PATCH] - add name to camera and light (not being part of the scenegraph is no reason to be nameless) git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7181 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/core/com/jme3/light/Light.java | 19 +++++++++++++++++++ engine/src/core/com/jme3/renderer/Camera.java | 19 +++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/engine/src/core/com/jme3/light/Light.java b/engine/src/core/com/jme3/light/Light.java index ef4c5ed66..41cc23b19 100644 --- a/engine/src/core/com/jme3/light/Light.java +++ b/engine/src/core/com/jme3/light/Light.java @@ -77,6 +77,9 @@ public abstract class Light implements Savable, Cloneable { */ protected boolean enabled = true; + /** The light's name. */ + protected String name; + /** * @return The color of the light. */ @@ -84,6 +87,22 @@ public abstract class Light implements Savable, Cloneable { return color; } + /** + * This method sets the light's name. + * @param name the light's name + */ + public void setName(String name) { + this.name = name; + } + + /** + * This method returns the light's name. + * @return the light's name + */ + public String getName() { + return name; + } + public void setLastDistance(float lastDistance){ this.lastDistance = lastDistance; } diff --git a/engine/src/core/com/jme3/renderer/Camera.java b/engine/src/core/com/jme3/renderer/Camera.java index 01048b7a6..0c4ae0a67 100644 --- a/engine/src/core/com/jme3/renderer/Camera.java +++ b/engine/src/core/com/jme3/renderer/Camera.java @@ -208,6 +208,9 @@ public class Camera implements Savable, Cloneable { protected Matrix4f viewProjectionMatrix = new Matrix4f(); private BoundingBox guiBounding = new BoundingBox(); + /** The camera's name. */ + protected String name; + /** * Constructor instantiates a new Camera object. All * values of the camera are set to default. @@ -284,6 +287,22 @@ public class Camera implements Savable, Cloneable { } } + /** + * This method sets the cameras name. + * @param name the cameras name + */ + public void setName(String name) { + this.name = name; + } + + /** + * This method returns the cameras name. + * @return the cameras name + */ + public String getName() { + return name; + } + /** * Sets a clipPlane for this camera. * The cliPlane is used to recompute the projectionMatrix using the plane as the near plane