當前位置: 首頁>>代碼示例>>Java>>正文


Java GlStateManager.getFloat方法代碼示例

本文整理匯總了Java中net.minecraft.client.renderer.GlStateManager.getFloat方法的典型用法代碼示例。如果您正苦於以下問題:Java GlStateManager.getFloat方法的具體用法?Java GlStateManager.getFloat怎麽用?Java GlStateManager.getFloat使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在net.minecraft.client.renderer.GlStateManager的用法示例。


在下文中一共展示了GlStateManager.getFloat方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: initModelviewMatrix

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
private void initModelviewMatrix()
{
    GlStateManager.pushMatrix();
    GlStateManager.loadIdentity();
    float f = 1.000001F;
    GlStateManager.translate(-8.0F, -8.0F, -8.0F);
    GlStateManager.scale(f, f, f);
    GlStateManager.translate(8.0F, 8.0F, 8.0F);
    GlStateManager.getFloat(2982, this.modelviewMatrix);
    GlStateManager.popMatrix();
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:12,代碼來源:RenderChunk.java

示例2: initModelviewMatrix

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
private void initModelviewMatrix()
{
    GlStateManager.pushMatrix();
    GlStateManager.loadIdentity();
    float f = 1.000001F;
    GlStateManager.translate(-8.0F, -8.0F, -8.0F);
    GlStateManager.scale(1.000001F, 1.000001F, 1.000001F);
    GlStateManager.translate(8.0F, 8.0F, 8.0F);
    GlStateManager.getFloat(2982, this.modelviewMatrix);
    GlStateManager.popMatrix();
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:12,代碼來源:RenderChunk.java

示例3: init

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
public void init()
{
    this.projectionMatrixBuffer.clear();
    this.modelviewMatrixBuffer.clear();
    this.field_78564_h.clear();
    GlStateManager.getFloat(2983, this.projectionMatrixBuffer);
    GlStateManager.getFloat(2982, this.modelviewMatrixBuffer);
    float[] afloat = this.projectionMatrix;
    float[] afloat1 = this.modelviewMatrix;
    this.projectionMatrixBuffer.flip().limit(16);
    this.projectionMatrixBuffer.get(afloat);
    this.modelviewMatrixBuffer.flip().limit(16);
    this.modelviewMatrixBuffer.get(afloat1);
    this.clippingMatrix[0] = afloat1[0] * afloat[0] + afloat1[1] * afloat[4] + afloat1[2] * afloat[8] + afloat1[3] * afloat[12];
    this.clippingMatrix[1] = afloat1[0] * afloat[1] + afloat1[1] * afloat[5] + afloat1[2] * afloat[9] + afloat1[3] * afloat[13];
    this.clippingMatrix[2] = afloat1[0] * afloat[2] + afloat1[1] * afloat[6] + afloat1[2] * afloat[10] + afloat1[3] * afloat[14];
    this.clippingMatrix[3] = afloat1[0] * afloat[3] + afloat1[1] * afloat[7] + afloat1[2] * afloat[11] + afloat1[3] * afloat[15];
    this.clippingMatrix[4] = afloat1[4] * afloat[0] + afloat1[5] * afloat[4] + afloat1[6] * afloat[8] + afloat1[7] * afloat[12];
    this.clippingMatrix[5] = afloat1[4] * afloat[1] + afloat1[5] * afloat[5] + afloat1[6] * afloat[9] + afloat1[7] * afloat[13];
    this.clippingMatrix[6] = afloat1[4] * afloat[2] + afloat1[5] * afloat[6] + afloat1[6] * afloat[10] + afloat1[7] * afloat[14];
    this.clippingMatrix[7] = afloat1[4] * afloat[3] + afloat1[5] * afloat[7] + afloat1[6] * afloat[11] + afloat1[7] * afloat[15];
    this.clippingMatrix[8] = afloat1[8] * afloat[0] + afloat1[9] * afloat[4] + afloat1[10] * afloat[8] + afloat1[11] * afloat[12];
    this.clippingMatrix[9] = afloat1[8] * afloat[1] + afloat1[9] * afloat[5] + afloat1[10] * afloat[9] + afloat1[11] * afloat[13];
    this.clippingMatrix[10] = afloat1[8] * afloat[2] + afloat1[9] * afloat[6] + afloat1[10] * afloat[10] + afloat1[11] * afloat[14];
    this.clippingMatrix[11] = afloat1[8] * afloat[3] + afloat1[9] * afloat[7] + afloat1[10] * afloat[11] + afloat1[11] * afloat[15];
    this.clippingMatrix[12] = afloat1[12] * afloat[0] + afloat1[13] * afloat[4] + afloat1[14] * afloat[8] + afloat1[15] * afloat[12];
    this.clippingMatrix[13] = afloat1[12] * afloat[1] + afloat1[13] * afloat[5] + afloat1[14] * afloat[9] + afloat1[15] * afloat[13];
    this.clippingMatrix[14] = afloat1[12] * afloat[2] + afloat1[13] * afloat[6] + afloat1[14] * afloat[10] + afloat1[15] * afloat[14];
    this.clippingMatrix[15] = afloat1[12] * afloat[3] + afloat1[13] * afloat[7] + afloat1[14] * afloat[11] + afloat1[15] * afloat[15];
    float[] afloat2 = this.frustum[0];
    afloat2[0] = this.clippingMatrix[3] - this.clippingMatrix[0];
    afloat2[1] = this.clippingMatrix[7] - this.clippingMatrix[4];
    afloat2[2] = this.clippingMatrix[11] - this.clippingMatrix[8];
    afloat2[3] = this.clippingMatrix[15] - this.clippingMatrix[12];
    this.normalize(afloat2);
    float[] afloat3 = this.frustum[1];
    afloat3[0] = this.clippingMatrix[3] + this.clippingMatrix[0];
    afloat3[1] = this.clippingMatrix[7] + this.clippingMatrix[4];
    afloat3[2] = this.clippingMatrix[11] + this.clippingMatrix[8];
    afloat3[3] = this.clippingMatrix[15] + this.clippingMatrix[12];
    this.normalize(afloat3);
    float[] afloat4 = this.frustum[2];
    afloat4[0] = this.clippingMatrix[3] + this.clippingMatrix[1];
    afloat4[1] = this.clippingMatrix[7] + this.clippingMatrix[5];
    afloat4[2] = this.clippingMatrix[11] + this.clippingMatrix[9];
    afloat4[3] = this.clippingMatrix[15] + this.clippingMatrix[13];
    this.normalize(afloat4);
    float[] afloat5 = this.frustum[3];
    afloat5[0] = this.clippingMatrix[3] - this.clippingMatrix[1];
    afloat5[1] = this.clippingMatrix[7] - this.clippingMatrix[5];
    afloat5[2] = this.clippingMatrix[11] - this.clippingMatrix[9];
    afloat5[3] = this.clippingMatrix[15] - this.clippingMatrix[13];
    this.normalize(afloat5);
    float[] afloat6 = this.frustum[4];
    afloat6[0] = this.clippingMatrix[3] - this.clippingMatrix[2];
    afloat6[1] = this.clippingMatrix[7] - this.clippingMatrix[6];
    afloat6[2] = this.clippingMatrix[11] - this.clippingMatrix[10];
    afloat6[3] = this.clippingMatrix[15] - this.clippingMatrix[14];
    this.normalize(afloat6);
    float[] afloat7 = this.frustum[5];
    afloat7[0] = this.clippingMatrix[3] + this.clippingMatrix[2];
    afloat7[1] = this.clippingMatrix[7] + this.clippingMatrix[6];
    afloat7[2] = this.clippingMatrix[11] + this.clippingMatrix[10];
    afloat7[3] = this.clippingMatrix[15] + this.clippingMatrix[14];
    this.normalize(afloat7);
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:67,代碼來源:ClippingHelperImpl.java

示例4: init

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
public void init()
{
    this.projectionMatrixBuffer.clear();
    this.modelviewMatrixBuffer.clear();
    this.floatBuffer16.clear();
    GlStateManager.getFloat(2983, this.projectionMatrixBuffer);
    GlStateManager.getFloat(2982, this.modelviewMatrixBuffer);
    float[] afloat = this.projectionMatrix;
    float[] afloat1 = this.modelviewMatrix;
    this.projectionMatrixBuffer.flip().limit(16);
    this.projectionMatrixBuffer.get(afloat);
    this.modelviewMatrixBuffer.flip().limit(16);
    this.modelviewMatrixBuffer.get(afloat1);
    this.clippingMatrix[0] = afloat1[0] * afloat[0] + afloat1[1] * afloat[4] + afloat1[2] * afloat[8] + afloat1[3] * afloat[12];
    this.clippingMatrix[1] = afloat1[0] * afloat[1] + afloat1[1] * afloat[5] + afloat1[2] * afloat[9] + afloat1[3] * afloat[13];
    this.clippingMatrix[2] = afloat1[0] * afloat[2] + afloat1[1] * afloat[6] + afloat1[2] * afloat[10] + afloat1[3] * afloat[14];
    this.clippingMatrix[3] = afloat1[0] * afloat[3] + afloat1[1] * afloat[7] + afloat1[2] * afloat[11] + afloat1[3] * afloat[15];
    this.clippingMatrix[4] = afloat1[4] * afloat[0] + afloat1[5] * afloat[4] + afloat1[6] * afloat[8] + afloat1[7] * afloat[12];
    this.clippingMatrix[5] = afloat1[4] * afloat[1] + afloat1[5] * afloat[5] + afloat1[6] * afloat[9] + afloat1[7] * afloat[13];
    this.clippingMatrix[6] = afloat1[4] * afloat[2] + afloat1[5] * afloat[6] + afloat1[6] * afloat[10] + afloat1[7] * afloat[14];
    this.clippingMatrix[7] = afloat1[4] * afloat[3] + afloat1[5] * afloat[7] + afloat1[6] * afloat[11] + afloat1[7] * afloat[15];
    this.clippingMatrix[8] = afloat1[8] * afloat[0] + afloat1[9] * afloat[4] + afloat1[10] * afloat[8] + afloat1[11] * afloat[12];
    this.clippingMatrix[9] = afloat1[8] * afloat[1] + afloat1[9] * afloat[5] + afloat1[10] * afloat[9] + afloat1[11] * afloat[13];
    this.clippingMatrix[10] = afloat1[8] * afloat[2] + afloat1[9] * afloat[6] + afloat1[10] * afloat[10] + afloat1[11] * afloat[14];
    this.clippingMatrix[11] = afloat1[8] * afloat[3] + afloat1[9] * afloat[7] + afloat1[10] * afloat[11] + afloat1[11] * afloat[15];
    this.clippingMatrix[12] = afloat1[12] * afloat[0] + afloat1[13] * afloat[4] + afloat1[14] * afloat[8] + afloat1[15] * afloat[12];
    this.clippingMatrix[13] = afloat1[12] * afloat[1] + afloat1[13] * afloat[5] + afloat1[14] * afloat[9] + afloat1[15] * afloat[13];
    this.clippingMatrix[14] = afloat1[12] * afloat[2] + afloat1[13] * afloat[6] + afloat1[14] * afloat[10] + afloat1[15] * afloat[14];
    this.clippingMatrix[15] = afloat1[12] * afloat[3] + afloat1[13] * afloat[7] + afloat1[14] * afloat[11] + afloat1[15] * afloat[15];
    float[] afloat2 = this.frustum[0];
    afloat2[0] = this.clippingMatrix[3] - this.clippingMatrix[0];
    afloat2[1] = this.clippingMatrix[7] - this.clippingMatrix[4];
    afloat2[2] = this.clippingMatrix[11] - this.clippingMatrix[8];
    afloat2[3] = this.clippingMatrix[15] - this.clippingMatrix[12];
    this.normalize(afloat2);
    float[] afloat3 = this.frustum[1];
    afloat3[0] = this.clippingMatrix[3] + this.clippingMatrix[0];
    afloat3[1] = this.clippingMatrix[7] + this.clippingMatrix[4];
    afloat3[2] = this.clippingMatrix[11] + this.clippingMatrix[8];
    afloat3[3] = this.clippingMatrix[15] + this.clippingMatrix[12];
    this.normalize(afloat3);
    float[] afloat4 = this.frustum[2];
    afloat4[0] = this.clippingMatrix[3] + this.clippingMatrix[1];
    afloat4[1] = this.clippingMatrix[7] + this.clippingMatrix[5];
    afloat4[2] = this.clippingMatrix[11] + this.clippingMatrix[9];
    afloat4[3] = this.clippingMatrix[15] + this.clippingMatrix[13];
    this.normalize(afloat4);
    float[] afloat5 = this.frustum[3];
    afloat5[0] = this.clippingMatrix[3] - this.clippingMatrix[1];
    afloat5[1] = this.clippingMatrix[7] - this.clippingMatrix[5];
    afloat5[2] = this.clippingMatrix[11] - this.clippingMatrix[9];
    afloat5[3] = this.clippingMatrix[15] - this.clippingMatrix[13];
    this.normalize(afloat5);
    float[] afloat6 = this.frustum[4];
    afloat6[0] = this.clippingMatrix[3] - this.clippingMatrix[2];
    afloat6[1] = this.clippingMatrix[7] - this.clippingMatrix[6];
    afloat6[2] = this.clippingMatrix[11] - this.clippingMatrix[10];
    afloat6[3] = this.clippingMatrix[15] - this.clippingMatrix[14];
    this.normalize(afloat6);
    float[] afloat7 = this.frustum[5];
    afloat7[0] = this.clippingMatrix[3] + this.clippingMatrix[2];
    afloat7[1] = this.clippingMatrix[7] + this.clippingMatrix[6];
    afloat7[2] = this.clippingMatrix[11] + this.clippingMatrix[10];
    afloat7[3] = this.clippingMatrix[15] + this.clippingMatrix[14];
    this.normalize(afloat7);
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:67,代碼來源:ClippingHelperImpl.java


注:本文中的net.minecraft.client.renderer.GlStateManager.getFloat方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。