libHSPlasma
|
Describes a wearable Clothing Item for avatars. More...
#include <plClothingItem.h>
Public Types | |
enum | LODLevels { kLODHigh, kLODMedium, kLODLow, kNumLODLevels } |
enum | ClothingLayers { kLayerBase, kLayerSkin, kLayerSkinBlend1, kLayerSkinBlend2, kLayerSkinBlend3, kLayerSkinBlend4, kLayerSkinBlend5, kLayerSkinBlend6, kLayerTint1, kLayerTint2, kLayerMax } |
enum | Tilesets { kSetShirt, kSetFace, kSetShoe, kSetPants, kSetHand, kSetPlayerBook, kSetGlasses, kSetKI, kSetEye, kSetBackpack, kMaxTileset } |
enum | Types { kTypePants, kTypeShirt, kTypeLeftHand, kTypeRightHand, kTypeFace, kTypeHair, kTypeLeftFoot, kTypeRightFoot, kTypeAccessory, kMaxType } |
enum | Groups { kClothingBaseMale, kClothingBaseFemale, kClothingBaseNoOptions, kMaxGroup } |
Public Member Functions | |
plClothingItem () | |
virtual | ~plClothingItem () |
virtual void | read (hsStream *S, plResManager *mgr) |
virtual void | write (hsStream *S, plResManager *mgr) |
plString | getItemName () const |
plString | getDescription () const |
plString | getCustomText () const |
unsigned char | getGroup () const |
unsigned char | getType () const |
unsigned char | getTileset () const |
unsigned char | getSortOrder () const |
plKey | getIcon () const |
plKey | getAccessory () const |
plKey | getMesh (int lodLevel) const |
hsColorRGBA | getDefaultTint1 () const |
hsColorRGBA | getDefaultTint2 () const |
void | setItemName (const plString &name) |
void | setDescription (const plString &desc) |
void | setCustomText (const plString &text) |
void | setGroup (unsigned char group) |
void | setType (unsigned char type) |
void | setTileset (unsigned char set) |
void | setSortOrder (unsigned char order) |
void | setIcon (plKey icon) |
void | setAccessory (plKey acc) |
void | setMesh (int lodLevel, plKey mesh) |
void | setDefaultTint1 (const hsColorRGBA &tint) |
void | setDefaultTint2 (const hsColorRGBA &tint) |
void | clearElements () |
void | addElement (const plString &elementName) |
void | setElementTexture (int element, int layer, plKey texture) |
void | setElementName (int element, const plString &elementName) |
plKey | getElementTexture (int element, int layer) const |
plString | getElementName (int element) const |
void | delElement (int element) |
![]() | |
void | init (const plString &name) |
plKey | getKey () const |
void | setKey (plKey key) |
![]() | |
plCreatable () | |
virtual | ~plCreatable () |
virtual short | ClassIndex () const =0 |
short | ClassIndex (PlasmaVer ver) const |
virtual const char * | ClassName () const |
virtual bool | ClassInstance (short) const |
virtual bool | isStub () const |
virtual void | prcWrite (pfPrcHelper *prc) |
virtual void | prcParse (const pfPrcTag *tag, plResManager *mgr) |
Protected Member Functions | |
virtual void | IPrcWrite (pfPrcHelper *prc) |
virtual void | IPrcParse (const pfPrcTag *tag, plResManager *mgr) |
Describes a wearable Clothing Item for avatars.
Clothing in Plasma is made up of several elements, all linked back to a named plClothingItem. The Clothing Manager within Uru keeps a list of loaded Clothing Items and can assign them to avatars by item name. The plClothingItem is the top level object to describe an item for the clothing manager.
plClothingItem::plClothingItem | ( | ) |
|
virtual |
void plClothingItem::addElement | ( | const plString & | elementName | ) |
Add a named element to the clothing item.
void plClothingItem::clearElements | ( | ) |
Remove all elements from the clothing item.
void plClothingItem::delElement | ( | int | element | ) |
Remove the specified element from the clothing item.
plKey plClothingItem::getAccessory | ( | ) | const |
Returns this item's accessory link.
plString plClothingItem::getCustomText | ( | ) | const |
Returns the customization text for the clothing item.
hsColorRGBA plClothingItem::getDefaultTint1 | ( | ) | const |
Returns the default first tint color for the item.
hsColorRGBA plClothingItem::getDefaultTint2 | ( | ) | const |
Returns the default second tint color for the item.
plString plClothingItem::getDescription | ( | ) | const |
Returns the properties description for the clothing item.
plString plClothingItem::getElementName | ( | int | element | ) | const |
Returns the element name for element number element.
plKey plClothingItem::getElementTexture | ( | int | element, |
int | layer | ||
) | const |
Returns the element texture for element number element, at layer layer.
unsigned char plClothingItem::getGroup | ( | ) | const |
Returns the group this item belongs to.
plKey plClothingItem::getIcon | ( | ) | const |
Returns the icon to display this clothing item in AvatarCustomization.
plString plClothingItem::getItemName | ( | ) | const |
Returns the name of the clothing item.
plKey plClothingItem::getMesh | ( | int | lodLevel | ) | const |
Returns a key for the plSharedMesh that stores this items geometry at LOD of lodLevel.
unsigned char plClothingItem::getSortOrder | ( | ) | const |
Returns the sorting order for the item in AvatarCustomization.
unsigned char plClothingItem::getTileset | ( | ) | const |
Returns the clothing item's tileset for AvatarCustomization.
unsigned char plClothingItem::getType | ( | ) | const |
Returns the clothing item's item type.
|
protectedvirtual |
This must be overloaded by subclasses to parse PRC data specific to the class from the PRC document. It is called once for each tag that is a child to the Creatable tag itself, so subclasses should check for each supported tag and handle it accordingly if it matches. If the tag is not recognized, it should be passed along to the parent class.
Reimplemented from hsKeyedObject.
|
protectedvirtual |
This must be overloaded by subclasses to write PRC data specific to the class to the PRC document. Do not write the top-level creatable tag, that is handled by prcWrite().
Reimplemented from hsKeyedObject.
|
virtual |
Reads this creatable directly from the stream. If any keys are read, they will be added to the plResManager automatically.
Reimplemented from hsKeyedObject.
void plClothingItem::setAccessory | ( | plKey | acc | ) |
Set the accessory key for this item.
void plClothingItem::setCustomText | ( | const plString & | text | ) |
Set the customization text for this clothing item.
void plClothingItem::setDefaultTint1 | ( | const hsColorRGBA & | tint | ) |
Set the default first tint color for this item.
void plClothingItem::setDefaultTint2 | ( | const hsColorRGBA & | tint | ) |
Set the default second tint color for this item.
void plClothingItem::setDescription | ( | const plString & | desc | ) |
Set the property description string for this item.
void plClothingItem::setElementName | ( | int | element, |
const plString & | elementName | ||
) |
Sets the element name for element number element to elementName.
void plClothingItem::setElementTexture | ( | int | element, |
int | layer, | ||
plKey | texture | ||
) |
Sets the texture for element number element, at layer layer to texture.
void plClothingItem::setGroup | ( | unsigned char | group | ) |
Set the group this item belongs to.
void plClothingItem::setIcon | ( | plKey | icon | ) |
Set the clothing item's icon for AvatarCustomization.
void plClothingItem::setItemName | ( | const plString & | name | ) |
Set the name of the clothing item.
void plClothingItem::setMesh | ( | int | lodLevel, |
plKey | mesh | ||
) |
Set the key for the plSharedMesh that contains this item's geometry at LOD level lodLevel.
void plClothingItem::setSortOrder | ( | unsigned char | order | ) |
Set the sort order for listing in AvatarCustomization.
void plClothingItem::setTileset | ( | unsigned char | set | ) |
Set the tileset to assign this item in AvatarCustomization.
void plClothingItem::setType | ( | unsigned char | type | ) |
Set the clothing item's type.
|
virtual |
Writes this creatable directly to the stream. The plResManager is used to manage any key references written by this creatable.
Reimplemented from hsKeyedObject.