public GVRMesh findMesh ( GVRSceneObject model ) { class MeshFinder implements GVRSceneObject . ComponentVisitor { private GVRMesh meshFound = null ; public GVRMesh getMesh ( ) { return meshFound ; } public boolean visit ( GVRComponent comp ) { GVRRenderData rdata = ( GVRRenderData ) comp ; meshFound = rdata . getMesh ( ) ; return ( meshFound == null ) ; } } ; MeshFinder findMesh = new MeshFinder ( ) ; model . forAllComponents ( findMesh , GVRRenderData . getComponentType ( ) ) ; return findMesh . getMesh ( ) ; }
Finds the first mesh in the given model .