Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
import java.util.logging.Logger;

/**
* A garbage collector bound asset cache that handles non-clonable objects.
* A garbage collector bound asset cache that handles non-cloneable objects.
* This cache assumes that the asset given to the user is the same asset
* that has been stored in the cache, in other words,
* {@link AssetProcessor#createClone(java.lang.Object) } for that asset
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ public static int getSampleFromMip(int mipLevel, int miptot) {
}


//see lagarde's paper https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf
//see Lagarde's paper https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf
//linear roughness
public static float getRoughnessFromMip(int miplevel, int miptot) {
float step = 1f / ((float) miptot - 1);
Expand Down
8 changes: 4 additions & 4 deletions jme3-core/src/main/java/com/jme3/material/Material.java
Original file line number Diff line number Diff line change
Expand Up @@ -975,11 +975,11 @@ private void resetUniformsNotSetByCurrent(Shader shader) {
* <li>Set the {@link RenderState} to use for rendering. The render states are
* applied in this order (later RenderStates override earlier RenderStates):<ol>
* <li>{@link TechniqueDef#getRenderState() Technique Definition's RenderState}
* - i.e. specific renderstate that is required for the shader.</li>
* - i.e. specific RenderState that is required for the shader.</li>
* <li>{@link #getAdditionalRenderState() Material Instance Additional RenderState}
* - i.e. ad-hoc renderstate set per model</li>
* - i.e. ad-hoc RenderState set per model</li>
* <li>{@link RenderManager#getForcedRenderState() RenderManager's Forced RenderState}
* - i.e. renderstate requested by a {@link com.jme3.post.SceneProcessor} or
* - i.e. RenderState requested by a {@link com.jme3.post.SceneProcessor} or
* post-processing filter.</li></ol>
* <li>If the technique uses a shader, then the uniforms of the shader must be updated.<ul>
* <li>Uniforms bound to material parameters are updated based on the current material parameter values.</li>
Expand Down Expand Up @@ -1116,7 +1116,7 @@ public void read(JmeImporter im) throws IOException {
// Using SimpleTextured/SolidColor, just switch to Unshaded
defName = "Common/MatDefs/Misc/Unshaded.j3md";
} else if (defName.equalsIgnoreCase("Common/MatDefs/Misc/WireColor.j3md")) {
// Using WireColor, set wireframe renderstate = true and use Unshaded
// Using WireColor, set wireframe render state = true and use Unshaded
getAdditionalRenderState().setWireframe(true);
defName = "Common/MatDefs/Misc/Unshaded.j3md";
} else if (defName.equalsIgnoreCase("Common/MatDefs/Misc/Unshaded.j3md")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ public void preFrame(float tpf) {
} else {
setupViewPortFrameBuffer();
//if we are in a multiview situation we need to resize the camera
//to the viewportsize so that the backbuffer is rendered correctly
//to the viewport size so that the back buffer is rendered correctly
if (multiView) {
viewPort.getCamera().resize(width, height, false);
viewPort.getCamera().setViewPort(0, 1, 0, 1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ private void rotateBillboard(Camera cam) {
private void rotateCameraAligned(Camera camera) {
look.set(camera.getLocation()).subtractLocal(
spatial.getWorldTranslation());
// coopt left for our own purposes.
// co-opt left for our own purposes.
Vector3f xzp = left;
// The xzp vector is the projection of the look vector on the xz plane
xzp.set(look.x, 0, look.z);
Expand Down Expand Up @@ -187,9 +187,9 @@ private void rotateCameraAligned(Camera camera) {
* Camera
*/
private void rotateScreenAligned(Camera camera) {
// coopt diff for our in direction:
// co-opt diff for our in direction:
look.set(camera.getDirection()).negateLocal();
// coopt loc for our left direction:
// co-opt loc for our left direction:
left.set(camera.getLeft()).negateLocal();
orient.fromAxes(left, camera.getUp(), look);
Node parent = spatial.getParent();
Expand All @@ -214,8 +214,7 @@ private void rotateAxial(Camera camera, Vector3f axis) {
// the model space of the billboard.
look.set(camera.getLocation()).subtractLocal(
spatial.getWorldTranslation());
spatial.getParent().getWorldRotation().mult(look, left); // coopt left for our own
// purposes.
spatial.getParent().getWorldRotation().mult(look, left); // co-opt left for our own purposes.
left.x *= 1.0f / spatial.getWorldScale().x;
left.y *= 1.0f / spatial.getWorldScale().y;
left.z *= 1.0f / spatial.getWorldScale().z;
Expand Down
4 changes: 2 additions & 2 deletions jme3-core/src/main/java/com/jme3/texture/FrameBuffer.java
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ public RenderBuffer getDepthTarget() {
* @param width The width to use
* @param height The height to use
* @param samples The number of samples to use for a multisampled
* framebuffer, or 1 if the framebuffer should be singlesampled.
* framebuffer, or 1 if the framebuffer should be single-sampled.
*
* @throws IllegalArgumentException If width or height are not positive.
*/
Expand Down Expand Up @@ -726,7 +726,7 @@ public int getWidth() {

/**
* @return The number of samples when using a multisample framebuffer, or
* 1 if this is a singlesampled framebuffer.
* 1 if this is a single-sampled framebuffer.
*/
public int getSamples() {
return samples;
Expand Down
6 changes: 3 additions & 3 deletions jme3-core/src/main/java/com/jme3/util/ListMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,9 @@ public Collection<V> values() {
@Override
public Set<Entry<K, V>> entrySet() {
return backingMap.entrySet();
// HashSet<Entry<K, V>> entryset = new HashSet<Entry<K, V>>();
// entryset.addAll(entries);
// return entryset;
// HashSet<Entry<K, V>> entrySet = new HashSet<Entry<K, V>>();
// entrySet.addAll(entries);
// return entrySet;
}

}
4 changes: 2 additions & 2 deletions jme3-core/src/main/java/com/jme3/util/ListSort.java
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ public void sort(T[] array, Comparator<T> comparator) {
while (remaining != 0) {
int runLength = getRunLength(array, low, high, comparator);

/* if runlength is below the threshold we binary sort the remaining
/* if run length is below the threshold we binary sort the remaining
* elements
*/
if (runLength < minLength) {
Expand Down Expand Up @@ -293,7 +293,7 @@ private int getRunLength(T[] array, int firstId, int lastId,
}

/**
* binarysort is the best method for sorting small arrays: it does few
* Binary sort is the best method for sorting small arrays: it does few
* compares, but can do data movement quadratic in the number of elements.
* [firstId, lastId] is a contiguous slice of a list, and is sorted via
* binary insertion. This sort is stable. On entry, must have firstId <=
Expand Down
4 changes: 2 additions & 2 deletions jme3-core/src/main/resources/Common/ShaderLib/Fog.glsllib
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ uniform vec3 m_FogColor;

// x == density
// y == factor
// z == ystart
// w == yend
// z == yStart
// w == yEnd
uniform vec4 m_FogParams;

varying vec3 fogCoord;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ public static TextureAtlas createAtlas(Spatial root, int atlasSize) {
* Creates one geometry out of the given root spatial and merges all single
* textures into one texture of the given size.
* @param spat The root spatial of the scene to batch
* @param mgr An assetmanager that can be used to create the material.
* @param mgr An asset manager that can be used to create the material.
* @param atlasSize A size for the atlas texture, it has to be large enough to hold all single textures.
* @return A new geometry that uses the generated texture atlas and merges all meshes of the root spatial, null if the atlas cannot be created because not all textures fit.
*/
Expand Down
12 changes: 6 additions & 6 deletions jme3-core/src/tools/java/jme3tools/savegame/SaveGame.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ private SaveGame() {
/**
* Saves a savable in a system-dependent way.
* @param gamePath A unique path for this game, e.g. com/mycompany/mygame
* @param dataName A unique name for this savegame, e.g. "save_001"
* @param dataName A unique name for this SaveGame, e.g. "save_001"
* @param data The Savable to save
*/
public static void saveGame(String gamePath, String dataName, Savable data) {
Expand All @@ -74,7 +74,7 @@ public static void saveGame(String gamePath, String dataName, Savable data) {
/**
* Saves a savable in a system-dependent way.
* @param gamePath A unique path for this game, e.g. com/mycompany/mygame
* @param dataName A unique name for this savegame, e.g. "save_001"
* @param dataName A unique name for this SaveGame, e.g. "save_001"
* @param data The Savable to save
* @param storageType The specific type of folder to use to save the data
*/
Expand Down Expand Up @@ -127,7 +127,7 @@ public static void saveGame(String gamePath, String dataName, Savable data, JmeS
/**
* Loads a savable that has been saved on this system with saveGame() before.
* @param gamePath A unique path for this game, e.g. com/mycompany/mygame
* @param dataName A unique name for this savegame, e.g. "save_001"
* @param dataName A unique name for this SaveGame, e.g. "save_001"
* @return The savable that was saved
*/
public static Savable loadGame(String gamePath, String dataName) {
Expand All @@ -137,7 +137,7 @@ public static Savable loadGame(String gamePath, String dataName) {
/**
* Loads a savable that has been saved on this system with saveGame() before.
* @param gamePath A unique path for this game, e.g. com/mycompany/mygame
* @param dataName A unique name for this savegame, e.g. "save_001"
* @param dataName A unique name for this SaveGame, e.g. "save_001"
* @param storageType The specific type of folder to use to save the data
* @return The savable that was saved
*/
Expand All @@ -148,7 +148,7 @@ public static Savable loadGame(String gamePath, String dataName, JmeSystem.Stora
/**
* Loads a savable that has been saved on this system with saveGame() before.
* @param gamePath A unique path for this game, e.g. com/mycompany/mygame
* @param dataName A unique name for this savegame, e.g. "save_001"
* @param dataName A unique name for this SaveGame, e.g. "save_001"
* @param manager Link to an AssetManager if required for loading the data (e.g. models with textures)
* @return The savable that was saved or null if none was found
*/
Expand All @@ -159,7 +159,7 @@ public static Savable loadGame(String gamePath, String dataName, AssetManager ma
/**
* Loads a savable that has been saved on this system with saveGame() before.
* @param gamePath A unique path for this game, e.g. com/mycompany/mygame
* @param dataName A unique name for this savegame, e.g. "save_001"
* @param dataName A unique name for this SaveGame, e.g. "save_001"
* @param manager Link to an AssetManager if required for loading the data (e.g. models with textures)
* @param storageType The specific type of folder to use to save the data
* @return The savable that was saved or null if none was found
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ private void updateResolutionChoices() {

private void updateAntialiasChoices() {
// maybe in the future will add support for determining this info
// through pbuffer
// through PBuffer
String[] choices = new String[]{resourceBundle.getString("antialias.disabled"), "2x", "4x", "6x", "8x", "16x"};
antialiasCombo.setModel(new DefaultComboBoxModel<>(choices));
antialiasCombo.setSelectedItem(choices[Math.min(source.getSamples()/2,5)]);
Expand Down
2 changes: 1 addition & 1 deletion jme3-effects/src/main/java/com/jme3/water/WaterUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ private WaterUtils() {
public static void updateReflectionCam(Camera reflectionCam, Plane plane, Camera sceneCam){

TempVars vars = TempVars.get();
//Temp vects for reflection cam orientation calculation
// temporary vectors for reflection cam orientation calculation:
Vector3f sceneTarget = vars.vect1;
Vector3f reflectDirection = vars.vect2;
Vector3f reflectUp = vars.vect3;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ public static Node createPhysicsTestNode(AssetManager manager, CollisionShape sh
}

/**
* creates the necessary inputlistener and action to shoot balls from the camera
* creates the necessary input listener and action to shoot balls from the camera
*
* @param app the application that's running
* @param rootNode where ball geometries should be added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
import com.jme3.scene.Node;

/**
* Tests attaching ghost nodes to physicsnodes via the scenegraph
* Tests attaching ghost nodes to physics nodes via the scene graph
* @author normenhansen
*/
public class TestAttachGhostObject extends SimpleApplication implements AnalogListener {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public void simpleInitApp() {
//export to byte array
ByteArrayOutputStream bout=new ByteArrayOutputStream();
BinaryExporter.getInstance().save(loaderNode, bout);
//import from byte array, automatically loads the monkeyhead from file
//import from byte array, automatically loads the monkey head from file
ByteArrayInputStream bin=new ByteArrayInputStream(bout.toByteArray());
BinaryImporter imp=BinaryImporter.getInstance();
imp.setAssetManager(assetManager);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public void simpleInitApp() {
// We set up collision detection for the player by creating
// a capsule collision shape and a CharacterControl.
// The CharacterControl offers extra settings for
// size, stepheight, jumping, falling, and gravity.
// size, step height, jumping, falling, and gravity.
// We also put the player in its starting position.
CapsuleCollisionShape capsuleShape = new CapsuleCollisionShape(1.5f, 6f, 1);
player = new CharacterControl(capsuleShape, 0.05f);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
import com.jme3.scene.Geometry;
import com.jme3.scene.shape.Box;

/** Sample 5 - how to map keys and mousebuttons to actions */
/** Sample 5 - how to map keys and mouse buttons to actions */
public class HelloInput extends SimpleApplication {

public static void main(String[] args) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public void simpleInitApp() {
// We set up collision detection for the player by creating
// a capsule collision shape and a CharacterControl.
// The CharacterControl offers extra settings for
// size, stepheight, jumping, falling, and gravity.
// size, step height, jumping, falling, and gravity.
// We also put the player in its starting position.
CapsuleCollisionShape capsuleShape = new CapsuleCollisionShape(1.5f, 6f, 1);
player = new CharacterControl(capsuleShape, 0.05f);
Expand Down
4 changes: 2 additions & 2 deletions jme3-examples/src/main/java/jme3test/terrain/TerrainTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@
* The base terrain class it uses is TerrainQuad, which is a quad tree of actual
* meshes called TerrainPatches.
* There are a couple options for the terrain in this test:
* The first is wireframe mode. Here you can see the underlying trianglestrip structure.
* The first is wireframe mode. Here you can see the underlying triangle strip structure.
* You will notice some off lines; these are degenerate triangles and are part of the
* trianglestrip. They are only noticeable in wireframe mode.
* triangle strip. They are only noticeable in wireframe mode.
* Second is Tri-Planar texture mode. Here the textures are rendered on all 3 axes and
* then blended together to reduce distortion and stretching.
* Third, which you have to modify the code to see, is Entropy LOD calculations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,7 @@ public void setBroadphaseType(BroadphaseType broadphaseType) {
/**
* Sets the maximum amount of extra steps that will be used to step the physics
* when the fps is below the physics fps. Doing this maintains determinism in physics.
* For example a maximum number of 2 can compensate for framerates as low as 30fps
* For example a maximum number of 2 can compensate for frame rates as low as 30fps
* when the physics has the default accuracy of 60 fps. Note that setting this
* value too high can make the physics drive down its own fps in case it's overloaded.
* @param steps The maximum number of extra steps, default is 4.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public Vector3f getPivotB() {
}

/**
* destroys this joint and removes it from its connected PhysicsRigidBodys joint lists
* destroys this joint and removes it from its connected PhysicsRigidBody's joint lists
*/
public void destroy() {
getBodyA().removeJoint(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
* vehicle model as provided in btRaycastVehicle. Instead of simulation each wheel
* and chassis as separate rigid bodies, connected by constraints, it uses a simplified model.
* This simplified model has many benefits, and is widely used in commercial driving games.<br>
* The entire vehicle is represented as a single rigidbody, the chassis.
* The entire vehicle is represented as a single rigid body, the chassis.
* The collision detection of the wheels is approximated by ray casts,
* and the tire friction is a basic anisotropic friction model.
* </p>
Expand Down Expand Up @@ -115,7 +115,7 @@ protected void postRebuild() {
}

/**
* Used internally, creates the actual vehicle constraint when vehicle is added to phyicsspace
* Used internally, creates the actual vehicle constraint when vehicle is added to physics space
*
* @param space the PhysicsSpace to use (alias created) or null for none
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public void uncaughtException(Thread thread, Throwable thrown) {
});
}

// For canvas, this will create a pbuffer,
// For canvas, this will create a Pbuffer,
// allowing us to query information.
// When the canvas context becomes available, it will
// be replaced seamlessly.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,11 @@ protected int determineMaxSamples(int requestedSamples) {
listener.handleError("Failed to check if display is current", ex);
}
if ((Pbuffer.getCapabilities() & Pbuffer.PBUFFER_SUPPORTED) == 0) {
// No pbuffer, assume everything is supported.
// No PBuffer, assume everything is supported.
return Integer.MAX_VALUE;
} else {
Pbuffer pb = null;
// OpenGL2 method: Create pbuffer and query samples
// OpenGL2 method: Create PBuffer and query samples
// from GL_ARB_framebuffer_object or GL_EXT_framebuffer_multisample.
try {
pb = new Pbuffer(1, 1, new PixelFormat(0, 0, 0), null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ protected boolean initInThread() {

timer = new NanoTimer();

// For canvas, this will create a pbuffer,
// For canvas, this will create a PBuffer,
// allowing us to query information.
// When the canvas context becomes available, it will
// be replaced seamlessly.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ public static void writeClassAndObject(ByteBuffer buffer, Object object) throws
// In that case, the SerializerRegistration object we get back isn't
// really going to be capable of recreating the object on the other
// end because it won't know what class to use. This only comes up
// in writeclassAndObject() because we just wrote an ID to a more generic
// in writeClassAndObject() because we just wrote an ID to a more generic
// class than will be readable on the other end. The check is simple, though.
if( reg.getType() != object.getClass() ) {
throw new IllegalArgumentException("Class has not been registered:"
Expand Down
Loading