Arrow Functions

Functions to create, modify, and query arrow objects, including start/end points, head dimensions, normal, and attributes.

MTK_Object_Arrow_GetAttributes()

Get the attributes of an arrow object.

Signature
int MTK_Object_Arrow_GetAttributes(
    MTK_Object* obj,
    int* autoscale, int* filled, int* numfacets,
    MTK_Object_ArrowType* arrowtype
    );
Parameters
  • obj: Pointer to an MTK_Object struct.

  • autoscale: Whether the arrow autoscales.

  • filled: Whether the arrow is filled.

  • numfacets:The number of facets in the arrow.

  • arrowtypeThe type of the arrow, one of the following enum values:

    enum MTK_Object_ArrowType
    {
        ARROW_2D,
        ARROW_3D,
        ARROW_FAN
    };
Returns

0 on success; any other value indicates failure.

MTK_Object_Arrow_GetEnd()

Get the end location of an arrow object.

Signature
int MTK_Object_Arrow_GetEnd(
    MTK_Object* obj, double* x, double* y, double* z);
Parameters
  • obj: Pointer to an MTK_Object struct.

  • x: The end x value.

  • y: The end y value.

  • z: The end z value.

Returns

0 on success; any other value indicates failure.

MTK_Object_Arrow_GetHeadInfo()

Get the length and width of the head of an arrow object.

Signature
int MTK_Object_Arrow_GetHeadInfo(
    MTK_Object* obj,
    double* length, double* width
    );
Parameters
  • obj: Pointer to an MTK_Object struct.

  • length: The head length.

  • width: The head width.

Returns

0 on success; any other value indicates failure.

MTK_Object_Arrow_GetNormal()

Get the normal vector of an arrow object.

Signature
int MTK_Object_Arrow_GetNormal(
    MTK_Object* obj, 
    double* x, double* y, double* z
    );
Parameters
  • obj: Pointer to an MTK_Object struct.

  • x: The normal x value.

  • y: The normal y value.

  • z: The normal z value.

Returns

0 on success; any other value indicates failure.

MTK_Object_Arrow_GetRelativeHeadInfo()

Get the relative length and width of the head of an arrow object.

Signature
int MTK_Object_Arrow_GetRelativeHeadInfo(
    MTK_Object* obj,
    double* length, double* width
    );
Parameters
  • obj: Pointer to an MTK_Object struct.

  • length: The relative head length.

  • width: The relative head width.

Returns

0 on success; any other value indicates failure.

MTK_Object_Arrow_GetScaledHeadInfo()

Get the scaled length and width of the head of an arrow object.

Signature
int MTK_Object_Arrow_GetScaledHeadInfo(
    MTK_Object* obj,
    double* length, double* width
    );
Parameters
  • obj: Pointer to an MTK_Object struct.

  • length: Pointer to a double for the scaled head length.

  • width: Pointer to a double for the scaled head width.

Returns

0 on success; any other value indicates failure.

MTK_Object_Arrow_GetStart()

Get the start location of an arrow object.

Signature
int MTK_Object_Arrow_GetStart(
    MTK_Object* obj,
    double* x, double* y, double* z
    );
Parameters
  • obj: Pointer to an MTK_Object struct.

  • x: The start x value.

  • y: The start y value.

  • z: The start z value.

Returns

0 on success; any other value indicates failure.

MTK_Object_Arrow_SetAttributes()

Set the attributes of an arrow object.

Signature
int MTK_Object_Arrow_SetAttributes(
    MTK_Object* obj, const int& autoscale,
    const int& filled, const int& numfacets,
    const MTK_Object_ArrowType& arrowtype
    );
Parameters
  • obj: Pointer to an MTK_Object struct.

  • autoscale: Whether the arrow autoscales.

  • filled: Whether the arrow is filled.

  • numfacets: Number of facets in the arrow.

  • arrowtype: The type of the arrow, one of the following enum values:

    enum MTK_Object_ArrowType
    {
        ARROW_2D,
        ARROW_3D,
        ARROW_FAN
    };
Returns

0 on success; any other value indicates failure.

MTK_Object_Arrow_SetEnd()

Set the end location of an arrow object.

Signature
int MTK_Object_Arrow_SetEnd(
    MTK_Object* obj,
    const double& x, const double& y, const double& z
    );
Parameters
  • obj: Pointer to an MTK_Object struct.

  • x: End x value.

  • y: End y value.

  • z: End z value.

Returns

0 on success; any other value indicates failure.

MTK_Object_Arrow_SetHeadInfo()

Set the length and width of the head of an arrow object.

Signature
int MTK_Object_Arrow_SetHeadInfo(
    MTK_Object* obj,
    const double& length, const double& width
    );
Parameters
  • obj: Pointer to an MTK_Object struct.

  • length: Head length value.

  • width: Head width value.

Returns

0 on success; any other value indicates failure.

MTK_Object_Arrow_SetNormal()

Set the normal of an arrow object.

Signature
int MTK_Object_Arrow_SetNormal(
    MTK_Object* obj,
    const double& x,
    const double& y,
    const double& z
    );
Parameters
  • obj: Pointer to an MTK_Object struct.

  • x: Normal x value.

  • y: Normal y value.

  • z: Normal z value.

Returns

0 on success; any other value indicates failure.

MTK_Object_Arrow_SetRelativeHeadInfo()

Set the relative length and width of the head of an arrow object.

Signature
int MTK_Object_Arrow_SetRelativeHeadInfo(
    MTK_Object* obj,
    const double& length,
    const double& width
    );
Parameters
  • obj: Pointer to an MTK_Object struct.

  • length: Relative head length value.

  • width: Relative head width value.

Returns

0 on success; any other value indicates failure.

MTK_Object_Arrow_SetStart()

Set the start location of an arrow object.

Signature
int MTK_Object_Arrow_SetStart(
    MTK_Object* obj,
    const double& x,
    const double& y,
    const double& z
    );
Parameters
  • obj: Pointer to an MTK_Object struct.

  • x: Start x value.

  • y: Start y value.

  • z: Start z value.

Returns

0 on success; any other value indicates failure.