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


Java VertexBuffer.Type方法代码示例

本文整理汇总了Java中com.jme3.scene.VertexBuffer.Type方法的典型用法代码示例。如果您正苦于以下问题:Java VertexBuffer.Type方法的具体用法?Java VertexBuffer.Type怎么用?Java VertexBuffer.Type使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.jme3.scene.VertexBuffer的用法示例。


在下文中一共展示了VertexBuffer.Type方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getAttribute

import com.jme3.scene.VertexBuffer; //导入方法依赖的package包/类
public Attribute getAttribute(VertexBuffer.Type attribType){
    int ordinal = attribType.ordinal();
    Attribute attrib = attribs.get(ordinal);
    if (attrib == null){
        attrib = new Attribute();
        attrib.name = attribType.name();
        attribs.put(ordinal, attrib);
    }
    return attrib;
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:11,代码来源:Shader.java

示例2: convertArrayType

import com.jme3.scene.VertexBuffer; //导入方法依赖的package包/类
private int convertArrayType(VertexBuffer.Type type) {
    switch (type) {
        case Position:
            return GL_VERTEX_ARRAY;
        case Normal:
            return GL_NORMAL_ARRAY;
        case TexCoord:
            return GL_TEXTURE_COORD_ARRAY;
        case Color:
            return GL_COLOR_ARRAY;
        default:
            return -1; // unsupported
    }
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:15,代码来源:LwjglGL1Renderer.java

示例3: AddAttributeDialog

import com.jme3.scene.VertexBuffer; //导入方法依赖的package包/类
/**
 * Creates new form AddMaterialParameter
 */
public AddAttributeDialog(java.awt.Frame parent, boolean modal, Diagram diagram, Point clickPosition) {
    super(parent, modal);
    initComponents();
    DefaultComboBoxModel model = new DefaultComboBoxModel();

    for (VertexBuffer.Type attr : VertexBuffer.Type.values()) {
        model.addElement("in" + attr.name());
    }
    this.diagram = diagram;
    this.clickPosition = clickPosition;
    nameField.setModel(model);
    updateType();
}
 
开发者ID:jMonkeyEngine,项目名称:sdk,代码行数:17,代码来源:AddAttributeDialog.java

示例4: toJME

import com.jme3.scene.VertexBuffer; //导入方法依赖的package包/类
public static VertexBuffer.Type toJME(VertexArray.Attrib v) {
	switch(v){
		case position:
			return Type.Position;
		case normal:
			return Type.Normal;
		case bitangent:
			return Type.Binormal;
		case tangent:
			return Type.Tangent;
		case color:
			return Type.Color;
		case texcoord:
			return Type.TexCoord;
		case texcoord2:
			return Type.TexCoord2;
		case texcoord3:
			return Type.TexCoord3;
		case texcoord4:
			return Type.TexCoord4;
		case texcoord5:
			return Type.TexCoord5;
		case texcoord6:
			return Type.TexCoord6;
		case texcoord7:
			return Type.TexCoord7;
		case texcoord8:
			return Type.TexCoord8;
		default:
			throw new IllegalArgumentException(String.format("doesn't support %s : %s",v==null?"?":v.getClass(),v));
	}
}
 
开发者ID:xbuf,项目名称:jme3_xbuf,代码行数:33,代码来源:PrimitiveExt.java

示例5: convertArrayType

import com.jme3.scene.VertexBuffer; //导入方法依赖的package包/类
private int convertArrayType(VertexBuffer.Type type) {
    switch (type) {
        case Position:
            return gl.GL_VERTEX_ARRAY;
        case Normal:
            return gl.GL_NORMAL_ARRAY;
        case TexCoord:
            return gl.GL_TEXTURE_COORD_ARRAY;
        case Color:
            return gl.GL_COLOR_ARRAY;
        default:
            return -1; // unsupported
    }
}
 
开发者ID:chototsu,项目名称:MikuMikuStudio,代码行数:15,代码来源:JoglRenderer.java

示例6: convertArrayType

import com.jme3.scene.VertexBuffer; //导入方法依赖的package包/类
@Override
protected int convertArrayType(VertexBuffer.Type type) {
    switch (type) {
        case Position:
            return GLPointerFunc.GL_VERTEX_ARRAY;
        case Normal:
            return GLPointerFunc.GL_NORMAL_ARRAY;
        case TexCoord:
            return GLPointerFunc.GL_TEXTURE_COORD_ARRAY;
        case Color:
            return GLPointerFunc.GL_COLOR_ARRAY;
        default:
            return -1; // unsupported
    }
}
 
开发者ID:chototsu,项目名称:MikuMikuStudio,代码行数:16,代码来源:JoglRenderer.java

示例7: clearBuffer

import com.jme3.scene.VertexBuffer; //导入方法依赖的package包/类
@Override
public void clearBuffer(VertexBuffer.Type type) {
    super.clearBuffer(type); //To change body of generated methods, choose Tools | Templates.
}
 
开发者ID:JulienGreen,项目名称:RoadTessalation,代码行数:5,代码来源:RoadMesh.java

示例8: updateType

import com.jme3.scene.VertexBuffer; //导入方法依赖的package包/类
private void updateType() {
    VertexBuffer.Type attr = VertexBuffer.Type.valueOf(((String) nameField.getSelectedItem()).replaceFirst("in", ""));
    switch (attr) {

        case BoneWeight:

        case BindPoseNormal:
        case Binormal:

        case Normal:
            typeField.setText("vec3");
            break;

        case Size:
            typeField.setText("float");
            break;

        case Position:
        case BindPosePosition:
        case BindPoseTangent:
        case Tangent:
        case Color:
            typeField.setText("vec4");
            break;
        case InterleavedData:
            typeField.setText("int");
            break;
        case Index:
            typeField.setText("uint");
            break;
        case BoneIndex:
            typeField.setText("uvec4");
            break;

        case TexCoord:
        case TexCoord2:
        case TexCoord3:
        case TexCoord4:
        case TexCoord5:
        case TexCoord6:
        case TexCoord7:
        case TexCoord8:
            typeField.setText("vec2");
            break;
    }
}
 
开发者ID:jMonkeyEngine,项目名称:sdk,代码行数:47,代码来源:AddAttributeDialog.java

示例9: ParticleController

import com.jme3.scene.VertexBuffer; //导入方法依赖的package包/类
public ParticleController(ParticleRenderer renderer) {
	this.renderer = renderer;
	buffers = new EnumMap<>(VertexBuffer.Type.class);
}
 
开发者ID:shamanDevel,项目名称:jME3-OpenCL-Library,代码行数:5,代码来源:ParticleController.java

示例10: getBuffer

import com.jme3.scene.VertexBuffer; //导入方法依赖的package包/类
public SharedBuffer getBuffer(VertexBuffer.Type type) {
	return buffers.get(type);
}
 
开发者ID:shamanDevel,项目名称:jME3-OpenCL-Library,代码行数:4,代码来源:ParticleController.java

示例11: SharedBuffer

import com.jme3.scene.VertexBuffer; //导入方法依赖的package包/类
/**
 * Creates a new vertex buffer with the specified properties and shares it 
 * with OpenCL. The initial buffer will be uninitialized.
 * @param format the format of the buffer
 * @param type the type of each component
 * @param components the number of components per entry
 * @param size the size of the buffer
 */
public SharedBuffer(VertexBuffer.Format format, VertexBuffer.Type type, int components, int size) {
	this.format = format;
	this.type = type;
	this.components = components;
	this.size = size;
}
 
开发者ID:shamanDevel,项目名称:jME3-OpenCL-Library,代码行数:15,代码来源:SharedBuffer.java

示例12: convertArrayType

import com.jme3.scene.VertexBuffer; //导入方法依赖的package包/类
protected abstract int convertArrayType(VertexBuffer.Type type); 
开发者ID:chototsu,项目名称:MikuMikuStudio,代码行数:2,代码来源:AbstractRenderer.java


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