B2d_shape_get_type - hpgDesigns/hpgdesigns-dev.io GitHub Wiki

Description

Gets the type of the given shape and returns the result.

Parameters

Parameter Description
id index of the shape

Return Values

integer: Returns the shape constant of the shapes type.

Example Call

// demonstrates getting the type of a shape
switch (b2d_shape_get_type(myshape, 1)) {
  case b2d_polygon:
    // its a polygon shape
    break;
  case b2d_edge:
    // its an edge shape
    break;
}

NOTOC