protected void cloneTo(Object3D clone, boolean copyMaterial) { clone.setName(mName); clone.getGeometry().copyFromGeometry3D(mGeometry); clone.isContainer(mIsContainerOnly); if (copyMaterial) { clone.setMaterial(mMaterial); } clone.mElementsBufferType = GLES20.GL_UNSIGNED_INT; clone.mTransparent = this.mTransparent; clone.mEnableBlending = this.mEnableBlending; clone.mBlendFuncSFactor = this.mBlendFuncSFactor; clone.mBlendFuncDFactor = this.mBlendFuncDFactor; clone.mEnableDepthTest = this.mEnableDepthTest; clone.mEnableDepthMask = this.mEnableDepthMask; }
boolean currentObjHasFaces=false; Object3D currentGroup = mRootObject; mRootObject.setName("default"); Map<String, Object3D> groups = new HashMap<String, Object3D>(); currentObjHasFaces = false; currObjIndexData.targetObj.setName(objName); } else if(type.equals(MATERIAL_LIB)) { if(!parts.hasMoreTokens()) continue;
/** * Collapse single-object groups. (Some obj exporters use g token for objects) * @param object */ private void mergeGroupsAsObjects(Object3D object) { if(object.isContainer() && object.getNumChildren()==1 && object.getChildAt(0).getName().startsWith("Object")) { Object3D child = object.getChildAt(0); object.removeChild(child); child.setName(object.getName()); addChildSetParent(object.getParent(), child); object.getParent().removeChild(object); object = child; } for(int i=0; i<object.getNumChildren(); i++) { mergeGroupsAsObjects(object.getChildAt(i)); } }
mGeometry.setName(mSceneGraphBlock.lookupName);
boolean currentObjHasFaces=false; Object3D currentGroup = mRootObject; mRootObject.setName("default"); Map<String, Object3D> groups = new HashMap<String, Object3D>(); currentObjHasFaces = false; currObjIndexData.targetObj.setName(objName); } else if(type.equals(MATERIAL_LIB)) { if(!parts.hasMoreTokens()) continue;
protected void cloneTo(Object3D clone, boolean copyMaterial) { clone.setName(mName); clone.getGeometry().copyFromGeometry3D(mGeometry); clone.isContainer(mIsContainerOnly); if (copyMaterial) clone.setMaterial(mMaterial); clone.mElementsBufferType = mGeometry.areOnlyShortBuffersSupported() ? GLES20.GL_UNSIGNED_SHORT : GLES20.GL_UNSIGNED_INT; clone.mTransparent = this.mTransparent; clone.mEnableBlending = this.mEnableBlending; clone.mBlendFuncSFactor = this.mBlendFuncSFactor; clone.mBlendFuncDFactor = this.mBlendFuncDFactor; clone.mEnableDepthTest = this.mEnableDepthTest; clone.mEnableDepthMask = this.mEnableDepthMask; }
/** * Collapse single-object groups. (Some obj exporters use g token for objects) * @param object */ private void mergeGroupsAsObjects(Object3D object) { if(object.isContainer() && object.getNumChildren()==1 && object.getChildAt(0).getName().startsWith("Object")) { Object3D child = object.getChildAt(0); object.removeChild(child); child.setName(object.getName()); addChildSetParent(object.getParent(), child); object.getParent().removeChild(object); object = child; } for(int i=0; i<object.getNumChildren(); i++) { mergeGroupsAsObjects(object.getChildAt(i)); } }
mGeometry.setName(mSceneGraphBlock.lookupName);