From 7256b913f0bdb5bb3df3d71bd808abc6a6bfacfc Mon Sep 17 00:00:00 2001
From: Julien Gouesse Texture
object with default attributes.
*/
- public Texture() {}
+ public Texture() {
+ }
/**
* sets a color that is used with CombinerSource.Constant
- *
+ *
* @param color
* the new constant color (the default is {@link ColorRGBA#BLACK_NO_ALPHA})
*/
@@ -512,11 +513,15 @@ public abstract class Texture implements Savable {
/**
* sets a color that is used with CombinerSource.Constant
- *
+ *
* @param red
+ * the red value
* @param green
+ * the green value
* @param blue
+ * the blue value
* @param alpha
+ * the alpha value
*/
public void setConstantColor(final float red, final float green, final float blue, final float alpha) {
_constantColor.set(red, green, blue, alpha);
@@ -524,7 +529,7 @@ public abstract class Texture implements Savable {
/**
* sets the color used when texture operations encounter the border of a texture.
- *
+ *
* @param color
* the new border color (the default is {@link ColorRGBA#BLACK_NO_ALPHA})
*/
@@ -534,11 +539,15 @@ public abstract class Texture implements Savable {
/**
* sets the color used when texture operations encounter the border of a texture.
- *
+ *
* @param red
+ * the red value
* @param green
+ * the green value
* @param blue
+ * the blue value
* @param alpha
+ * the alpha value
*/
public void setBorderColor(final float red, final float green, final float blue, final float alpha) {
_borderColor.set(red, green, blue, alpha);
@@ -586,7 +595,7 @@ public abstract class Texture implements Savable {
/**
* setApply
sets the apply mode for this texture.
- *
+ *
* @param apply
* the apply mode for this texture.
* @throws IllegalArgumentException
@@ -601,7 +610,7 @@ public abstract class Texture implements Savable {
/**
* setImage
sets the image object that defines the texture.
- *
+ *
* @param image
* the image that defines the texture.
*/
@@ -634,7 +643,7 @@ public abstract class Texture implements Savable {
/**
* Sets the id for this texture in regards to the given OpenGL context.
- *
+ *
* @param glContext
* the object representing the OpenGL context this texture belongs to. See
* {@link RenderContext#getGlContextRep()}
@@ -655,7 +664,7 @@ public abstract class Texture implements Savable {
* Note: This does not remove the texture from the card and is provided for use by code that does remove textures
* from the card.
*
Node
with a given name.
- *
+ *
* @param name
* the name of the node. This is required for identification purposes.
*/
@@ -60,7 +60,7 @@ public class Node extends Spatial {
/**
* Constructs a new Node
with a given name.
- *
+ *
* @param name
* the name of the node. This is required for identification purposes.
* @param children
@@ -73,11 +73,11 @@ public class Node extends Spatial {
}
/**
- *
+ *
* attachChild
attaches a child to this node. This node becomes the child's parent. The current number
* of children maintained is returned. attachChildAt
attaches a child to this node at an index. This node becomes the child's parent. The
* current number of children maintained is returned. detachChild
removes a given child from the node's list. This child will no longe be maintained.
- *
+ *
* @param child
* the child to remove.
* @return the index the child was at. -1 if the child was not in the list.
@@ -159,7 +161,7 @@ public class Node extends Spatial {
/**
* detachChild
removes a given child from the node's list. This child will no longe be maintained. Only
* the first child with a matching name is removed.
- *
+ *
* @param childName
* the child to remove.
* @return the index the child was at. -1 if the child was not in the list.
@@ -179,9 +181,9 @@ public class Node extends Spatial {
}
/**
- *
+ *
* detachChildAt
removes a child at a given index. That child is returned for saving purposes.
- *
+ *
* @param index
* the index of the child to be removed.
* @return the child at the supplied index.
@@ -202,7 +204,7 @@ public class Node extends Spatial {
}
/**
- *
+ *
* detachAllChildren
removes all children attached to this node.
*/
public void detachAllChildren() {
@@ -214,7 +216,7 @@ public class Node extends Spatial {
/**
* Get the index of the specified spatial.
- *
+ *
* @param sp
* spatial to retrieve index for.
* @return the index
@@ -225,7 +227,7 @@ public class Node extends Spatial {
/**
* Returns all children to this node.
- *
+ *
* @return a list containing all children to this node
*/
public ListgetChild
returns a child at a given index.
- *
+ *
* @param i
* the index to retrieve the child from.
* @return the child at a specified index.
@@ -271,7 +275,7 @@ public class Node extends Spatial {
/**
* getChild
returns the first child found with exactly the given name (case sensitive.) If our children
* are Nodes, we will search their children as well.
- *
+ *
* @param name
* the name of the child to retrieve. If null, we'll return null.
* @return the child if found, or null.
@@ -296,7 +300,7 @@ public class Node extends Spatial {
/**
* determines if the provided Spatial is contained in the children list of this node.
- *
+ *
* @param spat
* the child object to look for.
* @return true if the object is contained, false otherwise.
@@ -317,9 +321,9 @@ public class Node extends Spatial {
}
/**
- *
+ *
* getNumberOfChildren
returns the number of children this node maintains.
- *
+ *
* @return the number of children this node maintains.
*/
public int getNumberOfChildren() {
@@ -361,7 +365,7 @@ public class Node extends Spatial {
/**
* draw
calls the onDraw method for each child maintained by this node.
- *
+ *
* @see com.ardor3d.scenegraph.Spatial#draw(com.ardor3d.renderer.Renderer)
* @param r
* the renderer to draw to.
@@ -393,7 +397,7 @@ public class Node extends Spatial {
/**
* updateWorldBound
merges the bounds of all the children maintained by this node. This will allow for
* faster culling operations.
- *
+ *
* @see com.ardor3d.scenegraph.Spatial#updateWorldBound(boolean)
*/
@Override
@@ -411,8 +415,8 @@ public class Node extends Spatial {
// simple check to catch NaN issues
if (!Vector3.isValid(worldBound.getCenter())) {
- throw new Ardor3dException("WorldBound center is invalid after merge between " + this + " and "
- + child);
+ throw new Ardor3dException(
+ "WorldBound center is invalid after merge between " + this + " and " + child);
}
} else {
// set world bound to first non-null child world bound
diff --git a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/hint/SceneHints.java b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/hint/SceneHints.java
index a56d106..95ad425 100644
--- a/ardor3d-core/src/main/java/com/ardor3d/scenegraph/hint/SceneHints.java
+++ b/ardor3d-core/src/main/java/com/ardor3d/scenegraph/hint/SceneHints.java
@@ -3,7 +3,7 @@
*
* This file is part of Ardor3D.
*
- * Ardor3D is free software: you can redistribute it and/or modify it
+ * Ardor3D is free software: you can redistribute it and/or modify it
* under the terms of its license which may be found in the accompanying
* LICENSE file or at true
if the given ColorRGBA is equal to the data stored in the buffer at the given data
+ * index
*/
public static boolean equals(final ReadOnlyColorRGBA check, final FloatBuffer buf, final int index) {
final ColorRGBA temp = new ColorRGBA();
@@ -230,6 +234,7 @@ public final class BufferUtils {
*
* @param data
* array of Vector4 objects to place into a new FloatBuffer
+ * @return the requested new FloatBuffer
*/
public static FloatBuffer createFloatBuffer(final ReadOnlyVector4... data) {
if (data == null) {
@@ -248,6 +253,7 @@ public final class BufferUtils {
* the number of vectors to read
* @param data
* array of Vector4 objects to place into a new FloatBuffer
+ * @return the requested new FloatBuffer
*/
public static FloatBuffer createFloatBuffer(final int offset, final int length, final ReadOnlyVector4... data) {
if (data == null) {
@@ -468,7 +474,7 @@ public final class BufferUtils {
* the buffer to compare data with
* @param index
* the position (in terms of vectors, not floats) of the vector in the buffer to check against
- * @return
+ * @return true
if the given Vector3 is equals to the data stored in the buffer at the given data index
*/
public static boolean equals(final ReadOnlyVector4 check, final FloatBuffer buf, final int index) {
final Vector4 temp = Vector4.fetchTempInstance();
@@ -486,6 +492,8 @@ public final class BufferUtils {
*
* @param data
* array of Vector3 objects to place into a new FloatBuffer
+ *
+ * @return the requested new FloatBuffer
*/
public static FloatBuffer createFloatBuffer(final ReadOnlyVector3... data) {
if (data == null) {
@@ -504,6 +512,7 @@ public final class BufferUtils {
* the number of vectors to read
* @param data
* array of Vector3 objects to place into a new FloatBuffer
+ * @return the requested new FloatBuffer
*/
public static FloatBuffer createFloatBuffer(final int offset, final int length, final ReadOnlyVector3... data) {
if (data == null) {
@@ -718,7 +727,7 @@ public final class BufferUtils {
* the buffer to compare data with
* @param index
* the position (in terms of vectors, not floats) of the vector in the buffer to check against
- * @return
+ * @return true
if the given Vector3 is equals to the data stored in the buffer at the given data index
*/
public static boolean equals(final ReadOnlyVector3 check, final FloatBuffer buf, final int index) {
final Vector3 temp = Vector3.fetchTempInstance();
@@ -736,6 +745,7 @@ public final class BufferUtils {
*
* @param data
* array of Vector2 objects to place into a new FloatBuffer
+ * @return the requested new FloatBuffer
*/
public static FloatBuffer createFloatBuffer(final ReadOnlyVector2... data) {
if (data == null) {
@@ -754,6 +764,7 @@ public final class BufferUtils {
* the number of vectors to read
* @param data
* array of Vector2 objects to place into a new FloatBuffer
+ * @return the requested new FloatBuffer
*/
public static FloatBuffer createFloatBuffer(final int offset, final int length, final ReadOnlyVector2... data) {
if (data == null) {
@@ -954,7 +965,7 @@ public final class BufferUtils {
* the buffer to compare data with
* @param index
* the position (in terms of vectors, not floats) of the vector in the buffer to check against
- * @return
+ * @return true
if the given Vector2 is equals to the data stored in the buffer at the given data index
*/
public static boolean equals(final ReadOnlyVector2 check, final FloatBuffer buf, final int index) {
final Vector2 temp = Vector2.fetchTempInstance();
@@ -972,6 +983,7 @@ public final class BufferUtils {
*
* @param data
* array of ints to place into a new IntBuffer
+ * @return the requested new IntBuffer
*/
public static IntBuffer createIntBuffer(final int... data) {
if (data == null) {
@@ -1154,6 +1166,7 @@ public final class BufferUtils {
*
* @param data
* array of float primitives to place into a new FloatBuffer
+ * @return the new FloatBuffer
*/
public static FloatBuffer createFloatBuffer(final float... data) {
return createFloatBuffer(null, data);
@@ -1162,8 +1175,12 @@ public final class BufferUtils {
/**
* Generate a new FloatBuffer using the given array of float primitives.
*
+ * @param reuseStore
+ * the store reused if non null and big enough to contain the float primitives
+ *
* @param data
* array of float primitives to place into a new FloatBuffer
+ * @return the new FloatBuffer
*/
public static FloatBuffer createFloatBuffer(final FloatBuffer reuseStore, final float... data) {
if (data == null) {
@@ -1192,6 +1209,7 @@ public final class BufferUtils {
* the number of vectors to read
* @param data
* array of Vector2 objects to place into a new FloatBuffer
+ * @return the new FloatBuffer created on the heap
*/
public static FloatBuffer createFloatBufferOnHeap(final int offset, final int length,
final ReadOnlyVector2... data) {
@@ -1220,6 +1238,7 @@ public final class BufferUtils {
* the number of vectors to read
* @param data
* array of Vector3 objects to place into a new FloatBuffer
+ * @return the new FloatBuffer created on the heap
*/
public static FloatBuffer createFloatBufferOnHeap(final int offset, final int length,
final ReadOnlyVector3... data) {
@@ -1248,6 +1267,7 @@ public final class BufferUtils {
* the number of colors to read
* @param data
* array of ColorRGBA objects to place into a new FloatBuffer
+ * @return the new FloatBuffer created on the heap
*/
public static FloatBuffer createFloatBufferOnHeap(final int offset, final int length,
final ReadOnlyColorRGBA... data) {
@@ -1528,6 +1548,7 @@ public final class BufferUtils {
*
* @param data
* array of short primitives to place into a new ShortBuffer
+ * @return the new ShortBuffer
*/
public static ShortBuffer createShortBuffer(final short... data) {
if (data == null) {
--
cgit v1.2.3