SG_OBJECT_TYPE   sgCObject::GetType() const

 

Description:

Returns the system type of the object.

 

Arguments:

No arguments.

 

Returned value:

 

The function returns the system type of the object. System object type is an internal library category and each geometrical object belongs to one of the following types:

point   -  the return value is SG_OT_POINT

line segment - the return value is SG_OT_LINE

circle - the return value is SG_OT_CICLE

arc - the return value is SG_OT_ARC

spline - the return value is SG_OT_SPLINE

contour - the return value is SG_OT_CONTOUR

text - the return value is SG_OT_TEXT

size - the return value is SG_OT_DIM

group - the return value is SG_OT_POINT

3D object - the return value is SG_OT_3D

If an error occurs the function returns SG_OT_BAD_OBJECT

 

The library user is unable to change the object type.

 

 

Define object type

 

Example:

 

sgLine*      line1 = sgCreateLine(0.0, 0.0, 0.0, 2.0, 3.0, 5.0);

assert(line2->GetType()==SG_OT_LINE);

 

See also:

Objects hierarchy   sgCObject methods