Author Topic: loadSerializedObject question  (Read 702 times)

Offline apaladin@naver.com

  • byte
  • *
  • Posts: 1
    • View Profile
loadSerializedObject question
« on: September 20, 2012, 04:01:09 am »
Hi every one

i have a model 3ds file . it has a 0~7 part's.
eg. obj_0.res ~obj_7.res

cause i coded like this.

Object3D model = Loader.loadSerializedObject(res.openRawResource(R.raw.obj_0));
            
for(int i = R.raw.obj_0; i < R.raw.obj_7; i++){
 if(i == R.raw.obj_0)continue;
 Object3D _tmp = Loader.loadSerializedObject(res.openRawResource(i));
 _tmp.strip();
 _tmp.setVisibility(Object3D.OBJ_VISIBLE);
 _tmp.setAdditionalColor(RGBColor.RED);
 model.addChild(_tmp);
}

but dosen't seeing whole object.
just seeing "obj_0" first loaded "model" variable.

Question is 3dObject has Multiple part's. how can load it?
Just anybody little hint  for me ?

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: loadSerializedObject question
« Reply #1 on: September 20, 2012, 09:13:07 am »
If you have more than one part in one file, you have to use loadSerializedObjectArray(InputStream is) method