correct more grammar/spelling errors in comments
This commit is contained in:
parent
4f664f33cc
commit
e6b23342fb
@ -59,7 +59,7 @@ import java.util.logging.Logger;
|
|||||||
/**
|
/**
|
||||||
* AndroidSensorJoyInput converts the Android Sensor system into Joystick events.
|
* AndroidSensorJoyInput converts the Android Sensor system into Joystick events.
|
||||||
* A single joystick is configured and includes data for all configured sensors
|
* A single joystick is configured and includes data for all configured sensors
|
||||||
* as seperate axes of the joystick.
|
* as separate axes of the joystick.
|
||||||
*
|
*
|
||||||
* Each axis is named according to the static strings in SensorJoystickAxis.
|
* Each axis is named according to the static strings in SensorJoystickAxis.
|
||||||
* Refer to the strings defined in SensorJoystickAxis for a list of supported
|
* Refer to the strings defined in SensorJoystickAxis for a list of supported
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2012 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -69,7 +69,7 @@ public class BlenderKey extends ModelKey {
|
|||||||
*/
|
*/
|
||||||
protected String usedWorld;
|
protected String usedWorld;
|
||||||
/**
|
/**
|
||||||
* User's default material that is set fo objects that have no material definition in blender. The default value is
|
* User's default material that is set for objects that have no material definition in blender. The default value is
|
||||||
* null. If the value is null the importer will use its own default material (gray color - like in blender).
|
* null. If the value is null the importer will use its own default material (gray color - like in blender).
|
||||||
*/
|
*/
|
||||||
protected Material defaultMaterial;
|
protected Material defaultMaterial;
|
||||||
@ -476,9 +476,9 @@ public class BlenderKey extends ModelKey {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This mehtod sets the name of the WORLD data block taht should be used during file loading. By default the name is
|
* This method sets the name of the WORLD data block that should be used during file loading. By default the name is
|
||||||
* not set. If no name is set or the given name does not occur in the file - the first WORLD data block will be used
|
* not set. If no name is set or the given name does not occur in the file - the first WORLD data block will be used
|
||||||
* during loading (assumin any exists in the file).
|
* during loading (assuming any exists in the file).
|
||||||
* @param usedWorld
|
* @param usedWorld
|
||||||
* the name of the WORLD block used during loading
|
* the name of the WORLD block used during loading
|
||||||
*/
|
*/
|
||||||
@ -487,7 +487,7 @@ public class BlenderKey extends ModelKey {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This mehtod returns the name of the WORLD data block taht should be used during file loading.
|
* This method returns the name of the WORLD data block that should be used during file loading.
|
||||||
* @return the name of the WORLD block used during loading
|
* @return the name of the WORLD block used during loading
|
||||||
*/
|
*/
|
||||||
public String getUsedWorld() {
|
public String getUsedWorld() {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2012 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -85,7 +85,7 @@ public class DnaBlockData {
|
|||||||
names[i] = inputStream.readString();
|
names[i] = inputStream.readString();
|
||||||
}
|
}
|
||||||
|
|
||||||
// reding types
|
// reading types
|
||||||
inputStream.alignPosition(4);
|
inputStream.alignPosition(4);
|
||||||
identifier = inputStream.readByte() << 24 | inputStream.readByte() << 16 | inputStream.readByte() << 8 | inputStream.readByte();
|
identifier = inputStream.readByte() << 24 | inputStream.readByte() << 16 | inputStream.readByte() << 8 | inputStream.readByte();
|
||||||
if (identifier != TYPE_ID) {
|
if (identifier != TYPE_ID) {
|
||||||
@ -181,7 +181,7 @@ public class DnaBlockData {
|
|||||||
/**
|
/**
|
||||||
* This method converts the given identifier code to string.
|
* This method converts the given identifier code to string.
|
||||||
* @param code
|
* @param code
|
||||||
* the code taht is to be converted
|
* the code that is to be converted
|
||||||
* @return the string value of the identifier
|
* @return the string value of the identifier
|
||||||
*/
|
*/
|
||||||
private String toString(int code) {
|
private String toString(int code) {
|
||||||
|
@ -206,7 +206,7 @@ public final class ImageUtils {
|
|||||||
N.z = 1;
|
N.z = 1;
|
||||||
N.divideLocal(den);
|
N.divideLocal(den);
|
||||||
|
|
||||||
// setting thge pixel in the result image
|
// setting the pixel in the result image
|
||||||
bumpMap.setRGB(x, y, ImageUtils.vectorToColor(N.x, N.y, N.z));
|
bumpMap.setRGB(x, y, ImageUtils.vectorToColor(N.x, N.y, N.z));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -422,7 +422,7 @@ public final class ImageUtils {
|
|||||||
* pixel's X coordinate
|
* pixel's X coordinate
|
||||||
* @param y
|
* @param y
|
||||||
* pixel's Y coordinate
|
* pixel's Y coordinate
|
||||||
* @return height reprezented by the given texture in the specified location
|
* @return height represented by the given texture in the specified location
|
||||||
*/
|
*/
|
||||||
private static int getHeight(BufferedImage image, int x, int y) {
|
private static int getHeight(BufferedImage image, int x, int y) {
|
||||||
if (x < 0) {
|
if (x < 0) {
|
||||||
|
@ -171,7 +171,7 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* contruct a KinematicRagdollControl
|
* construct a KinematicRagdollControl
|
||||||
*/
|
*/
|
||||||
public KinematicRagdollControl() {
|
public KinematicRagdollControl() {
|
||||||
baseRigidBody = new PhysicsRigidBody(new BoxCollisionShape(Vector3f.UNIT_XYZ.mult(0.1f)), 1);
|
baseRigidBody = new PhysicsRigidBody(new BoxCollisionShape(Vector3f.UNIT_XYZ.mult(0.1f)), 1);
|
||||||
@ -255,7 +255,7 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
|
|||||||
link.bone.setUserTransformsInModelSpace(position, tmpRot1);
|
link.bone.setUserTransformsInModelSpace(position, tmpRot1);
|
||||||
} else {
|
} else {
|
||||||
//boneList is not empty, this means some bones of the skeleton might not be associated with a collision shape.
|
//boneList is not empty, this means some bones of the skeleton might not be associated with a collision shape.
|
||||||
//So we update them recusively
|
//So we update them recursively
|
||||||
RagdollUtils.setTransform(link.bone, position, tmpRot1, false, boneList);
|
RagdollUtils.setTransform(link.bone, position, tmpRot1, false, boneList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ import java.util.BitSet;
|
|||||||
public final class BoneTrack implements Track {
|
public final class BoneTrack implements Track {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Bone index in the skeleton which this track effects.
|
* Bone index in the skeleton which this track affects.
|
||||||
*/
|
*/
|
||||||
private int targetBoneIndex;
|
private int targetBoneIndex;
|
||||||
|
|
||||||
|
@ -213,7 +213,7 @@ public class EffectTrack implements ClonableTrack {
|
|||||||
control.addListener(new OnEndListener());
|
control.addListener(new OnEndListener());
|
||||||
initialized = true;
|
initialized = true;
|
||||||
}
|
}
|
||||||
//checking fo time to trigger the effect
|
//checking for time to trigger the effect
|
||||||
if (!emitted && time >= startOffset) {
|
if (!emitted && time >= startOffset) {
|
||||||
emitted = true;
|
emitted = true;
|
||||||
emitter.setCullHint(CullHint.Dynamic);
|
emitter.setCullHint(CullHint.Dynamic);
|
||||||
@ -449,7 +449,7 @@ public class EffectTrack implements ClonableTrack {
|
|||||||
public void read(JmeImporter im) throws IOException {
|
public void read(JmeImporter im) throws IOException {
|
||||||
InputCapsule in = im.getCapsule(this);
|
InputCapsule in = im.getCapsule(this);
|
||||||
this.particlesPerSeconds = in.readFloat("particlesPerSeconds", 0);
|
this.particlesPerSeconds = in.readFloat("particlesPerSeconds", 0);
|
||||||
//reading the emitter even if the track will then reference its cloned counter part if it's loaded with the assetManager.
|
//reading the emitter even if the track will then reference its cloned counterpart if it's loaded with the assetManager.
|
||||||
//This also avoid null pointer exception if the model is not loaded via the AssetManager.
|
//This also avoid null pointer exception if the model is not loaded via the AssetManager.
|
||||||
emitter = (ParticleEmitter) in.readSavable("emitter", null);
|
emitter = (ParticleEmitter) in.readSavable("emitter", null);
|
||||||
emitter.setParticlesPerSec(0);
|
emitter.setParticlesPerSec(0);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2012 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -44,9 +44,9 @@ public interface Track extends Savable, Cloneable {
|
|||||||
* given parameters.
|
* given parameters.
|
||||||
*
|
*
|
||||||
* @param time The time in the animation
|
* @param time The time in the animation
|
||||||
* @param weight The weight from 0 to 1 on how much to apply the track
|
* @param weight The weight from 0 to 1 on how much to apply the track
|
||||||
* @param control The control which the track should effect
|
* @param control The control which the track should affect
|
||||||
* @param channel The channel which the track should effect
|
* @param channel The channel which the track should affect
|
||||||
*/
|
*/
|
||||||
public void setTime(float time, float weight, AnimControl control, AnimChannel channel, TempVars vars);
|
public void setTime(float time, float weight, AnimControl control, AnimChannel channel, TempVars vars);
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2012 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -80,10 +80,10 @@ public class ScreenshotAppState extends AbstractAppState implements ActionListen
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This constructor allows you to specify the output file path of the screenshot.
|
* This constructor allows you to specify the output file path of the screenshot.
|
||||||
* Include the seperator at the end of the path.
|
* Include the separator at the end of the path.
|
||||||
* Use an emptry string to use the application folder. Use NULL to use the system
|
* Use an empty string to use the application folder. Use NULL to use the system
|
||||||
* default storage folder.
|
* default storage folder.
|
||||||
* @param filePath The screenshot file path to use. Include the seperator at the end of the path.
|
* @param filePath The screenshot file path to use. Include the separator at the end of the path.
|
||||||
*/
|
*/
|
||||||
public ScreenshotAppState(String filePath) {
|
public ScreenshotAppState(String filePath) {
|
||||||
this.filePath = filePath;
|
this.filePath = filePath;
|
||||||
@ -91,11 +91,11 @@ public class ScreenshotAppState extends AbstractAppState implements ActionListen
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This constructor allows you to specify the output file path of the screenshot.
|
* This constructor allows you to specify the output file path of the screenshot.
|
||||||
* Include the seperator at the end of the path.
|
* Include the separator at the end of the path.
|
||||||
* Use an emptry string to use the application folder. Use NULL to use the system
|
* Use an empty string to use the application folder. Use NULL to use the system
|
||||||
* default storage folder.
|
* default storage folder.
|
||||||
* @param filePath The screenshot file path to use. Include the seperator at the end of the path.
|
* @param filePath The screenshot file path to use. Include the separator at the end of the path.
|
||||||
* @param fileName The name of the file to save the screeshot as.
|
* @param fileName The name of the file to save the screenshot as.
|
||||||
*/
|
*/
|
||||||
public ScreenshotAppState(String filePath, String fileName) {
|
public ScreenshotAppState(String filePath, String fileName) {
|
||||||
this.filePath = filePath;
|
this.filePath = filePath;
|
||||||
@ -105,10 +105,10 @@ public class ScreenshotAppState extends AbstractAppState implements ActionListen
|
|||||||
/**
|
/**
|
||||||
* This constructor allows you to specify the output file path of the screenshot and
|
* This constructor allows you to specify the output file path of the screenshot and
|
||||||
* a base index for the shot index.
|
* a base index for the shot index.
|
||||||
* Include the seperator at the end of the path.
|
* Include the separator at the end of the path.
|
||||||
* Use an emptry string to use the application folder. Use NULL to use the system
|
* Use an empty string to use the application folder. Use NULL to use the system
|
||||||
* default storage folder.
|
* default storage folder.
|
||||||
* @param filePath The screenshot file path to use. Include the seperator at the end of the path.
|
* @param filePath The screenshot file path to use. Include the separator at the end of the path.
|
||||||
* @param shotIndex The base index for screen shots. The first screen shot will have
|
* @param shotIndex The base index for screen shots. The first screen shot will have
|
||||||
* shotIndex + 1 appended, the next shotIndex + 2, and so on.
|
* shotIndex + 1 appended, the next shotIndex + 2, and so on.
|
||||||
*/
|
*/
|
||||||
@ -120,11 +120,11 @@ public class ScreenshotAppState extends AbstractAppState implements ActionListen
|
|||||||
/**
|
/**
|
||||||
* This constructor allows you to specify the output file path of the screenshot and
|
* This constructor allows you to specify the output file path of the screenshot and
|
||||||
* a base index for the shot index.
|
* a base index for the shot index.
|
||||||
* Include the seperator at the end of the path.
|
* Include the separator at the end of the path.
|
||||||
* Use an emptry string to use the application folder. Use NULL to use the system
|
* Use an empty string to use the application folder. Use NULL to use the system
|
||||||
* default storage folder.
|
* default storage folder.
|
||||||
* @param filePath The screenshot file path to use. Include the seperator at the end of the path.
|
* @param filePath The screenshot file path to use. Include the separator at the end of the path.
|
||||||
* @param fileName The name of the file to save the screeshot as.
|
* @param fileName The name of the file to save the screenshot as.
|
||||||
* @param shotIndex The base index for screen shots. The first screen shot will have
|
* @param shotIndex The base index for screen shots. The first screen shot will have
|
||||||
* shotIndex + 1 appended, the next shotIndex + 2, and so on.
|
* shotIndex + 1 appended, the next shotIndex + 2, and so on.
|
||||||
*/
|
*/
|
||||||
@ -136,10 +136,10 @@ public class ScreenshotAppState extends AbstractAppState implements ActionListen
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the file path to store the screenshot.
|
* Set the file path to store the screenshot.
|
||||||
* Include the seperator at the end of the path.
|
* Include the separator at the end of the path.
|
||||||
* Use an emptry string to use the application folder. Use NULL to use the system
|
* Use an empty string to use the application folder. Use NULL to use the system
|
||||||
* default storage folder.
|
* default storage folder.
|
||||||
* @param filePath File path to use to store the screenshot. Include the seperator at the end of the path.
|
* @param filePath File path to use to store the screenshot. Include the separator at the end of the path.
|
||||||
*/
|
*/
|
||||||
public void setFilePath(String filePath) {
|
public void setFilePath(String filePath) {
|
||||||
this.filePath = filePath;
|
this.filePath = filePath;
|
||||||
|
@ -278,8 +278,8 @@ public class AudioNode extends Node implements AudioSource {
|
|||||||
* the dry filter will only influence the "dry" portion of the audio,
|
* the dry filter will only influence the "dry" portion of the audio,
|
||||||
* e.g. not the reverberated parts of the AudioNode playing.
|
* e.g. not the reverberated parts of the AudioNode playing.
|
||||||
*
|
*
|
||||||
* See the relevent documentation for the {@link Filter} to determine
|
* See the relevant documentation for the {@link Filter} to determine the
|
||||||
* the effect.
|
* effect.
|
||||||
*
|
*
|
||||||
* @param dryFilter The filter to set, or null to disable dry filter.
|
* @param dryFilter The filter to set, or null to disable dry filter.
|
||||||
*/
|
*/
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2015 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -114,7 +114,7 @@ public class LightsDebugState extends BaseAppState {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the scenes for wich to render light gizmos.
|
* Set the scenes for which to render light gizmos.
|
||||||
* @param scene
|
* @param scene
|
||||||
*/
|
*/
|
||||||
public void setScene(Spatial scene) {
|
public void setScene(Spatial scene) {
|
||||||
|
@ -432,7 +432,7 @@ public class InputManager implements RawInputListener {
|
|||||||
* If events aren't allowed, the event may be a "first mouse event"
|
* If events aren't allowed, the event may be a "first mouse event"
|
||||||
* triggered by the constructor setting the mouse listener.
|
* triggered by the constructor setting the mouse listener.
|
||||||
* In that case, use the event to initialize the cursor position,
|
* In that case, use the event to initialize the cursor position,
|
||||||
* but don't queue it for futher processing.
|
* but don't queue it for further processing.
|
||||||
* This is part of the fix for issue #792.
|
* This is part of the fix for issue #792.
|
||||||
*/
|
*/
|
||||||
cursorPos.set(evt.getX(), evt.getY());
|
cursorPos.set(evt.getX(), evt.getY());
|
||||||
@ -874,7 +874,7 @@ public class InputManager implements RawInputListener {
|
|||||||
// larynx, 2011.06.10 - flag event as reusable because
|
// larynx, 2011.06.10 - flag event as reusable because
|
||||||
// the android input uses a non-allocating ringbuffer which
|
// the android input uses a non-allocating ringbuffer which
|
||||||
// needs to know when the event is not anymore in inputQueue
|
// needs to know when the event is not anymore in inputQueue
|
||||||
// and therefor can be reused.
|
// and therefore can be reused.
|
||||||
event.setConsumed();
|
event.setConsumed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2015 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -48,7 +48,7 @@ public interface LightProbeBlendingStrategy {
|
|||||||
public void registerProbe(LightProbe probe);
|
public void registerProbe(LightProbe probe);
|
||||||
/**
|
/**
|
||||||
* Populates the resulting light probes into the given light list.
|
* Populates the resulting light probes into the given light list.
|
||||||
* @param g the geometry for wich the light list is computed
|
* @param g the geometry for which the light list is computed
|
||||||
* @param lightList the result light list
|
* @param lightList the result light list
|
||||||
*/
|
*/
|
||||||
public void populateProbes(Geometry g, LightList lightList);
|
public void populateProbes(Geometry g, LightList lightList);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2012 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -726,7 +726,7 @@ public class RenderManager {
|
|||||||
// Saving cam state for culling
|
// Saving cam state for culling
|
||||||
int camState = vp.getCamera().getPlaneState();
|
int camState = vp.getCamera().getPlaneState();
|
||||||
for (int i = 0; i < children.size(); i++) {
|
for (int i = 0; i < children.size(); i++) {
|
||||||
// Restoring cam state before proceeding children recusively
|
// Restoring cam state before proceeding children recursively
|
||||||
vp.getCamera().setPlaneState(camState);
|
vp.getCamera().setPlaneState(camState);
|
||||||
renderSubScene(children.get(i), vp);
|
renderSubScene(children.get(i), vp);
|
||||||
}
|
}
|
||||||
|
@ -361,7 +361,7 @@ public final class Shader extends NativeObject {
|
|||||||
*/
|
*/
|
||||||
public void resetLocations() {
|
public void resetLocations() {
|
||||||
if (uniforms != null) {
|
if (uniforms != null) {
|
||||||
// NOTE: Shader sources will be reset seperately from the shader itself.
|
// NOTE: Shader sources will be reset separately from the shader itself.
|
||||||
for (Uniform uniform : uniforms.values()) {
|
for (Uniform uniform : uniforms.values()) {
|
||||||
uniform.reset(); // fixes issue with re-initialization
|
uniform.reset(); // fixes issue with re-initialization
|
||||||
}
|
}
|
||||||
|
@ -387,7 +387,7 @@ public class ShadowUtil {
|
|||||||
BoundingBox occBB = (BoundingBox) occBox;
|
BoundingBox occBB = (BoundingBox) occBox;
|
||||||
//Kirill 01/10/2011
|
//Kirill 01/10/2011
|
||||||
// Extend the occluder further into the frustum
|
// Extend the occluder further into the frustum
|
||||||
// This fixes shadow dissapearing issues when
|
// This fixes shadow disappearing issues when
|
||||||
// the caster itself is not in the view camera
|
// the caster itself is not in the view camera
|
||||||
// but its shadow is in the camera
|
// but its shadow is in the camera
|
||||||
// The number is in world units
|
// The number is in world units
|
||||||
@ -430,7 +430,7 @@ public class ShadowUtil {
|
|||||||
BoundingBox occBB = (BoundingBox) occBox;
|
BoundingBox occBB = (BoundingBox) occBox;
|
||||||
//Kirill 01/10/2011
|
//Kirill 01/10/2011
|
||||||
// Extend the occluder further into the frustum
|
// Extend the occluder further into the frustum
|
||||||
// This fixes shadow dissapearing issues when
|
// This fixes shadow disappearing issues when
|
||||||
// the caster itself is not in the view camera
|
// the caster itself is not in the view camera
|
||||||
// but its shadow is in the camera
|
// but its shadow is in the camera
|
||||||
// The number is in world units
|
// The number is in world units
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2012 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -291,7 +291,7 @@ public final class BufferUtils {
|
|||||||
* @param buf
|
* @param buf
|
||||||
* the buffer to insert into
|
* the buffer to insert into
|
||||||
* @param index
|
* @param index
|
||||||
* the postion to place the data; in terms of colors not floats
|
* the position to place the data; in terms of colors not floats
|
||||||
*/
|
*/
|
||||||
public static void setInBuffer(ColorRGBA color, FloatBuffer buf, int index) {
|
public static void setInBuffer(ColorRGBA color, FloatBuffer buf, int index) {
|
||||||
buf.position(index * 4);
|
buf.position(index * 4);
|
||||||
@ -349,7 +349,7 @@ public final class BufferUtils {
|
|||||||
* @param buf
|
* @param buf
|
||||||
* the buffer to insert into
|
* the buffer to insert into
|
||||||
* @param index
|
* @param index
|
||||||
* the postion to place the data; in terms of vectors not floats
|
* the position to place the data; in terms of vectors not floats
|
||||||
*/
|
*/
|
||||||
public static void setInBuffer(Vector3f vector, FloatBuffer buf, int index) {
|
public static void setInBuffer(Vector3f vector, FloatBuffer buf, int index) {
|
||||||
if (buf == null) {
|
if (buf == null) {
|
||||||
@ -1027,7 +1027,7 @@ public final class BufferUtils {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new ByteBuffer with the same contents as the given ByteBuffer.
|
* Creates a new ByteBuffer with the same contents as the given ByteBuffer.
|
||||||
* The new ByteBuffer is seperate from the old one and changes are not
|
* The new ByteBuffer is separate from the old one and changes are not
|
||||||
* reflected across. If you want to reflect changes, consider using
|
* reflected across. If you want to reflect changes, consider using
|
||||||
* Buffer.duplicate().
|
* Buffer.duplicate().
|
||||||
*
|
*
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2012 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -46,7 +46,7 @@ import java.util.Comparator;
|
|||||||
* difference that the temporary necessary memory space are allocated as the
|
* difference that the temporary necessary memory space are allocated as the
|
||||||
* geometry list grows and reused all along the application execution.
|
* geometry list grows and reused all along the application execution.
|
||||||
*
|
*
|
||||||
* Usage : ListSort has to be instanciated and kept with the geometry list ( or
|
* Usage : ListSort has to be instantiated and kept with the geometry list ( or
|
||||||
* w/e it may have to sort) Then the allocate method has to be called to
|
* w/e it may have to sort) Then the allocate method has to be called to
|
||||||
* allocate necessary tmp space needed for the sort. This should be called once
|
* allocate necessary tmp space needed for the sort. This should be called once
|
||||||
* for optimal performance, but can be called several times if the length of the
|
* for optimal performance, but can be called several times if the length of the
|
||||||
@ -91,7 +91,7 @@ public class ListSort<T> {
|
|||||||
* class + array was a convoluted pain.
|
* class + array was a convoluted pain.
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* array of start indices in the original array for runs : run i sarting
|
* array of start indices in the original array for runs : run i starting
|
||||||
* index is at runIndices[i]
|
* index is at runIndices[i]
|
||||||
*/
|
*/
|
||||||
private int[] runsIndices = null;
|
private int[] runsIndices = null;
|
||||||
@ -108,12 +108,12 @@ public class ListSort<T> {
|
|||||||
/**
|
/**
|
||||||
* MIN_GALLOP set to 7 constant as described in listsort.txt. this magic
|
* MIN_GALLOP set to 7 constant as described in listsort.txt. this magic
|
||||||
* number indicates how many wins should trigger the switch from binary
|
* number indicates how many wins should trigger the switch from binary
|
||||||
* search to gallopping mode
|
* search to galloping mode
|
||||||
*/
|
*/
|
||||||
private static final int MIN_GALLOP = 7;
|
private static final int MIN_GALLOP = 7;
|
||||||
/**
|
/**
|
||||||
* This variable allows to adjust when switching to galloping mode. lowered
|
* This variable allows to adjust when switching to galloping mode. lowered
|
||||||
* when the data are "naturally" structured highered when data are random.
|
* when the data are "naturally" structured, raised when data are random.
|
||||||
*/
|
*/
|
||||||
private int minGallop = MIN_GALLOP;
|
private int minGallop = MIN_GALLOP;
|
||||||
|
|
||||||
@ -342,7 +342,7 @@ public class ListSort<T> {
|
|||||||
*/
|
*/
|
||||||
int nbElems = start - left;
|
int nbElems = start - left;
|
||||||
/*
|
/*
|
||||||
* grabbed from java7 TimSort, the swich is an optimization to
|
* grabbed from java7 TimSort, the switch is an optimization to
|
||||||
* arraycopy in case there are 1 or 2 elements only to copy
|
* arraycopy in case there are 1 or 2 elements only to copy
|
||||||
*/
|
*/
|
||||||
switch (nbElems) {
|
switch (nbElems) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2016 jMonkeyEngine
|
* Copyright (c) 2016-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -61,7 +61,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
|||||||
* This two step process has a few benefits. First, it means that objects
|
* This two step process has a few benefits. First, it means that objects
|
||||||
* can easily have a regular shallow clone implementation just like any
|
* can easily have a regular shallow clone implementation just like any
|
||||||
* normal Java objects. Second, the deep cloning of fields happens after
|
* normal Java objects. Second, the deep cloning of fields happens after
|
||||||
* creation wich means that the clone is available to future field cloning
|
* creation which means that the clone is available to future field cloning
|
||||||
* to resolve circular references.</p>
|
* to resolve circular references.</p>
|
||||||
*
|
*
|
||||||
* <p>Similar to Java serialization, the handling of specific object
|
* <p>Similar to Java serialization, the handling of specific object
|
||||||
@ -71,7 +71,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
|||||||
* (For example, adding the IdentityCloneFunction for Mesh.class would cause
|
* (For example, adding the IdentityCloneFunction for Mesh.class would cause
|
||||||
* all mesh instances to be shared with the original object graph.)</p>
|
* all mesh instances to be shared with the original object graph.)</p>
|
||||||
*
|
*
|
||||||
* <p>By default, the Cloner registers serveral default clone functions
|
* <p>By default, the Cloner registers several default clone functions
|
||||||
* as follows:</p>
|
* as follows:</p>
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>java.util.ArrayList: ListCloneFunction
|
* <li>java.util.ArrayList: ListCloneFunction
|
||||||
@ -187,7 +187,7 @@ public class Cloner {
|
|||||||
* <li>Else an IllegalArgumentException is thrown.
|
* <li>Else an IllegalArgumentException is thrown.
|
||||||
* </ul>
|
* </ul>
|
||||||
*
|
*
|
||||||
* <p>The abililty to selectively use clone functions is useful when
|
* <p>The ability to selectively use clone functions is useful when
|
||||||
* being called from a clone function.</p>
|
* being called from a clone function.</p>
|
||||||
*
|
*
|
||||||
* Note: objects returned by this method may not have yet had their cloneField()
|
* Note: objects returned by this method may not have yet had their cloneField()
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2012 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -255,7 +255,7 @@ public class BinaryExporter implements JmeExporter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||||
// write out data to a seperate stream
|
// write out data to a separate stream
|
||||||
int location = 0;
|
int location = 0;
|
||||||
// keep track of location for each piece
|
// keep track of location for each piece
|
||||||
HashMap<String, ArrayList<BinaryIdContentPair>> alreadySaved = new HashMap<String, ArrayList<BinaryIdContentPair>>(
|
HashMap<String, ArrayList<BinaryIdContentPair>> alreadySaved = new HashMap<String, ArrayList<BinaryIdContentPair>>(
|
||||||
|
@ -1003,7 +1003,7 @@ final class BinaryInputCapsule implements InputCapsule {
|
|||||||
/*
|
/*
|
||||||
* @see ISSUE 276
|
* @see ISSUE 276
|
||||||
*
|
*
|
||||||
* We'll transfer the bytes into a seperate byte array.
|
* We'll transfer the bytes into a separate byte array.
|
||||||
* While we do that we'll take the opportunity to check if the byte data is valid UTF-8.
|
* While we do that we'll take the opportunity to check if the byte data is valid UTF-8.
|
||||||
*
|
*
|
||||||
* If it is not UTF-8 it is most likely saved with the BinaryOutputCapsule bug, that saves Strings using their native
|
* If it is not UTF-8 it is most likely saved with the BinaryOutputCapsule bug, that saves Strings using their native
|
||||||
@ -1020,7 +1020,7 @@ final class BinaryInputCapsule implements InputCapsule {
|
|||||||
*
|
*
|
||||||
* It is impossible to detect which one-byte encoding is used. Since UTF8 and practically all 1-byte encodings share the most
|
* It is impossible to detect which one-byte encoding is used. Since UTF8 and practically all 1-byte encodings share the most
|
||||||
* used characters (the "none-high" ones) parsing them will give the same result. However, not all byte sequences are legal in
|
* used characters (the "none-high" ones) parsing them will give the same result. However, not all byte sequences are legal in
|
||||||
* UTF-8 (see explantion above). If not UTF-8 encoded content is detected we therefor fallback on latin1. We also log a warning.
|
* UTF-8 (see explantion above). If not UTF-8 encoded content is detected we therefore fall back on latin1. We also log a warning.
|
||||||
*
|
*
|
||||||
* By this method we detect all use of 1 byte encoding if they:
|
* By this method we detect all use of 1 byte encoding if they:
|
||||||
* - use a "high" codepoint after a "low" codepoint or a sequence of codepoints that is valid as UTF-8 bytes, that starts with 1000
|
* - use a "high" codepoint after a "low" codepoint or a sequence of codepoints that is valid as UTF-8 bytes, that starts with 1000
|
||||||
@ -1078,9 +1078,9 @@ final class BinaryInputCapsule implements InputCapsule {
|
|||||||
);
|
);
|
||||||
// We use ISO8859_1 to be consistent across platforms. We could default to native encoding, but this would lead to inconsistent
|
// We use ISO8859_1 to be consistent across platforms. We could default to native encoding, but this would lead to inconsistent
|
||||||
// behaviour across platforms!
|
// behaviour across platforms!
|
||||||
// Developers that have previously saved their exports using the old exporter (wich uses native encoding), can temporarly
|
// Developers that have previously saved their exports using the old exporter (which uses native encoding), can temporarly
|
||||||
// remove the ""ISO8859_1" parameter, and change the above if statement to "if (false)".
|
// remove the ""ISO8859_1" parameter, and change the above if statement to "if (false)".
|
||||||
// They should then import and re-export their models using the same enviroment they were originally created in.
|
// They should then import and re-export their models using the same environment they were originally created in.
|
||||||
return new String(bytes, "ISO8859_1");
|
return new String(bytes, "ISO8859_1");
|
||||||
}
|
}
|
||||||
} catch (UnsupportedEncodingException uee) {
|
} catch (UnsupportedEncodingException uee) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2012 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -149,7 +149,7 @@ public class HDRLoader implements AssetLoader {
|
|||||||
rleTempBuffer = BufferUtils.createByteBuffer(width * 4);
|
rleTempBuffer = BufferUtils.createByteBuffer(width * 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
// read each component seperately
|
// read each component separately
|
||||||
for (int i = 0; i < 4; i++) {
|
for (int i = 0; i < 4; i++) {
|
||||||
// read WIDTH bytes for the channel
|
// read WIDTH bytes for the channel
|
||||||
for (int j = 0; j < width;) {
|
for (int j = 0; j < width;) {
|
||||||
|
@ -214,7 +214,7 @@ public final class TGALoader implements AssetLoader {
|
|||||||
byte alpha = 0;
|
byte alpha = 0;
|
||||||
|
|
||||||
// Faster than doing a 16-or-24-or-32 check on each individual pixel,
|
// Faster than doing a 16-or-24-or-32 check on each individual pixel,
|
||||||
// just make a seperate loop for each.
|
// just make a separate loop for each.
|
||||||
if (pixelDepth == 16) {
|
if (pixelDepth == 16) {
|
||||||
byte[] data = new byte[2];
|
byte[] data = new byte[2];
|
||||||
float scalar = 255f / 31f;
|
float scalar = 255f / 31f;
|
||||||
@ -287,7 +287,7 @@ public final class TGALoader implements AssetLoader {
|
|||||||
byte blue = 0;
|
byte blue = 0;
|
||||||
byte alpha = 0;
|
byte alpha = 0;
|
||||||
// Faster than doing a 16-or-24-or-32 check on each individual pixel,
|
// Faster than doing a 16-or-24-or-32 check on each individual pixel,
|
||||||
// just make a seperate loop for each.
|
// just make a separate loop for each.
|
||||||
if (pixelDepth == 32) {
|
if (pixelDepth == 32) {
|
||||||
for (int i = 0; i <= (height - 1); ++i) {
|
for (int i = 0; i <= (height - 1); ++i) {
|
||||||
if (!flip) {
|
if (!flip) {
|
||||||
|
@ -67,7 +67,7 @@ public class LightScatteringFilter extends Filter {
|
|||||||
private ViewPort viewPort;
|
private ViewPort viewPort;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* creates a lightScatterring filter
|
* creates a lightScattering filter
|
||||||
*/
|
*/
|
||||||
public LightScatteringFilter() {
|
public LightScatteringFilter() {
|
||||||
super("Light Scattering");
|
super("Light Scattering");
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2012 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -74,7 +74,7 @@ public class ImageTileLoader implements TerrainGridTileLoader{
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Effects vertical scale of the height of the terrain when loaded.
|
* Affects the vertical scale of the terrain when loaded.
|
||||||
*/
|
*/
|
||||||
public void setHeightScale(float heightScale) {
|
public void setHeightScale(float heightScale) {
|
||||||
this.heightScale = heightScale;
|
this.heightScale = heightScale;
|
||||||
|
@ -610,7 +610,7 @@ public class OculusVR implements VRAPI {
|
|||||||
* @return The {@code to} argument.
|
* @return The {@code to} argument.
|
||||||
*/
|
*/
|
||||||
public static Vector3f vecO2J(OVRVector3f from, Vector3f to) {
|
public static Vector3f vecO2J(OVRVector3f from, Vector3f to) {
|
||||||
// jME and LibOVR disagree on which way X and Z is, too.
|
// jME and LibOVR disagree on which way X and Z are, too.
|
||||||
to.set(
|
to.set(
|
||||||
-from.x(),
|
-from.x(),
|
||||||
from.y(),
|
from.y(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user