VertexDeclaration
Inheritance: java.lang.Object
All Implemented Interfaces: java.lang.Iterable, java.lang.Comparable
public final class VertexDeclaration implements Iterable<VertexField>, Comparable<VertexDeclaration>
自定义顶点结构的声明
构造函数
| 构造函数 | 描述 |
|---|---|
| VertexDeclaration() |
方法
| 方法 | 描述 |
|---|---|
| addField(int dataType, VertexFieldSemantic semantic) | 添加新的顶点字段 |
| addField(int dataType, VertexFieldSemantic semantic, int index) | 添加新的顶点字段 |
| addField(int dataType, VertexFieldSemantic semantic, int index, String alias) | 添加新的顶点字段 |
| clear() | 清除所有字段。 |
| compareTo(VertexDeclaration other) | 将此实例与指定对象进行比较,并返回它们相对值的指示。 |
| equals(Object obj) | 确定此实例与指定对象(该对象也必须是 VertexDeclaration 对象)是否具有相同的值。 |
| fromGeometry(Geometry geometry, boolean useFloat) | 基于 Geometry 的布局创建一个 VertexDeclaration。 |
| get(int index) | 按索引获取 VertexField |
| getClass() | |
| getCount() | 获取此 VertexDeclaration 中定义的所有字段的计数 |
| getSealed() | 当 VertexDeclaration 被 TriMesh 使用后将被封闭,不再允许修改。 |
| getSize() | 顶点结构的字节大小。 |
| hashCode() | 返回此字符串的哈希码。 |
| iterator() | 获取一个枚举器以遍历此实例中的所有顶点字段。 |
| notify() | |
| notifyAll() | |
| toString() | VertexDeclaration 的字符串表示 |
| wait() | |
| wait(long arg0) | |
| wait(long arg0, int arg1) |
VertexDeclaration()
public VertexDeclaration()
addField(int dataType, VertexFieldSemantic semantic)
public VertexField addField(int dataType, VertexFieldSemantic semantic)
添加新的顶点字段
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| dataType | int | 顶点字段的数据类型 |
| semantic | VertexFieldSemantic | 此字段将用于何处 |
Returns: VertexField
addField(int dataType, VertexFieldSemantic semantic, int index)
public VertexField addField(int dataType, VertexFieldSemantic semantic, int index)
添加新的顶点字段
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| dataType | int | 顶点字段的数据类型 |
| semantic | VertexFieldSemantic | 此字段将用于何处 |
| 索引 | int | 相同字段语义的索引,-1 表示自动生成 |
Returns: VertexField
addField(int dataType, VertexFieldSemantic semantic, int index, String alias)
public VertexField addField(int dataType, VertexFieldSemantic semantic, int index, String alias)
添加新的顶点字段
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| dataType | int | 顶点字段的数据类型 |
| semantic | VertexFieldSemantic | 此字段将用于何处 |
| 索引 | int | 相同字段语义的索引,-1 表示自动生成 |
| 别名 | java.lang.String | 字段的别名 |
Returns: VertexField
clear()
public void clear()
清除所有字段。
compareTo(VertexDeclaration other)
public int compareTo(VertexDeclaration other)
将此实例与指定对象进行比较,并返回它们相对值的指示。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| other | VertexDeclaration |
Returns: int
equals(Object obj)
public boolean equals(Object obj)
确定此实例与指定对象(该对象也必须是 VertexDeclaration 对象)是否具有相同的值。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| obj | java.lang.Object |
Returns: 布尔
fromGeometry(Geometry geometry, boolean useFloat)
public static VertexDeclaration fromGeometry(Geometry geometry, boolean useFloat)
基于 Geometry 的布局创建一个 VertexDeclaration。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| geometry | Geometry | |
| useFloat | 布尔 | 使用 float 而不是 double 类型 |
Returns: VertexDeclaration
get(int index)
public VertexField get(int index)
按索引获取 VertexField
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| 索引 | int |
Returns: VertexField - the VertexField by index
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getCount()
public int getCount()
获取此 VertexDeclaration 中定义的所有字段的计数
Returns: int - 此 VertexDeclaration 中定义的所有字段的计数
getSealed()
public boolean getSealed()
当 VertexDeclaration 被 TriMesh 使用后将被封闭,不再允许修改。
Returns: boolean - 当 VertexDeclaration 被 TriMesh 使用后将被封闭,不再允许修改。
getSize()
public int getSize()
顶点结构的字节大小。
Returns: int - 顶点结构的字节大小。
hashCode()
public int hashCode()
返回此字符串的哈希码。
Returns: int - 32 位有符号整数哈希码。
iterator()
public Iterator<VertexField> iterator()
获取一个枚举器以遍历此实例中的所有顶点字段。
Returns: java.util.Iterator<com.aspose.threed.VertexField> - 枚举器
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
toString()
public String toString()
VertexDeclaration 的字符串表示
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final void wait(long arg0)
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| arg0 | long | |
| arg1 | int |