本文整理汇总了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;
}
示例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
}
}
示例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();
}
示例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));
}
}
示例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
}
}
示例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
}
}
示例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.
}
示例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;
}
}
示例9: ParticleController
import com.jme3.scene.VertexBuffer; //导入方法依赖的package包/类
public ParticleController(ParticleRenderer renderer) {
this.renderer = renderer;
buffers = new EnumMap<>(VertexBuffer.Type.class);
}
示例10: getBuffer
import com.jme3.scene.VertexBuffer; //导入方法依赖的package包/类
public SharedBuffer getBuffer(VertexBuffer.Type type) {
return buffers.get(type);
}
示例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;
}
示例12: convertArrayType
import com.jme3.scene.VertexBuffer; //导入方法依赖的package包/类
protected abstract int convertArrayType(VertexBuffer.Type type);