nativeWriteInto method

  1. @override
void nativeWriteInto(
  1. MeshC p
)
override

Writes all fields directly into the native struct reference p. For nested structs, use writeInto as well.

Implementation

@override
void nativeWriteInto(MeshC p) {
  p.vertexCount = vertexCount;
  p.triangleCount = triangleCount;
  p.triangleCount = triangleCount;
  p.boneCount = boneCount;
  p.vaoId = vaoId;

  structOnOp((o) {
    p.vertexCount = o.ref.vertexCount;
    p.triangleCount = o.ref.triangleCount;
    p.triangleCount = o.ref.triangleCount;
    p.boneCount = o.ref.boneCount;
    p.vaoId = o.ref.vaoId;

    p.vertices = o.ref.vertices;
    p.texcoords = o.ref.texcoords;
    p.texcoords2 = o.ref.texcoords2;
    p.normals = o.ref.normals;
    p.tangents = o.ref.tangents;
    p.colors = o.ref.colors;
    p.indices = o.ref.indices;
    p.animVertices = o.ref.animVertices;
    p.animNormals = o.ref.animNormals;
    p.boneIds = o.ref.boneIds;
    p.boneWeights = o.ref.boneWeights;
    p.boneMatrices = o.ref.boneMatrices;
    p.vboId = o.ref.vboId;
  });

  if (p.vertices.address != 0) {
    for (int i = 0; i < vertices.length; i++) {
      p.vertices[i] = _vertices.inner[i];
    }
  }

  if (p.texcoords.address != 0) {
    for (int i = 0; i < texcoords.length; i++) {
      p.texcoords[i] = _texcoords.inner[i];
    }
  }

  if (p.texcoords2.address != 0) {
    for (int i = 0; i < texcoords2.length; i++) {
      p.texcoords2[i] = _texcoords2.inner[i];
    }
  }

  if (p.normals.address != 0) {
    for (int i = 0; i < normals.length; i++) {
      p.normals[i] = _normals.inner[i];
    }
  }

  if (p.tangents.address != 0) {
    for (int i = 0; i < tangents.length; i++) {
      p.tangents[i] = _tangents.inner[i];
    }
  }

  if (p.colors.address != 0) {
    for (int i = 0; i < colors.length; i++) {
      p.colors[i] = _colors.inner[i];
    }
  }

  if (p.indices.address != 0) {
    for (int i = 0; i < indices.length; i++) {
      p.indices[i] = _indices.inner[i];
    }
  }

  if (p.animVertices.address != 0) {
    for (int i = 0; i < animVertices.length; i++) {
      p.animVertices[i] = _animVertices.inner[i];
    }
  }

  if (p.animNormals.address != 0) {
    for (int i = 0; i < animNormals.length; i++) {
      p.animNormals[i] = _animNormals.inner[i];
    }
  }

  if (p.boneIds.address != 0) {
    for (int i = 0; i < boneIds.length; i++) {
      p.boneIds[i] = _boneIds.inner[i];
    }
  }

  if (p.boneWeights.address != 0) {
    for (int i = 0; i < boneWeights.length; i++) {
      p.boneWeights[i] = _boneWeights.inner[i];
    }
  }

  if (p.boneMatrices.address != 0) {
    for (int i = 0; i < boneMatrices.length; i++) {
      _boneMatrices.inner[i].nativeWriteInto((p.boneMatrices + i).ref);
    }
  }

  if (p.vboId.address != 0) {
    for (int i = 0; i < vboId.length; i++) {
      p.vboId[i] = _vboId.inner[i];
    }
  }
}