Read bone data from an acclaim skeleton file stream.

def read_bonedata(self, fid):
        """Read bone data from an acclaim skeleton file stream."""

        bone_count = 0
        lin = self.read_line(fid)
        while lin[0]!=':':
            parts = lin.split()
            if parts[0] == 'begin':
                bone_count += 1
                self.vertices.append(vertex(name = '', id=np.NaN,
                                       meta={'name': [],
                                             'id': [], 
                                             'offset': [], 
                                             'orientation': [], 
                                             'axis': [0., 0., 0.], 
                                             'axis_order': [], 
                                             'C': np.eye(3), 
                                             'Cinv': np.eye(3), 
                                             'channels': [], 
                                             'bodymass': [], 
                                             'confmass': [], 
                                             'order': [], 
                                             'rot_ind': [], 
                                             'pos_ind': [], 
                                             'limits': [],
                                             'xyz': np.array([0., 0., 0.]),
                                             'rot': np.eye(3)}))
                lin = self.read_line(fid)


            elif parts[0]=='id':
                self.vertices[bone_count].id = int(parts[1])
                lin = self.read_line(fid)

                self.vertices[bone_count].children = []

            elif parts[0]=='name':
                self.vertices[bone_count].name = parts[1]
                lin = self.read_line(fid)


            elif parts[0]=='direction':
                direction = np.array([float(parts[1]), float(parts[2]), float(parts[3])])
                lin = self.read_line(fid)


            elif parts[0]=='length':
                lgth =  float(parts[1])
                lin = self.read_line(fid)


            elif parts[0]=='axis':
                self.vertices[bone_count].meta['axis'] = np.array([float(parts[1]),
                                                         float(parts[2]),
                                                         float(parts[3])])
                # order is reversed compared to bvh
                self.vertices[bone_count].meta['axis_order'] =  parts[-1][::-1].lower()
                lin = self.read_line(fid)

            elif parts[0]=='dof':
                order = []
                for i in range(1, len(parts)):
                    if parts[i]== 'rx':
                        chan = 'Xrotation'
                        order.append('x')
                    elif parts[i] =='ry':
                        chan = 'Yrotation'
                        order.append('y')
                    elif parts[i] == 'rz':
                        chan = 'Zrotation'
                        order.append('z')
                    elif parts[i] == 'tx':
                        chan = 'Xposition'
                    elif parts[i] == 'ty':
                        chan = 'Yposition'
                    elif parts[i] == 'tz':
                        chan = 'Zposition'
                    elif parts[i] == 'l':
                        chan = 'length'
                    self.vertices[bone_count].meta['channels'].append(chan)
                    # order is reversed compared to bvh
                self.vertices[bone_count].meta['order'] = order[::-1]
                lin = self.read_line(fid)

            elif parts[0]=='limits':
                self.vertices[bone_count].meta['limits'] = [[float(parts[1][1:]),  float(parts[2][:-1])]]

                lin = self.read_line(fid)

                while lin !='end':
                    parts = lin.split()

                    self.vertices[bone_count].meta['limits'].append([float(parts[0][1:]), float(parts[1][:-1])])
                    lin = self.read_line(fid)
                self.vertices[bone_count].meta['limits'] = np.array(self.vertices[bone_count].meta['limits'])

            elif parts[0]=='end':
                self.vertices[bone_count].meta['offset'] = direction*lgth
                lin = self.read_line(fid)

        return lin