public SkeletalMeshData(List<Bone> bones, List<BoneWeight> weights, List<Vector2f> uvs, TIntList vertexStartWeights, TIntList vertexWeightCounts, TIntList indices, AABB staticAABB) { for (Bone bone : bones) { if (bone.getParent() == null) { rootBone = bone; break; } } this.bones.addAll(bones); this.weights.addAll(weights); this.uvs = ImmutableList.copyOf(uvs); this.vertexStartWeights.addAll(vertexStartWeights); this.vertexWeightCounts.addAll(vertexWeightCounts); this.indices.addAll(indices); this.staticAABB = staticAABB; calculateNormals(); }
public void setIndices(TIntList indices) { this.indices.clear(); this.indices.addAll(indices); }
texCoord0Mesh.addAll(loader.getTexCoord0()); normalsMesh.addAll(loader.getNormals()); indicesMesh.addAll(loader.getIndices());
/** * Returns an array containing the sub-field bucket indices for * each sub-field of the inputData. To get the associated field names for each of * the buckets, call getScalarNames(). * @param input The data from the source. This is typically a object with members. * * @return array of bucket indices */ public int[] getBucketIndices(String input) { TIntList l = new TIntArrayList(); Map<EncoderTuple, List<EncoderTuple>> encoders = getEncoders(); if(encoders != null && encoders.size() > 0) { for(EncoderTuple t : encoders.keySet()) { l.addAll(t.getEncoder().getBucketIndices(input)); } }else{ throw new IllegalStateException("Should be implemented in base classes that are not " + "containers for other encoders"); } return l.toArray(); }
/** * Returns an array containing the sub-field bucket indices for * each sub-field of the inputData. To get the associated field names for each of * the buckets, call getScalarNames(). * @param input The data from the source. This is typically a object with members. * * @return array of bucket indices */ public int[] getBucketIndices(double input) { TIntList l = new TIntArrayList(); Map<EncoderTuple, List<EncoderTuple>> encoders = getEncoders(); if(encoders != null && encoders.size() > 0) { for(EncoderTuple t : encoders.keySet()) { l.addAll(t.getEncoder().getBucketIndices(input)); } }else{ throw new IllegalStateException("Should be implemented in base classes that are not " + "containers for other encoders"); } return l.toArray(); }
/** * Returns an array containing the sub-field bucket indices for * each sub-field of the inputData. To get the associated field names for each of * the buckets, call getScalarNames(). * @param input The data from the source. This is typically a object with members. * * @return array of bucket indices */ public int[] getBucketIndices(DateTime input) { TDoubleList scalars = getScalars(input); TIntList l = new TIntArrayList(); List<EncoderTuple> encoders = getEncoders(this); if(encoders != null && encoders.size() > 0) { int i = 0; for(EncoderTuple t : encoders) { l.addAll(t.getEncoder().getBucketIndices(scalars.get(i))); ++i; } }else{ throw new IllegalStateException("Should be implemented in base classes that are not " + "containers for other encoders"); } return l.toArray(); }
/** * Replaces the contents of this vertex data by the provided one. This is a deep copy. The vertex attribute are each individually cloned. * * @param data The data to copy. */ public void copy(VertexData data) { clear(); indices.addAll(data.indices); final TIntObjectIterator<VertexAttribute> iterator = data.attributes.iterator(); while (iterator.hasNext()) { iterator.advance(); attributes.put(iterator.key(), iterator.value().clone()); } nameToIndex.putAll(data.nameToIndex); } }
vertexData.getIndices().addAll(indices); return vertexData;