瀏覽代碼

Add javadoc fix typo

Riccardo Balbo 2 年之前
父節點
當前提交
5261a986e7

+ 33 - 1
jme3-core/src/main/java/com/jme3/environment/baker/EnvBaker.java

@@ -1,3 +1,35 @@
+/*
+ * Copyright (c) 2009-2023 jMonkeyEngine
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ *
+ * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
+ *   may be used to endorse or promote products derived from this software
+ *   without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
 package com.jme3.environment.baker;
 package com.jme3.environment.baker;
 
 
 import java.util.function.Function;
 import java.util.function.Function;
@@ -8,7 +40,7 @@ import com.jme3.scene.Spatial;
 import com.jme3.texture.TextureCubeMap;
 import com.jme3.texture.TextureCubeMap;
 
 
 /**
 /**
- * And environment baker. It bakes the environment.
+ * An environment baker. It bakes the environment.
  *
  *
  * @author Riccardo Balbo
  * @author Riccardo Balbo
  */
  */

+ 21 - 8
jme3-core/src/main/java/com/jme3/renderer/RenderManager.java

@@ -105,15 +105,8 @@ public class RenderManager {
     private TechniqueDef.LightMode preferredLightMode = TechniqueDef.LightMode.MultiPass;
     private TechniqueDef.LightMode preferredLightMode = TechniqueDef.LightMode.MultiPass;
     private int singlePassLightBatchSize = 1;
     private int singlePassLightBatchSize = 1;
     private MatParamOverride boundDrawBufferId=new MatParamOverride(VarType.Int,"BoundDrawBuffer",0);
     private MatParamOverride boundDrawBufferId=new MatParamOverride(VarType.Int,"BoundDrawBuffer",0);
-    private Function<Geometry,Boolean> renderFilter;
+    private Function<Geometry, Boolean> renderFilter;
 
 
-    public void setRenderFilter(Function<Geometry,Boolean> filter){
-        renderFilter=filter;
-    }
-    
-    public Function<Geometry,Boolean> getRenderFilter(){
-        return renderFilter;
-    }
 
 
     /**
     /**
      * Creates a high-level rendering interface over the
      * Creates a high-level rendering interface over the
@@ -1346,4 +1339,24 @@ public class RenderManager {
             this.forcedOverrides.remove(boundDrawBufferId);
             this.forcedOverrides.remove(boundDrawBufferId);
         }
         }
     }
     }
+    /**
+     * Set a render filter. Every geometry will be tested against this filter
+     * before rendering and will only be rendered if the filter returns true.
+     * 
+     * @param filter
+     */
+    public void setRenderFilter(Function<Geometry, Boolean> filter) {
+        renderFilter = filter;
+    }
+
+    /**
+     * Returns the render filter that the RenderManager is currently using
+     * 
+     * @param filter
+     *            the render filter
+     */
+    public Function<Geometry, Boolean> getRenderFilter() {
+        return renderFilter;
+    }
+
 }
 }