diff --git a/jme3-core/src/main/java/com/jme3/bounding/BoundingBox.java b/jme3-core/src/main/java/com/jme3/bounding/BoundingBox.java index c087950a3..6e422dea4 100644 --- a/jme3-core/src/main/java/com/jme3/bounding/BoundingBox.java +++ b/jme3-core/src/main/java/com/jme3/bounding/BoundingBox.java @@ -79,9 +79,9 @@ public class BoundingBox extends BoundingVolume { * Instantiate a BoundingBox with given center and extents. * * @param c the coordinates of the center of the box (not null, not altered) - * @param x the X-extent of the box (>=0, may be +Infinity) - * @param y the Y-extent of the box (>=0, may be +Infinity) - * @param z the Z-extent of the box (>=0, may be +Infinity) + * @param x the X-extent of the box (0 or greater, may be +Infinity) + * @param y the Y-extent of the box (0 or greater, may be +Infinity) + * @param z the Z-extent of the box (0 or greater, may be +Infinity) */ public BoundingBox(Vector3f c, float x, float y, float z) { this.center.set(c); diff --git a/jme3-core/src/main/java/com/jme3/bounding/BoundingSphere.java b/jme3-core/src/main/java/com/jme3/bounding/BoundingSphere.java index 3137f2cbf..7936c7224 100644 --- a/jme3-core/src/main/java/com/jme3/bounding/BoundingSphere.java +++ b/jme3-core/src/main/java/com/jme3/bounding/BoundingSphere.java @@ -173,11 +173,11 @@ public class BoundingSphere extends BoundingVolume { /** * Calculates a minimum bounding sphere for the set of points. The algorithm - * was originally found in C++ at - *

- * http://www.flipcode.com/cgi-bin/msg.cgi?showThread=COTD-SmallestEnclosingSpheres&forum=cotd&id=-1
broken link

- *

and translated to java by Cep21

- * + * was originally found in C++ at
+ * + * http://flipcode.com/archives/Smallest_Enclosing_Spheres.shtml
+ * and translated to java by Cep21 + * * @param points * The points to calculate the minimum bounds from. */ diff --git a/jme3-core/src/main/java/com/jme3/cinematic/events/CameraEvent.java b/jme3-core/src/main/java/com/jme3/cinematic/events/CameraEvent.java index 91b9ee5e1..8d2b70894 100644 --- a/jme3-core/src/main/java/com/jme3/cinematic/events/CameraEvent.java +++ b/jme3-core/src/main/java/com/jme3/cinematic/events/CameraEvent.java @@ -41,7 +41,7 @@ import java.io.IOException; /** * - * @author Rickard + * @author Rickard (neph1 @ github) */ public class CameraEvent extends AbstractCinematicEvent{ diff --git a/jme3-core/src/main/java/com/jme3/material/RenderState.java b/jme3-core/src/main/java/com/jme3/material/RenderState.java index bda2105cb..a44b0eac5 100644 --- a/jme3-core/src/main/java/com/jme3/material/RenderState.java +++ b/jme3-core/src/main/java/com/jme3/material/RenderState.java @@ -272,27 +272,27 @@ public class RenderState implements Cloneable, Savable { /** * Additive blending. For use with glows and particle emitters. *

- * Result = Source Color + Destination Color -> (GL_ONE, GL_ONE) + * Result = Source Color + Destination Color -> (GL_ONE, GL_ONE) */ Additive, /** * Premultiplied alpha blending, for use with premult alpha textures. *

- * Result = Source Color + (Dest Color * (1 - Source Alpha) ) -> (GL_ONE, GL_ONE_MINUS_SRC_ALPHA) + * Result = Source Color + (Dest Color * (1 - Source Alpha) ) -> (GL_ONE, GL_ONE_MINUS_SRC_ALPHA) */ PremultAlpha, /** * Additive blending that is multiplied with source alpha. * For use with glows and particle emitters. *

- * Result = (Source Alpha * Source Color) + Dest Color -> (GL_SRC_ALPHA, GL_ONE) + * Result = (Source Alpha * Source Color) + Dest Color -> (GL_SRC_ALPHA, GL_ONE) */ AlphaAdditive, /** * Color blending, blends in color from dest color * using source color. *

- * Result = Source Color + (1 - Source Color) * Dest Color -> (GL_ONE, GL_ONE_MINUS_SRC_COLOR) + * Result = Source Color + (1 - Source Color) * Dest Color -> (GL_ONE, GL_ONE_MINUS_SRC_COLOR) */ Color, /** @@ -300,26 +300,26 @@ public class RenderState implements Cloneable, Savable { * using source alpha. *

* Result = Source Alpha * Source Color + - * (1 - Source Alpha) * Dest Color -> (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) + * (1 - Source Alpha) * Dest Color -> (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) */ Alpha, /** * Multiplies the source and dest colors. *

- * Result = Source Color * Dest Color -> (GL_DST_COLOR, GL_ZERO) + * Result = Source Color * Dest Color -> (GL_DST_COLOR, GL_ZERO) */ Modulate, /** * Multiplies the source and dest colors then doubles the result. *

- * Result = 2 * Source Color * Dest Color -> (GL_DST_COLOR, GL_SRC_COLOR) + * Result = 2 * Source Color * Dest Color -> (GL_DST_COLOR, GL_SRC_COLOR) */ ModulateX2, /** * Opposite effect of Modulate/Multiply. Invert both colors, multiply and * then invert the result. *

- * Result = 1 - (1 - Source Color) * (1 - Dest Color) -> (GL_ONE, GL_ONE_MINUS_SRC_COLOR) + * Result = 1 - (1 - Source Color) * (1 - Dest Color) -> (GL_ONE, GL_ONE_MINUS_SRC_COLOR) */ Screen, /** @@ -327,7 +327,7 @@ public class RenderState implements Cloneable, Savable { * operation. This is directly equivalent to Photoshop's "Exclusion" blend. *

* Result = (Source Color * (1 - Dest Color)) + (Dest Color * (1 - Source Color)) - * -> (GL_ONE_MINUS_DST_COLOR, GL_ONE_MINUS_SRC_COLOR) + * -> (GL_ONE_MINUS_DST_COLOR, GL_ONE_MINUS_SRC_COLOR) */ Exclusion, /** diff --git a/jme3-core/src/main/java/com/jme3/material/Technique.java b/jme3-core/src/main/java/com/jme3/material/Technique.java index 5b02d77e7..a2fb1a037 100644 --- a/jme3-core/src/main/java/com/jme3/material/Technique.java +++ b/jme3-core/src/main/java/com/jme3/material/Technique.java @@ -169,7 +169,7 @@ public final class Technique { /** * Get the {@link DefineList} for dynamic defines. * - * Dynamic defines are used to implement material parameter -> define + * Dynamic defines are used to implement material parameter -- define * bindings as well as {@link TechniqueDefLogic} specific functionality. * * @return all dynamic defines. diff --git a/jme3-core/src/main/java/com/jme3/math/FastMath.java b/jme3-core/src/main/java/com/jme3/math/FastMath.java index 1bbf37fca..5ab1a601c 100644 --- a/jme3-core/src/main/java/com/jme3/math/FastMath.java +++ b/jme3-core/src/main/java/com/jme3/math/FastMath.java @@ -91,7 +91,7 @@ final public class FastMath { * Get the next power of two of the given number. * * E.g. for an input 100, this returns 128. - * Returns 1 for all numbers <= 1. + * Returns 1 for all numbers less than or equal to 1. * * @param number The number to obtain the POT for. * @return The next power of two. @@ -942,7 +942,8 @@ final public class FastMath { * Converts a single precision (32 bit) floating point value * into half precision (16 bit). * - *

Source: + * ftp://www.fox-toolkit.org/pub/fasthalffloatconversion.pdf * * @param half The half floating point value as a short. * @return floating point value of the half. diff --git a/jme3-core/src/main/java/com/jme3/math/Ray.java b/jme3-core/src/main/java/com/jme3/math/Ray.java index 8b2ab216b..81e54d99f 100644 --- a/jme3-core/src/main/java/com/jme3/math/Ray.java +++ b/jme3-core/src/main/java/com/jme3/math/Ray.java @@ -43,8 +43,9 @@ import java.io.IOException; /** * Ray defines a line segment which has an origin and a direction. * That is, a point and an infinite ray is cast from this point. The ray is - * defined by the following equation: R(t) = origin + t*direction for t >= 0. - * + * defined by the following equation: {@literal + * R(t) = origin + t*direction for t >= 0. + * } * @author Mark Powell * @author Joshua Slack */ diff --git a/jme3-core/src/main/java/com/jme3/renderer/Caps.java b/jme3-core/src/main/java/com/jme3/renderer/Caps.java index fbfee004b..4e9ccabe5 100644 --- a/jme3-core/src/main/java/com/jme3/renderer/Caps.java +++ b/jme3-core/src/main/java/com/jme3/renderer/Caps.java @@ -238,7 +238,7 @@ public enum Caps { TextureBuffer, /** - * Supports floating point & half textures (Format.RGB16F) + * Supports floating point and half textures (Format.RGB16F) */ FloatTexture, diff --git a/jme3-core/src/main/java/com/jme3/renderer/opengl/GL.java b/jme3-core/src/main/java/com/jme3/renderer/opengl/GL.java index 19bdfffff..f0e2a3626 100644 --- a/jme3-core/src/main/java/com/jme3/renderer/opengl/GL.java +++ b/jme3-core/src/main/java/com/jme3/renderer/opengl/GL.java @@ -249,40 +249,357 @@ public interface GL { public long glGetQueryObjectui64(int query, int pname); public int glGetQueryObjectiv(int query, int pname); public void glGetShader(int shader, int pname, IntBuffer params); - public String glGetShaderInfoLog(int shader, int maxSize); - public String glGetString(int name); - public int glGetUniformLocation(int program, String name); - public boolean glIsEnabled(int cap); - public void glLineWidth(float width); - public void glLinkProgram(int program); - public void glPixelStorei(int pname, int param); - public void glPolygonOffset(float factor, float units); - public void glReadPixels(int x, int y, int width, int height, int format, int type, ByteBuffer data); - public void glReadPixels(int x, int y, int width, int height, int format, int type, long offset); - public void glScissor(int x, int y, int width, int height); + + /** + *

Reference Page

+ *

+ * Returns the information log for a shader object. + * + * @param shader the shader object whose information log is to be queried. + * @param maxSize the size of the character buffer for storing the returned information log. + */ + public String glGetShaderInfoLog(int shader, int maxSize); + + /** + *

Reference Page

+ *

+ * Return strings describing properties of the current GL context. + * + * @param name the property to query. One of:
{@link #GL_RENDERER RENDERER}{@link #GL_VENDOR VENDOR}{@link #GL_EXTENSIONS EXTENSIONS}{@link #GL_VERSION VERSION}{@link GL2#GL_SHADING_LANGUAGE_VERSION SHADING_LANGUAGE_VERSION}
+ */ + public String glGetString(int name); + + /** + *

Reference Page

+ *

+ * Returns the location of a uniform variable. + * + * @param program the program object to be queried. + * @param name a null terminated string containing the name of the uniform variable whose location is to be queried. + */ + public int glGetUniformLocation(int program, String name); + + /** + *

Reference Page

+ *

+ * Determines if {@code cap} is currently enabled (as with {@link #glEnable Enable}) or disabled. + * + * @param cap the enable state to query. + */ + public boolean glIsEnabled(int cap); + + /** + *

Reference Page

+ * + * Sets the width of rasterized line segments. The default width is 1.0. + * + * @param width the line width. + */ + public void glLineWidth(float width); + + /** + *

Reference Page

+ * + * Links a program object. + * + * @param program the program object to be linked. + */ + public void glLinkProgram(int program); + + /** + *

Reference Page

+ *

+ * Sets the integer value of a pixel store parameter. + * + * @param pname the pixel store parameter to set. + * @param param the parameter value + */ + public void glPixelStorei(int pname, int param); + + /** + *

Reference Page

+ *

+ * The depth values of all fragments generated by the rasterization of a polygon may be offset by a single value that is computed for that polygon. This + * function determines that value. + *

+ *

{@code factor} scales the maximum depth slope of the polygon, and {@code units} scales an implementation-dependent constant that relates to the usable + * resolution of the depth buffer. The resulting values are summed to produce the polygon offset value.

+ * + * @param factor the maximum depth slope factor. + * @param units the constant scale. + */ + public void glPolygonOffset(float factor, float units); + + /** + *

Reference Page

+ *

+ * ReadPixels obtains values from the selected read buffer from each pixel with lower left hand corner at {@code (x + i, y + j)} for {@code 0 <= i < width} + * and {@code 0 <= j < height}; this pixel is said to be the ith pixel in the jth row. If any of these pixels lies outside of the + * window allocated to the current GL context, or outside of the image attached to the currently bound read framebuffer object, then the values obtained + * for those pixels are undefined. When {@link GLFbo#GL_READ_FRAMEBUFFER_BINDING_EXT READ_FRAMEBUFFER_BINDING} is zero, values are also undefined for individual pixels that are not owned by + * the current context. Otherwise, {@code ReadPixels} obtains values from the selected buffer, regardless of how those values were placed there. + * + * @param x the left pixel coordinate + * @param y the lower pixel coordinate + * @param width the number of pixels to read in the x-dimension + * @param height the number of pixels to read in the y-dimension + * @param format the pixel format. + * @param type the pixel type. + * @param data a buffer in which to place the returned pixel data. + */ + public void glReadPixels(int x, int y, int width, int height, int format, int type, ByteBuffer data); + + + /** + *

Reference Page

+ *

+ * ReadPixels obtains values from the selected read buffer from each pixel with lower left hand corner at {@code (x + i, y + j)} for {@code 0 <= i < width} + * and {@code 0 <= j < height}; this pixel is said to be the ith pixel in the jth row. If any of these pixels lies outside of the + * window allocated to the current GL context, or outside of the image attached to the currently bound read framebuffer object, then the values obtained + * for those pixels are undefined. When {@link GLFbo#GL_READ_FRAMEBUFFER_BINDING_EXT READ_FRAMEBUFFER_BINDING} is zero, values are also undefined for individual pixels that are not owned by + * the current context. Otherwise, {@code ReadPixels} obtains values from the selected buffer, regardless of how those values were placed there. + * + * @param x the left pixel coordinate + * @param y the lower pixel coordinate + * @param width the number of pixels to read in the x-dimension + * @param height the number of pixels to read in the y-dimension + * @param format the pixel format. + * @param type the pixel type. + * @param offset a buffer in which to place the returned pixel data/ + */ + public void glReadPixels(int x, int y, int width, int height, int format, int type, long offset); + + /** + *

Reference Page

+ *

+ * Defines the scissor rectangle for all viewports. The scissor test is enabled or disabled for all viewports using {@link #glEnable Enable} or {@link #glDisable Disable} + * with the symbolic constant {@link #GL_SCISSOR_TEST SCISSOR_TEST}. When disabled, it is as if the scissor test always passes. When enabled, if + * left <= xw < left + width and bottom <= yw < bottom + height for the scissor rectangle, then the scissor + * test passes. Otherwise, the test fails and the fragment is discarded. + * + * @param x the left scissor rectangle coordinate. + * @param y the bottom scissor rectangle coordinate. + * @param width the scissor rectangle width. + * @param height the scissor rectangle height. + */ + public void glScissor(int x, int y, int width, int height); public void glShaderSource(int shader, String[] string, IntBuffer length); - public void glStencilFuncSeparate(int face, int func, int ref, int mask); - public void glStencilOpSeparate(int face, int sfail, int dpfail, int dppass); + public void glStencilFuncSeparate(int face, int func, int ref, int mask); + + /** + *

Reference Page

+ *

+ * Sets front and/or back stencil test actions. + * + * @param face whether front and/or back stencil state is updated. One of:
{@link GL#GL_FRONT FRONT}{@link GL#GL_BACK BACK}{@link GL#GL_FRONT_AND_BACK FRONT_AND_BACK}
+ * @param sfail the action to take when the stencil test fails. The initial value is GL_KEEP. One of:
{@link GL#GL_KEEP KEEP}{@link GL#GL_ZERO ZERO}{@link GL#GL_REPLACE REPLACE}{@link GL#GL_INCR INCR}{@link GL#GL_INCR_WRAP INCR_WRAP}{@link GL#GL_DECR DECR}{@link GL#GL_DECR_WRAP DECR_WRAP}{@link GL#GL_INVERT INVERT}
+ * @param dpfail the stencil action when the stencil test passes, but the depth test fails. The initial value is GL_KEEP. + * @param dppass the stencil action when both the stencil test and the depth test pass, or when the stencil test passes and either there is no depth buffer or depth + * testing is not enabled. The initial value is GL_KEEP. + */ + public void glStencilOpSeparate(int face, int sfail, int dpfail, int dppass); public void glTexImage2D(int target, int level, int internalFormat, int width, int height, int border, int format, int type, ByteBuffer data); - public void glTexParameterf(int target, int pname, float param); - public void glTexParameteri(int target, int pname, int param); + public void glTexParameterf(int target, int pname, float param); + + /** + *

Reference Page

+ *

+ * Sets the integer value of a texture parameter, which controls how the texel array is treated when specified or changed, and when applied to a fragment. + * + * @param target the texture target. + * @param pname the parameter to set. + * @param param the parameter value. + */ + public void glTexParameteri(int target, int pname, int param); public void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, ByteBuffer data); - public void glUniform1(int location, FloatBuffer value); - public void glUniform1(int location, IntBuffer value); - public void glUniform1f(int location, float v0); - public void glUniform1i(int location, int v0); - public void glUniform2(int location, IntBuffer value); - public void glUniform2(int location, FloatBuffer value); - public void glUniform2f(int location, float v0, float v1); - public void glUniform3(int location, IntBuffer value); - public void glUniform3(int location, FloatBuffer value); - public void glUniform3f(int location, float v0, float v1, float v2); - public void glUniform4(int location, FloatBuffer value); - public void glUniform4(int location, IntBuffer value); - public void glUniform4f(int location, float v0, float v1, float v2, float v3); - public void glUniformMatrix3(int location, boolean transpose, FloatBuffer value); - public void glUniformMatrix4(int location, boolean transpose, FloatBuffer value); - public void glUseProgram(int program); - public void glVertexAttribPointer(int index, int size, int type, boolean normalized, int stride, long pointer); - public void glViewport(int x, int y, int width, int height); + public void glUniform1(int location, FloatBuffer value); + + /** + *

Reference Page

+ *

+ * Specifies the value of a single int uniform variable or a int uniform variable array for the current program object. + * + * @param location the location of the uniform variable to be modified. + * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable. + */ + public void glUniform1(int location, IntBuffer value); + + /** + *

Reference Page

+ *

+ * Specifies the value of a float uniform variable for the current program object. + * + * @param location the location of the uniform variable to be modified. + * @param v0 the uniform value. + */ + public void glUniform1f(int location, float v0); + + /** + *

Reference Page

+ *

+ * Specifies the value of an int uniform variable for the current program object. + * + * @param location the location of the uniform variable to be modified. + * @param v0 the uniform value. + */ + public void glUniform1i(int location, int v0); + + /** + *

Reference Page

+ *

+ * Specifies the value of a single ivec2 uniform variable or an ivec2 uniform variable array for the current program object. + * + * @param location the location of the uniform variable to be modified. + * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable. + */ + public void glUniform2(int location, IntBuffer value); + + /** + *

Reference Page

+ *

+ * Specifies the value of a single vec2 uniform variable or a vec2 uniform variable array for the current program object. + * + * @param location the location of the uniform variable to be modified. + * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable. + */ + public void glUniform2(int location, FloatBuffer value); + + /** + *

Reference Page

+ *

+ * Specifies the value of a vec2 uniform variable for the current program object. + * + * @param location the location of the uniform variable to be modified. + * @param v0 the uniform x value. + * @param v1 the uniform y value. + */ + public void glUniform2f(int location, float v0, float v1); + + /** + *

Reference Page

+ *

+ * Specifies the value of a single ivec3 uniform variable or an ivec3 uniform variable array for the current program object. + * + * @param location the location of the uniform variable to be modified. + * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable. + */ + public void glUniform3(int location, IntBuffer value); + + /** + *

Reference Page

+ *

+ * Specifies the value of a single vec3 uniform variable or a vec3 uniform variable array for the current program object. + * + * @param location the location of the uniform variable to be modified. + * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable. + */ + public void glUniform3(int location, FloatBuffer value); + + /** + *

Reference Page

+ *

+ * Specifies the value of a vec3 uniform variable for the current program object. + * + * @param location the location of the uniform variable to be modified. + * @param v0 the uniform x value. + * @param v1 the uniform y value. + * @param v2 the uniform z value. + */ + public void glUniform3f(int location, float v0, float v1, float v2); + + /** + *

Reference Page

+ *

+ * Specifies the value of a single vec4 uniform variable or a vec4 uniform variable array for the current program object. + * + * @param location the location of the uniform variable to be modified. + * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable. + */ + public void glUniform4(int location, FloatBuffer value); + + /** + *

Reference Page

+ *

+ * Specifies the value of a single ivec4 uniform variable or an ivec4 uniform variable array for the current program object. + * + * @param location the location of the uniform variable to be modified. + * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable. + */ + public void glUniform4(int location, IntBuffer value); + + /** + *

Reference Page

+ *

+ * Specifies the value of a vec4 uniform variable for the current program object. + * + * @param location the location of the uniform variable to be modified. + * @param v0 the uniform x value. + * @param v1 the uniform y value. + * @param v2 the uniform z value. + * @param v3 the uniform w value. + */ + public void glUniform4f(int location, float v0, float v1, float v2, float v3); + + /** + *

Reference Page

+ *

+ * Specifies the value of a single mat3 uniform variable or a mat3 uniform variable array for the current program object. + * + * @param location the location of the uniform variable to be modified. + * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable. + * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable. + */ + public void glUniformMatrix3(int location, boolean transpose, FloatBuffer value); + + /** + *

Reference Page

+ *

+ * Specifies the value of a single mat4 uniform variable or a mat4 uniform variable array for the current program object. + * + * @param location the location of the uniform variable to be modified. + * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable. + * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable. + */ + public void glUniformMatrix4(int location, boolean transpose, FloatBuffer value); + + /** + *

Reference Page

+ *

+ * Installs a program object as part of current rendering state. + * + * @param program the program object whose executables are to be used as part of current rendering state. + */ + public void glUseProgram(int program); + + /** + *

Reference Page

+ *

+ * Specifies the location and organization of a vertex attribute array. + * + * @param index the index of the generic vertex attribute to be modified + * @param size the number of values per vertex that are stored in the array. + * @param type the data type of each component in the array. The initial value is GL_FLOAT. + * @param normalized whether fixed-point data values should be normalized or converted directly as fixed-point values when they are accessed + * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in + * the array. The initial value is 0. + * @param pointer the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer + * currently bound to the {@link GL#GL_ARRAY_BUFFER ARRAY_BUFFER} target. The initial value is 0. + */ + public void glVertexAttribPointer(int index, int size, int type, boolean normalized, int stride, long pointer); + + /** + *

Reference Page

+ *

+ * Specifies the viewport transformation parameters for all viewports. + *

+ *

In the initial state, {@code width} and {@code height} for each viewport are set to the width and height, respectively, of the window into which the GL is to do + * its rendering. If the default framebuffer is bound but no default framebuffer is associated with the GL context, then {@code width} and {@code height} are + * initially set to zero.

+ * + * @param x the left viewport coordinate. + * @param y the bottom viewport coordinate. + * @param width the viewport width. + * @param height the viewport height. + */ + public void glViewport(int x, int y, int width, int height); } diff --git a/jme3-core/src/main/java/com/jme3/system/SystemListener.java b/jme3-core/src/main/java/com/jme3/system/SystemListener.java index e2e604a4b..132f47523 100644 --- a/jme3-core/src/main/java/com/jme3/system/SystemListener.java +++ b/jme3-core/src/main/java/com/jme3/system/SystemListener.java @@ -32,7 +32,7 @@ package com.jme3.system; /** - * The ContextListener> provides a means for an application + * The {@code SystemListener} provides a means for an application * to receive events relating to a context. */ public interface SystemListener { diff --git a/jme3-core/src/main/java/com/jme3/texture/Texture.java b/jme3-core/src/main/java/com/jme3/texture/Texture.java index 253423d00..e2166d42a 100644 --- a/jme3-core/src/main/java/com/jme3/texture/Texture.java +++ b/jme3-core/src/main/java/com/jme3/texture/Texture.java @@ -278,21 +278,23 @@ public abstract class Texture implements CloneableSmartAsset, Savable, Cloneable */ Off, - /** + /** + * {@code * Compares the 3rd texture coordinate R to the value * in this depth texture. If R <= texture value then result is 1.0, * otherwise, result is 0.0. If filtering is set to bilinear or trilinear * the implementation may sample the texture multiple times to provide - * smoother results in the range [0, 1]. + * smoother results in the range [0, 1].} */ LessOrEqual, /** + * {@code * Compares the 3rd texture coordinate R to the value * in this depth texture. If R >= texture value then result is 1.0, * otherwise, result is 0.0. If filtering is set to bilinear or trilinear * the implementation may sample the texture multiple times to provide - * smoother results in the range [0, 1]. + * smoother results in the range [0, 1].} */ GreaterOrEqual } diff --git a/jme3-core/src/main/java/com/jme3/texture/TextureCubeMap.java b/jme3-core/src/main/java/com/jme3/texture/TextureCubeMap.java index e2447fac2..f1a0f7d3b 100644 --- a/jme3-core/src/main/java/com/jme3/texture/TextureCubeMap.java +++ b/jme3-core/src/main/java/com/jme3/texture/TextureCubeMap.java @@ -44,14 +44,14 @@ import java.util.ArrayList; * Describes a cubemap texture. * The image specified by setImage must contain 6 data units, * each data contains a 2D image representing a cube's face. - * The slices are specified in this order:
- *
- * 0 => Positive X (+x)
- * 1 => Negative X (-x)
- * 2 => Positive Y (+y)
- * 3 => Negative Y (-y)
- * 4 => Positive Z (+z)
- * 5 => Negative Z (-z)
+ * The slices are specified in this order:
+ *
+ * 0 -- Positive X (+x)
+ * 1 -- Negative X (-x)
+ * 2 -- Positive Y (+y)
+ * 3 -- Negative Y (-y)
+ * 4 -- Positive Z (+z)
+ * 5 -- Negative Z (-z)
* * @author Joshua Slack */ diff --git a/jme3-core/src/main/java/com/jme3/util/ListSort.java b/jme3-core/src/main/java/com/jme3/util/ListSort.java index c45353a0c..517f2dd6b 100644 --- a/jme3-core/src/main/java/com/jme3/util/ListSort.java +++ b/jme3-core/src/main/java/com/jme3/util/ListSort.java @@ -52,12 +52,13 @@ import java.util.Comparator; * for optimal performance, but can be called several times if the length of the * list changes * + * {@code * Disclaimer : I was intrigued by the use of val >>> 1 in java 7 Timsort class * instead of val / 2 (integer division). Micro benching revealed that val >>> 1 * is twice faster than val / 2 in java 6 and has similar perf in java 7. The * following code uses val >>> 1 when ever a value needs to be divided by 2 and * rounded to its floor - * + * } * * @author Nehon */ @@ -66,7 +67,7 @@ public class ListSort { /** * Threshold for binary sort vs merge. Original algorithm use 64, java7 * TimSort uses 32 and I used 128, see this post for explanations : - * http://hub.jmonkeyengine.org/groups/development-discussion-jme3/forum/topic/i-got-that-sorted-out-huhuhu/ + * https://hub.jmonkeyengine.org/t/i-got-that-sorted-out-huhuhu/24478 */ private static final int MIN_SIZE = 128; private T[] array; diff --git a/jme3-core/src/main/java/com/jme3/util/SortUtil.java b/jme3-core/src/main/java/com/jme3/util/SortUtil.java index 51edc0adb..7628495f5 100644 --- a/jme3-core/src/main/java/com/jme3/util/SortUtil.java +++ b/jme3-core/src/main/java/com/jme3/util/SortUtil.java @@ -47,7 +47,7 @@ public class SortUtil { private static final int INSERTION_SORT_THRESHOLD = 7; - /** + /* procedure optimizedGnomeSort(a[]) pos := 1 last := 0 diff --git a/jme3-core/src/plugins/java/com/jme3/export/binary/ByteUtils.java b/jme3-core/src/plugins/java/com/jme3/export/binary/ByteUtils.java index f66a7fc7e..882cb529f 100644 --- a/jme3-core/src/plugins/java/com/jme3/export/binary/ByteUtils.java +++ b/jme3-core/src/plugins/java/com/jme3/export/binary/ByteUtils.java @@ -452,7 +452,7 @@ public class ByteUtils { * of bytes have been read. * * @param store - * the byte array to store in. Should have a length > bytes + * the byte array to store in. Array length must be greater than bytes param. * @param bytes * the number of bytes to read. * @param is diff --git a/jme3-core/src/plugins/java/com/jme3/material/plugins/ConditionParser.java b/jme3-core/src/plugins/java/com/jme3/material/plugins/ConditionParser.java index 2041fba09..88e0e39fe 100644 --- a/jme3-core/src/plugins/java/com/jme3/material/plugins/ConditionParser.java +++ b/jme3-core/src/plugins/java/com/jme3/material/plugins/ConditionParser.java @@ -78,15 +78,13 @@ public class ConditionParser { * parse a condition and returns the list of defines of this condition. * additionally this methods updates the formattedExpression with uppercased * defines names - * - * supported expression syntax example: - * - * "(LightMap && SeparateTexCoord) || !ColorMap" - * "#if (defined(LightMap) && defined(SeparateTexCoord)) || !defined(ColorMap)" - * "#ifdef LightMap" - * "#ifdef (LightMap && SeparateTexCoord) || !ColorMap" - * - * + * + * supported expression syntax example:

+ * {@code "(LightMap && SeparateTexCoord) || !ColorMap"}

+ * {@code "#if (defined(LightMap) && defined(SeparateTexCoord)) || !defined(ColorMap)"}

+ * {@code "#ifdef LightMap"}

+ * {@code "#ifdef (LightMap && SeparateTexCoord) || !ColorMap"}
+ * * @param expression the expression to parse * @return the list of defines */ @@ -111,4 +109,4 @@ public class ConditionParser { public String getFormattedExpression() { return formattedExpression; } -} \ No newline at end of file +} diff --git a/jme3-core/src/plugins/java/com/jme3/material/plugins/ShaderNodeLoaderDelegate.java b/jme3-core/src/plugins/java/com/jme3/material/plugins/ShaderNodeLoaderDelegate.java index bd2b86c3c..0d410057e 100644 --- a/jme3-core/src/plugins/java/com/jme3/material/plugins/ShaderNodeLoaderDelegate.java +++ b/jme3-core/src/plugins/java/com/jme3/material/plugins/ShaderNodeLoaderDelegate.java @@ -984,11 +984,11 @@ public class ShaderNodeLoaderDelegate { } /** - * merges 2 condition with the given operator + * Merges 2 conditions with the given operator * * @param condition1 the first condition * @param condition2 the second condition - * @param operator the operator ("&&" or "||&) + * @param operator the operator {@literal ("&&" or "||&)} * @return the merged condition */ public String mergeConditions(String condition1, String condition2, String operator) { diff --git a/jme3-networking/src/main/java/com/jme3/network/serializing/Serializer.java b/jme3-networking/src/main/java/com/jme3/network/serializing/Serializer.java index 26374762e..4e560fbfa 100644 --- a/jme3-networking/src/main/java/com/jme3/network/serializing/Serializer.java +++ b/jme3-networking/src/main/java/com/jme3/network/serializing/Serializer.java @@ -153,7 +153,7 @@ public abstract class Serializer { /** * When set to true, classes that do not have intrinsic IDs in their - * @Serializable will not be auto-registered during write. Defaults + * {@code @Serializable } will not be auto-registered during write. Defaults * to true since this is almost never desired behavior with the way * this code works. Set to false to get the old permissive behavior. */