Skip to content

Commit ff2a4b7

Browse files
Improve docs
1 parent 0d07d47 commit ff2a4b7

File tree

9 files changed

+47
-40
lines changed

9 files changed

+47
-40
lines changed

jbox2d-library/src/main/java/de/pirckheimer_gymnasium/jbox2d/dynamics/joints/DistanceJoint.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@
4949
* These points imply the length of the distance constraint.
5050
* </p>
5151
*
52-
* <p><img src="https://github.com/engine-pi/jbox2d/blob/main/misc/images/joints/distance_joint.svg" alt="distance joint"></p>
52+
* <p>
53+
* <img src=
54+
* "https://github.com/engine-pi/jbox2d/blob/main/misc/images/joints/distance_joint.svg"
55+
* alt="distance joint">
56+
* </p>
5357
*
5458
* <p>
5559
* Here is an example of a distance joint definition. In this case we decide to

jbox2d-library/src/main/java/de/pirckheimer_gymnasium/jbox2d/dynamics/joints/GearJoint.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,11 @@
5757
* a prismatic joint, then the ratio will have units of length or units of
5858
* 1/length.
5959
*
60-
* <p><img src="https://github.com/engine-pi/jbox2d/blob/main/misc/images/joints/gear_joint.gif" alt="gear joint"></p>
60+
* <p>
61+
* <img src=
62+
* "https://github.com/engine-pi/jbox2d/blob/main/misc/images/joints/gear_joint.gif"
63+
* alt="gear joint">
64+
* </p>
6165
*
6266
* @warning The revolute and prismatic joints must be attached to fixed bodies
6367
* (which must be body1 on those joints).

jbox2d-library/src/main/java/de/pirckheimer_gymnasium/jbox2d/dynamics/joints/Joint.java

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,26 @@
3333
* The base joint class. Joints are used to constrain two bodies together in
3434
* various fashions. Some joints also feature limits and motors.
3535
*
36-
* <p>Joints are used to constrain bodies to the world or to each other. Typical
36+
* <p>
37+
* Joints are used to constrain bodies to the world or to each other. Typical
3738
* examples in games include ragdolls, teeters, and pulleys. Joints can be
38-
* combined in many different ways to create interesting motions.</p>
39+
* combined in many different ways to create interesting motions.
40+
* </p>
3941
*
40-
* <p>Some joints provide limits so you can control the range of motion. Some joint
42+
* <p>
43+
* Some joints provide limits so you can control the range of motion. Some joint
4144
* provide motors which can be used to drive the joint at a prescribed speed
42-
* until a prescribed force/torque is exceeded.</p>
45+
* until a prescribed force/torque is exceeded.
46+
* </p>
4347
*
44-
* <p>Joint motors can be used in many ways. You can use motors to control position
48+
* <p>
49+
* Joint motors can be used in many ways. You can use motors to control position
4550
* by specifying a joint velocity that is proportional to the difference between
4651
* the actual and desired position. You can also use motors to simulate joint
4752
* friction: set the joint velocity to zero and provide a small, but significant
4853
* maximum motor force/torque. Then the motor will attempt to keep the joint
49-
* from moving until the load becomes too strong.</p>
54+
* from moving until the load becomes too strong.
55+
* </p>
5056
*
5157
* https://box2d.org/documentation/md__d_1__git_hub_box2d_docs_dynamics.html#autotoc_md81
5258
*

jbox2d-library/src/main/java/de/pirckheimer_gymnasium/jbox2d/dynamics/joints/JointDef.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,17 @@
3838
* <p>
3939
* You can specify user data for any joint type and you can provide a flag to
4040
* prevent the attached bodies from colliding with each other. This is actually
41-
* the default behavior and you must set the
42-
* {@link JointDef#collideConnectedcollideConnected} Boolean to allow collision
43-
* between to connected bodies.
41+
* the default behavior and you must set the {@link JointDef#collideConnected}
42+
* Boolean to allow collision between to connected bodies.
4443
* </p>
4544
*
4645
* <p>
4746
* Many joint definitions require that you provide some geometric data. Often a
4847
* joint will be defined by anchor points. These are points fixed in the
4948
* attached bodies. jbox2d requires these points to be specified in local
5049
* coordinates. This way the joint can be specified even when the current body
51-
* transforms violate the joint constraint - a common occurrence when a game
52-
* is saved and reloaded. Additionally, some joint definitions need to know the
50+
* transforms violate the joint constraint - a common occurrence when a game is
51+
* saved and reloaded. Additionally, some joint definitions need to know the
5352
* default relative angle between the bodies. This is necessary to constrain
5453
* rotation correctly.
5554
* </p>

jbox2d-library/src/main/java/de/pirckheimer_gymnasium/jbox2d/dynamics/joints/PrismaticJoint.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,11 @@
102102
* joint limit to restrict the range of motion and a joint motor to drive the
103103
* motion or to model joint friction.
104104
*
105-
* <p><img src="https://github.com/engine-pi/jbox2d/blob/main/misc/images/joints/prismatic_joint.svg" alt="prismatic joint"></p>
105+
* <p>
106+
* <img src=
107+
* "https://github.com/engine-pi/jbox2d/blob/main/misc/images/joints/prismatic_joint.svg"
108+
* alt="prismatic joint">
109+
* </p>
106110
*
107111
* @author Daniel Murphy
108112
*/
@@ -163,7 +167,7 @@ public class PrismaticJoint extends Joint
163167
private final Mat33 K;
164168

165169
/**
166-
* effective mass for motor/limit translational constraint.
170+
* The effective mass for motor/limit translational constraint.
167171
*/
168172
private float motorMass;
169173

jbox2d-library/src/main/java/de/pirckheimer_gymnasium/jbox2d/dynamics/joints/PulleyJoint.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@
3939
* should also cover the anchor points with static shapes to prevent one side
4040
* from going to zero length.
4141
*
42-
* <p><img src="https://github.com/engine-pi/jbox2d/blob/main/misc/images/joints/pulley_joint.gif" alt="pulley joint"></p>
42+
* <p>
43+
* <img src=
44+
* "https://github.com/engine-pi/jbox2d/blob/main/misc/images/joints/pulley_joint.gif"
45+
* alt="pulley joint">
46+
* </p>
4347
*
4448
* @author Daniel Murphy
4549
*/

jbox2d-library/src/main/java/de/pirckheimer_gymnasium/jbox2d/dynamics/joints/RevoluteJoint.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@
5353
* relative rotation about the shared point. A maximum motor torque is provided
5454
* so that infinite forces are not generated.
5555
*
56-
* <p><img src="https://github.com/engine-pi/jbox2d/blob/main/misc/images/joints/revolute_joint.svg" alt="revolute joint"></p>
56+
* <p>
57+
* <img src=
58+
* "https://github.com/engine-pi/jbox2d/blob/main/misc/images/joints/revolute_joint.svg"
59+
* alt="revolute joint">
60+
* </p>
5761
*
5862
* @author Daniel Murphy
5963
*/

jbox2d-library/src/main/java/de/pirckheimer_gymnasium/jbox2d/dynamics/joints/RevoluteJointDef.java

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,28 +21,6 @@
2121
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2222
* POSSIBILITY OF SUCH DAMAGE.
2323
*/
24-
/*
25-
* JBox2D - A Java Port of Erin Catto's Box2D
26-
*
27-
* JBox2D homepage: http://jbox2d.sourceforge.net/
28-
* Box2D homepage: http://www.box2d.org
29-
*
30-
* This software is provided 'as-is', without any express or implied
31-
* warranty. In no event will the authors be held liable for any damages
32-
* arising from the use of this software.
33-
*
34-
* Permission is granted to anyone to use this software for any purpose,
35-
* including commercial applications, and to alter it and redistribute it
36-
* freely, subject to the following restrictions:
37-
*
38-
* 1. The origin of this software must not be misrepresented; you must not
39-
* claim that you wrote the original software. If you use this software
40-
* in a product, an acknowledgment in the product documentation would be
41-
* appreciated but is not required.
42-
* 2. Altered source versions must be plainly marked as such, and must not be
43-
* misrepresented as being the original software.
44-
* 3. This notice may not be removed or altered from any source distribution.
45-
*/
4624
package de.pirckheimer_gymnasium.jbox2d.dynamics.joints;
4725

4826
import de.pirckheimer_gymnasium.jbox2d.common.Vec2;

jbox2d-library/src/main/java/de/pirckheimer_gymnasium/jbox2d/dynamics/joints/WheelJoint.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@
5050
* to restrict the range of motion and a joint motor to drive the rotation or to
5151
* model rotational friction. This joint is designed for vehicle suspensions.
5252
*
53-
* <p><img src="https://github.com/engine-pi/jbox2d/blob/main/misc/images/joints/wheel_joint.svg" alt="wheel joint"></p>
53+
* <p>
54+
* <img src=
55+
* "https://github.com/engine-pi/jbox2d/blob/main/misc/images/joints/wheel_joint.svg"
56+
* alt="wheel joint">
57+
* </p>
5458
*
5559
* @author Daniel Murphy
5660
*/

0 commit comments

Comments
 (0)