comment corrections: mostly spelling and grammar
This commit is contained in:
parent
36e09ee456
commit
8b70b64505
@ -214,7 +214,7 @@ public class MainActivity extends AppCompatActivity implements OnItemClickListen
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* User clicked a view on the screen. Check for the OK and Cancel buttons
|
* User clicked a view on the screen. Check for the OK and Cancel buttons
|
||||||
* and either start the applicaiton or exit.
|
* and either start the application or exit.
|
||||||
* @param view
|
* @param view
|
||||||
*/
|
*/
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
|
@ -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
|
||||||
@ -285,8 +285,8 @@ public class AndroidSensorJoyInput implements SensorEventListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Calculates the device orientation based off the data recieved from the
|
* Calculates the device orientation based off the data received from the
|
||||||
* Acceleration Sensor and Mangetic Field sensor
|
* Acceleration Sensor and Magnetic Field sensor
|
||||||
* Values are returned relative to the Earth.
|
* Values are returned relative to the Earth.
|
||||||
*
|
*
|
||||||
* From the Android Doc
|
* From the Android Doc
|
||||||
|
@ -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
|
||||||
@ -136,7 +136,7 @@ public class OGLESContext implements JmeContext, GLSurfaceView.Renderer, SoftTex
|
|||||||
// stops at the setFormat call without a crash.
|
// stops at the setFormat call without a crash.
|
||||||
// We look at the user setting for alpha bits and set the surfaceview
|
// We look at the user setting for alpha bits and set the surfaceview
|
||||||
// PixelFormat to either Opaque, Transparent, or Translucent.
|
// PixelFormat to either Opaque, Transparent, or Translucent.
|
||||||
// ConfigChooser will do it's best to honor the alpha requested by the user
|
// ConfigChooser will do its best to honor the alpha requested by the user
|
||||||
// For best rendering performance, use Opaque (alpha bits = 0).
|
// For best rendering performance, use Opaque (alpha bits = 0).
|
||||||
int curAlphaBits = settings.getAlphaBits();
|
int curAlphaBits = settings.getAlphaBits();
|
||||||
logger.log(Level.FINE, "curAlphaBits: {0}", curAlphaBits);
|
logger.log(Level.FINE, "curAlphaBits: {0}", curAlphaBits);
|
||||||
|
@ -237,7 +237,7 @@ public class SimulationNode {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ... add virtual tracks if neccessary, for bones that were altered but had no tracks before ...
|
// ... add virtual tracks if necessary, for bones that were altered but had no tracks before ...
|
||||||
for (Long boneOMA : alteredOmas) {
|
for (Long boneOMA : alteredOmas) {
|
||||||
BoneContext boneContext = blenderContext.getBoneContext(boneOMA);
|
BoneContext boneContext = blenderContext.getBoneContext(boneOMA);
|
||||||
int boneIndex = skeleton.getBoneIndex(boneContext.getBone());
|
int boneIndex = skeleton.getBoneIndex(boneContext.getBone());
|
||||||
|
@ -37,7 +37,7 @@ import com.jme3.util.BufferUtils;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* A temporal mesh for curves and surfaces. It works in similar way as TemporalMesh for meshes.
|
* A temporal mesh for curves and surfaces. It works in similar way as TemporalMesh for meshes.
|
||||||
* It prepares all neccessary lines and faces and allows to apply modifiers just like in regular temporal mesh.
|
* It prepares all necessary lines and faces and allows to apply modifiers just like in regular temporal mesh.
|
||||||
*
|
*
|
||||||
* @author Marcin Roguski (Kaelthas)
|
* @author Marcin Roguski (Kaelthas)
|
||||||
*/
|
*/
|
||||||
@ -210,7 +210,7 @@ public class CurvesTemporalMesh extends TemporalMesh {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The method computes the value of a point at the certain relational distance from its beggining.
|
* The method computes the value of a point at the certain relational distance from its beginning.
|
||||||
* @param alongRatio
|
* @param alongRatio
|
||||||
* the relative distance along the curve; should be a value between 0 and 1 inclusive;
|
* the relative distance along the curve; should be a value between 0 and 1 inclusive;
|
||||||
* if the value exceeds the boundaries it is truncated to them
|
* if the value exceeds the boundaries it is truncated to them
|
||||||
@ -369,7 +369,7 @@ public class CurvesTemporalMesh extends TemporalMesh {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The method loads the bevel object that sould be applied to curve. It can either be another curve or a generated one
|
* The method loads the bevel object that should be applied to curve. It can either be another curve or a generated one
|
||||||
* based on the bevel generating parameters in blender.
|
* based on the bevel generating parameters in blender.
|
||||||
* @param curveStructure
|
* @param curveStructure
|
||||||
* the structure with the curve's data (the curve being loaded, NOT the bevel curve)
|
* the structure with the curve's data (the curve being loaded, NOT the bevel curve)
|
||||||
@ -707,7 +707,7 @@ public class CurvesTemporalMesh extends TemporalMesh {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* the method applies scale for the given bevel points. The points table is
|
* the method applies scale for the given bevel points. The points table is
|
||||||
* being modified so expect ypur result there.
|
* being modified so expect your result there.
|
||||||
*
|
*
|
||||||
* @param points
|
* @param points
|
||||||
* the bevel points
|
* the bevel points
|
||||||
@ -726,7 +726,7 @@ public class CurvesTemporalMesh extends TemporalMesh {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* A helper class that represents a single bezier line. It consists of Edge's and allows to
|
* A helper class that represents a single bezier line. It consists of Edge's and allows to
|
||||||
* get a subline of a lentgh of the line.
|
* get a subline of a length of the line.
|
||||||
*
|
*
|
||||||
* @author Marcin Roguski (Kaelthas)
|
* @author Marcin Roguski (Kaelthas)
|
||||||
*/
|
*/
|
||||||
@ -776,7 +776,7 @@ public class CurvesTemporalMesh extends TemporalMesh {
|
|||||||
}
|
}
|
||||||
if (cyclic) {
|
if (cyclic) {
|
||||||
// if the first vertex is repeated at the end the distance will be = 0 so it won't affect the result, and if it is not repeated
|
// if the first vertex is repeated at the end the distance will be = 0 so it won't affect the result, and if it is not repeated
|
||||||
// then it is neccessary to add the length between the last and the first vertex
|
// then it is necessary to add the length between the last and the first vertex
|
||||||
length += vertices[vertices.length - 1].distance(vertices[0]);
|
length += vertices[vertices.length - 1].distance(vertices[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -834,7 +834,7 @@ public class CurvesTemporalMesh extends TemporalMesh {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The method computes the value of a point at the certain relational distance from its beggining.
|
* The method computes the value of a point at the certain relational distance from its beginning.
|
||||||
* @param alongRatio
|
* @param alongRatio
|
||||||
* the relative distance along the curve; should be a value between 0 and 1 inclusive;
|
* the relative distance along the curve; should be a value between 0 and 1 inclusive;
|
||||||
* if the value exceeds the boundaries it is truncated to them
|
* if the value exceeds the boundaries it is truncated to them
|
||||||
|
@ -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
|
||||||
@ -32,7 +32,7 @@
|
|||||||
package com.jme3.scene.plugins.blender.file;
|
package com.jme3.scene.plugins.blender.file;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An array that can be dynamically modified/
|
* An array that can be dynamically modified
|
||||||
* @author Marcin Roguski
|
* @author Marcin Roguski
|
||||||
* @param <T>
|
* @param <T>
|
||||||
* the type of stored data in the array
|
* the type of stored data in the array
|
||||||
@ -42,7 +42,7 @@ public class DynamicArray<T> implements Cloneable {
|
|||||||
/** An array object that holds the required data. */
|
/** An array object that holds the required data. */
|
||||||
private T[] array;
|
private T[] array;
|
||||||
/**
|
/**
|
||||||
* This table holds the sizes of dimetions of the dynamic table. It's length specifies the table dimension or a
|
* This table holds the sizes of dimensions of the dynamic table. Its length specifies the table dimension or a
|
||||||
* pointer level. For example: if tableSizes.length == 3 then it either specifies a dynamic table of fixed lengths:
|
* pointer level. For example: if tableSizes.length == 3 then it either specifies a dynamic table of fixed lengths:
|
||||||
* dynTable[a][b][c], where a,b,c are stored in the tableSizes table.
|
* dynTable[a][b][c], where a,b,c are stored in the tableSizes table.
|
||||||
*/
|
*/
|
||||||
|
@ -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
|
||||||
@ -169,7 +169,7 @@ public class Structure implements Cloneable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This methos should be used on structures that are of a 'ListBase' type. It creates a List of structures that are
|
* This method should be used on structures that are of a 'ListBase' type. It creates a List of structures that are
|
||||||
* held by this structure within the blend file.
|
* held by this structure within the blend file.
|
||||||
* @return a list of filled structures
|
* @return a list of filled structures
|
||||||
* @throws BlenderFileException
|
* @throws BlenderFileException
|
||||||
@ -232,7 +232,7 @@ public class Structure implements Cloneable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method returns the address of the structure. The strucutre should be filled with data otherwise an exception
|
* This method returns the address of the structure. The structure should be filled with data otherwise an exception
|
||||||
* is thrown.
|
* is thrown.
|
||||||
* @return the address of the feature stored in this structure
|
* @return the address of the feature stored in this structure
|
||||||
*/
|
*/
|
||||||
|
@ -107,7 +107,7 @@ public final class MaterialContext implements Savable {
|
|||||||
boolean transparent = false;
|
boolean transparent = false;
|
||||||
if (diffuseColor != null) {
|
if (diffuseColor != null) {
|
||||||
transparent = diffuseColor.a < 1.0f;
|
transparent = diffuseColor.a < 1.0f;
|
||||||
if (loadedTextures.size() > 0) {// texutre covers the material color
|
if (loadedTextures.size() > 0) {// texture covers the material color
|
||||||
diffuseColor.set(1, 1, 1, 1);
|
diffuseColor.set(1, 1, 1, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
@ -324,7 +324,7 @@ public final class Vector3d implements Savable, Cloneable, Serializable {
|
|||||||
* the vector to take the cross product of with this.
|
* the vector to take the cross product of with this.
|
||||||
* @param result
|
* @param result
|
||||||
* the vector to store the cross product result.
|
* the vector to store the cross product result.
|
||||||
* @return result, after recieving the cross product vector.
|
* @return result, after receiving the cross product vector.
|
||||||
*/
|
*/
|
||||||
public Vector3d cross(Vector3d v, Vector3d result) {
|
public Vector3d cross(Vector3d v, Vector3d result) {
|
||||||
return this.cross(v.x, v.y, v.z, result);
|
return this.cross(v.x, v.y, v.z, result);
|
||||||
@ -342,7 +342,7 @@ public final class Vector3d implements Savable, Cloneable, Serializable {
|
|||||||
* z component of the vector to take the cross product of with this.
|
* z component of the vector to take the cross product of with this.
|
||||||
* @param result
|
* @param result
|
||||||
* the vector to store the cross product result.
|
* the vector to store the cross product result.
|
||||||
* @return result, after recieving the cross product vector.
|
* @return result, after receiving the cross product vector.
|
||||||
*/
|
*/
|
||||||
public Vector3d cross(double otherX, double otherY, double otherZ, Vector3d result) {
|
public Vector3d cross(double otherX, double otherY, double otherZ, Vector3d result) {
|
||||||
if (result == null) {
|
if (result == null) {
|
||||||
@ -485,12 +485,12 @@ public final class Vector3d implements Savable, Cloneable, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <code>multLocal</code> multiplies a provided vector to this vector
|
* <code>multLocal</code> multiplies a provided vector by this vector
|
||||||
* internally, and returns a handle to this vector for easy chaining of
|
* internally, and returns a handle to this vector for easy chaining of
|
||||||
* calls. If the provided vector is null, null is returned.
|
* calls. If the provided vector is null, null is returned.
|
||||||
*
|
*
|
||||||
* @param vec
|
* @param vec
|
||||||
* the vector to mult to this vector.
|
* the vector to multiply by this vector.
|
||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public Vector3d multLocal(Vector3d vec) {
|
public Vector3d multLocal(Vector3d vec) {
|
||||||
@ -522,7 +522,7 @@ public final class Vector3d implements Savable, Cloneable, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <code>multLocal</code> multiplies a provided vector to this vector
|
* <code>multLocal</code> multiplies a provided vector by this vector
|
||||||
* internally, and returns a handle to this vector for easy chaining of
|
* internally, and returns a handle to this vector for easy chaining of
|
||||||
* calls. If the provided vector is null, null is returned.
|
* calls. If the provided vector is null, null is returned.
|
||||||
*
|
*
|
||||||
@ -539,7 +539,7 @@ public final class Vector3d implements Savable, Cloneable, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <code>multLocal</code> multiplies a provided vector to this vector
|
* <code>multLocal</code> multiplies a provided vector by this vector
|
||||||
* internally, and returns a handle to this vector for easy chaining of
|
* internally, and returns a handle to this vector for easy chaining of
|
||||||
* calls. If the provided vector is null, null is returned.
|
* calls. If the provided vector is null, null is returned.
|
||||||
*
|
*
|
||||||
@ -657,7 +657,7 @@ public final class Vector3d implements Savable, Cloneable, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <code>subtractLocal</code> subtracts a provided vector to this vector
|
* <code>subtractLocal</code> subtracts a provided vector from this vector
|
||||||
* internally, and returns a handle to this vector for easy chaining of
|
* internally, and returns a handle to this vector for easy chaining of
|
||||||
* calls. If the provided vector is null, null is returned.
|
* calls. If the provided vector is null, null is returned.
|
||||||
*
|
*
|
||||||
@ -825,7 +825,7 @@ public final class Vector3d implements Savable, Cloneable, Serializable {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* <code>hashCode</code> returns a unique code for this vector object based
|
* <code>hashCode</code> returns a unique code for this vector object based
|
||||||
* on it's values. If two vectors are logically equivalent, they will return
|
* on its values. If two vectors are logically equivalent, they will return
|
||||||
* the same hash code value.
|
* the same hash code value.
|
||||||
* @return the hash code value of this vector.
|
* @return the hash code value of this vector.
|
||||||
*/
|
*/
|
||||||
|
@ -47,7 +47,7 @@ public class SubdivisionSurfaceModifier extends Modifier {
|
|||||||
private Set<Integer> verticesOnOriginalEdges = new HashSet<Integer>();
|
private Set<Integer> verticesOnOriginalEdges = new HashSet<Integer>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor loads all neccessary modifier data.
|
* Constructor loads all necessary modifier data.
|
||||||
* @param modifierStructure
|
* @param modifierStructure
|
||||||
* the modifier structure
|
* the modifier structure
|
||||||
* @param blenderContext
|
* @param blenderContext
|
||||||
@ -193,7 +193,7 @@ public class SubdivisionSurfaceModifier extends Modifier {
|
|||||||
// moving the vertex
|
// moving the vertex
|
||||||
v.addLocal(t);
|
v.addLocal(t);
|
||||||
|
|
||||||
// applying crease weight if neccessary
|
// applying crease weight if necessary
|
||||||
CreasePoint creasePoint = creasePoints.get(i);
|
CreasePoint creasePoint = creasePoints.get(i);
|
||||||
if (creasePoint.getTarget() != null && creasePoint.getWeight() != 0) {
|
if (creasePoint.getTarget() != null && creasePoint.getWeight() != 0) {
|
||||||
t = creasePoint.getTarget().subtractLocal(v).multLocal(creasePoint.getWeight());
|
t = creasePoint.getTarget().subtractLocal(v).multLocal(creasePoint.getWeight());
|
||||||
|
@ -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
|
||||||
@ -315,7 +315,7 @@ public class TextureHelper extends AbstractBlenderHelper {
|
|||||||
* @param pos
|
* @param pos
|
||||||
* the relative position (value of range <0, 1> (both inclusive))
|
* the relative position (value of range <0, 1> (both inclusive))
|
||||||
* @param size
|
* @param size
|
||||||
* the size of the line the pixel lies on (width, heigth or
|
* the size of the line the pixel lies on (width, height or
|
||||||
* depth)
|
* depth)
|
||||||
* @return the integer index of the pixel on the line of the specified width
|
* @return the integer index of the pixel on the line of the specified width
|
||||||
*/
|
*/
|
||||||
@ -434,10 +434,10 @@ public class TextureHelper extends AbstractBlenderHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method loads the textre from outside the blend file using the
|
* This method loads the texture from outside the blend file using the
|
||||||
* AssetManager that the blend file was loaded with. It returns a texture
|
* AssetManager that the blend file was loaded with. It returns a texture
|
||||||
* with a full assetKey that references the original texture so it later
|
* with a full assetKey that references the original texture so it later
|
||||||
* doesn't need to ba packed when the model data is serialized. It searches
|
* doesn't need to be packed when the model data is serialized. It searches
|
||||||
* the AssetManager for the full path if the model file is a relative path
|
* the AssetManager for the full path if the model file is a relative path
|
||||||
* and will attempt to truncate the path if it is an absolute file path
|
* and will attempt to truncate the path if it is an absolute file path
|
||||||
* until the path can be found in the AssetManager. If the texture can not
|
* until the path can be found in the AssetManager. If the texture can not
|
||||||
|
@ -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
|
||||||
@ -73,7 +73,7 @@ import java.util.logging.Logger;
|
|||||||
* use this control you need a model with an AnimControl and a
|
* use this control you need a model with an AnimControl and a
|
||||||
* SkeletonControl.<br> This should be the case if you imported an animated
|
* SkeletonControl.<br> This should be the case if you imported an animated
|
||||||
* model from Ogre or blender.<br> Note enabling/disabling the control
|
* model from Ogre or blender.<br> Note enabling/disabling the control
|
||||||
* add/removes it from the physic space<br> <p> This control creates collision
|
* add/removes it from the physics space<br> <p> This control creates collision
|
||||||
* shapes for each bones of the skeleton when you call
|
* shapes for each bones of the skeleton when you call
|
||||||
* spatial.addControl(ragdollControl). <ul> <li>The shape is HullCollision shape
|
* spatial.addControl(ragdollControl). <ul> <li>The shape is HullCollision shape
|
||||||
* based on the vertices associated with each bone and based on a tweakable
|
* based on the vertices associated with each bone and based on a tweakable
|
||||||
@ -84,11 +84,11 @@ import java.util.logging.Logger;
|
|||||||
* </ul> </p> <p> There are 2 modes for this control : <ul> <li><strong>The
|
* </ul> </p> <p> There are 2 modes for this control : <ul> <li><strong>The
|
||||||
* kinematic modes :</strong><br> this is the default behavior, this means that
|
* kinematic modes :</strong><br> this is the default behavior, this means that
|
||||||
* the collision shapes of the body are able to interact with physics enabled
|
* the collision shapes of the body are able to interact with physics enabled
|
||||||
* objects. in this mode physic shapes follow the moovements of the animated
|
* objects. in this mode physics shapes follow the motion of the animated
|
||||||
* skeleton (for example animated by a key framed animation) this mode is
|
* skeleton (for example animated by a key framed animation) this mode is
|
||||||
* enabled by calling setKinematicMode(); </li> <li><strong>The ragdoll modes
|
* enabled by calling setKinematicMode(); </li> <li><strong>The ragdoll modes
|
||||||
* :</strong><br> To enable this behavior, you need to call setRagdollMode()
|
* :</strong><br> To enable this behavior, you need to call setRagdollMode()
|
||||||
* method. In this mode the charater is entirely controled by physics, so it
|
* method. In this mode the character is entirely controlled by physics, so it
|
||||||
* will fall under the gravity and move if any force is applied to it. </li>
|
* will fall under the gravity and move if any force is applied to it. </li>
|
||||||
* </ul> </p>
|
* </ul> </p>
|
||||||
*
|
*
|
||||||
@ -201,7 +201,7 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
|
|||||||
if(mode == Mode.IK){
|
if(mode == Mode.IK){
|
||||||
ikUpdate(tpf);
|
ikUpdate(tpf);
|
||||||
} else if (mode == mode.Ragdoll && targetModel.getLocalTranslation().equals(modelPosition)) {
|
} else if (mode == mode.Ragdoll && targetModel.getLocalTranslation().equals(modelPosition)) {
|
||||||
//if the ragdoll has the control of the skeleton, we update each bone with its position in physic world space.
|
//if the ragdoll has the control of the skeleton, we update each bone with its position in physics world space.
|
||||||
ragDollUpdate(tpf);
|
ragDollUpdate(tpf);
|
||||||
} else {
|
} else {
|
||||||
kinematicUpdate(tpf);
|
kinematicUpdate(tpf);
|
||||||
@ -217,12 +217,12 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
|
|||||||
|
|
||||||
Vector3f position = vars.vect1;
|
Vector3f position = vars.vect1;
|
||||||
|
|
||||||
//retrieving bone position in physic world space
|
//retrieving bone position in physics world space
|
||||||
Vector3f p = link.rigidBody.getMotionState().getWorldLocation();
|
Vector3f p = link.rigidBody.getMotionState().getWorldLocation();
|
||||||
//transforming this position with inverse transforms of the model
|
//transforming this position with inverse transforms of the model
|
||||||
targetModel.getWorldTransform().transformInverseVector(p, position);
|
targetModel.getWorldTransform().transformInverseVector(p, position);
|
||||||
|
|
||||||
//retrieving bone rotation in physic world space
|
//retrieving bone rotation in physics world space
|
||||||
Quaternion q = link.rigidBody.getMotionState().getWorldRotationQuat();
|
Quaternion q = link.rigidBody.getMotionState().getWorldRotationQuat();
|
||||||
|
|
||||||
//multiplying this rotation by the initialWorld rotation of the bone,
|
//multiplying this rotation by the initialWorld rotation of the bone,
|
||||||
@ -264,7 +264,7 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void kinematicUpdate(float tpf) {
|
protected void kinematicUpdate(float tpf) {
|
||||||
//the ragdoll does not have the controll, so the keyframed animation updates the physic position of the physic bonces
|
//the ragdoll does not have control, so the keyframed animation updates the physics position of the physics bonces
|
||||||
TempVars vars = TempVars.get();
|
TempVars vars = TempVars.get();
|
||||||
Quaternion tmpRot1 = vars.quat1;
|
Quaternion tmpRot1 = vars.quat1;
|
||||||
Quaternion tmpRot2 = vars.quat2;
|
Quaternion tmpRot2 = vars.quat2;
|
||||||
@ -420,7 +420,7 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
|
|||||||
targetModel.getWorldRotation().mult(tmpRot1, tmpRot1);
|
targetModel.getWorldRotation().mult(tmpRot1, tmpRot1);
|
||||||
tmpRot1.normalizeLocal();
|
tmpRot1.normalizeLocal();
|
||||||
|
|
||||||
//updating physic location/rotation of the physic bone
|
//updating physics location/rotation of the physics bone
|
||||||
link.rigidBody.setPhysicsLocation(position);
|
link.rigidBody.setPhysicsLocation(position);
|
||||||
link.rigidBody.setPhysicsRotation(tmpRot1);
|
link.rigidBody.setPhysicsRotation(tmpRot1);
|
||||||
|
|
||||||
@ -707,9 +707,9 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable or disable the ragdoll behaviour. if ragdollEnabled is true, the
|
* Enable or disable the ragdoll behaviour. if ragdollEnabled is true, the
|
||||||
* character motion will only be powerd by physics else, the characted will
|
* character motion will only be powered by physics else, the character will
|
||||||
* be animated by the keyframe animation, but will be able to physically
|
* be animated by the keyframe animation, but will be able to physically
|
||||||
* interact with its physic environnement
|
* interact with its physics environment
|
||||||
*
|
*
|
||||||
* @param ragdollEnabled
|
* @param ragdollEnabled
|
||||||
*/
|
*/
|
||||||
@ -789,9 +789,9 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the control into Kinematic mode In theis mode, the collision shapes
|
* Set the control into Kinematic mode In this mode, the collision shapes
|
||||||
* follow the movements of the skeleton, and can interact with physical
|
* follow the movements of the skeleton, and can interact with physical
|
||||||
* environement
|
* environment
|
||||||
*/
|
*/
|
||||||
public void setKinematicMode() {
|
public void setKinematicMode() {
|
||||||
if (mode != Mode.Kinematic) {
|
if (mode != Mode.Kinematic) {
|
||||||
@ -820,7 +820,7 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* retruns the mode of this control
|
* returns the mode of this control
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ -903,7 +903,7 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* For internal use only specific render for the ragdoll(if debugging)
|
* For internal use only specific render for the ragdoll (if debugging)
|
||||||
*
|
*
|
||||||
* @param rm
|
* @param rm
|
||||||
* @param vp
|
* @param vp
|
||||||
|
@ -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
|
||||||
@ -160,7 +160,7 @@ public class RagdollUtils {
|
|||||||
return new HullCollisionShape(p);
|
return new HullCollisionShape(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
//retruns the list of bone indices of the given bone and its child(if they are not in the boneList)
|
//returns the list of bone indices of the given bone and its child (if they are not in the boneList)
|
||||||
public static List<Integer> getBoneIndices(Bone bone, Skeleton skeleton, Set<String> boneList) {
|
public static List<Integer> getBoneIndices(Bone bone, Skeleton skeleton, Set<String> boneList) {
|
||||||
List<Integer> list = new LinkedList<Integer>();
|
List<Integer> list = new LinkedList<Integer>();
|
||||||
if (boneList.isEmpty()) {
|
if (boneList.isEmpty()) {
|
||||||
@ -266,7 +266,7 @@ public class RagdollUtils {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates a bone position and rotation.
|
* Updates a bone position and rotation.
|
||||||
* if the child bones are not in the bone list this means, they are not associated with a physic shape.
|
* if the child bones are not in the bone list this means, they are not associated with a physics shape.
|
||||||
* So they have to be updated
|
* So they have to be updated
|
||||||
* @param bone the bone
|
* @param bone the bone
|
||||||
* @param pos the position
|
* @param pos the position
|
||||||
|
@ -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
|
||||||
@ -121,7 +121,7 @@ public class HingeJoint extends PhysicsJoint {
|
|||||||
* @param high the high limit in radians.
|
* @param high the high limit in radians.
|
||||||
* @param _softness the factor at which the velocity error correction starts operating,i.e a softness of 0.9 means that the vel. corr starts at 90% of the limit range.
|
* @param _softness the factor at which the velocity error correction starts operating,i.e a softness of 0.9 means that the vel. corr starts at 90% of the limit range.
|
||||||
* @param _biasFactor the magnitude of the position correction. It tells you how strictly the position error (drift ) is corrected.
|
* @param _biasFactor the magnitude of the position correction. It tells you how strictly the position error (drift ) is corrected.
|
||||||
* @param _relaxationFactor the rate at which velocity errors are corrected. This can be seen as the strength of the limits. A low value will make the the limits more spongy.
|
* @param _relaxationFactor the rate at which velocity errors are corrected. This can be seen as the strength of the limits. A low value will make the limits more spongy.
|
||||||
*/
|
*/
|
||||||
public void setLimit(float low, float high, float _softness, float _biasFactor, float _relaxationFactor) {
|
public void setLimit(float low, float high, float _softness, float _biasFactor, float _relaxationFactor) {
|
||||||
biasFactor = _biasFactor;
|
biasFactor = _biasFactor;
|
||||||
|
@ -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
|
||||||
@ -154,7 +154,7 @@ public class FadeFilter extends Filter {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* return the current value of the fading
|
* return the current value of the fading
|
||||||
* can be used to chack if fade is complete (eg value=1)
|
* can be used to check if fade is complete (eg value=1)
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public float getValue() {
|
public float getValue() {
|
||||||
|
@ -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
|
||||||
@ -47,8 +47,8 @@ import com.jme3.renderer.queue.RenderQueue;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* LightScattering filters creates rays comming from a light sources
|
* LightScattering filters create rays coming from light sources
|
||||||
* This is often reffered as god rays.
|
* This is often referred to as god rays.
|
||||||
*
|
*
|
||||||
* @author Rémy Bouquet aka Nehon
|
* @author Rémy Bouquet aka Nehon
|
||||||
*/
|
*/
|
||||||
@ -67,7 +67,7 @@ public class LightScatteringFilter extends Filter {
|
|||||||
private ViewPort viewPort;
|
private ViewPort viewPort;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* creates a lightScaterring filter
|
* creates a lightScatterring filter
|
||||||
*/
|
*/
|
||||||
public LightScatteringFilter() {
|
public LightScatteringFilter() {
|
||||||
super("Light Scattering");
|
super("Light Scattering");
|
||||||
@ -200,7 +200,7 @@ public class LightScatteringFilter extends Filter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns the nmber of samples for the radial blur
|
* returns the number of samples for the radial blur
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public int getNbSamples() {
|
public int getNbSamples() {
|
||||||
@ -209,7 +209,7 @@ public class LightScatteringFilter extends Filter {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* sets the number of samples for the radial blur default is 50
|
* sets the number of samples for the radial blur default is 50
|
||||||
* the higher the value the higher the quality, but the slower the performances.
|
* the higher the value the higher the quality, but the slower the performance.
|
||||||
* @param nbSamples
|
* @param nbSamples
|
||||||
*/
|
*/
|
||||||
public void setNbSamples(int nbSamples) {
|
public void setNbSamples(int nbSamples) {
|
||||||
|
@ -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
|
||||||
@ -53,7 +53,7 @@ import java.util.ArrayList;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* SSAO stands for screen space ambient occlusion
|
* SSAO stands for screen space ambient occlusion
|
||||||
* It's a technique that fake ambient lighting by computing shadows that near by objects would casts on each others
|
* It's a technique that fakes ambient lighting by computing shadows that near by objects would casts on each others
|
||||||
* under the effect of an ambient light
|
* under the effect of an ambient light
|
||||||
* more info on this in this blog post <a href="http://jmonkeyengine.org/2010/08/16/screen-space-ambient-occlusion-for-jmonkeyengine-3-0/">http://jmonkeyengine.org/2010/08/16/screen-space-ambient-occlusion-for-jmonkeyengine-3-0/</a>
|
* more info on this in this blog post <a href="http://jmonkeyengine.org/2010/08/16/screen-space-ambient-occlusion-for-jmonkeyengine-3-0/">http://jmonkeyengine.org/2010/08/16/screen-space-ambient-occlusion-for-jmonkeyengine-3-0/</a>
|
||||||
*
|
*
|
||||||
@ -207,7 +207,7 @@ public class SSAOFilter extends Filter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the the width of the occlusion cone considered by the occludee default is 0.1f
|
* Sets the width of the occlusion cone considered by the occludee default is 0.1f
|
||||||
* @param bias
|
* @param bias
|
||||||
*/
|
*/
|
||||||
public void setBias(float bias) {
|
public void setBias(float bias) {
|
||||||
@ -247,7 +247,7 @@ public class SSAOFilter extends Filter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the radius of the area where random samples will be picked dafault 5.1f
|
* Sets the radius of the area where random samples will be picked default 5.1f
|
||||||
* @param sampleRadius
|
* @param sampleRadius
|
||||||
*/
|
*/
|
||||||
public void setSampleRadius(float sampleRadius) {
|
public void setSampleRadius(float sampleRadius) {
|
||||||
|
@ -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
|
||||||
@ -50,7 +50,7 @@ import com.jme3.ui.Picture;
|
|||||||
*
|
*
|
||||||
* Simple Water renders a simple plane that use reflection and refraction to look like water.
|
* Simple Water renders a simple plane that use reflection and refraction to look like water.
|
||||||
* It's pretty basic, but much faster than the WaterFilter
|
* It's pretty basic, but much faster than the WaterFilter
|
||||||
* It's useful if you aim low specs hardware and still want a good looking water.
|
* It's useful if you aim for low specs hardware and still want a good looking water.
|
||||||
* Usage is :
|
* Usage is :
|
||||||
* <code>
|
* <code>
|
||||||
* SimpleWaterProcessor waterProcessor = new SimpleWaterProcessor(assetManager);
|
* SimpleWaterProcessor waterProcessor = new SimpleWaterProcessor(assetManager);
|
||||||
@ -514,7 +514,7 @@ public class SimpleWaterProcessor implements SceneProcessor {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* retruns true if the waterprocessor is in debug mode
|
* returns true if the waterprocessor is in debug mode
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public boolean isDebug() {
|
public boolean isDebug() {
|
||||||
|
@ -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
|
||||||
@ -864,7 +864,7 @@ public class WaterFilter extends Filter implements JmeCloneable, Cloneable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the shinines factor of the water
|
* Sets the shininess factor of the water
|
||||||
* default is 0.7f
|
* default is 0.7f
|
||||||
* @param shininess
|
* @param shininess
|
||||||
*/
|
*/
|
||||||
@ -876,7 +876,7 @@ public class WaterFilter extends Filter implements JmeCloneable, Cloneable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* retruns the speed of the waves
|
* returns the speed of the waves
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public float getSpeed() {
|
public float getSpeed() {
|
||||||
|
@ -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
|
||||||
@ -206,7 +206,7 @@ public class PhysicsTestHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* creates the necessary inputlistener and action to shoot balls from teh camera
|
* creates the necessary inputlistener and action to shoot balls from the camera
|
||||||
* @param app
|
* @param app
|
||||||
* @param rootNode
|
* @param rootNode
|
||||||
* @param space
|
* @param space
|
||||||
|
@ -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
|
||||||
@ -66,9 +66,9 @@ public class TestKinematicAddToPhysicsSpaceIssue extends SimpleApplication {
|
|||||||
physicsSphere.getControl(RigidBodyControl.class).setPhysicsLocation(new Vector3f(3, 6, 0));
|
physicsSphere.getControl(RigidBodyControl.class).setPhysicsLocation(new Vector3f(3, 6, 0));
|
||||||
rootNode.attachChild(physicsSphere);
|
rootNode.attachChild(physicsSphere);
|
||||||
|
|
||||||
//Setting the rigidBody to kinematic before adding it to the physic space
|
//Setting the rigidBody to kinematic before adding it to the physics space
|
||||||
physicsSphere.getControl(RigidBodyControl.class).setKinematic(true);
|
physicsSphere.getControl(RigidBodyControl.class).setKinematic(true);
|
||||||
//adding it to the physic space
|
//adding it to the physics space
|
||||||
getPhysicsSpace().add(physicsSphere);
|
getPhysicsSpace().add(physicsSphere);
|
||||||
//Making it not kinematic again, it should fall under gravity, it doesn't
|
//Making it not kinematic again, it should fall under gravity, it doesn't
|
||||||
physicsSphere.getControl(RigidBodyControl.class).setKinematic(false);
|
physicsSphere.getControl(RigidBodyControl.class).setKinematic(false);
|
||||||
@ -78,7 +78,7 @@ public class TestKinematicAddToPhysicsSpaceIssue extends SimpleApplication {
|
|||||||
physicsSphere2.getControl(RigidBodyControl.class).setPhysicsLocation(new Vector3f(5, 6, 0));
|
physicsSphere2.getControl(RigidBodyControl.class).setPhysicsLocation(new Vector3f(5, 6, 0));
|
||||||
rootNode.attachChild(physicsSphere2);
|
rootNode.attachChild(physicsSphere2);
|
||||||
|
|
||||||
//Adding the rigid body to physic space
|
//Adding the rigid body to physics space
|
||||||
getPhysicsSpace().add(physicsSphere2);
|
getPhysicsSpace().add(physicsSphere2);
|
||||||
//making it kinematic
|
//making it kinematic
|
||||||
physicsSphere2.getControl(RigidBodyControl.class).setKinematic(false);
|
physicsSphere2.getControl(RigidBodyControl.class).setKinematic(false);
|
||||||
|
@ -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
|
||||||
@ -97,7 +97,7 @@ public class TestChaseCamera extends SimpleApplication implements AnalogListener
|
|||||||
//WARNING : setting this trigger disable the rotation on right and left mouse button click
|
//WARNING : setting this trigger disable the rotation on right and left mouse button click
|
||||||
//chaseCam.setToggleRotationTrigger(new MouseButtonTrigger(MouseInput.BUTTON_MIDDLE));
|
//chaseCam.setToggleRotationTrigger(new MouseButtonTrigger(MouseInput.BUTTON_MIDDLE));
|
||||||
|
|
||||||
//Uncomment this to set mutiple triggers to enable rotation of the cam
|
//Uncomment this to set multiple triggers to enable rotation of the cam
|
||||||
//Here spade bar and middle mouse button
|
//Here spade bar and middle mouse button
|
||||||
//chaseCam.setToggleRotationTrigger(new MouseButtonTrigger(MouseInput.BUTTON_MIDDLE),new KeyTrigger(KeyInput.KEY_SPACE));
|
//chaseCam.setToggleRotationTrigger(new MouseButtonTrigger(MouseInput.BUTTON_MIDDLE),new KeyTrigger(KeyInput.KEY_SPACE));
|
||||||
|
|
||||||
|
@ -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
|
||||||
@ -90,7 +90,7 @@ public class TestChaseCameraAppState extends SimpleApplication implements Analog
|
|||||||
//WARNING : setting this trigger disable the rotation on right and left mouse button click
|
//WARNING : setting this trigger disable the rotation on right and left mouse button click
|
||||||
//chaseCamAS.setToggleRotationTrigger(new MouseButtonTrigger(MouseInput.BUTTON_MIDDLE));
|
//chaseCamAS.setToggleRotationTrigger(new MouseButtonTrigger(MouseInput.BUTTON_MIDDLE));
|
||||||
|
|
||||||
//Uncomment this to set mutiple triggers to enable rotation of the cam
|
//Uncomment this to set multiple triggers to enable rotation of the cam
|
||||||
//Here space bar and middle mouse button
|
//Here space bar and middle mouse button
|
||||||
//chaseCamAS.setToggleRotationTrigger(new MouseButtonTrigger(MouseInput.BUTTON_MIDDLE),new KeyTrigger(KeyInput.KEY_SPACE));
|
//chaseCamAS.setToggleRotationTrigger(new MouseButtonTrigger(MouseInput.BUTTON_MIDDLE),new KeyTrigger(KeyInput.KEY_SPACE));
|
||||||
|
|
||||||
|
@ -52,14 +52,14 @@ public class TestAnimationFactory extends SimpleApplication {
|
|||||||
|
|
||||||
//creating a translation keyFrame at time = 3 with a translation on the x axis of 5 WU
|
//creating a translation keyFrame at time = 3 with a translation on the x axis of 5 WU
|
||||||
animationFactory.addTimeTranslation(3, new Vector3f(5, 0, 0));
|
animationFactory.addTimeTranslation(3, new Vector3f(5, 0, 0));
|
||||||
//reseting the translation to the start position at time = 6
|
//resetting the translation to the start position at time = 6
|
||||||
animationFactory.addTimeTranslation(6, new Vector3f(0, 0, 0));
|
animationFactory.addTimeTranslation(6, new Vector3f(0, 0, 0));
|
||||||
|
|
||||||
//Creating a scale keyFrame at time = 2 with the unit scale.
|
//Creating a scale keyFrame at time = 2 with the unit scale.
|
||||||
animationFactory.addTimeScale(2, new Vector3f(1, 1, 1));
|
animationFactory.addTimeScale(2, new Vector3f(1, 1, 1));
|
||||||
//Creating a scale keyFrame at time = 4 scaling to 1.5
|
//Creating a scale keyFrame at time = 4 scaling to 1.5
|
||||||
animationFactory.addTimeScale(4, new Vector3f(1.5f, 1.5f, 1.5f));
|
animationFactory.addTimeScale(4, new Vector3f(1.5f, 1.5f, 1.5f));
|
||||||
//reseting the scale to the start value at time = 5
|
//resetting the scale to the start value at time = 5
|
||||||
animationFactory.addTimeScale(5, new Vector3f(1, 1, 1));
|
animationFactory.addTimeScale(5, new Vector3f(1, 1, 1));
|
||||||
|
|
||||||
|
|
||||||
|
@ -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 TestLatency {
|
|||||||
long curTime = getTime();
|
long curTime = getTime();
|
||||||
//System.out.println("Time sent: " + timeMsg.timeSent);
|
//System.out.println("Time sent: " + timeMsg.timeSent);
|
||||||
//System.out.println("Time received by server: " + timeMsg.timeReceived);
|
//System.out.println("Time received by server: " + timeMsg.timeReceived);
|
||||||
//System.out.println("Time recieved by client: " + curTime);
|
//System.out.println("Time received by client: " + curTime);
|
||||||
|
|
||||||
long latency = (curTime - timeMsg.timeSent);
|
long latency = (curTime - timeMsg.timeSent);
|
||||||
System.out.println("Latency: " + (latency) + " ms");
|
System.out.println("Latency: " + (latency) + " ms");
|
||||||
|
@ -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
|
||||||
@ -53,7 +53,7 @@ import com.jme3.texture.Texture.WrapMode;
|
|||||||
/**
|
/**
|
||||||
* Demonstrates how to use terrain.
|
* Demonstrates how to use terrain.
|
||||||
* The base terrain class it uses is TerrainQuad, which is a quad tree of actual
|
* The base terrain class it uses is TerrainQuad, which is a quad tree of actual
|
||||||
* meshes called TerainPatches.
|
* meshes called TerrainPatches.
|
||||||
* There are a couple options for the terrain in this test:
|
* 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 trianglestrip structure.
|
||||||
* You will notice some off lines; these are degenerate triangles and are part of the
|
* You will notice some off lines; these are degenerate triangles and are part of the
|
||||||
@ -203,7 +203,7 @@ public class TerrainTest extends SimpleApplication {
|
|||||||
matRock.setBoolean("useTriPlanarMapping", true);
|
matRock.setBoolean("useTriPlanarMapping", true);
|
||||||
// planar textures don't use the mesh's texture coordinates but real world coordinates,
|
// planar textures don't use the mesh's texture coordinates but real world coordinates,
|
||||||
// so we need to convert these texture coordinate scales into real world scales so it looks
|
// so we need to convert these texture coordinate scales into real world scales so it looks
|
||||||
// the same when we switch to/from tr-planar mode
|
// the same when we switch to/from tri-planar mode
|
||||||
matRock.setFloat("Tex1Scale", 1f / (float) (512f / grassScale));
|
matRock.setFloat("Tex1Scale", 1f / (float) (512f / grassScale));
|
||||||
matRock.setFloat("Tex2Scale", 1f / (float) (512f / dirtScale));
|
matRock.setFloat("Tex2Scale", 1f / (float) (512f / dirtScale));
|
||||||
matRock.setFloat("Tex3Scale", 1f / (float) (512f / rockScale));
|
matRock.setFloat("Tex3Scale", 1f / (float) (512f / rockScale));
|
||||||
|
@ -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
|
||||||
@ -62,7 +62,7 @@ public class TestSaveGame extends SimpleApplication {
|
|||||||
Spatial model = (Spatial) assetManager.loadModel("Models/Oto/Oto.mesh.xml");
|
Spatial model = (Spatial) assetManager.loadModel("Models/Oto/Oto.mesh.xml");
|
||||||
myPlayer.attachChild(model);
|
myPlayer.attachChild(model);
|
||||||
|
|
||||||
//before saving the game, the model should be detached so its not saved along with the node
|
//before saving the game, the model should be detached so it's not saved along with the node
|
||||||
myPlayer.detachAllChildren();
|
myPlayer.detachAllChildren();
|
||||||
SaveGame.saveGame("mycompany/mygame", "savegame_001", myPlayer);
|
SaveGame.saveGame("mycompany/mygame", "savegame_001", myPlayer);
|
||||||
|
|
||||||
|
@ -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
|
||||||
@ -99,7 +99,7 @@ public class HingeJoint extends PhysicsJoint {
|
|||||||
* @param high the high limit in radians.
|
* @param high the high limit in radians.
|
||||||
* @param _softness the factor at which the velocity error correction starts operating,i.e a softness of 0.9 means that the vel. corr starts at 90% of the limit range.
|
* @param _softness the factor at which the velocity error correction starts operating,i.e a softness of 0.9 means that the vel. corr starts at 90% of the limit range.
|
||||||
* @param _biasFactor the magnitude of the position correction. It tells you how strictly the position error (drift ) is corrected.
|
* @param _biasFactor the magnitude of the position correction. It tells you how strictly the position error (drift ) is corrected.
|
||||||
* @param _relaxationFactor the rate at which velocity errors are corrected. This can be seen as the strength of the limits. A low value will make the the limits more spongy.
|
* @param _relaxationFactor the rate at which velocity errors are corrected. This can be seen as the strength of the limits. A low value will make the limits more spongy.
|
||||||
*/
|
*/
|
||||||
public void setLimit(float low, float high, float _softness, float _biasFactor, float _relaxationFactor) {
|
public void setLimit(float low, float high, float _softness, float _biasFactor, float _relaxationFactor) {
|
||||||
biasFactor = _biasFactor;
|
biasFactor = _biasFactor;
|
||||||
|
@ -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
|
||||||
@ -294,7 +294,7 @@ public class TextureUtil {
|
|||||||
|
|
||||||
int[] mipSizes = image.getMipMapSizes();
|
int[] mipSizes = image.getMipMapSizes();
|
||||||
int pos = 0;
|
int pos = 0;
|
||||||
// TODO: Remove unneccessary allocation
|
// TODO: Remove unnecessary allocation
|
||||||
if (mipSizes == null){
|
if (mipSizes == null){
|
||||||
if (data != null)
|
if (data != null)
|
||||||
mipSizes = new int[]{ data.capacity() };
|
mipSizes = new int[]{ data.capacity() };
|
||||||
@ -473,7 +473,7 @@ public class TextureUtil {
|
|||||||
int[] mipSizes = image.getMipMapSizes();
|
int[] mipSizes = image.getMipMapSizes();
|
||||||
int pos = 0;
|
int pos = 0;
|
||||||
|
|
||||||
// TODO: Remove unneccessary allocation
|
// TODO: Remove unnecessary allocation
|
||||||
if (mipSizes == null){
|
if (mipSizes == null){
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
mipSizes = new int[]{ data.capacity() };
|
mipSizes = new int[]{ data.capacity() };
|
||||||
|
@ -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
|
||||||
@ -66,13 +66,13 @@ public abstract class LwjglAbstractDisplay extends LwjglContext implements Runna
|
|||||||
public abstract Type getType();
|
public abstract Type getType();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the title if its a windowed display
|
* Set the title if it's a windowed display
|
||||||
* @param title
|
* @param title
|
||||||
*/
|
*/
|
||||||
public abstract void setTitle(String title);
|
public abstract void setTitle(String title);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Restart if its a windowed or full-screen display.
|
* Restart if it's a windowed or full-screen display.
|
||||||
*/
|
*/
|
||||||
public abstract void restart();
|
public abstract void restart();
|
||||||
|
|
||||||
|
@ -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
|
||||||
@ -76,7 +76,7 @@ public class LwjglSmoothingTimer extends Timer {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor builds a <code>Timer</code> object. All values will be
|
* Constructor builds a <code>Timer</code> object. All values will be
|
||||||
* initialized to it's default values.
|
* initialized to its default values.
|
||||||
*/
|
*/
|
||||||
public LwjglSmoothingTimer() {
|
public LwjglSmoothingTimer() {
|
||||||
reset();
|
reset();
|
||||||
@ -144,7 +144,7 @@ public class LwjglSmoothingTimer extends Timer {
|
|||||||
if ( oldTime == -1 ) {
|
if ( oldTime == -1 ) {
|
||||||
// For the first frame use 60 fps. This value will not be counted in further averages.
|
// For the first frame use 60 fps. This value will not be counted in further averages.
|
||||||
// This is done so initialization code between creating the timer and the first
|
// This is done so initialization code between creating the timer and the first
|
||||||
// frame is not counted as a single frame on it's own.
|
// frame is not counted as a single frame on its own.
|
||||||
lastTPF = 1 / 60f;
|
lastTPF = 1 / 60f;
|
||||||
lastFPS = 1f / lastTPF;
|
lastFPS = 1f / lastTPF;
|
||||||
return;
|
return;
|
||||||
|
@ -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
|
||||||
@ -63,7 +63,7 @@ public class LwjglTimer extends Timer {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor builds a <code>Timer</code> object. All values will be
|
* Constructor builds a <code>Timer</code> object. All values will be
|
||||||
* initialized to it's default values.
|
* initialized to its default values.
|
||||||
*/
|
*/
|
||||||
public LwjglTimer() {
|
public LwjglTimer() {
|
||||||
reset();
|
reset();
|
||||||
|
@ -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
|
||||||
@ -101,7 +101,7 @@ public abstract class LwjglWindow extends LwjglContext implements Runnable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the title if its a windowed display
|
* Set the title if it's a windowed display
|
||||||
*
|
*
|
||||||
* @param title the title to set
|
* @param title the title to set
|
||||||
*/
|
*/
|
||||||
@ -112,7 +112,7 @@ public abstract class LwjglWindow extends LwjglContext implements Runnable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Restart if its a windowed or full-screen display.
|
* Restart if it's a windowed or full-screen display.
|
||||||
*/
|
*/
|
||||||
public void restart() {
|
public void restart() {
|
||||||
if (created.get()) {
|
if (created.get()) {
|
||||||
|
@ -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
|
||||||
@ -37,7 +37,7 @@ import java.io.IOException;
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* KernelFactory implemention for creating TCP kernels
|
* KernelFactory implementation for creating TCP kernels
|
||||||
* using the NIO selector model.
|
* using the NIO selector model.
|
||||||
*
|
*
|
||||||
* @version $Revision$
|
* @version $Revision$
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2015 jMonkeyEngine
|
* Copyright (c) 2015-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
|
||||||
@ -167,7 +167,7 @@ public class RmiHostedService extends AbstractHostedService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the RMI registry for the specific HostedConection. Each connection
|
* Returns the RMI registry for the specific HostedConnection. Each connection
|
||||||
* has its own registry with its own connection-specific shared objects.
|
* has its own registry with its own connection-specific shared objects.
|
||||||
*/
|
*/
|
||||||
public RmiRegistry getRmiRegistry( HostedConnection hc ) {
|
public RmiRegistry getRmiRegistry( HostedConnection hc ) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2015 jMonkeyEngine
|
* Copyright (c) 2015-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
|
||||||
@ -90,7 +90,7 @@ public abstract class AbstractMessageDelegator<S extends MessageConnection>
|
|||||||
/**
|
/**
|
||||||
* Returns true if the specified method is valid for the specified
|
* Returns true if the specified method is valid for the specified
|
||||||
* message type. This is used internally during automapping to
|
* message type. This is used internally during automapping to
|
||||||
* provide implementation specific filting of methods.
|
* provide implementation specific filtering of methods.
|
||||||
* This implementation checks for methods that take either the connection and message
|
* This implementation checks for methods that take either the connection and message
|
||||||
* type arguments (in that order) or just the message type.
|
* type arguments (in that order) or just the message type.
|
||||||
*/
|
*/
|
||||||
@ -129,7 +129,7 @@ public abstract class AbstractMessageDelegator<S extends MessageConnection>
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience method that returns the message type as
|
* Convenience method that returns the message type as
|
||||||
* reflecively determined for a particular method. This
|
* reflectively determined for a particular method. This
|
||||||
* only works with methods that actually have arguments.
|
* only works with methods that actually have arguments.
|
||||||
* This implementation returns the last element of the method's
|
* This implementation returns the last element of the method's
|
||||||
* getParameterTypes() array, thus supporting both
|
* getParameterTypes() array, thus supporting both
|
||||||
@ -167,7 +167,7 @@ public abstract class AbstractMessageDelegator<S extends MessageConnection>
|
|||||||
/**
|
/**
|
||||||
* Returns true if the specified method name is allowed.
|
* Returns true if the specified method name is allowed.
|
||||||
* This is used by automapping to determine if a method
|
* This is used by automapping to determine if a method
|
||||||
* should be rejected purely on name. Default implemention
|
* should be rejected purely on name. Default implementation
|
||||||
* always returns true.
|
* always returns true.
|
||||||
*/
|
*/
|
||||||
protected boolean allowName( String name ) {
|
protected boolean allowName( String name ) {
|
||||||
|
@ -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
|
||||||
@ -167,7 +167,7 @@ public class NiftyJmeDisplay implements SceneProcessor {
|
|||||||
*
|
*
|
||||||
* Currently you have to make sure to not use more image space than this single texture provides. However, Nifty
|
* Currently you have to make sure to not use more image space than this single texture provides. However, Nifty
|
||||||
* tries to be smart about this and internally will make sure that only the images are uploaded that your GUI
|
* tries to be smart about this and internally will make sure that only the images are uploaded that your GUI
|
||||||
* really needs. So in general this shoudln't be an issue.
|
* really needs. So in general this shouldn't be an issue.
|
||||||
*
|
*
|
||||||
* A complete re-organisation of the texture atlas happens when a Nifty screen ends and another begins. Dynamically
|
* A complete re-organisation of the texture atlas happens when a Nifty screen ends and another begins. Dynamically
|
||||||
* adding images while a screen is running is supported as well.
|
* adding images while a screen is running is supported as well.
|
||||||
|
@ -13,7 +13,7 @@ import java.util.Map;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* A MaterialAdapter allows to map a GLTF material to a JME material.
|
* A MaterialAdapter allows to map a GLTF material to a JME material.
|
||||||
* It maps each gltf parameter to it's matching parameter in the JME material,
|
* It maps each gltf parameter to its matching parameter in the JME material,
|
||||||
* and allows for some conversion if the JME material model doesn't exactly match the gltf material model
|
* and allows for some conversion if the JME material model doesn't exactly match the gltf material model
|
||||||
* Created by Nehon on 08/08/2017.
|
* Created by Nehon on 08/08/2017.
|
||||||
*/
|
*/
|
||||||
|
@ -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
|
||||||
@ -144,7 +144,7 @@ public class MaterialLoader implements AssetLoader {
|
|||||||
textures[texUnit].setAnisotropicFilter(loadedTexture.getAnisotropicFilter());
|
textures[texUnit].setAnisotropicFilter(loadedTexture.getAnisotropicFilter());
|
||||||
textures[texUnit].setKey(loadedTexture.getKey());
|
textures[texUnit].setKey(loadedTexture.getKey());
|
||||||
|
|
||||||
// XXX: Is this really neccessary?
|
// XXX: Is this really necessary?
|
||||||
textures[texUnit].setWrap(WrapMode.Repeat);
|
textures[texUnit].setWrap(WrapMode.Repeat);
|
||||||
if (texName != null){
|
if (texName != null){
|
||||||
textures[texUnit].setName(texName);
|
textures[texUnit].setName(texName);
|
||||||
|
@ -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
|
||||||
@ -127,7 +127,7 @@ public class GeoMap implements Savable {
|
|||||||
* If false, then the data is unavailable- must be loaded with load()
|
* If false, then the data is unavailable- must be loaded with load()
|
||||||
* before the methods getHeight/getNormal can be used
|
* before the methods getHeight/getNormal can be used
|
||||||
*
|
*
|
||||||
* @return wether the geomap data is loaded in system memory
|
* @return whether the geomap data is loaded in system memory
|
||||||
*/
|
*/
|
||||||
public boolean isLoaded() {
|
public boolean isLoaded() {
|
||||||
return true;
|
return true;
|
||||||
|
@ -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
|
||||||
@ -87,7 +87,7 @@ public interface Terrain {
|
|||||||
* Each xz coordinate entry matches to a height entry, 1 for 1. So the
|
* Each xz coordinate entry matches to a height entry, 1 for 1. So the
|
||||||
* first coordinate matches to the first height value, the last to the
|
* first coordinate matches to the first height value, the last to the
|
||||||
* last etc.
|
* last etc.
|
||||||
* @param xz a list of coordinates where the hight will be set
|
* @param xz a list of coordinates where the height will be set
|
||||||
* @param height the heights that match the xz coordinates
|
* @param height the heights that match the xz coordinates
|
||||||
*/
|
*/
|
||||||
public void setHeight(List<Vector2f> xz, List<Float> height);
|
public void setHeight(List<Vector2f> xz, List<Float> height);
|
||||||
@ -104,7 +104,7 @@ public interface Terrain {
|
|||||||
* Each xz coordinate entry matches to a height entry, 1 for 1. So the
|
* Each xz coordinate entry matches to a height entry, 1 for 1. So the
|
||||||
* first coordinate matches to the first height value, the last to the
|
* first coordinate matches to the first height value, the last to the
|
||||||
* last etc.
|
* last etc.
|
||||||
* @param xz a list of coordinates where the hight will be adjusted
|
* @param xz a list of coordinates where the height will be adjusted
|
||||||
* @param height +- value to adjust the height by, that matches the xz coordinates
|
* @param height +- value to adjust the height by, that matches the xz coordinates
|
||||||
*/
|
*/
|
||||||
public void adjustHeight(List<Vector2f> xz, List<Float> height);
|
public void adjustHeight(List<Vector2f> xz, List<Float> height);
|
||||||
|
@ -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 @@ import java.util.List;
|
|||||||
* is a mathematical limit on the number of times the 'size' of the patch can be divided by two. However there is a -1 to that
|
* is a mathematical limit on the number of times the 'size' of the patch can be divided by two. However there is a -1 to that
|
||||||
* for now until I add in a custom index buffer calculation for that max level, the current algorithm does not go that far.
|
* for now until I add in a custom index buffer calculation for that max level, the current algorithm does not go that far.
|
||||||
*
|
*
|
||||||
* You can supply a LodThresholdCalculator for use in determining when the LOD should change. It's API will no doubt change
|
* You can supply a LodThresholdCalculator for use in determining when the LOD should change. Its API will no doubt change
|
||||||
* in the near future. Right now it defaults to just changing LOD every two patch sizes. So if a patch has a size of 65,
|
* in the near future. Right now it defaults to just changing LOD every two patch sizes. So if a patch has a size of 65,
|
||||||
* then the LOD changes every 130 units away.
|
* then the LOD changes every 130 units away.
|
||||||
*
|
*
|
||||||
@ -86,7 +86,7 @@ public class TerrainPatch extends Geometry {
|
|||||||
protected int lod = 0; // this terrain patch's LOD
|
protected int lod = 0; // this terrain patch's LOD
|
||||||
private int maxLod = -1;
|
private int maxLod = -1;
|
||||||
protected int previousLod = -1;
|
protected int previousLod = -1;
|
||||||
protected int lodLeft, lodTop, lodRight, lodBottom; // it's neighbour's LODs
|
protected int lodLeft, lodTop, lodRight, lodBottom; // its neighbour's LODs
|
||||||
|
|
||||||
protected int size;
|
protected int size;
|
||||||
|
|
||||||
|
@ -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
|
||||||
@ -36,7 +36,7 @@ import java.util.logging.Logger;
|
|||||||
/**
|
/**
|
||||||
* <code>CombinerHeightMap</code> generates a new height map based on
|
* <code>CombinerHeightMap</code> generates a new height map based on
|
||||||
* two provided height maps. These had maps can either be added together
|
* two provided height maps. These had maps can either be added together
|
||||||
* or substracted from each other. Each heightmap has a weight to
|
* or subtracted from each other. Each heightmap has a weight to
|
||||||
* determine how much one will affect the other. By default it is set to
|
* determine how much one will affect the other. By default it is set to
|
||||||
* 0.5, 0.5 and meaning the two heightmaps are averaged evenly. This
|
* 0.5, 0.5 and meaning the two heightmaps are averaged evenly. This
|
||||||
* value can be adjusted at will, as long as the two factors are equal
|
* value can be adjusted at will, as long as the two factors are equal
|
||||||
|
@ -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
|
||||||
@ -240,7 +240,7 @@ public class FaultHeightMap extends AbstractHeightMap {
|
|||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//shoudn't go here
|
//shouldn't go here
|
||||||
throw new RuntimeException("Code needs update to switch allcases");
|
throw new RuntimeException("Code needs update to switch allcases");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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
|
||||||
@ -38,7 +38,7 @@ package com.jme3.terrain.heightmap;
|
|||||||
public interface Namer {
|
public interface Namer {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets a name for a heightmap tile given it's cell id
|
* Gets a name for a heightmap tile given its cell id
|
||||||
* @param x
|
* @param x
|
||||||
* @param y
|
* @param y
|
||||||
* @return
|
* @return
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2011, Novyon Events
|
* Copyright (c) 2011-2018, Novyon Events
|
||||||
*
|
*
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@ -100,7 +100,7 @@ public class HydraulicErodeFilter extends AbstractFilter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// step 3. water is transported to it's neighbours
|
// step 3. water is transported to its neighbours
|
||||||
float a = ga[idx] + wt[idx];
|
float a = ga[idx] + wt[idx];
|
||||||
// float[] aj = new float[idxrel.length];
|
// float[] aj = new float[idxrel.length];
|
||||||
float amax = 0;
|
float amax = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user