hy.
I’m try to import matrix from a collada skin mesh, this import an inv bind matrix from the file and work fine: (m_skin is a domSkinRef)
domInputLocalRef JointLocalArray = m_skin->getJoints()->getInput_array()[0];
domInputLocalRef JointInvBindMx= m_skin->getJoints()->getInput_array()[1];
xsAnyURI puriGeom = JointInvBindMx->getSource();
puriGeom.resolveElement();
//bind poses
domSource* SourceInvBindMx =(domSource*)(daeElement*) puriGeom.getElement();
m_skinBindPosesMatrix = SourceInvBindMx->getFloat_array();//m_skinBindPosesMatrix is a domFloat_arrayRef
//and i get the matrix:
GetMatrix(m_skinBindPosesMatrix, m_nBoneIdx * 16)//m_nBoneIdx is a offset for the bone //index
but when import:
m_skin->getBind_shape_matrix()->getValue()
i get a domFloat4x4 , how i can get the matrix from this type?
This is my getMatrix that get a domFloat_arrayRef :
float* CColladaSkinMeshImporter::GetMatrix(domFloat_arrayRef pMx, int nOffset)
{
float* pfVect = new float[16];
pfVect[0]=((float)pMx->getValue().get(0 + nOffset));
pfVect[1]=((float)pMx->getValue().get(1 + nOffset));
pfVect[2]=((float)pMx->getValue().get(2 + nOffset));
pfVect[3]=((float)pMx->getValue().get(3 + nOffset));
pfVect[4]=((float)pMx->getValue().get(4 + nOffset));
pfVect[5]=((float)pMx->getValue().get(5 + nOffset));
pfVect[6]=((float)pMx->getValue().get(6 + nOffset));
pfVect[7]=((float)pMx->getValue().get(7 + nOffset));
pfVect[8]=((float)pMx->getValue().get(8 + nOffset));
pfVect[9]=((float)pMx->getValue().get(9 + nOffset));
pfVect[10]=((float)pMx->getValue().get(10 + nOffset));
pfVect[11]=((float)pMx->getValue().get(11 + nOffset));
pfVect[12]=((float)pMx->getValue().get(12 + nOffset));
pfVect[13]=((float)pMx->getValue().get(13 + nOffset));
pfVect[14]=((float)pMx->getValue().get(14 + nOffset));
pfVect[15]=((float)pMx->getValue().get(15 + nOffset));
return pfVect;
}
I would use only a getmatrix function , but how i convert domFloat4x4 type to a domFloat_arrayRef?
thanks.