本文整理汇总了Java中codechicken.lib.colour.ColourRGBA类的典型用法代码示例。如果您正苦于以下问题:Java ColourRGBA类的具体用法?Java ColourRGBA怎么用?Java ColourRGBA使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ColourRGBA类属于codechicken.lib.colour包,在下文中一共展示了ColourRGBA类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: renderItem
import codechicken.lib.colour.ColourRGBA; //导入依赖的package包/类
public void renderItem(int metadata)
{
TextureUtils.bindAtlas(0);
CCRenderState.reset();
CCRenderState.startDrawing();
CCRenderState.hasColour = true;
EnumColor c = EnumColor.DYES[metadata];
Colour colour = new ColourRGBA(c.getColor(0), c.getColor(1), c.getColor(2), 1);
Colour white = new ColourRGBA(1.0, 1.0, 1.0, 1.0);
for(int i = 4; i < 5; i++)
{
frameModels[i].render(new IconTransformation(icon), new ColourMultiplier(white.rgba()));
lightModels[i].render(new IconTransformation(icon), new ColourMultiplier(colour.rgba()));
}
CCRenderState.draw();
}
示例2: operate
import codechicken.lib.colour.ColourRGBA; //导入依赖的package包/类
@Override
public void operate() {
if(colourRef != null)
setColour(ColourRGBA.multiply(baseColour, colourRef[vertexIndex]));
else
setColour(baseColour);
}
示例3: getColourRGB
import codechicken.lib.colour.ColourRGBA; //导入依赖的package包/类
public Colour getColourRGB()
{
Matcher matcherRGB = patternRGB.matcher(getValue().replaceAll("\\s", ""));
if(matcherRGB.matches())
{
return new ColourRGBA(
Integer.parseInt(matcherRGB.group(1)),
Integer.parseInt(matcherRGB.group(2)),
Integer.parseInt(matcherRGB.group(3)),
0xFF);
}
return new ColourRGBA(getHexValue()<<8|0xFF);
}
示例4: operate
import codechicken.lib.colour.ColourRGBA; //导入依赖的package包/类
@Override
public void operate() {
LC lc = CCRenderState.lc;
float[] a = ao(lc.side);
float f = (a[0] * lc.fa + a[1] * lc.fb + a[2] * lc.fc + a[3] * lc.fd);
int[] b = brightness(lc.side);
CCRenderState.setColour(ColourRGBA.multiplyC(CCRenderState.colour, f));
CCRenderState.setBrightness((int) (b[0] * lc.fa + b[1] * lc.fb + b[2] * lc.fc + b[3] * lc.fd) & 0xFF00FF);
}
示例5: apply
import codechicken.lib.colour.ColourRGBA; //导入依赖的package包/类
public TripleABC<Integer, Integer, ?> apply(LC lc, Colour colour) {
float[] a = ao(lc.side);
float f = (a[0] * lc.fa + a[1] * lc.fb + a[2] * lc.fc + a[3] * lc.fd);
int[] b = brightness(lc.side);
int finalColour = ColourRGBA.multiplyC(colour.rgba(), f);
int finalBright = (int) (b[0] * lc.fa + b[1] * lc.fb + b[2] * lc.fc + b[3] * lc.fd) & 0xFF00FF;
return new TripleABC<Integer, Integer, Object>(finalColour, finalBright, null);
}
示例6: operate
import codechicken.lib.colour.ColourRGBA; //导入依赖的package包/类
@Override
public void operate(CCRenderState state) {
if (colourRef != null) {
state.colour = ColourRGBA.multiply(state.baseColour, colourRef[state.vertexIndex]);
} else {
state.colour = state.baseColour;
}
}
示例7: operate
import codechicken.lib.colour.ColourRGBA; //导入依赖的package包/类
@Override
public void operate(CCRenderState state) {
LC lc = state.lc;
float[] a = ao(lc.side);
float f = (a[0] * lc.fa + a[1] * lc.fb + a[2] * lc.fc + a[3] * lc.fd);
int[] b = brightness(lc.side);
state.colour = ColourRGBA.multiplyC(state.colour, f);
state.brightness = (int) (b[0] * lc.fa + b[1] * lc.fb + b[2] * lc.fc + b[3] * lc.fd) & 0xFF00FF;
}
示例8: blendOnto
import codechicken.lib.colour.ColourRGBA; //导入依赖的package包/类
public ColourTemperature blendOnto(ColourRGBA baseColour)
{
double sR = (r & 0xFF)/255D, sG = (g & 0xFF)/255D, sB = (b & 0xFF)/255D, sA = (a & 0xFF)/255D;
double dR = (baseColour.r & 0xFF)/255D, dG = (baseColour.g & 0xFF)/255D, dB = (baseColour.b & 0xFF)/255D, dA = (baseColour.a & 0xFF)/255D;
double rR = sR * sA + dR * (1-sA);
double rG = sG * sA + dG * (1-sA);
double rB = sB * sA + dB * (1-sA);
double rA = dA * 1D + sA * (1-dA);
return new ColourTemperature(rR, rG, rB, rA, temp);
}
示例9: renderStatic
import codechicken.lib.colour.ColourRGBA; //导入依赖的package包/类
public void renderStatic(PartGlowPanel panel)
{
CCRenderState.reset();
CCRenderState.setBrightness(panel.world(), panel.x(), panel.y(), panel.z());
Colour colour = new ColourRGBA(panel.colour.getColor(0), panel.colour.getColor(1), panel.colour.getColor(2), 1);
int side = panel.side.ordinal();
frameModels[side].render(new Translation(panel.x(), panel.y(), panel.z()), new IconTransformation(icon));
lightModels[side].render(new Translation(panel.x(), panel.y(), panel.z()), new IconTransformation(icon), new ColourMultiplier(colour.rgba()));
}
示例10: HeatMaterial
import codechicken.lib.colour.ColourRGBA; //导入依赖的package包/类
private HeatMaterial(double inversek, double inverseC, double insulationInversek, ColourRGBA colour)
{
inverseConduction = inversek;
inverseHeatCapacity = inverseC;
inverseConductionInsulation = insulationInversek;
baseColour = colour;
}
示例11: operate
import codechicken.lib.colour.ColourRGBA; //导入依赖的package包/类
@Override
public void operate()
{
if (colourRef != null)
{
setColour(ColourRGBA.multiply(baseColour, colourRef[vertexIndex]));
} else
{
setColour(baseColour);
}
}
示例12: operate
import codechicken.lib.colour.ColourRGBA; //导入依赖的package包/类
@Override
public void operate()
{
LC lc = CCRenderState.lc;
float[] a = ao(lc.side);
float f = (a[0] * lc.fa + a[1] * lc.fb + a[2] * lc.fc + a[3] * lc.fd);
int[] b = brightness(lc.side);
CCRenderState.setColour(ColourRGBA.multiplyC(CCRenderState.colour, f));
CCRenderState.setBrightness((int) (b[0] * lc.fa + b[1] * lc.fb + b[2] * lc.fc + b[3] * lc.fd) & 0xFF00FF);
}
示例13: operate
import codechicken.lib.colour.ColourRGBA; //导入依赖的package包/类
@Override
public void operate() {
CCRenderState.setColour(ColourRGBA.multiply(CCRenderState.colour, colour));
}
示例14: operate
import codechicken.lib.colour.ColourRGBA; //导入依赖的package包/类
@Override
public void operate() {
CCRenderState.setColour(ColourRGBA.multiply(CCRenderState.colour, colours[CCRenderState.side]));
}
示例15: onTick
import codechicken.lib.colour.ColourRGBA; //导入依赖的package包/类
public void onTick()
{
int var2;
float var3;
int var5;
int var6;
int var7;
int var8;
int var9;
for (int var1 = 0; var1 < tileSizeBase; ++var1)
{
for (var2 = 0; var2 < tileSizeBase; ++var2)
{
var3 = 0.0F;
int var4 = (int)(MathHelper.sin(var2 * (float)Math.PI * 2.0F / 16.0F) * 1.2F);
var5 = (int)(MathHelper.sin(var1 * (float)Math.PI * 2.0F / 16.0F) * 1.2F);
for (var6 = var1 - 1; var6 <= var1 + 1; ++var6)
{
for (var7 = var2 - 1; var7 <= var2 + 1; ++var7)
{
var8 = var6 + var4 & tileSizeMask;
var9 = var7 + var5 & tileSizeMask;
var3 += this.field_76876_g[var8 + var9 * tileSizeBase];
}
}
this.field_76878_h[var1 + var2 * tileSizeBase] = var3 / 10.0F + (this.field_76879_i[(var1 + 0 & tileSizeMask) + (var2 + 0 & tileSizeMask) * tileSizeBase] + this.field_76879_i[(var1 + 1 & tileSizeMask) + (var2 + 0 & tileSizeMask) * tileSizeBase] + this.field_76879_i[(var1 + 1 & tileSizeMask) + (var2 + 1 & tileSizeMask) * tileSizeBase] + this.field_76879_i[(var1 + 0 & tileSizeMask) + (var2 + 1 & tileSizeMask) * tileSizeBase]) / 4.0F * 0.8F;
this.field_76879_i[var1 + var2 * tileSizeBase] += this.field_76877_j[var1 + var2 * tileSizeBase] * 0.01F;
if (this.field_76879_i[var1 + var2 * tileSizeBase] < 0.0F)
{
this.field_76879_i[var1 + var2 * tileSizeBase] = 0.0F;
}
this.field_76877_j[var1 + var2 * tileSizeBase] -= 0.06F;
if (Math.random() < 0.005D)
{
this.field_76877_j[var1 + var2 * tileSizeBase] = 1.5F;
}
}
}
float[] var11 = this.field_76878_h;
this.field_76878_h = this.field_76876_g;
this.field_76876_g = var11;
for (var2 = 0; var2 < tileSizeSquare; ++var2)
{
var3 = this.field_76876_g[var2] * 2.0F;
if (var3 > 1.0F)
{
var3 = 1.0F;
}
if (var3 < 0.0F)
{
var3 = 0.0F;
}
var5 = (int)(var3 * 100.0F + 155.0F);
var6 = (int)(var3 * var3 * 255.0F);
var7 = (int)(var3 * var3 * var3 * var3 * 128.0F);
if (this.anaglyphEnabled)
{
var8 = (var5 * 30 + var6 * 59 + var7 * 11) / 100;
var9 = (var5 * 30 + var6 * 70) / 100;
int var10 = (var5 * 30 + var7 * 70) / 100;
var5 = var8;
var6 = var9;
var7 = var10;
}
imageData[var2] = new ColourRGBA(var5, var6, var7, -1).argb();
}
}