@ -155,10 +155,10 @@ public class SkeletonControl extends AbstractControl implements Cloneable {
void resetToBind ( ) {
void resetToBind ( ) {
for ( Mesh mesh : targets ) {
for ( Mesh mesh : targets ) {
if ( isMeshAnimated ( mesh ) ) {
if ( isMeshAnimated ( mesh ) ) {
VertexBuffer bi = mesh . getBuffer ( Type . BoneIndex ) ;
FloatBuffer bwBuff = ( FloatBuffer ) mesh . getBuffer ( Type . BoneWeight ) . getData ( ) ;
ByteBuffer bib = ( ByteBuffer ) bi . getData ( ) ;
ByteBuffer biBuff = ( ByteBuffer ) mesh . getBuffer ( Type . BoneIndex ) . getData ( ) ;
if ( ! bib . hasArray ( ) ) {
if ( ! biBuff . hasArray ( ) | | ! bwBuff . hasArray ( ) ) {
mesh . prepareForAnim ( true ) ; // prepare for software animation
mesh . prepareForAnim ( true ) ; // prepare for software animation
}
}
VertexBuffer bindPos = mesh . getBuffer ( Type . BindPosePosition ) ;
VertexBuffer bindPos = mesh . getBuffer ( Type . BindPosePosition ) ;
@ -420,7 +420,7 @@ public class SkeletonControl extends AbstractControl implements Cloneable {
FloatBuffer ftb = ( FloatBuffer ) tb . getData ( ) ;
FloatBuffer ftb = ( FloatBuffer ) tb . getData ( ) ;
ftb . rewind ( ) ;
ftb . rewind ( ) ;
// get boneIndexes and weights for mesh
// get boneIndexes and weights for mesh
ByteBuffer ib = ( ByteBuffer ) mesh . getBuffer ( Type . BoneIndex ) . getData ( ) ;
ByteBuffer ib = ( ByteBuffer ) mesh . getBuffer ( Type . BoneIndex ) . getData ( ) ;
FloatBuffer wb = ( FloatBuffer ) mesh . getBuffer ( Type . BoneWeight ) . getData ( ) ;
FloatBuffer wb = ( FloatBuffer ) mesh . getBuffer ( Type . BoneWeight ) . getData ( ) ;
@ -440,7 +440,7 @@ public class SkeletonControl extends AbstractControl implements Cloneable {
float [ ] tanBuf = vars . skinTangents ;
float [ ] tanBuf = vars . skinTangents ;
int iterations = ( int ) FastMath . ceil ( fvb . capacity ( ) / ( ( float ) posBuf . length ) ) ;
int iterations = ( int ) FastMath . ceil ( fvb . capacity ( ) / ( ( float ) posBuf . length ) ) ;
int bufLength = 0 ;
int bufLength = 0 ;
int tanLength = 0 ;
int tanLength = 0 ;
for ( int i = iterations - 1 ; i > = 0 ; i - - ) {
for ( int i = iterations - 1 ; i > = 0 ; i - - ) {
// read next set of positions and normals from native buffer
// read next set of positions and normals from native buffer