C3D Toolkit
Kernel - 117982, Vision - 2.9.2.2
|
Material properties. More...
#include <attr_color.h>
Public Member Functions | |
MbVisual (float a=MB_AMBIENT, float d=MB_DIFFUSE, float s=MB_SPECULARITY, float h=MB_SHININESS, float t=MB_OPACITY, float e=MB_EMISSION) | |
Constructor. | |
MbVisual (uint8 a, uint8 d, uint8 s, uint8 h, uint8 t, uint8 e) | |
Constructor. | |
virtual | ~MbVisual () |
Destructor. | |
MbeAttributeType | AttributeType () const override |
Get subtype of an attribute. | |
MbAttribute & | Duplicate (MbRegDuplicate *=nullptr) const override |
Create a copy of the element. | |
bool | IsSame (const MbAttribute &, double accuracy=PARAM_ACCURACY) const override |
Determine whether objects are equal. More... | |
bool | Init (const MbAttribute &) override |
Initialize data. | |
void | Init (float a=MB_AMBIENT, float d=MB_DIFFUSE, float s=MB_SPECULARITY, float h=MB_SHININESS, float t=MB_OPACITY, float e=MB_EMISSION, uint rgb=0) |
Set properties for OpenGL. | |
void | Init (const MbRGBA &ambient, const MbRGBA &diffuse, const MbRGBA &specular, const MbRGBA &emission, uint8 shininess, uint8 opacity, uint8 chrom) |
Set properties for OpenGL. | |
void | Get (float &a, float &d, float &s, float &h, float &t, float &e, uint rgb=0) const |
Get properties for OpenGL. | |
void | Get (MbRGBA &ambient, MbRGBA &diffuse, MbRGBA &specular, MbRGBA &emission, uint8 &shininess, uint8 &opacity, uint8 &chrom) const |
Get properties for OpenGL. | |
float | Ambient (uint rgb=0) const |
Get some properties for OpenGL. | |
const MbRGBA & | GetAmbient () const |
Get some properties for OpenGL. | |
void | SetAmbient (float v, uint rgb=0) |
Set some properties for OpenGL. | |
void | SetAmbient (const MbRGBA &v) |
Set some properties for OpenGL. | |
uint32 | GetColor () const |
Methods working with a color component (use in case only the color is used). | |
void | GetProperties (MbProperties &) override |
Get properties of the object. | |
size_t | SetProperties (const MbProperties &) override |
Set properties of object. | |
MbePrompt | GetPropertyName () override |
Get a name of object property. | |
![]() | |
MbeAttributeType | AttributeFamily () const override |
Get attribute type. | |
void | OnChangeOwner (const MbAttributeContainer &owner) override |
Perform actions which are not associated with other actions when changing the owner. More... | |
void | OnConvertOwner (const MbAttributeContainer &owner, MbAttributeContainer &other) override |
void | OnTransformOwner (const MbAttributeContainer &owner, const MbMatrix3D &, MbRegTransform *=nullptr) override |
Actions when transforming the owner. | |
void | OnMoveOwner (const MbAttributeContainer &owner, const MbVector3D &, MbRegTransform *=nullptr) override |
void | OnRotateOwner (const MbAttributeContainer &owner, const MbAxis3D &, double angle, MbRegTransform *=nullptr) override |
void | OnCopyOwner (const MbAttributeContainer &owner, MbAttributeContainer &other, MbRegDuplicate *=nullptr) override |
void | OnMergeOwner (const MbAttributeContainer &owner, MbAttributeContainer &other) override |
void | OnReplaceOwner (const MbAttributeContainer &owner, MbAttributeContainer &other) override |
void | OnSplitOwner (const MbAttributeContainer &owner, const std::vector< MbAttributeContainer * > &others) override |
void | OnDeleteOwner (const MbAttributeContainer &owner) override |
void | GetProperties (MbProperties &) override |
Get properties of the object. | |
size_t | SetProperties (const MbProperties &) override |
Set properties of object. | |
MbePrompt | GetPropertyName () override |
Get a name of object property. | |
![]() | |
virtual | ~MbAttribute () |
Destructor. | |
OnChangeOwnerAction | GetActionForChange () const |
Get behavior of attribute when changing the owner. | |
OnConvertOwnerAction | GetActionForConvert () const |
Get behavior of attribute when converting the owner. | |
OnTransformOwnerAction | GetActionForTransform () const |
Get behavior of attribute when transforming the owner. | |
OnCopyOwnerAction | GetActionForCopy () const |
Get behavior of attribute when copying the owner. | |
OnMergeOwnerAction | GetActionForMerge () const |
Get behavior of attribute when merging the owner. | |
OnReplaceOwnerAction | GetActionForReplace () const |
Get behavior of attribute when replacing the owner. | |
OnSplitOwnerAction | GetActionForSplit () const |
Get behavior of attribute when splitting the owner. | |
OnDeleteOwnerAction | GetActionForDelete () const |
Get behavior of attribute when deleting the owner. | |
void | SetActionForChange (OnChangeOwnerAction a) |
Set behavior of attribute when changing the owner. | |
void | SetActionForConvert (OnConvertOwnerAction a) |
Set behavior of attribute when converting the owner. | |
void | SetActionForTransform (OnTransformOwnerAction a) |
Set behavior of attribute when transforming the owner. | |
void | SetActionForCopy (OnCopyOwnerAction a) |
Set behavior of attribute when copying the owner. | |
void | SetActionForMerge (OnMergeOwnerAction a) |
Set behavior of attribute when merging the owner. | |
void | SetActionForReplace (OnReplaceOwnerAction a) |
Set behavior of attribute when replacing the owner. | |
void | SetActionForSplit (OnSplitOwnerAction a) |
Set behavior of attribute when splitting the owner. | |
void | SetActionForDelete (OnDeleteOwnerAction a) |
Set behavior of attribute when deleting the owner. | |
void | InitActions (const MbAttribute &) |
Define behavior of an attribute by another attribute. | |
bool | IsFamilyRegistrable () const override |
Whether the object belongs to a registrable family. | |
MbeRefType | RefType () const override |
Get registrational type (for copying, duplication) | |
virtual MbeImplicationType | ImplicationType () const |
Get attribute container type. | |
bool | IsA (MbeAttributeType t) const |
Check an attribute type. | |
![]() | |
refcount_t | GetUseCount () const |
Get count of references (get count of owners of an object). | |
refcount_t | AddRef () const |
Increase count of references by one. | |
refcount_t | DecRef () const |
Decrease count of references by one. | |
refcount_t | Release () const |
Decrease count of references by one and if count of references became zero, then remove itself. | |
![]() | |
TapeBase (RegistrableRec regs=noRegistrable) | |
Constructor. | |
TapeBase (const TapeBase &) | |
Copy-constructor. | |
virtual | ~TapeBase () |
Destructor. | |
RegistrableRec | GetRegistrable () const |
Whether the stream class is registrable. | |
void | SetRegistrable (RegistrableRec regs=registrable) const |
Set the state of registration of the stream class. | |
virtual const char * | GetPureName (const VersionContainer &) const |
Get the class name. | |
Static Public Member Functions | |
static SPtr< MbVisual > | Create (uint32 c) |
Create an object by a color component. | |
static SPtr< MbVisual > | Create (int iR, int iG, int iB) |
Create an object by a color component. | |
static SPtr< MbVisual > | Create (const MbRGBA &c) |
Create an object by a color component. | |
Protected Member Functions | |
MbVisual (const MbVisual &init) | |
Copy constructor. | |
![]() | |
MbAttribute () | |
Constructor without parameters for inheritors. | |
MbAttribute (const MbAttribute &) | |
Copy constructor for inheritors. | |
![]() | |
MbRefItem () | |
Constructor without parameters. | |
Additional Inherited Members | |
![]() | |
enum | OnChangeOwnerAction { chn_Self = 0 , chn_Free , chn_Keep , chn_ActCount } |
enum | OnConvertOwnerAction { cnv_Self = 0 , cnv_Free , cnv_Keep , cnv_Copy , cnv_Convert , cnv_ActCount } |
enum | OnTransformOwnerAction { trn_Self = 0 , trn_Free , trn_Keep , trn_ActCount } |
enum | OnCopyOwnerAction { cpy_Self = 0 , cpy_Free , cpy_Keep , cpy_Copy , cpy_ActCount } |
enum | OnMergeOwnerAction { mrg_Self = 0 , mrg_Free , mrg_Keep , mrg_KeepAll , mrg_KeepRep , mrg_ActCount } |
enum | OnReplaceOwnerAction { rep_Self = 0 , rep_Free , rep_Keep , rep_KeepAll , rep_KeepRep , rep_ActCount } |
enum | OnSplitOwnerAction { spl_Self = 0 , spl_Free , spl_Keep , spl_Copy , spl_ActCount } |
enum | OnDeleteOwnerAction { del_Self = 0 , del_Free , del_ActCount } |
Material properties.
Material properties (properties for OpenGL). Contains color and coefficients.
Component _ambient contains RED, GREEN, BLUE of a color and background coefficient in range 0.0 - 1.0 (0 - 255 in uint8).
Component _diffuse contains RED, GREEN, BLUE of a color and coefficient of diffuse reflection in range 0.0 - 1.0 (0 - 255 in uint8).
Component _specular contains RED, GREEN, BLUE of a color and coefficient of specular reflection in range 0.0 - 1.0 (0 - 255 in uint8).
Component _emission contains RED, GREEN, BLUE of a color and emissivity coefficient in range 0.0 - 1.0 (0 - 255 in uint8).
Component _shininess contains shininess coefficient (index according to the law of specular reflection) in range 0 - 128 (in uint8).
Component _opacity contains opacity coefficient (coefficient of total reflection) in range 0.0 (transparent) - 1.0 (opaque) (range 0 - 255 in uint8).
Component _chrom contains coefficient of specular reflection in range 0.0 - 1.0 (0 - 255 in uint8).
|
overridevirtual |
Determine whether objects are equal.
Objects of the same types with similar (equal) data are considered to be equal.
[in] | item | - Objects for comparison. |
[in] | accuracy | - The accuracy to compare. |
Implements MbAttribute.