### Install Built Libraries to Local Maven Repository (Windows) Source: https://stephengold.github.io/Libbulletjme/lbj-en/English/build.html Install the successfully built desktop and Android libraries to your local Maven repository using the Gradle wrapper on Windows Command Prompt. ```cmd .\gradlew install ``` ```cmd .\gradlew -b android.gradle install ``` -------------------------------- ### Install Built Libraries to Local Maven Repository Source: https://stephengold.github.io/Libbulletjme/lbj-en/English/build.html Install the successfully built desktop and Android libraries to your local Maven repository using the Gradle wrapper. ```bash ./gradlew install;./gradlew -b android.gradle install ``` -------------------------------- ### Install Antora for Documentation Build Source: https://stephengold.github.io/Libbulletjme/lbj-en/English/build.html Install Antora, a documentation generator, as a development dependency using npm. The '-E' flag ensures the exact version is installed. ```bash npm i -D -E antora ``` -------------------------------- ### setUp Source: https://stephengold.github.io/Libbulletjme/javadoc/master/com/jme3/bullet/objects/infos/CharacterController.html Alters the character's "up" direction. ```APIDOC ## setUp ### Description Alter the character's "up" direction. ### Parameters * **direction** (Vector3f) - the new "up" direction vector ``` -------------------------------- ### Install Android Build Script (Windows) Source: https://stephengold.github.io/Libbulletjme/lbj-en/English/build.html Copy the Android-specific Gradle build script to 'build.gradle' for building Android artifacts on Windows Command Prompt. ```cmd copy android.gradle build.gradle ``` -------------------------------- ### Quaternion clone Method Example Source: https://stephengold.github.io/Libbulletjme/javadoc/master/com/jme3/math/Quaternion.html Creates a copy of the quaternion. The current instance is unaffected. ```java public Quaternion clone() Creates a copy. The current instance is unaffected. Overrides: `clone` in class `Object` Returns: a new instance, equivalent to the current one ``` -------------------------------- ### Install Android Build Script Source: https://stephengold.github.io/Libbulletjme/lbj-en/English/build.html Copy the Android-specific Gradle build script to 'build.gradle' for building Android artifacts. This is done using either Bash/Fish/PowerShell/Zsh or Windows Command Prompt. ```bash cp android.gradle build.gradle ``` -------------------------------- ### Add Libbulletjme Desktop JVM and Native Libraries to Gradle Project Source: https://stephengold.github.io/Libbulletjme/lbj-en/English/add.html For desktop projects, add the JVM library and the platform-specific native library. This example shows dependencies for a Linux x86_64 environment. Adjust 'Linux64' for other platforms (e.g., 'Windows64', 'MacOSX_ARM64'). ```gradle repositories { mavenCentral() } dependencies { // JVM library: implementation("com.github.stephengold:Libbulletjme-Windows64:23.0.1") // native libraries: runtimeOnly("com.github.stephengold:Libbulletjme-Linux64:23.0.1:SpDebug") // Native libraries for other platforms could be added. } ``` -------------------------------- ### Quaternion toString Example Source: https://stephengold.github.io/Libbulletjme/javadoc/master/com/jme3/math/Quaternion.html Returns a string representation of the quaternion. The current instance is unaffected. ```java public String toString() Returns a string representation of the quaternion, which is unaffected. For example, the identity quaternion is represented by: ``` (0.0, 0.0, 0.0, 1.0) ``` ``` -------------------------------- ### get Source: https://stephengold.github.io/Libbulletjme/javadoc/master/jme3utilities/math/MyBuffer.html Reads a Vector3f from a FloatBuffer starting at a given position without altering the buffer's current position. ```APIDOC ## get ### Description Reads a Vector3f starting from the specified position. Does not alter the buffer's position. ### Method public static void get(FloatBuffer buffer, int startPosition, Vector3f storeVector) ### Parameters #### Path Parameters - **buffer** (FloatBuffer) - The buffer to read from (not null, unaffected) - **startPosition** (int) - The position at which to start reading (>=0) - **storeVector** (Vector3f) - Storage for the vector (not null, modified) ``` -------------------------------- ### Build Desktop Artifacts with Gradle Wrapper (Windows) Source: https://stephengold.github.io/Libbulletjme/lbj-en/English/build.html Execute the Gradle wrapper to build the desktop artifacts of Libbulletjme on Windows Command Prompt. ```cmd .\gradlew build ``` -------------------------------- ### Set JAVA_HOME Environment Variable (Windows Command Prompt) Source: https://stephengold.github.io/Libbulletjme/lbj-en/English/build.html Configure the JAVA_HOME environment variable to point to your JDK installation when using the Windows Command Prompt. ```cmd set JAVA_HOME="` **path to installation** `" ``` -------------------------------- ### PhysicsRigidBody Methods Source: https://stephengold.github.io/Libbulletjme/javadoc/master/index-all.html Provides methods to get inverse inertia, damping, linear factors, sleeping thresholds, and velocities of a rigid body. ```APIDOC ## getInverseInertiaLocal(Vector3f) ### Description Copy the principal (diagonal) elements of the inverse inertia tensor in the body's local coordinates. ### Method Method ### Endpoint com.jme3.bullet.objects.PhysicsRigidBody ### Parameters - **vector** (Vector3f) - A vector to store the result. ### Response #### Success Response - **inverseInertiaLocal** (Vector3f) - The principal elements of the inverse inertia tensor in local coordinates. ## getInverseInertiaWorld(Matrix3f) ### Description Compute the inverse inertia tensor in physics-space coordinates. ### Method Method ### Endpoint com.jme3.bullet.objects.PhysicsRigidBody ### Parameters - **matrix** (Matrix3f) - A matrix to store the result. ### Response #### Success Response - **inverseInertiaWorld** (Matrix3f) - The inverse inertia tensor in physics-space coordinates. ## getLinearDamping() ### Description Return the body's linear damping. ### Method Method ### Endpoint com.jme3.bullet.objects.PhysicsRigidBody ### Parameters None ### Response #### Success Response - **linearDamping** (float) - The linear damping value. ## getLinearFactor(Vector3f) ### Description Copy the body's linear factors. ### Method Method ### Endpoint com.jme3.bullet.objects.PhysicsRigidBody ### Parameters - **vector** (Vector3f) - A vector to store the result. ### Response #### Success Response - **linearFactor** (Vector3f) - The linear factors. ## getLinearSleepingThreshold() ### Description Return the body's linear-motion sleeping threshold. ### Method Method ### Endpoint com.jme3.bullet.objects.PhysicsRigidBody ### Parameters None ### Response #### Success Response - **linearSleepingThreshold** (float) - The linear-motion sleeping threshold. ## getLinearVelocity(Vector3f) ### Description Copy the linear velocity of the body's center of mass. ### Method Method ### Endpoint com.jme3.bullet.objects.PhysicsRigidBody ### Parameters - **vector** (Vector3f) - A vector to store the result. ### Response #### Success Response - **linearVelocity** (Vector3f) - The linear velocity of the center of mass. ## getLinearVelocityDp(Vec3d) ### Description Copy the linear velocity of the body's center of mass. ### Method Method ### Endpoint com.jme3.bullet.objects.PhysicsRigidBody ### Parameters - **vec3d** (Vec3d) - A Vec3d to store the result. ### Response #### Success Response - **linearVelocityDp** (Vec3d) - The linear velocity of the center of mass. ``` -------------------------------- ### Install g++-multilib on Linux Source: https://stephengold.github.io/Libbulletjme/lbj-en/English/build.html If you are using GCC on Linux, you may need to install the 'g++-multilib' package for proper compilation. ```bash sudo apt install g++-multilib ``` -------------------------------- ### Build Desktop Artifacts with Gradle Wrapper Source: https://stephengold.github.io/Libbulletjme/lbj-en/English/build.html Execute the Gradle wrapper to build the desktop artifacts of Libbulletjme. This command should be run from the root of the cloned repository. ```bash ./gradlew build ``` -------------------------------- ### main(String[]) Source: https://stephengold.github.io/Libbulletjme/javadoc/master/index-all.html Main entry point for the TestApp application. ```APIDOC ## main(String[]) ### Description Main entry point for the TestApp application. ### Class jme3utilities.minie.TestApp ### Method Signature public static void main(String[] args) ``` -------------------------------- ### Setting Soft Body Collision Margin Source: https://stephengold.github.io/Libbulletjme/lbj-en/English/softbody.html Demonstrates how to get and set the collision margin for a soft body. This is used to control how close soft bodies can get to other objects before a collision is detected. ```Java float oldMargin = softBody.margin(); softBody.setMargin(0.1f); ``` -------------------------------- ### Create a Simple Physics Space Source: https://stephengold.github.io/Libbulletjme/lbj-en/English/add.html Initializes a PhysicsSpace with the DBVT broadphase type. This is the most basic way to set up the physics environment. ```java import com.jme3.bullet.PhysicsSpace; PhysicsSpace physicsSpace = new PhysicsSpace(PhysicsSpace.BroadphaseType.DBVT); ``` -------------------------------- ### Radius Source: https://stephengold.github.io/Libbulletjme/javadoc/master/com/jme3/bullet/objects/VehicleWheel.html Gets the radius of the wheel. ```APIDOC ## getRadius() ### Description Determine the radius of this wheel (native field: m_wheelsRadius). ### Returns The radius (in physics-space units, ≥0). ``` -------------------------------- ### getOs() Source: https://stephengold.github.io/Libbulletjme/javadoc/master/com/jme3/system/Platform.html Returns the operating system of this platform. ```APIDOC ## Method Details ### getOs public Platform.Os getOs() Returns the operating system of this platform. Returns: the generic name of the operating system of this platform ``` -------------------------------- ### getRatio Source: https://stephengold.github.io/Libbulletjme/javadoc/master/index-all.html Gets the gear ratio for a GearJoint. ```APIDOC ## getRatio ### Description Get the gear ratio. ### Method `getRatio()` ### Returns (float) - The gear ratio. ``` -------------------------------- ### Run Antora to Build Local Documentation Site Source: https://stephengold.github.io/Libbulletjme/lbj-en/English/build.html Execute Antora using npx to build the local copy of the documentation website. This command uses the 'docs/playbook.yml' configuration file. ```bash npx antora docs/playbook.yml ``` -------------------------------- ### getVehicleId() Source: https://stephengold.github.io/Libbulletjme/javadoc/master/index-all.html Used internally to get the vehicle ID. ```APIDOC ## getVehicleId() ### Description Used internally to get the vehicle ID. ### Method N/A (Java Method) ### Endpoint N/A ### Parameters None ### Request Example N/A ### Response * **vehicleId** (int) - The internal vehicle ID. ``` -------------------------------- ### Quaternion hashCode Method Example Source: https://stephengold.github.io/Libbulletjme/javadoc/master/com/jme3/math/Quaternion.html Returns a hash code. If two quaternions have identical values, they will have the same hash code. The current instance is unaffected. ```java public int hashCode() Returns a hash code. If two quaternions have identical values, they will have the same hash code. The current instance is unaffected. Overrides: `hashCode` in class `Object` Returns: a 32-bit value for use in hashing ``` -------------------------------- ### MyString.axisName Source: https://stephengold.github.io/Libbulletjme/javadoc/master/index-all.html Get the string name of a coordinate axis. ```APIDOC ## axisName(int) ### Description Describe a coordinate axis. ### Method Static method ### Parameters #### Path Parameters - **axisIndex** (int) - Required - The index of the axis (e.g., 0 for X, 1 for Y, 2 for Z). ### Parameters #### Query Parameters - None ### Request Body - None ### Request Example ```java String name = MyString.axisName(0); // Returns "X" ``` ### Response #### Success Response (200) - **return** (String) - The name of the axis. #### Response Example ```json { "example": "X" } ``` ``` -------------------------------- ### Instance Methods Source: https://stephengold.github.io/Libbulletjme/javadoc/master/com/jme3/bullet/PhysicsSoftSpace.html Methods for interacting with and managing the PhysicsSoftSpace. ```APIDOC ## Instance Methods ### `void addCollisionObject(PhysicsCollisionObject pco)` Add the specified collision object to this space. ### `boolean contains(PhysicsCollisionObject pco)` Test whether the specified collision object is added to this space. ### `int countJoints()` Count the joints in this space, including anchors and soft-body joints. ### `int countSoftBodies()` Count the soft bodies in this space. ### `void destroy()` Remove all collision objects and physics joints. ### `Collection getPcoList()` Enumerate collision objects that have been added to this space and not yet removed. ### `Collection getSoftBodyList()` Enumerate soft bodies that have been added to this space and not yet removed. ### `SoftBodyWorldInfo getWorldInfo()` Access the parameters applied when soft bodies are added to this space. ### `boolean isEmpty()` Test whether this space is empty. ### `void removeCollisionObject(PhysicsCollisionObject pco)` Remove the specified collision object from this space. ### `void setGravity(Vector3f gravity)` Alter the gravitational acceleration acting on newly-added bodies. ``` -------------------------------- ### ConicalFrustum.aRadius Source: https://stephengold.github.io/Libbulletjme/javadoc/master/index-all.html Get the radius of the 'A' base of the conical frustum. ```APIDOC ## aRadius() ### Description Return the radius of the "A" base. ### Method Method ### Parameters #### Path Parameters - None ### Parameters #### Query Parameters - None ### Request Body - None ### Request Example ```java float radiusA = conicalFrustum.aRadius(); ``` ### Response #### Success Response (200) - **return** (float) - The radius of the 'A' base. #### Response Example ```json { "example": 1.5 } ``` ``` -------------------------------- ### Get MultiBody Source: https://stephengold.github.io/Libbulletjme/javadoc/master/com/jme3/bullet/objects/MultiBodyCollider.html Retrieves the MultiBody that this collider is part of. ```APIDOC ## getMultiBody() ### Description Access the MultiBody that contains this collider. ### Returns * **MultiBody** - The parent MultiBody object. ``` -------------------------------- ### Gravity Source: https://stephengold.github.io/Libbulletjme/javadoc/master/com/jme3/bullet/SoftBodyWorldInfo.html Methods for getting and setting the gravitational acceleration. ```APIDOC ## Gravity ### copyGravity (Vector3f storeResult) Copy the gravitational acceleration. Parameters: `storeResult` - storage for the result (modified if not null) Returns: an acceleration vector in physics-space coordinates (either storeResult or a new vector, not null) ### setGravity (Vector3f acceleration) Alter the gravitational acceleration. Parameters: `acceleration` - the desired acceleration vector (in physics-space coordinates, not null, unaffected, default=(0,-10,0)) ``` -------------------------------- ### Quaternion Instance Methods Source: https://stephengold.github.io/Libbulletjme/javadoc/master/com/jme3/math/Quaternion.html Documentation for instance methods that operate on Quaternion objects. ```APIDOC ## Quaternion Instance Methods ### Description Documentation for instance methods that operate on Quaternion objects. ### Methods - **Quaternion addLocal(Quaternion q)**: Adds the argument and returns the (modified) current instance. - **Quaternion clone()**: Creates a copy. - **boolean equals(Object o)**: Tests for exact equality with the argument, distinguishing -0 from 0. - **Quaternion fromAngleNormalAxis(float angle, Vector3f axis)**: Sets the quaternion from the specified rotation angle and normalized axis of rotation. - **Quaternion fromAngles(float xAngle, float yAngle, float zAngle)**: Sets the quaternion from the specified Tait-Bryan angles, applying the rotations in x-z-y extrinsic order or y-z'-x" intrinsic order. - **Quaternion fromAxes(Vector3f xAxis, Vector3f yAxis, Vector3f zAxis)**: Sets the quaternion from the specified orthonormal basis. - **Quaternion fromRotationMatrix(float m00, float m01, float m02, float m10, float m11, float m12, float m20, float m21, float m22)**: Sets the quaternion from a rotation matrix with the specified elements. - **Quaternion fromRotationMatrix(Matrix3f matrix)**: Sets the quaternion from the specified rotation matrix. - **float getW()**: Returns the W (real) component. - **float getX()**: Returns the X component. - **float getY()**: Returns the Y component. - **float getZ()**: Returns the Z component. - **int hashCode()**: Returns a hash code. - **Quaternion inverse()**: Returns the multiplicative inverse. - **void loadIdentity()**: Sets all components to zero except `w`, which is set to 1. - **Quaternion mult(Quaternion q)**: Multiplies by the argument and returns the product as a new instance. - **Quaternion mult(Quaternion q, Quaternion storeResult)**: Multiplies by the specified quaternion and returns the product in a 3rd quaternion. - **Quaternion multLocal(float scalar)**: Multiplies by the scalar argument and returns the (modified) current instance. - **Quaternion multLocal(float qx, float qy, float qz, float qw)**: Multiplies by a quaternion with the specified components and returns the (modified) current instance. - **Quaternion multLocal(Quaternion q)**: Multiplies by the argument and returns the (modified) current instance. - **float norm()**: Returns the norm, defined as the dot product of the quaternion with itself. - **Quaternion normalizeLocal()**: Scales the quaternion to have norm=1 and returns the (modified) current instance. - **void set(float x, float y, float z, float w)**: Sets all 4 components to specified values. - **void set(Quaternion q)**: Copies all 4 components from the argument. - **Matrix3f toRotationMatrix()**: Converts to an equivalent rotation matrix. - **Matrix3f toRotationMatrix(Matrix3f result)**: Converts to an equivalent rotation matrix. - **Matrix4f toRotationMatrix(Matrix4f result)**: Sets the rotation component of the specified transform matrix. - **String toString()**: Returns a string representation of the quaternion, which is unaffected. - **Matrix4f toTransformMatrix(Matrix4f store)**: Sets the rotation component of the specified transform matrix. ``` -------------------------------- ### get Source: https://stephengold.github.io/Libbulletjme/javadoc/master/jme3utilities/math/MyBuffer.html Reads a Vector3f from a specified position within a FloatBuffer. ```APIDOC ## get ### Description Read a Vector3f starting from the specified position. ### Method `public static void get(FloatBuffer buffer, int startPosition, Vector3f storeVector)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters * `buffer` (FloatBuffer) - the buffer to read from (not null, unaffected) * `startPosition` (int) - the starting position in the buffer (≥0, ≤capacity-3) * `storeVector` (Vector3f) - the Vector3f to store the read values into (modified) ``` -------------------------------- ### Initialize Native Binary Loader on Desktop Source: https://stephengold.github.io/Libbulletjme/lbj-en/English/add.html Use JSnapLoader to initialize the native binary loader and load the Libbulletjme library on desktop projects. Ensure all necessary platform libraries are registered. ```java import electrostatic4j.snaploader.LibraryInfo; import electrostatic4j.snaploader.LoadingCriterion; import electrostatic4j.snaploader.NativeBinaryLoader; import electrostatic4j.snaploader.filesystem.DirectoryPath; import electrostatic4j.snaploader.platform.NativeDynamicLibrary; import electrostatic4j.snaploader.platform.util.PlatformPredicate; // ... LibraryInfo info = new LibraryInfo(null, "bulletjme", DirectoryPath.USER_DIR); NativeBinaryLoader loader = new NativeBinaryLoader(info); NativeDynamicLibrary[] libraries = { new NativeDynamicLibrary("native/linux/arm64", PlatformPredicate.LINUX_ARM_64), new NativeDynamicLibrary("native/linux/arm32", PlatformPredicate.LINUX_ARM_32), new NativeDynamicLibrary("native/linux/x86_64", PlatformPredicate.LINUX_X86_64), new NativeDynamicLibrary("native/osx/arm64", PlatformPredicate.MACOS_ARM_64), new NativeDynamicLibrary("native/osx/x86_64", PlatformPredicate.MACOS_X86_64), new NativeDynamicLibrary("native/windows/arm64", PlatformPredicate.WIN_ARM_64), new NativeDynamicLibrary("native/windows/x86_64", PlatformPredicate.WIN_X86_64) }; loader.registerNativeLibraries(libraries).initPlatformLibrary(); loader.loadLibrary(LoadingCriterion.CLEAN_EXTRACTION); ``` -------------------------------- ### Index Source: https://stephengold.github.io/Libbulletjme/javadoc/master/com/jme3/bullet/objects/VehicleWheel.html Gets the index of the wheel based on its creation order. ```APIDOC ## getIndex() ### Description Determine the index of this wheel, based on creation order. ### Returns The zero-origin index (≥0). ``` -------------------------------- ### Engine Force Source: https://stephengold.github.io/Libbulletjme/javadoc/master/com/jme3/bullet/objects/VehicleWheel.html Gets the engine force applied to the wheel. ```APIDOC ## getEngineForce() ### Description Determine this wheel's engine force (native field: m_engineForce). ### Returns The amount of force applied (TODO positive direction?). ``` -------------------------------- ### getSuspensionStiffness (PhysicsVehicle) Source: https://stephengold.github.io/Libbulletjme/javadoc/master/index-all.html Determine the initial suspension stiffness for new wheels. ```APIDOC ## getSuspensionStiffness (PhysicsVehicle) ### Description Determine the initial suspension stiffness for new wheels. ### Method GET ### Endpoint /objects/PhysicsVehicle/getSuspensionStiffness ``` -------------------------------- ### Brake Force Source: https://stephengold.github.io/Libbulletjme/javadoc/master/com/jme3/bullet/objects/VehicleWheel.html Gets the braking impulse applied to the wheel. ```APIDOC ## getBrake() ### Description Determine this wheel's braking impulse (native field: m_brake). ### Returns The amount of impulse. ``` -------------------------------- ### Quaternion Constructors Source: https://stephengold.github.io/Libbulletjme/javadoc/master/com/jme3/math/Quaternion.html Provides documentation for the various constructors used to create Quaternion instances. ```APIDOC ## Quaternion Constructors ### Description Provides documentation for the various constructors used to create Quaternion instances. ### Constructors - **Quaternion()**: Instantiates an identity quaternion: all components zeroed except `w`, which is set to 1. - **Quaternion(float x, float y, float z, float w)**: Instantiates a quaternion with the specified components. - **Quaternion(Quaternion q)**: Instantiates a copy of the argument. ``` -------------------------------- ### Point2PointJoint Methods Source: https://stephengold.github.io/Libbulletjme/javadoc/master/com/jme3/bullet/joints/Point2PointJoint.html Methods for getting and setting properties of a Point2PointJoint. ```APIDOC ## Point2PointJoint Methods ### `float getDamping()` Return the joint's damping ratio. ### `void setDamping(float value)` Alter the joint's damping. ### `float getImpulseClamp()` Return the joint's impulse clamp. ### `void setImpulseClamp(float value)` Alter the joint's impulse clamp. ### `Vector3f getPivotInA(Vector3f storeResult)` Locate the pivot in A's scaled local coordinates. ### `void setPivotInA(Vector3f location)` Alter the pivot location in A's scaled local coordinates. ### `Vector3f getPivotInB(Vector3f storeResult)` Locate the pivot in B's scaled local coordinates. ### `void setPivotInB(Vector3f location)` Alter the pivot location in B's scaled local coordinates. ### `float getTau()` Return the joint's tau value. ### `void setTau(float value)` Alter the joint's tau value. ``` -------------------------------- ### Clone LbjExamples Repository using Git Source: https://stephengold.github.io/Libbulletjme/lbj-en/English/build.html Download the LbjExamples source code from GitHub using Git. This includes cloning the repository and changing the directory. ```bash git clone https://github.com/stephengold/LbjExamples.git ``` ```bash cd LbjExamples ``` -------------------------------- ### Water Offset Source: https://stephengold.github.io/Libbulletjme/javadoc/master/com/jme3/bullet/SoftBodyWorldInfo.html Methods for getting and setting the water offset. ```APIDOC ## Water Offset ### waterOffset () Return the water offset. Returns: the offset distance (in physics-space units) ### setWaterOffset (float offset) Alter the water offset. Parameters: `offset` - the desired offset distance (in physics-space units, default=0) ``` -------------------------------- ### Water Density Source: https://stephengold.github.io/Libbulletjme/javadoc/master/com/jme3/bullet/SoftBodyWorldInfo.html Methods for getting and setting the water density. ```APIDOC ## Water Density ### waterDensity () Return the water density. Returns: the density ### setWaterDensity (float density) Alter the water density. Parameters: `density` - the desired density (default=0) ``` -------------------------------- ### Instance Methods Source: https://stephengold.github.io/Libbulletjme/javadoc/master/jme3utilities/lbj/IndexBuffer.html Methods for interacting with an IndexBuffer instance. ```APIDOC ## Instance Methods ### `Buffer copyBuffer()` Copy all the indices to a new direct buffer. ### `protected int get()` Read an index from the current read/write position, then increment the position. ### `int get(int position)` Read an index from the specified buffer position. ### `protected Buffer getBuffer()` Access the buffer data. ### `boolean isDirect()` Test whether the buffer is direct. ### `IndexBuffer limit(int newLimit)` Alter the limit. ### `protected IndexBuffer makeImmutable()` Make the buffer immutable. ### `protected IndexBuffer put(int index)` Write the specified index at the current read/write position, then increment the position. ### `IndexBuffer put(int position, int index)` Write the specified index at the specified buffer position. ### `int size()` Return the buffer's limit. ### `protected void verifyMutable()` Verify that the buffer is still mutable. ``` -------------------------------- ### Methods Source: https://stephengold.github.io/Libbulletjme/javadoc/master/com/jme3/bullet/joints/New6Dof.html Methods for interacting with and configuring the New6Dof constraint. ```APIDOC ## Methods ### `Matrix3f calculatedBasisA(Matrix3f storeResult)` Calculate the pivot orientation of the A end. ### `Matrix3f calculatedBasisB(Matrix3f storeResult)` Calculate the pivot orientation of the B end. ### `Vector3f calculatedOriginA(Vector3f storeResult)` Calculate the pivot location of the A end (native field: m_calculatedTransformA.m_origin). ### `Vector3f calculatedOriginB(Vector3f storeResult)` Calculate the pivot location of the B end (native field: m_calculatedTransformB.m_origin). ### `boolean checkRotationOrder()` Compare Bullet's rotation order to the JVM copy. ### `void enableSpring(int dofIndex, boolean onOff)` Enable or disable the spring for the indexed degree of freedom. ### `float get(MotorParam parameter, int dofIndex)` Return the specified parameter of the indexed degree of freedom. ### `Vector3f getAngles(Vector3f storeResult)` Calculate the constraint's rotation angles (native field: m_calculatedAxisAngleDiff). ### `Vector3f getAxis(int axisIndex, Vector3f storeResult)` Calculate the indexed axis of the Constraint (native field: m_calculatedAxis). ### `Transform getFrameTransform(JointEnd end, Transform storeResult)` Copy the constraint's frame transform relative to the specified end (native fields: m_frameInA, m_frameInB). ### `Vector3f getPivotOffset(Vector3f storeResult)` Copy the constraint's pivot offset (native field: m_calculatedLinearDiff). ### `Matrix3f getRotationMatrix(JointEnd end, Matrix3f storeResult)` Copy the orientation of the constraint in the specified end's coordinate system. ### `RotationMotor getRotationMotor(int axisIndex)` Access the indexed RotationMotor of this constraint, the motor which influences rotation around the indexed axis. ### `RotationOrder getRotationOrder()` Return the order in which axis rotations are applied (native field: m_rotateOrder). ### `TranslationMotor getTranslationMotor()` Access the TranslationMotor of this Constraint, the motor which influences translation on all 3 axes. ### `boolean isMotorEnabled(int dofIndex)` Test whether the motor is enabled for the indexed degree of freedom. ### `boolean isServoEnabled(int dofIndex)` Test whether the servo is enabled for the indexed degree of freedom. ### `boolean isSpringEnabled(int dofIndex)` Test whether the spring is enabled for the indexed degree of freedom. ### `void set(MotorParam parameter, int dofIndex, float value)` Alter the specified parameter for the indexed degree of freedom. ### `void setDamping(int dofIndex, float damping, boolean limitIfNeeded)` Alter the damping for the indexed degree of freedom. ### `void setEquilibriumPoint()` Alter the equilibrium points for all degrees of freedom, based on the constraint's current location/orientation. ### `void setEquilibriumPoint(int dofIndex)` Alter the equilibrium point of the indexed degree of freedom, based on the constraint's current location/orientation. ### `void setEquilibriumPoint(int dofIndex, float value)` Alter the equilibrium point of the indexed degree of freedom. ### `void setPivotInA(Vector3f location)` Alter the pivot location in A's scaled local coordinates. ### `void setPivotInB(Vector3f location)` Alter the pivot location in B's scaled local coordinates. ### `void setRotationOrder(RotationOrder rotationOrder)` Alter the order in which to apply axis rotations. ### `void setStiffness(int dofIndex, float stiffness, boolean limitIfNeeded)` Alter the spring stiffness for the indexed degree of freedom. ``` -------------------------------- ### Air Density Source: https://stephengold.github.io/Libbulletjme/javadoc/master/com/jme3/bullet/SoftBodyWorldInfo.html Methods for getting and setting the air density. ```APIDOC ## Air Density ### airDensity () Return the air density. Returns: the density ### setAirDensity (float density) Alter the air density. Parameters: `density` - the desired density (default=1.2) ``` -------------------------------- ### MultiSphere Constructors Source: https://stephengold.github.io/Libbulletjme/javadoc/master/com/jme3/bullet/collision/shapes/MultiSphere.html Provides documentation for various ways to instantiate a MultiSphere object, allowing for different configurations of spheres. ```APIDOC ## MultiSphere Constructors ### `MultiSphere(float radius)` Instantiate a centered sphere shape with the specified radius. Parameters: - `radius` (float) - the desired radius (in shape units, ≥0) ### `MultiSphere(float radius, float height)` Instantiate a centered Y-axis capsule shape with the specified radius and height. Parameters: - `radius` (float) - the desired radius (in shape units, ≥0) - `height` (float) - the desired height of the cylindrical portion (in shape units, ≥0) ### `MultiSphere(float radius, float height, int axisIndex)` Instantiate a centered capsule shape with the specified radius, height, and axis. Parameters: - `radius` (float) - the desired radius (in shape units, ≥0) - `height` (float) - the desired height of the cylindrical portion (in shape units, ≥0) - `axisIndex` (int) - which local axis to use for the height: 0→X, 1→Y, 2→Z ### `MultiSphere(List centers, List radii)` Instantiate a multi-sphere shape with the specified centers and radii. Parameters: - `centers` (List) - the list of center locations (in shape coordinates, not null, not empty) - `radii` (List) - the list of radii (in shape units, not null, not empty, each ≥0) ### `MultiSphere(RectangularSolid rectangularSolid)` Instantiate a 4-sphere shape to fill the specified RectangularSolid. The spheres will be of equal size, arranged in a rectangle. Parameters: - `rectangularSolid` (RectangularSolid) - the solid on which to base the shape (not null) ### `MultiSphere(Vector3f center, float radius)` Instantiate an eccentric sphere shape with the specified center and radius. Parameters: - `center` (Vector3f) - the location of the sphere's center (in shape coordinates, not null, unaffected) - `radius` (float) - the desired radius (in shape units, ≥0) ### `MultiSphere(Vector3f[] centers, float... radii)` Instantiate a multi-sphere shape with the specified centers and radii. Parameters: - `centers` (Vector3f[]) - the array of center locations (in shape coordinates, not null, not empty) - `radii` (float...) - the array of radii (in shape units, not null, not empty, each ≥0) ``` -------------------------------- ### Roll Influence Source: https://stephengold.github.io/Libbulletjme/javadoc/master/com/jme3/bullet/objects/VehicleWheel.html Gets the influence of the wheel on the vehicle's roll. ```APIDOC ## getRollInfluence() ### Description Determine this wheel's roll influence (native field: m_rollInfluence). ### Returns The roll influence value. ``` -------------------------------- ### VehicleTuning Constructor Source: https://stephengold.github.io/Libbulletjme/javadoc/master/com/jme3/bullet/objects/infos/VehicleTuning.html Instantiates a VehicleTuning object with default parameter values. ```APIDOC ## VehicleTuning() ### Description Instantiate an instance with the default parameter values. ### Constructor `VehicleTuning()` ``` -------------------------------- ### Rest Length Source: https://stephengold.github.io/Libbulletjme/javadoc/master/com/jme3/bullet/objects/VehicleWheel.html Gets the rest length of the wheel's suspension. ```APIDOC ## getRestLength() ### Description Determine the rest length of this wheel (native field: m_suspensionRestLength1). ### Returns The length. ``` -------------------------------- ### Constructors Source: https://stephengold.github.io/Libbulletjme/javadoc/master/com/jme3/bullet/PhysicsSoftSpace.html These constructors allow you to instantiate a PhysicsSoftSpace with different configurations for the physics world. ```APIDOC ## Constructors ### `PhysicsSoftSpace(PhysicsSpace.BroadphaseType broadphaseType)` Instantiate a PhysicsSoftSpace with a sequential-impulse solver. ### `PhysicsSoftSpace(Vector3f worldMin, Vector3f worldMax, PhysicsSpace.BroadphaseType broadphaseType)` Instantiate a PhysicsSoftSpace with a sequential-impulse solver. ### `PhysicsSoftSpace(Vector3f worldMin, Vector3f worldMax, PhysicsSpace.BroadphaseType broadphaseType, CollisionConfiguration configuration)` Instantiate a PhysicsSoftSpace with a sequential-impulse solver. ``` -------------------------------- ### Suspension Stiffness Configuration Source: https://stephengold.github.io/Libbulletjme/javadoc/master/com/jme3/bullet/objects/infos/VehicleTuning.html Methods for getting and setting the stiffness of the suspension. ```APIDOC ## getSuspensionStiffness() ### Description Return the suspension stiffness (native field: m_suspensionStiffness). ### Returns the stiffness constant ### Method `public float getSuspensionStiffness()` ## setSuspensionStiffness(float stiffness) ### Description Alter the stiffness of the suspension (native field: m_suspensionStiffness). ### Parameters * `stiffness` (float) - the desired stiffness constant (10→off-road buggy, 50→sports car, 200→Formula-1 race car, default=5.88) ### Method `public void setSuspensionStiffness(float stiffness)` ``` -------------------------------- ### Maximum Displacement Source: https://stephengold.github.io/Libbulletjme/javadoc/master/com/jme3/bullet/SoftBodyWorldInfo.html Methods for getting and setting the maximum displacement of a node. ```APIDOC ## Maximum Displacement ### maxDisplacement () Return the maximum distance a node can travel in a simulation step. Returns: the distance (in physics-space units) ### setMaxDisplacement (float maxDisplacement) Alter the maximum distance a node can travel per simulation step. Parameters: `maxDisplacement` - the desired value (>0, default=1000) ``` -------------------------------- ### getTuning() Source: https://stephengold.github.io/Libbulletjme/javadoc/master/index-all.html Accesses the tuning parameters applied when a wheel is created for the PhysicsVehicle. ```APIDOC ## getTuning() ### Description Accesses the tuning parameters applied when a wheel is created for the PhysicsVehicle. ### Method N/A (Java Method) ### Endpoint N/A ### Parameters None ### Request Example N/A ### Response * **tuningParameters** (Tuning) - The tuning parameters. ``` -------------------------------- ### SolverInfo Configuration Source: https://stephengold.github.io/Libbulletjme/javadoc/master/com/jme3/bullet/SolverInfo.html This section details the methods available for configuring the physics solver's behavior through the SolverInfo object. ```APIDOC ## SolverInfo Methods ### `contactErp()` **Description**: Returns the error-reduction parameter for contact constraints. **Returns**: The parameter value. ### `copyAll(SolverInfo source)` **Description**: Copies all parameter values from another SolverInfo object. **Parameters**: - `source` (SolverInfo) - The source SolverInfo object to copy from (not null, unaffected). ### `globalCfm()` **Description**: Determines the global constraint-force mixing parameter. **Returns**: The parameter value (≥0). ### `isSplitImpulseEnabled()` **Description**: Tests whether split impulse is enabled globally. **Returns**: `true` if split impulse is enabled, `false` otherwise. ### `jointErp()` **Description**: Returns the error-reduction parameter for non-contact constraints. **Returns**: The parameter value. ### `minBatch()` **Description**: Determines the minimum batch size for constraints. **Returns**: The number of constraints in a batch (≥1). ### `mode()` **Description**: Determines the mode flags for the solver. **Returns**: The bitmask value. **See Also**: `SolverMode` ### `numIterations()` **Description**: Determines the number of solver iterations. **Returns**: The iteration count (>0). ### `setContactErp(float erp)` **Description**: Alters the error-reduction parameter for contact constraints. **Parameters**: - `erp` (float) - The desired parameter value (default=0.2). ### `setGlobalCfm(float cfm)` **Description**: Alters the global constraint-force mixing parameter. **Parameters**: - `cfm` (float) - The desired parameter value (≥0, default=0). ### `setJointErp(float erp)` **Description**: Alters the error-reduction parameter for non-contact constraints. **Parameters**: - `erp` (float) - The desired parameter value (default=0.2). ### `setMinBatch(int numConstraints)` **Description**: Alters the minimum batch size for constraints. **Parameters**: - `numConstraints` (int) - The desired number of constraints per batch (≥1, default=128). ### `setMode(int flags)` **Description**: Alters the mode flags for the solver. **Parameters**: - `flags` (int) - The desired bitmask (default=0x114 for a MultiBodySpace, otherwise 0x104). **See Also**: `SolverMode` ### `setNumIterations(int numIterations)` **Description**: Alters the number of solver iterations. **Parameters**: - `numIterations` (int) - The desired number of iterations (≥1, default=10). Use 4 for low quality, 20 for high quality. ### `setSplitImpulseEnabled(boolean setting)` **Description**: Alters whether split impulse is enabled globally. **Parameters**: - `setting` (boolean) - The desired setting (default=true). ### `setSplitImpulseErp(float erp)` **Description**: Alters the error-reduction parameter (ERP) used with split impulse. **Parameters**: - `erp` (float) - The parameter (default=0.1). ### `setSplitImpulseThreshold(float penetration)` **Description**: Alters the degree of penetration at which split impulse will be used. This setting has no effect while split impulse is enabled globally. **Parameters**: - `penetration` (float) - The penetration threshold (in physics-space units, default=-0.04). ### `splitImpulseErp()` **Description**: Determines the error-reduction parameter (ERP) used with split impulse. **Returns**: The parameter value. ### `splitImpulseThreshold()` **Description**: Determines the minimum degree of penetration at which split impulse would be used, assuming it's not enabled globally. **Returns**: The parameter value. ``` -------------------------------- ### get Source: https://stephengold.github.io/Libbulletjme/javadoc/master/com/jme3/bullet/objects/PhysicsSoftBody.html Reads a specified parameter of an indexed cluster within the soft body. ```APIDOC ## get ### Description Read the specified parameter of the indexed cluster. ### Method public float get(Cluster parameter, int clusterIndex) ### Parameters #### Path Parameters - **parameter** (Cluster) - Required - which parameter to read (not null) - **clusterIndex** (int) - Required - which cluster (≥0,