Skip to content

Commit 509fb6e

Browse files
committed
re-order methods in 3 classes
1 parent b2ace4b commit 509fb6e

File tree

3 files changed

+63
-63
lines changed

3 files changed

+63
-63
lines changed

src/main/java/com/github/stephengold/joltjni/VehicleConstraint.java

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -377,33 +377,6 @@ public void getWheelLocalBasis(
377377
storeRight.set(storeFloats, 6);
378378
}
379379

380-
/**
381-
* Copy the world transform of the specified wheel. The constraint is
382-
* unaffected.
383-
*
384-
* @param wheelIndex the index of the wheel to query (≥0)
385-
* @param right the wheel's axis of rotation (a unit vector in the wheel's
386-
* model space)
387-
* @param up the "up" direction (a unit vector in the wheel's model space)
388-
* @return a new coordinate transform matrix
389-
*/
390-
@Override
391-
public RMat44 getWheelWorldTransform(
392-
int wheelIndex, Vec3Arg right, Vec3Arg up) {
393-
long constraintVa = va();
394-
float rx = right.getX();
395-
float ry = right.getY();
396-
float rz = right.getZ();
397-
float ux = up.getX();
398-
float uy = up.getY();
399-
float uz = up.getZ();
400-
long matrixVa = getWheelWorldTransform(
401-
constraintVa, wheelIndex, rx, ry, rz, ux, uy, uz);
402-
RMat44 result = new RMat44(matrixVa, true);
403-
404-
return result;
405-
}
406-
407380
/**
408381
* Copy the world transform of the specified wheel. The constraint is
409382
* unaffected.
@@ -431,6 +404,33 @@ public void getWheelPositionAndRotation(int wheelIndex, Vec3Arg right,
431404
storeRotation.set(storeFloats);
432405
}
433406

407+
/**
408+
* Copy the world transform of the specified wheel. The constraint is
409+
* unaffected.
410+
*
411+
* @param wheelIndex the index of the wheel to query (≥0)
412+
* @param right the wheel's axis of rotation (a unit vector in the wheel's
413+
* model space)
414+
* @param up the "up" direction (a unit vector in the wheel's model space)
415+
* @return a new coordinate transform matrix
416+
*/
417+
@Override
418+
public RMat44 getWheelWorldTransform(
419+
int wheelIndex, Vec3Arg right, Vec3Arg up) {
420+
long constraintVa = va();
421+
float rx = right.getX();
422+
float ry = right.getY();
423+
float rz = right.getZ();
424+
float ux = up.getX();
425+
float uy = up.getY();
426+
float uz = up.getZ();
427+
long matrixVa = getWheelWorldTransform(
428+
constraintVa, wheelIndex, rx, ry, rz, ux, uy, uz);
429+
RMat44 result = new RMat44(matrixVa, true);
430+
431+
return result;
432+
}
433+
434434
/**
435435
* Copy the "up" direction based on gravity. The constraint is unaffected.
436436
*

src/main/java/com/github/stephengold/joltjni/VehicleConstraintRef.java

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -368,33 +368,6 @@ public void getWheelLocalBasis(
368368
storeRight.set(storeFloats, 6);
369369
}
370370

371-
/**
372-
* Copy the world transform of the specified wheel. The constraint is
373-
* unaffected.
374-
*
375-
* @param wheelIndex the index of the wheel to query (≥0)
376-
* @param right the wheel's axis of rotation (a unit vector in the wheel's
377-
* model space)
378-
* @param up the "up" direction (a unit vector in the wheel's model space)
379-
* @return a new coordinate transform matrix
380-
*/
381-
@Override
382-
public RMat44 getWheelWorldTransform(
383-
int wheelIndex, Vec3Arg right, Vec3Arg up) {
384-
long constraintVa = targetVa();
385-
float rx = right.getX();
386-
float ry = right.getY();
387-
float rz = right.getZ();
388-
float ux = up.getX();
389-
float uy = up.getY();
390-
float uz = up.getZ();
391-
long matrixVa = VehicleConstraint.getWheelWorldTransform(
392-
constraintVa, wheelIndex, rx, ry, rz, ux, uy, uz);
393-
RMat44 result = new RMat44(matrixVa, true);
394-
395-
return result;
396-
}
397-
398371
/**
399372
* Copy the world transform of the specified wheel. The constraint is
400373
* unaffected.
@@ -422,6 +395,33 @@ public void getWheelPositionAndRotation(int wheelIndex, Vec3Arg right,
422395
storeRotation.set(storeFloats);
423396
}
424397

398+
/**
399+
* Copy the world transform of the specified wheel. The constraint is
400+
* unaffected.
401+
*
402+
* @param wheelIndex the index of the wheel to query (≥0)
403+
* @param right the wheel's axis of rotation (a unit vector in the wheel's
404+
* model space)
405+
* @param up the "up" direction (a unit vector in the wheel's model space)
406+
* @return a new coordinate transform matrix
407+
*/
408+
@Override
409+
public RMat44 getWheelWorldTransform(
410+
int wheelIndex, Vec3Arg right, Vec3Arg up) {
411+
long constraintVa = targetVa();
412+
float rx = right.getX();
413+
float ry = right.getY();
414+
float rz = right.getZ();
415+
float ux = up.getX();
416+
float uy = up.getY();
417+
float uz = up.getZ();
418+
long matrixVa = VehicleConstraint.getWheelWorldTransform(
419+
constraintVa, wheelIndex, rx, ry, rz, ux, uy, uz);
420+
RMat44 result = new RMat44(matrixVa, true);
421+
422+
return result;
423+
}
424+
425425
/**
426426
* Copy the "up" direction based on gravity. The constraint is unaffected.
427427
*

src/main/java/com/github/stephengold/joltjni/readonly/ConstVehicleConstraint.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,13 @@ void getWheelLocalBasis(
130130
* @param right the wheel's axis of rotation (a unit vector in the wheel's
131131
* model space)
132132
* @param up the "up" direction (a unit vector in the wheel's model space)
133-
* @return a new coordinate transform matrix
133+
* @param storePosition storage for the translation component (not null,
134+
* modified)
135+
* @param storeRotation storage for the rotation component (not null,
136+
* modified)
134137
*/
135-
RMat44 getWheelWorldTransform(
136-
int wheelIndex, Vec3Arg right, Vec3Arg up);
138+
void getWheelPositionAndRotation(int wheelIndex, Vec3Arg right,
139+
Vec3Arg up, RVec3 storePosition, Quat storeRotation);
137140

138141
/**
139142
* Copy the world transform of the specified wheel. The constraint is
@@ -143,13 +146,10 @@ RMat44 getWheelWorldTransform(
143146
* @param right the wheel's axis of rotation (a unit vector in the wheel's
144147
* model space)
145148
* @param up the "up" direction (a unit vector in the wheel's model space)
146-
* @param storePosition storage for the translation component (not null,
147-
* modified)
148-
* @param storeRotation storage for the rotation component (not null,
149-
* modified)
149+
* @return a new coordinate transform matrix
150150
*/
151-
void getWheelPositionAndRotation(int wheelIndex, Vec3Arg right,
152-
Vec3Arg up, RVec3 storePosition, Quat storeRotation);
151+
RMat44 getWheelWorldTransform(
152+
int wheelIndex, Vec3Arg right, Vec3Arg up);
153153

154154
/**
155155
* Copy the "up" direction based on gravity. The constraint is unaffected.

0 commit comments

Comments
 (0)