setC method
Copies the fields of the native struct o into this instance.
Implementation
@override
MeshD setC(MeshC o) {
onOriginalPointer((p) {
p.ref.vertexCount = o.vertexCount;
p.ref.triangleCount = o.triangleCount;
p.ref.boneCount = o.boneCount;
p.ref.vertices = o.vertices;
p.ref.texcoords = o.texcoords;
p.ref.texcoords2 = o.texcoords2;
p.ref.normals = o.normals;
p.ref.tangents = o.tangents;
p.ref.colors = o.colors;
p.ref.indices = o.indices;
p.ref.animVertices = o.animVertices;
p.ref.animNormals = o.animNormals;
p.ref.boneIds = o.boneIds;
p.ref.boneWeights = o.boneWeights;
p.ref.boneMatrices = o.boneMatrices;
p.ref.vboId = o.vboId;
});
vertexCount = o.vertexCount;
triangleCount = o.triangleCount;
boneCount = o.boneCount;
vertices = vertexCount > 0 && o.vertices.address != 0 ? .generate(verticesCount, (i) => (o.vertices + i).value) : [];
texcoords = vertexCount > 0 && o.texcoords.address != 0 ? .generate(texcoordsCount, (i) => (o.texcoords + i).value) : [];
texcoords2 = vertexCount > 0 && o.texcoords2.address != 0 ? .generate(texcoords2Count, (i) => (o.texcoords2 + i).value) : [];
normals = vertexCount > 0 && o.normals.address != 0 ? .generate(normalsCount, (i) => (o.normals + i).value) : [];
tangents = vertexCount > 0 && o.tangents.address != 0 ? .generate(tangentsCount, (i) => (o.tangents + i).value) : [];
colors = vertexCount > 0 && o.colors.address != 0 ? .generate(colorsCount, (i) => (o.colors + i).value) : [];
indices = triangleCount > 0 && o.indices.address != 0 ? .generate(indicesCount, (i) => (o.indices + i).value) : [];
animVertices = vertexCount > 0 && o.animVertices.address != 0 ? .generate(animVerticesCount, (i) => (o.animVertices + i).value) : [];
animNormals = vertexCount > 0 && o.animNormals.address != 0 ? .generate(animNormalsCount, (i) => (o.animNormals + i).value) : [];
boneIds = vertexCount > 0 && o.boneIds.address != 0 ? .generate(boneIdsCount, (i) => (o.boneIds + i).value) : [];
boneWeights = vertexCount > 0 && o.boneWeights.address != 0 ? .generate(boneWeightsCount, (i) => (o.boneWeights + i).value) : [];
boneMatrices = o.boneMatrices.address != 0 ? .generate(boneMatricesCount, (i) => (o.boneMatrices + i).toD()) : [];
vaoId = o.vaoId;
vboId = .generate(9, (i) => (o.vboId + i).value);
return this;
}