void sgCObject::SetAttribute(SG_OBJECT_ATTR_ID attributeId, unsigned short attributeValue)
Description:
Returns the value of the corresponding object attribute.
Arguments:
attributeId - object attribute identifier. Can have the following values:
SG_OA_COLOR - the 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.
•12 user flags are described
#define SG_DS_USER_1 0x8000
#define SG_DS_USER_2 0x4000
#define SG_DS_USER_3 0x2000
#define SG_DS_USER_4 0x1000
#define SG_DS_USER_5 0x0800
#define SG_DS_USER_6 0x0400
#define SG_DS_USER_7 0x0020
#define SG_DS_USER_8 0x0010
#define SG_DS_USER_9 0x0008
#define SG_DS_USER_10 0x0004
#define SG_DS_USER_11 0x0002
#define SG_DS_USER_12 0x0001
attributeValue - value of the corresponding attribute
Returned value:
No values.
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 GetAttribute