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


Java WavefrontObject类代码示例

本文整理汇总了Java中net.minecraftforge.client.model.obj.WavefrontObject的典型用法代码示例。如果您正苦于以下问题:Java WavefrontObject类的具体用法?Java WavefrontObject怎么用?Java WavefrontObject使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


WavefrontObject类属于net.minecraftforge.client.model.obj包,在下文中一共展示了WavefrontObject类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: Rail3rdRenderer

import net.minecraftforge.client.model.obj.WavefrontObject; //导入依赖的package包/类
public Rail3rdRenderer() {
    this.model = new WavefrontObject[] {
            new WavefrontObject(new ResourceLocation("nyasamarailway", "models/rails/trd_rail_s.obj")),
            new WavefrontObject(new ResourceLocation("nyasamarailway", "models/rails/trd_rail_l.obj")),
            new WavefrontObject(new ResourceLocation("nyasamarailway", "models/rails/trd_rail_t.obj"))
    };
    this.eleModel = new WavefrontObject[] {
            new WavefrontObject(new ResourceLocation("nyasamarailway", "models/rails/trd_rail_se.obj")),
            new WavefrontObject(new ResourceLocation("nyasamarailway", "models/rails/trd_rail_le.obj")),
            new WavefrontObject(new ResourceLocation("nyasamarailway", "models/rails/trd_rail_te.obj"))
    };
    this.pillarModel = new WavefrontObject(new ResourceLocation("nyasamarailway", "models/rails/trd_rail_p.obj"));

    this.texture = new ResourceLocation("nyasamarailway", "textures/rails/trd_rail_base.png");
    this.eleTexture = new ResourceLocation("nyasamarailway", "textures/rails/trd_rail_ele.png");
}
 
开发者ID:NSDN,项目名称:NyaSamaRailway,代码行数:17,代码来源:Rail3rdRenderer.java

示例2: TriSignalLightRenderer

import net.minecraftforge.client.model.obj.WavefrontObject; //导入依赖的package包/类
public TriSignalLightRenderer(String baseName) {
    modelBase = new WavefrontObject(
            new ResourceLocation("nyasamarailway", "models/blocks/" + baseName + "_base.obj")
    );
    modelLight = new WavefrontObject[] {
            new WavefrontObject(
                    new ResourceLocation("nyasamarailway", "models/blocks/" + baseName + "_light_1.obj")
            ),
            new WavefrontObject(
                    new ResourceLocation("nyasamarailway", "models/blocks/" + baseName + "_light_2.obj")
            ),
            new WavefrontObject(
                    new ResourceLocation("nyasamarailway", "models/blocks/" + baseName + "_light_3.obj")
            )
    };
}
 
开发者ID:NSDN,项目名称:NyaSamaRailway,代码行数:17,代码来源:TriSignalLightRenderer.java

示例3: renderArclamp

import net.minecraftforge.client.model.obj.WavefrontObject; //导入依赖的package包/类
private void renderArclamp(ItemRenderType type, RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ)
{
    GL11.glPushMatrix();

    switch (type)
    {
    case INVENTORY:
        GL11.glScalef(0.9F, 0.9F, 0.9F);
        break;
    case EQUIPPED_FIRST_PERSON:
        GL11.glTranslatef(0.8F, 0.8F, 0.5F);
        GL11.glRotatef(150F, 0, 1F, 0);
        GL11.glScalef(0.7F, 0.7F, 0.7F);
        break;
    case EQUIPPED:
        GL11.glTranslatef(0.6F, 0.8F, 0.6F);
        GL11.glRotatef(150F, 0, 1F, 0);
        GL11.glScalef(0.9F, 0.9F, 0.9F);
        break;
    default:
        break;
    }

    GL11.glScalef(0.07F, 0.07F, 0.07F);
    GL11.glRotatef(90, 0, 0, -1);
    FMLClientHandler.instance().getClient().getTextureManager().bindTexture(TileEntityArclampRenderer.lampTexture);
    TileEntityArclampRenderer.lampMetal.renderAll();

    OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240F, 240F);
    FMLClientHandler.instance().getClient().getTextureManager().bindTexture(TileEntityArclampRenderer.lightTexture);
    Tessellator tessellator = Tessellator.instance;
    tessellator.startDrawing(GL11.GL_QUADS);
    tessellator.setColorRGBA(255, 255, 255, 255);
    GL11.glDisable(GL11.GL_LIGHTING);
    ((WavefrontObject) TileEntityArclampRenderer.lampLight).tessellateAll(tessellator);
    tessellator.draw();

    GL11.glPopMatrix();
    GL11.glEnable(GL11.GL_LIGHTING);
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:41,代码来源:ItemRendererArclamp.java

示例4: getModel

import net.minecraftforge.client.model.obj.WavefrontObject; //导入依赖的package包/类
public static WavefrontObject getModel(String path)
{
    ResourceLocation rl = resourceMap.containsKey(path) ? resourceMap.get(path) : new ResourceLocation(path);
    if(!resourceMap.containsKey(path))
    {
        resourceMap.put(path, rl);
    }
    return (WavefrontObject) AdvancedModelLoader.loadModel(rl);
}
 
开发者ID:XFactHD,项目名称:RFUtilities,代码行数:10,代码来源:ClientUtils.java

示例5: renderWithResourceAndRotation

import net.minecraftforge.client.model.obj.WavefrontObject; //导入依赖的package包/类
public static void renderWithResourceAndRotation(WavefrontObject model, float angle, ResourceLocation texture) {
    Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
    GL11.glPushMatrix();
    GL11.glScalef(0.0625F, 0.0625F, 0.0625F);
    GL11.glPushMatrix();
    GL11.glRotatef(angle, 0.0F, -1.0F, 0.0F);
    model.renderAll();
    GL11.glPopMatrix();
    GL11.glPopMatrix();
}
 
开发者ID:NSDN,项目名称:NyaSamaRailway,代码行数:11,代码来源:RendererHelper.java

示例6: renderWithResource

import net.minecraftforge.client.model.obj.WavefrontObject; //导入依赖的package包/类
public static void renderWithResource(WavefrontObject model, ResourceLocation texture) {
    Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
    GL11.glPushMatrix();
    GL11.glScalef(0.0625F, 0.0625F, 0.0625F);
    model.renderAll();
    GL11.glPopMatrix();
}
 
开发者ID:NSDN,项目名称:NyaSamaRailway,代码行数:8,代码来源:RendererHelper.java

示例7: renderPartWithResource

import net.minecraftforge.client.model.obj.WavefrontObject; //导入依赖的package包/类
public static void renderPartWithResource(WavefrontObject model, String part, ResourceLocation texture) {
    Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
    GL11.glPushMatrix();
    GL11.glScalef(0.0625F, 0.0625F, 0.0625F);
    model.renderPart(part);
    GL11.glPopMatrix();
}
 
开发者ID:NSDN,项目名称:NyaSamaRailway,代码行数:8,代码来源:RendererHelper.java

示例8: RailMonoSwitchRenderer

import net.minecraftforge.client.model.obj.WavefrontObject; //导入依赖的package包/类
public RailMonoSwitchRenderer() {
    this.model = new WavefrontObject[] {
            new WavefrontObject(new ResourceLocation("nyasamarailway", "models/rails/mono_rail_straight.obj")),
            new WavefrontObject(new ResourceLocation("nyasamarailway", "models/rails/mono_rail_turned.obj"))
    };
    this.texture = new ResourceLocation("nyasamarailway", "textures/rails/mono_rail_switch.png");
}
 
开发者ID:NSDN,项目名称:NyaSamaRailway,代码行数:8,代码来源:RailMonoSwitchRenderer.java

示例9: RailMonoRenderer

import net.minecraftforge.client.model.obj.WavefrontObject; //导入依赖的package包/类
public RailMonoRenderer() {
    this.model  = new WavefrontObject[] {
            new WavefrontObject(new ResourceLocation("nyasamarailway", "models/rails/mono_rail_straight.obj")),
            new WavefrontObject(new ResourceLocation("nyasamarailway", "models/rails/mono_rail_slope.obj")),
            new WavefrontObject(new ResourceLocation("nyasamarailway", "models/rails/mono_rail_turned.obj"))
    };
    this.textures = new ResourceLocation[] {
            new ResourceLocation("nyasamarailway", "textures/rails/mono_rail.png"),
            new ResourceLocation("nyasamarailway", "textures/rails/mono_rail.png"),
            new ResourceLocation("nyasamarailway", "textures/rails/mono_rail.png")
    };
    this.isMagnet = false;
}
 
开发者ID:NSDN,项目名称:NyaSamaRailway,代码行数:14,代码来源:RailMonoRenderer.java

示例10: BiSignalLightRenderer

import net.minecraftforge.client.model.obj.WavefrontObject; //导入依赖的package包/类
public BiSignalLightRenderer(String baseName) {
    modelBase = new WavefrontObject(
            new ResourceLocation("nyasamarailway", "models/blocks/" + baseName + "_base.obj")
    );
    modelLight = new WavefrontObject[] {
            new WavefrontObject(
                    new ResourceLocation("nyasamarailway", "models/blocks/" + baseName + "_light_1.obj")
            ),
            new WavefrontObject(
                    new ResourceLocation("nyasamarailway", "models/blocks/" + baseName + "_light_2.obj")
            )
    };
}
 
开发者ID:NSDN,项目名称:NyaSamaRailway,代码行数:14,代码来源:BiSignalLightRenderer.java

示例11: RailTriSwitchRenderer

import net.minecraftforge.client.model.obj.WavefrontObject; //导入依赖的package包/类
public RailTriSwitchRenderer() {
    this.model = new WavefrontObject(new ResourceLocation("nyasamarailway", "models/blocks/rail_tri_switch.obj"));
    this.textures = new ResourceLocation[] {
            new ResourceLocation("nyasamarailway", "textures/blocks/rail_tri_switch_straight.png"),
            new ResourceLocation("nyasamarailway", "textures/blocks/rail_tri_switch_left.png"),
            new ResourceLocation("nyasamarailway", "textures/blocks/rail_tri_switch_right.png")
    };
}
 
开发者ID:NSDN,项目名称:NyaSamaRailway,代码行数:9,代码来源:RailTriSwitchRenderer.java

示例12: SignalBoxRenderer

import net.minecraftforge.client.model.obj.WavefrontObject; //导入依赖的package包/类
public SignalBoxRenderer(boolean hasButton) {
    textureBase = new ResourceLocation("nyasamarailway", "textures/blocks/signal_box_base.png");

    if (hasButton) {
        modelBtn = new WavefrontObject(
                new ResourceLocation("nyasamarailway", "models/blocks/signal_box_btn.obj")
        );
        modelBtnLight = new WavefrontObject(
                new ResourceLocation("nyasamarailway", "models/blocks/signal_box_btn_light.obj")
        );
    } else {
        modelBtn = null;
        modelBtnLight = null;
    }
}
 
开发者ID:NSDN,项目名称:NyaSamaRailway,代码行数:16,代码来源:SignalBoxRenderer.java

示例13: loadObjModelParts

import net.minecraftforge.client.model.obj.WavefrontObject; //导入依赖的package包/类
public static Collection<CustomPartedModel> loadObjModelParts(WavefrontObject obj) {
    List<CustomPartedModel> ret = new ArrayList();
    for(GroupObject go : obj.groupObjects) {
        ret.add(new CustomPartedModel(obj, go.name));
    }
    return ret;
}
 
开发者ID:LambdaInnovation,项目名称:LambdaLib,代码行数:8,代码来源:PartedModelHelper.java

示例14: SimpleBlockOBJRenderer

import net.minecraftforge.client.model.obj.WavefrontObject; //导入依赖的package包/类
public SimpleBlockOBJRenderer(Addon addon, int renderID, ResourceLocation modelLocation) {
    super(addon, renderID);
    final IModelCustom temp = AdvancedModelLoader.loadModel(modelLocation);
    if (!(temp instanceof WavefrontObject)) {
        throw new IllegalArgumentException("SimpleBlockOBJRenderer is only for WaveFrontObjects (.obj)!");
    }
    model = (WavefrontObject) temp;
}
 
开发者ID:ObsidianBox,项目名称:Magma,代码行数:9,代码来源:SimpleBlockOBJRenderer.java

示例15: renderStatic

import net.minecraftforge.client.model.obj.WavefrontObject; //导入依赖的package包/类
@Override
public void renderStatic(float size, TileEntity te){
    GL11.glPushMatrix();
    if(model instanceof WavefrontObject) {
        applyRenderPreps(te);
    }
    if(staticParts != null) {
        model.renderOnly(staticParts);
    } else {
        renderAll(te);
    }
    GL11.glPopMatrix();
}
 
开发者ID:MineMaarten,项目名称:PneumaticCraft,代码行数:14,代码来源:BaseModel.java


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