|
Rhino C++ API
9.0
|
#include <opennurbs_decals.h>
Public Types | |
| enum | AddDecalResults { AddDecalResults::Success, AddDecalResults::Failure, AddDecalResults::Duplicate, AddDecalResults::ReadOnly } |
| Results for AddDecal(). More... | |
Public Member Functions | |
| ON_DecalObjectAttributesWrapper (const ON_3dmObjectAttributes &a) | |
| Construct for read-only access to the decal information on the attributes. More... | |
| ON_DecalObjectAttributesWrapper (ON_3dmObjectAttributes &a) | |
| Construct for read/write access to the decal information on the attributes. More... | |
| AddDecalResults | AddDecal (const ON_Decal &decal) |
| int | CountDecalsOnAttributesUserData (void) const |
| Returns the number of decals stored on the attributes user data. More... | |
| bool | CullIdenticalDecals (void) |
| void | GetDecalCRCs (ON_SimpleArray< ON_DECAL_CRC > &crcs) const |
| Gets the decal CRCs of all the decals stored on the attributes. More... | |
| bool | MoveDecalAfter (ON_DECAL_CRC decal_crc, ON_DECAL_CRC decal_crc_after) |
| const ON_Decal * | NewDecalForRead (ON_DECAL_CRC decal_crc) const |
| ON_Decal * | NewDecalForWrite (ON_DECAL_CRC decal_crc) |
| bool | RemoveAllDecals (void) |
| bool | RemoveDecal (ON_DECAL_CRC decal_crc) |
| bool | RemoveValue (ON_DECAL_CRC decal_crc, const wchar_t *param_name) |
| bool | UpdateDecal (ON_DECAL_CRC decal_crc, const ON_Decal &decal) |
Static Public Member Functions | |
| static const ON_XMLNode * | FastDecalsNode (const ON_3dmObjectAttributes &attr) |
Friends | |
| class | ON_DecalCollection |
ON_DecalObjectAttributesWrapper
Decal properties for an object are stored as XML in user data on the object's attributes. This class is a wrapper around these attributes which provides decal functionality. The attributes passed to the constructor of the wrapper can be either const or non-const. If the attributes are const, the wrapper is set as read-only and any methods that attempt to modify the attributes or one of its decals will fail.
|
strong |
Results for AddDecal().
| ON_DecalObjectAttributesWrapper::ON_DecalObjectAttributesWrapper | ( | ON_3dmObjectAttributes & | a | ) |
Construct for read/write access to the decal information on the attributes.
| ON_DecalObjectAttributesWrapper::ON_DecalObjectAttributesWrapper | ( | const ON_3dmObjectAttributes & | a | ) |
Construct for read-only access to the decal information on the attributes.
| AddDecalResults ON_DecalObjectAttributesWrapper::AddDecal | ( | const ON_Decal & | decal | ) |
Adds a copy of a decal to the attributes, if possible. Returns Success if successful or an error code if the attributes does not contain such a decal, the wrapper was constructed with a const attributes object, or the added decal has the same CRC as an existing decal.
| int ON_DecalObjectAttributesWrapper::CountDecalsOnAttributesUserData | ( | void | ) | const |
Returns the number of decals stored on the attributes user data.
| bool ON_DecalObjectAttributesWrapper::CullIdenticalDecals | ( | void | ) |
Removes any decals that have duplicate CRCs. Returns a pointer to the decal if successful, null if the attributes does not contain such a decal or the wrapper was constructed with a const attributes object.
|
static |
| void ON_DecalObjectAttributesWrapper::GetDecalCRCs | ( | ON_SimpleArray< ON_DECAL_CRC > & | crcs | ) | const |
Gets the decal CRCs of all the decals stored on the attributes.
| bool ON_DecalObjectAttributesWrapper::MoveDecalAfter | ( | ON_DECAL_CRC | decal_crc, |
| ON_DECAL_CRC | decal_crc_after | ||
| ) |
Move the decal given by 'decal_crc' after the decal given by 'decal_crc_after'. If 'decal_crc_after' is nil, move the decal to the top. By 'move', we mean move the decal's XML node position within the parent XML node. Returns true if successful, false if the wrapper was constructed with a const attributes object.
| const ON_Decal* ON_DecalObjectAttributesWrapper::NewDecalForRead | ( | ON_DECAL_CRC | decal_crc | ) | const |
Creates a new const decal for the decal CRC given by 'decal_crc'. Returns a pointer to the decal if successful, null if the attributes does not contain such a decal.
| ON_Decal* ON_DecalObjectAttributesWrapper::NewDecalForWrite | ( | ON_DECAL_CRC | decal_crc | ) |
Creates a new non-const decal for the decal CRC given by 'decal_crc'. Returns a pointer to the decal if successful, null if the attributes does not contain such a decal or the wrapper was constructed with a const attributes object.
| bool ON_DecalObjectAttributesWrapper::RemoveAllDecals | ( | void | ) |
Removes all decals from the attributes, if possible. Returns true if successful, false if the wrapper was constructed with a const attributes object. */
| bool ON_DecalObjectAttributesWrapper::RemoveDecal | ( | ON_DECAL_CRC | decal_crc | ) |
Removes the decal given by 'decal_crc' from the attributes, if possible. Returns true if successful, false if the attributes does not contain such a decal or the wrapper was constructed with a const attributes object.
| bool ON_DecalObjectAttributesWrapper::RemoveValue | ( | ON_DECAL_CRC | decal_crc, |
| const wchar_t * | param_name | ||
| ) |
Removes the value given by 'param_name' from the XML of the decal given by 'decal_crc'. Returns true if successful, false if the parameter does not exist or the wrapper was constructed with a const attributes object. */
| bool ON_DecalObjectAttributesWrapper::UpdateDecal | ( | ON_DECAL_CRC | decal_crc, |
| const ON_Decal & | decal | ||
| ) |
Updates a decal on the attributes. The decal given by 'decal_crc' is found and updated (if possible) to be the same as 'decal'. Returns true if successful, false if the attributes does not contain such a decal or the wrapper was constructed with a const attributes object.
|
friend |
1.8.17