unsigned short   sgCObject::GetAttribute(SG_OBJECT_ATTR_ID attributeId) const

 

Description:

Returns the value of the corresponding object attribute.

 

Arguments:

attributeId - object attribute identifier. Can have the following values:

SG_OA_COLOR - a number of the color from the user-defined palette

SG_OA_LINE_TYPE - object lines type - specified by the user as well

SG_OA_LINE_THICKNESS - object lines thickness (wireframe lines thickness for 3D objects)

SG_OA_LAYER - object layer

SG_OA_DRAW_STATE - object draw type. Can posesses the values specified by the following flags:

SG_DS_FRAME  - wireframe model of a 3D object

SG_DS_HIDE      -  object is hidden

SG_DS_GABARITE  - gabarit box of the object

SG_DS_FULL      -  full drawing of 3D objects.

 

Returned value:

The value of the corresponding object attribute.

 

Example:

 

sgCBox*  box    = sgCreateBox(3.0, 5.0, 10.0);

box->SetAttribute(SG_OA_DRAW_STATE, SG_DS_FRAME | SG_DS_GABARITE);

box->SetAttribute(SG_OA_COLOR,100);

assert(box->GetATTRIBUTE(SG_OA_COLOR)==100);

 

See also:

Objects hierarchy   sgCObject methods   SetAttribute