use of com.gempukku.libgdx.graph.plugin.models.GraphModel in project gdx-graph by MarcinSc.
the class BackToFrontModelRenderingStrategy method processModels.
@Override
public void processModels(GraphModelsImpl models, Array<String> tags, Camera camera, StrategyCallback callback) {
callback.begin();
orderingArray.clear();
for (String tag : tags) {
for (GraphModel model : models.getModels(tag)) if (model.getRenderableModel().isRendered(camera))
orderingArray.add(model);
}
modelSorter.sort(camera.position, orderingArray);
for (GraphModel graphModel : orderingArray) {
callback.process(graphModel.getRenderableModel(), graphModel.getTag());
}
callback.end();
}
use of com.gempukku.libgdx.graph.plugin.models.GraphModel in project gdx-graph by MarcinSc.
the class FrontToBackModelRenderingStrategy method processModels.
@Override
public void processModels(GraphModelsImpl models, Array<String> tags, Camera camera, ModelRenderingStrategy.StrategyCallback callback) {
callback.begin();
orderingArray.clear();
for (String tag : tags) {
for (GraphModel model : models.getModels(tag)) if (model.getRenderableModel().isRendered(camera))
orderingArray.add(model);
}
modelSorter.sort(camera.position, orderingArray);
for (GraphModel graphModel : orderingArray) {
callback.process(graphModel.getRenderableModel(), graphModel.getTag());
}
callback.end();
}
use of com.gempukku.libgdx.graph.plugin.models.GraphModel in project gdx-graph by MarcinSc.
the class ShaderBackToFrontModelRenderingStrategy method processModels.
@Override
public void processModels(GraphModelsImpl models, Array<String> tags, Camera camera, StrategyCallback callback) {
callback.begin();
for (String tag : tags) {
orderingArray.clear();
for (GraphModel model : models.getModels(tag)) if (model.getRenderableModel().isRendered(camera))
orderingArray.add(model);
modelSorter.sort(camera.position, orderingArray);
for (GraphModel graphModel : orderingArray) {
callback.process(graphModel.getRenderableModel(), tag);
}
}
callback.end();
}
use of com.gempukku.libgdx.graph.plugin.models.GraphModel in project gdx-graph by MarcinSc.
the class ShaderUnorderedModelRenderingStrategy method processModels.
@Override
public void processModels(GraphModelsImpl models, Array<String> tags, Camera camera, StrategyCallback callback) {
callback.begin();
for (String tag : tags) {
for (GraphModel model : models.getModels(tag)) {
if (model.getRenderableModel().isRendered(camera)) {
callback.process(model.getRenderableModel(), tag);
}
}
}
callback.end();
}
use of com.gempukku.libgdx.graph.plugin.models.GraphModel in project gdx-graph by MarcinSc.
the class GraphModelsImpl method registerTag.
public void registerTag(String tag, GraphShader shader) {
if (modelsByTag.containsKey(tag))
throw new IllegalStateException("There is already a shader with tag: " + tag);
modelsByTag.put(tag, new ObjectSet<GraphModel>());
propertiesByTag.put(tag, shader.getProperties());
propertiesForTag.put(tag, new MapWritablePropertyContainer());
}
Aggregations