Schema Functions

Function to query block model schemas, including their count, dimensions, extents, and size ranges.

MTK_BlockModel_GetSchemaDimensions()

Get dimensions of a schema.

Signature
int MTK_BlockModel_GetSchemaDimensions(
    MTK_BlockModel* bmodel,
    const int& nsch,
    double* ix, double* iy, double* iz
    );
Parameters
  • bmodel: Pointer to an MTK_BlockModel struct.

  • nsch Schema index to query.

  • ix, iy, iz: The number of blocks in each direction.

Returns

0 on success; any other value indicates failure.

MTK_BlockModel_GetSchemaExtent()

Get specific schema extent.

Signature
int MTK_BlockModel_GetSchemaExtent(
    MTK_BlockModel* bmodel,
    const int& nsch,
    double* x0, double* y0, double* z0,
    double* x1, double* y1, double* z1
    );
Parameters
  • bmodel: Pointer to an MTK_BlockModel struct.

  • nsch Schema index to query.

  • x0: Lower left x-coordinate

  • y0: Lower left y-coordinate

  • z0: Lower left z-coordinate

  • x1: Upper right x-coordinate

  • y1: Upper right y-coordinate

  • z1: Upper right z-coordinate

Returns

0 on success; any other value indicates failure

MTK_BlockModel_GetSchemaSizes()

Get specific schema sizes (min/max).

Signature
int MTK_BlockModel_GetSchemaSizes(
    MTK_BlockModel* bmodel,
    const int& nsch,
    double* minx, double* miny, double* minz,
    double* maxx, double* maxy, double* maxz
    );
Parameters
  • bmodel: Pointer to an MTK_BlockModel struct.

  • nsch Schema index to query.

  • minx, miny, minz: Lower limit.

  • maxx, maxy, maxz: Upper limit.

Returns

0 on success; any other value indicates failure.

MTK_BlockModel_NSchemas()

Number of schemas.

Signature
int MTK_BlockModel_NSchemas(MTK_BlockModel* bmodel);
Parameters
  • bmodel: Pointer to an MTK_BlockModel struct.

Returns
  • int: The number of schemas.

  • -1: Failed.