MeshD constructor
MeshD({
- WasmStructPointer<
MeshD> ? originalPointer, - int vertexCount = 0,
- int triangleCount = 0,
- int boneCount = 0,
- List<
double> ? vertices, - List<
double> ? texcoords, - List<
double> ? texcoords2, - List<
double> ? normals, - List<
double> ? tangents, - List<
int> ? colors, - List<
int> ? indices, - List<
double> ? animVertices, - List<
double> ? animNormals, - List<
int> ? boneIds, - List<
double> ? boneWeights, - List<
MatrixD> ? boneMatrices, - int vaoId = 0,
- List<
int> ? vboId,
Implementation
MeshD({
super.originalPointer,
int vertexCount = 0,
int triangleCount = 0,
int boneCount = 0,
List<double>? vertices,
List<double>? texcoords,
List<double>? texcoords2,
List<double>? normals,
List<double>? tangents,
List<int>? colors,
List<int>? indices,
List<double>? animVertices,
List<double>? animNormals,
List<int>? boneIds,
List<double>? boneWeights,
List<MatrixD>? boneMatrices,
int vaoId = 0,
List<int>? vboId,
}) :
_vertexCount = vertexCount,
_triangleCount = triangleCount,
_boneCount = boneCount,
_vaoId = vaoId
{
_vertices = .new(
vertices ?? .filled(verticesCount, 0),
originalPointer == null ? null : .new(wasmReader(_o[.vertices]).pointer())
);
_texcoords = .new(
texcoords ?? .filled(texcoordsCount, 0),
originalPointer == null ? null : .new(wasmReader(_o[.texcoords]).pointer())
);
_texcoords2 = .new(
texcoords2 ?? .filled(texcoords2Count, 0),
originalPointer == null ? null : .new(wasmReader(_o[.texcoords2]).pointer())
);
_normals = .new(
normals ?? .filled(normalsCount, 0),
originalPointer == null ? null : .new(wasmReader(_o[.normals]).pointer())
);
_tangents = .new(
tangents ?? .filled(tangentsCount, 0),
originalPointer == null ? null : .new(wasmReader(_o[.tangents]).pointer())
);
_colors = .new(
colors ?? .filled(colorsCount, 0),
originalPointer == null ? null : .new(wasmReader(_o[.colors]).pointer())
);
_indices = .new(
indices ?? .filled(indicesCount, 0),
originalPointer == null ? null : .new(wasmReader(_o[.indices]).pointer())
);
_animVertices = .new(
animVertices ?? .filled(animVerticesCount, 0),
originalPointer == null ? null : .new(wasmReader(_o[.animVertices]).pointer())
);
_animNormals = .new(
animNormals ?? .filled(animNormalsCount, 0),
originalPointer == null ? null : .new(wasmReader(_o[.animNormals]).pointer())
);
_boneIds = .new(
boneIds ?? .filled(boneIdsCount, 0),
originalPointer == null ? null : .new(wasmReader(_o[.boneIds]).pointer())
);
_boneWeights = .new(
boneWeights ?? .filled(boneWeightsCount, 0),
originalPointer == null ? null : .new(wasmReader(_o[.boneWeights]).pointer())
);
_boneMatrices = .new(
boneMatrices ?? [],
originalPointer == null ? null : MatrixD.wasmPointer(wasmReader(_o[.boneMatrices]).pointer())
);
_vboId = .new(
vboId ?? .filled(vboIdCount, 0),
originalPointer == null ? null : .new(wasmReader(_o[.vboId]).pointer())
);
}