本文整理汇总了Java中gnu.trove.list.TFloatList.add方法的典型用法代码示例。如果您正苦于以下问题:Java TFloatList.add方法的具体用法?Java TFloatList.add怎么用?Java TFloatList.add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gnu.trove.list.TFloatList
的用法示例。
在下文中一共展示了TFloatList.add方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: grep
import gnu.trove.list.TFloatList; //导入方法依赖的package包/类
/** {@inheritDoc} */
public TFloatList grep(TFloatProcedure condition) {
TFloatList ret = new TFloatLinkedList();
for (TFloatLink l = head; got(l); l = l.getNext()) {
if (condition.execute(l.getValue()))
ret.add(l.getValue());
}
return ret;
}
示例2: inverseGrep
import gnu.trove.list.TFloatList; //导入方法依赖的package包/类
/** {@inheritDoc} */
public TFloatList inverseGrep(TFloatProcedure condition) {
TFloatList ret = new TFloatLinkedList();
for (TFloatLink l = head; got(l); l = l.getNext()) {
if (!condition.execute(l.getValue()))
ret.add(l.getValue());
}
return ret;
}
示例3: grep
import gnu.trove.list.TFloatList; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override
public TFloatList grep(TFloatProcedure condition) {
TFloatList ret = new TFloatLinkedList();
for (TFloatLink l = head; got(l); l = l.getNext()) {
if (condition.execute(l.getValue()))
ret.add(l.getValue());
}
return ret;
}
示例4: inverseGrep
import gnu.trove.list.TFloatList; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override
public TFloatList inverseGrep(TFloatProcedure condition) {
TFloatList ret = new TFloatLinkedList();
for (TFloatLink l = head; got(l); l = l.getNext()) {
if (!condition.execute(l.getValue()))
ret.add(l.getValue());
}
return ret;
}
示例5: parseComponents
import gnu.trove.list.TFloatList; //导入方法依赖的package包/类
private static void parseComponents(TFloatList destination, String line) {
final String[] components = line.split(COMPONENT_SEPARATOR);
final int componentsLength = components.length;
for (int i = 1; i < componentsLength; i++) {
destination.add(Float.parseFloat(components[i]));
}
}
示例6: addToBatch
import gnu.trove.list.TFloatList; //导入方法依赖的package包/类
public int addToBatch(Transform transform, Transform normalTransform, TFloatList vertexData, TIntList indexData, int indexOffset) {
int uv1 = 0, uv2 = 0, n = 0, c = 0;
for (int v = 0; v < vertices.size(); v += 3) {
Vector3f vert = new Vector3f(vertices.get(v), vertices.get(v + 1), vertices.get(v + 2));
transform.transform(vert);
vertexData.add(vert.x);
vertexData.add(vert.y);
vertexData.add(vert.z);
for (int i = 0; i < TEX_COORD_0_SIZE; ++i) {
vertexData.add(texCoord0.get(uv1 + i));
}
for (int i = 0; i < TEX_COORD_1_SIZE; ++i) {
vertexData.add(texCoord1.get(uv2 + i));
}
Vector3f norm = new Vector3f(normals.get(n), normals.get(n + 1), normals.get(n + 2));
normalTransform.transform(norm);
vertexData.add(norm.x);
vertexData.add(norm.y);
vertexData.add(norm.z);
for (int i = 0; i < COLOR_SIZE; ++i) {
vertexData.add(colors.get(c + i));
}
uv1 += TEX_COORD_0_SIZE;
uv2 += TEX_COORD_1_SIZE;
n += NORMAL_SIZE;
c += COLOR_SIZE;
}
TIntIterator indexIterator = indices.iterator();
while (indexIterator.hasNext()) {
indexData.add(indexIterator.next() + indexOffset);
}
return indexOffset + vertices.size() / 3;
}
示例7: processData
import gnu.trove.list.TFloatList; //导入方法依赖的package包/类
private void processData(List<Vector3f> rawVertices, List<Vector3f> rawNormals, List<Vector2f> rawTexCoords, List<Tuple3i[]> rawIndices, TFloatList vertices, TFloatList texCoord0, TFloatList normals, TIntList indices) throws IOException {
int vertCount = 0;
for (Tuple3i[] face : rawIndices) {
for (Tuple3i indexSet : face) {
if (indexSet.x > rawVertices.size()) {
throw new IOException("Vertex index out of range: " + indexSet.x);
}
Vector3f vertex = rawVertices.get(indexSet.x - 1);
vertices.add(vertex.x);
vertices.add(vertex.y);
vertices.add(vertex.z);
if (indexSet.y != -1) {
if (indexSet.y > rawTexCoords.size()) {
throw new IOException("TexCoord index out of range: " + indexSet.y);
}
Vector2f texCoord = rawTexCoords.get(indexSet.y - 1);
texCoord0.add(texCoord.x);
texCoord0.add(texCoord.y);
}
if (indexSet.z != -1) {
if (indexSet.z > rawNormals.size()) {
throw new IOException("Normal index out of range: " + indexSet.z);
}
Vector3f normal = rawNormals.get(indexSet.z - 1);
normals.add(normal.x);
normals.add(normal.y);
normals.add(normal.z);
}
}
for (int i = 0; i < face.length - 2; ++i) {
indices.add(vertCount);
indices.add(vertCount + i + 1);
indices.add(vertCount + i + 2);
}
vertCount += face.length;
}
}