Resolving issue in ticket #661. Creating skelton debugger that allows bones to be extended in any direction instead of only the Y direction. (#681)
This commit is contained in:
parent
4251d70b75
commit
989c7926df
@ -84,7 +84,7 @@ public class SkeletonInterBoneWire extends Mesh {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The method updates the geometry according to the poitions of the bones.
|
* The method updates the geometry according to the positions of the bones.
|
||||||
*/
|
*/
|
||||||
public void updateGeometry() {
|
public void updateGeometry() {
|
||||||
VertexBuffer vb = this.getBuffer(Type.Position);
|
VertexBuffer vb = this.getBuffer(Type.Position);
|
||||||
@ -92,7 +92,7 @@ public class SkeletonInterBoneWire extends Mesh {
|
|||||||
posBuf.clear();
|
posBuf.clear();
|
||||||
for (int i = 0; i < skeleton.getBoneCount(); ++i) {
|
for (int i = 0; i < skeleton.getBoneCount(); ++i) {
|
||||||
Bone bone = skeleton.getBone(i);
|
Bone bone = skeleton.getBone(i);
|
||||||
Vector3f parentTail = bone.getModelSpacePosition().add(bone.getModelSpaceRotation().mult(Vector3f.UNIT_Y.mult(boneLengths.get(i))));
|
Vector3f parentTail = bone.getModelSpacePosition().add(bone.getModelSpaceRotation().mult(Vector3f.UNIT_XYZ.mult(boneLengths.get(i))));
|
||||||
|
|
||||||
for (Bone child : bone.getChildren()) {
|
for (Bone child : bone.getChildren()) {
|
||||||
Vector3f childHead = child.getModelSpacePosition();
|
Vector3f childHead = child.getModelSpacePosition();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user