bool   sgCObject::SetUserGeometry(const char* user_geometry_ID,

                   const unsigned short user_geometry_size,

                   const void* user_geometry_data)

 

Description:

Sets a user-defined geometry to the object.

 

Arguments:

user_geometry_ID - the identifier of the user-defined geometry, 39 characters string (GUID)

user_geometry_size - size of the user-defined geometry,

user_geometry_data - pointer to the beginning of the block of data containing the user-defined geometry

 

Returned value:

If succeed the function returns true, otherwise false.

 

Example:

 

sgCPoint*     pnt = sgCreatePoint(0.0, 0.0, 0.0);

typedef struct

{

  int         first_field;

  char     second_field;

  double  third_field;

}  USER_DATA;

 

USER_DATA user_data;

user_data.first_field = -1000;

user_data.second_field = 'c';

user_data.third_field = 3.14159265;

 

pnt->SetUserGeometry("{BE18FFEE-77FB-40f8-B7D1-570D316F696A}",sizeof(USER_DATA), &user_data);

 

See also:

GetUserGeometry   GetUserGeometryID