Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * The MIT License (MIT)
  *
  * Copyright (c) 2014 Christian Gärtner
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
  * in the Software without restriction, including without limitation the rights
  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */
package org.achtern.AchternEngine.core.scenegraph.entity.debug;
public class GridDebugger extends Node {
    public static final Logger LOGGER = LoggerFactory.getLogger(GridDebugger.class);
    protected Figure grid;

    
Create a new GridDebugger. Uses 50x50 grid with 1 as line separation (Name of this Node: 'Grid')
    public GridDebugger() {
        this("Grid");
    }

    
Create a new GridDebugger. Uses 50x50 grid with 1 as line separation

Parameters:
name The name of the node
    public GridDebugger(String name) {
        this(name, 50, 50, 1);
    }

    
Create a new GridDebugger. (Name of this Node: 'Grid')

Parameters:
xCount Lines in x direction
yCount Lines in y direction
lineSeparation Distance between lines
    public GridDebugger(int xCountint yCountfloat lineSeparation) {
        this("Grid"xCountyCountlineSeparation);
    }

    
Create a new GridDebugger.

Parameters:
name The name of the node
xCount Lines in x direction
yCount Lines in y direction
lineSeparation Distance between lines
    public GridDebugger(String nameint xCountint yCountfloat lineSeparation) {
        super(name);
        this. = new Figure("Grid");
        this..setMesh(new Grid(xCountyCountlineSeparation));
        Material m = new Material();
        m.addTexture("diffuse"new Texture(ImageGenerator.bytesFromColor(.)));
        m.addFloat("specularIntensity", 1);
        m.addFloat("specularPower", 8);
        this..setMaterial(m);
        add();
    }
New to GrepCode? Check out our FAQ X