use of com.badlogic.gdx.graphics.g3d.Renderable in project libgdx by libgdx.
the class AABBNearFarAnalyzer method analyze.
@Override
public <T extends RenderableProvider> void analyze(BaseLight light, Camera camera, Iterable<T> renderableProviders) {
getRenderables(renderableProviders);
prepareCamera(camera);
bb1.inf();
for (Renderable renderable : renderables) {
renderable.worldTransform.getTranslation(tmpV);
tmpV.add(renderable.meshPart.center);
if (camera.frustum.sphereInFrustum(tmpV, renderable.meshPart.radius)) {
bb1.ext(tmpV, renderable.meshPart.radius);
}
}
computeResult(bb1, camera);
renderablesPool.flush();
renderables.clear();
}
use of com.badlogic.gdx.graphics.g3d.Renderable in project libgdx by libgdx.
the class RenderableShapeBuilder method buildNormals.
/** Builds normal, tangent and binormal of a RenderableProvider.
* @param builder
* @param renderableProvider
* @param vectorSize Size of the normal vector
* @param normalColor Normal vector's color
* @param tangentColor Tangent vector's color
* @param binormalColor Binormal vector's color */
public static void buildNormals(MeshPartBuilder builder, RenderableProvider renderableProvider, float vectorSize, Color normalColor, Color tangentColor, Color binormalColor) {
renderableProvider.getRenderables(renderables, renderablesPool);
for (Renderable renderable : renderables) {
buildNormals(builder, renderable, vectorSize, normalColor, tangentColor, binormalColor);
}
renderablesPool.flush();
renderables.clear();
}
Aggregations