Search in sources :

Example 1 with LaserRow

use of buildcraft.lib.client.render.laser.LaserData_BC8.LaserRow in project BuildCraft by BuildCraft.

the class CompiledLaserRow method texU.

private double texU(double between) {
    ISprite sprite = sprites[currentRowIndex];
    LaserRow row = rows[currentRowIndex];
    if (between == 0)
        return sprite.getInterpU(row.uMin);
    if (between == 1)
        return sprite.getInterpU(row.uMax);
    double interp = row.uMin * (1 - between) + row.uMax * between;
    return sprite.getInterpU(interp);
}
Also used : ISprite(buildcraft.api.core.render.ISprite) LaserRow(buildcraft.lib.client.render.laser.LaserData_BC8.LaserRow)

Example 2 with LaserRow

use of buildcraft.lib.client.render.laser.LaserData_BC8.LaserRow in project BuildCraft by BuildCraft.

the class CompiledLaserRow method texV.

private double texV(double between) {
    ISprite sprite = sprites[currentRowIndex];
    LaserRow row = rows[currentRowIndex];
    if (between == 0)
        return sprite.getInterpV(row.vMin);
    if (between == 1)
        return sprite.getInterpV(row.vMax);
    double interp = row.vMin * (1 - between) + row.vMax * between;
    return sprite.getInterpV(interp);
}
Also used : ISprite(buildcraft.api.core.render.ISprite) LaserRow(buildcraft.lib.client.render.laser.LaserData_BC8.LaserRow)

Aggregations

ISprite (buildcraft.api.core.render.ISprite)2 LaserRow (buildcraft.lib.client.render.laser.LaserData_BC8.LaserRow)2