[C++] The IN55 project
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

bone.cpp 410B

1234567891011121314151617181920
  1. #include <bone.h>
  2. Bone::Bone(aiString id, aiString p, aiMatrix4x4 &o){
  3. name=id;
  4. parentName = p;
  5. offset = o;
  6. nbVertice=0;
  7. verticeIDList=(int*)malloc(nbVertice*sizeof(int));
  8. }
  9. void Bone::addVertice(int vert_id){
  10. int* tmp;
  11. tmp=(int*)realloc(verticeIDList,(nbVertice+1)*sizeof(int));
  12. verticeIDList=tmp;
  13. verticeIDList[nbVertice]=vert_id;
  14. }
  15. int* Bone::getListofVertices(){
  16. return verticeIDList;
  17. }