ImageGear for C and C++ on Windows v19.10 - Updated
IG_vect_ent_rotate
API Reference Guide > Vector Component API Reference > Vector Component Functions Reference > Entity Functions > IG_vect_ent_rotate

This function rotates the entity on the specified angle about the specified vector.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_vect_ent_rotate(
   HIG_VECT_ENTITY hEntity,
   VECT_REAL fAngle,
   VECT_REAL i,
   VECT_REAL j,
   VECT_REAL k,
   VECT_BOOL bBefore
);

Arguments:

Name Type Description
hEntity HIG_VECT_ENTITY Handle of the entity to be rotated.
fAngle VECT_REAL Rotation angle, in radians.
i VECT_REAL X coordinate of the rotation vector.
j VECT_REAL Y coordinate of the rotation vector.
k VECT_REAL Z coordinate of the rotation vector.
bBefore VECT_BOOL Specifies how the rotation matrix is multiplied by the entity matrix. TRUE means right multiplication; FALSE means left multiplication.

Return Value:

Returns 0 if successful. Otherwise, returns the number of ImageGear errors that occurred during this function call.

Supported Raster Image Formats:

This function does not process image pixels.

Sample:

Vector

Remarks:

This function creates rotation matrix using angle fAngle, and rotation vector i, j, k and multiplies it by the correct entity matrix according to the bBefore flag.