Examples of PrimitiveBuffer


Examples of org.osm2world.core.target.jogl.PrimitiveBuffer

  }
 
  @Override
  protected void fillTarget(JOGLTarget target) {
   
    final PrimitiveBuffer primitiveBuffer = new PrimitiveBuffer();

    iterate(map.getWorldObjects(), new Operation<WorldObject>() {
      @Override public void perform(WorldObject w) {
        TargetUtil.renderObject(primitiveBuffer, w);
      }
    });
   
    for (Material material : primitiveBuffer .getMaterials()) {
     
      Color color = material.getLighting() == Lighting.FLAT ?
          FLAT_NORMALS_COLOR : SMOOTH_NORMALS_COLOR;
     
      for (Primitive primitive : primitiveBuffer.getPrimitives(material)) {
       
        for (int i = 0; i < primitive.vertices.size(); i++) {
          VectorXYZ v = primitive.vertices.get(i);
          VectorXYZ n = primitive.normals.get(i);
          if (n != null) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.