Back to project page Look.
The source code is released under:
====================== LOOK! LICENSING TERMS ====================== look! is licensed under the BSD 3-Clause (also known as "BSD New" or "BSD Simplified"), as follows: Copyright (c) 2010-2012, Look...
If you think the Android project Look listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
/** *----------------------------------------------------------------------------- * Copyright (c) 2012, Look! Development Team * All rights reserved./* w ww .j av a 2 s . co m*/ * * Distributed under the terms of the BSD Simplified License. * * The full license is in the LICENSE file, distributed with this software. *----------------------------------------------------------------------------- */ package es.ucm.look.ar.ar3D.core.drawables; import java.util.HashMap; import java.util.Map; import es.ucm.look.ar.ar3D.core.drawables.primitives.ObjMesh3D; import es.ucm.look.ar.util.LookARUtil; public class DrawablesDataBase { private Map<Integer, ObjMesh3D> drawables; private static DrawablesDataBase instance; private DrawablesDataBase( ){ drawables = new HashMap<Integer, ObjMesh3D>(); } public static DrawablesDataBase getInstance( ){ if ( instance == null ){ instance = new DrawablesDataBase( ); } return instance; } public void putDrawable( Integer id, ObjMesh3D d ){ drawables.put(id, d); } public ObjMesh3D getDrawable3D( Integer id ){ if ( !drawables.containsKey(id)){ drawables.put(id, new ObjMesh3D( LookARUtil.getApp(), id)); } return drawables.get(id); } }