当前位置: 首页>>代码示例>>Java>>正文


Java ColourRGBA类代码示例

本文整理汇总了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();
}
 
开发者ID:Microsoft,项目名称:vsminecraft,代码行数:20,代码来源:RenderGlowPanel.java

示例2: operate

import codechicken.lib.colour.ColourRGBA; //导入依赖的package包/类
@Override
public void operate() {
    if(colourRef != null)
        setColour(ColourRGBA.multiply(baseColour, colourRef[vertexIndex]));
    else
        setColour(baseColour);
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:8,代码来源:CCRenderState.java

示例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);
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:15,代码来源:ConfigTag.java

示例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);
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:10,代码来源:LightMatrix.java

示例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);
}
 
开发者ID:TheCBProject,项目名称:CCTweaks,代码行数:9,代码来源:AOLightMatrix.java

示例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;
    }
}
 
开发者ID:TheCBProject,项目名称:CodeChickenLib,代码行数:9,代码来源:ColourAttribute.java

示例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;
}
 
开发者ID:TheCBProject,项目名称:CodeChickenLib,代码行数:10,代码来源:LightMatrix.java

示例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);
}
 
开发者ID:Microsoft,项目名称:vsminecraft,代码行数:13,代码来源:ColourTemperature.java

示例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()));
}
 
开发者ID:Microsoft,项目名称:vsminecraft,代码行数:12,代码来源:RenderGlowPanel.java

示例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;
}
 
开发者ID:Microsoft,项目名称:vsminecraft,代码行数:8,代码来源:MultipartHeatTransmitter.java

示例11: operate

import codechicken.lib.colour.ColourRGBA; //导入依赖的package包/类
@Override
public void operate()
{
    if (colourRef != null)
    {
        setColour(ColourRGBA.multiply(baseColour, colourRef[vertexIndex]));
    } else
    {
        setColour(baseColour);
    }
}
 
开发者ID:Darkona,项目名称:AdventureBackpack2,代码行数:12,代码来源:CCRenderState.java

示例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);
}
 
开发者ID:Darkona,项目名称:AdventureBackpack2,代码行数:11,代码来源:LightMatrix.java

示例13: operate

import codechicken.lib.colour.ColourRGBA; //导入依赖的package包/类
@Override
public void operate() {
    CCRenderState.setColour(ColourRGBA.multiply(CCRenderState.colour, colour));
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:5,代码来源:ColourMultiplier.java

示例14: operate

import codechicken.lib.colour.ColourRGBA; //导入依赖的package包/类
@Override
public void operate() {
    CCRenderState.setColour(ColourRGBA.multiply(CCRenderState.colour, colours[CCRenderState.side]));
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:5,代码来源:PlanarLightModel.java

示例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();
    }
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:81,代码来源:TextureLavaFX.java


注:本文中的codechicken.lib.colour.ColourRGBA类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。