Android Open Source - kgl2 Group






From Project

Back to project page kgl2.

License

The source code is released under:

Boost Software License - Version 1.0 - August 17th, 2003 Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation co...

If you think the Android project kgl2 listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

/*          Copyright  2014 Stanislav Petriakov
// Distributed under the Boost Software License, Version 1.0.
//    (See accompanying file LICENSE_1_0.txt or copy at
//          http://www.boost.org/LICENSE_1_0.txt)
*///from   w  w w  . j  a  v a  2 s  .  c om
package kg.fucking.shit.kgl2;

/**
 * Created by 4eRT on 28.12.2014.
 */
import java.util.Vector;

import javax.microedition.khronos.opengles.GL10;

public class Group extends Mesh {
    private final Vector<Mesh> meshes = new Vector<Mesh>();

    // draw each mesh
    @Override
    public void draw(GL10 gl) {
        int size = meshes.size();

        for (int i = 0; i < size; i++)
            if (meshes.size() > 0)   // runtime fix > scenes' redraw on fast events (multiclick)
                meshes.get(i).draw(gl);
    }

    // add mesh to group
    public boolean add(Mesh object) {
        return meshes.add(object);
    }

    // delete all meshes
    public void clear() {
        meshes.clear();
    }
}




Java Source Code List

kg.fucking.shit.kgl2.Group.java
kg.fucking.shit.kgl2.HouseBlock.java
kg.fucking.shit.kgl2.InDaHouse.java
kg.fucking.shit.kgl2.Main.java
kg.fucking.shit.kgl2.Mesh.java
kg.fucking.shit.kgl2.OpenGLRenderer.java
kg.fucking.shit.kgl2.Plane.java
kg.fucking.shit.kgl2.Roof.java
kg.fucking.shit.kgl2.Sofa.java