libHSPlasma
Public Types | Public Member Functions | Protected Member Functions | List of all members
plClothingItem Class Reference

Describes a wearable Clothing Item for avatars. More...

#include <plClothingItem.h>

Inheritance diagram for plClothingItem:
hsKeyedObject plCreatable

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)
- Public Member Functions inherited from hsKeyedObject
void init (const plString &name)
plKey getKey () const
void setKey (plKey key)
- Public Member Functions inherited from plCreatable
 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)

Detailed Description

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.

Member Enumeration Documentation

Enumerator:
kLayerBase 
kLayerSkin 
kLayerSkinBlend1 
kLayerSkinBlend2 
kLayerSkinBlend3 
kLayerSkinBlend4 
kLayerSkinBlend5 
kLayerSkinBlend6 
kLayerTint1 
kLayerTint2 
kLayerMax 
Enumerator:
kClothingBaseMale 
kClothingBaseFemale 
kClothingBaseNoOptions 
kMaxGroup 
Enumerator:
kLODHigh 
kLODMedium 
kLODLow 
kNumLODLevels 
Enumerator:
kSetShirt 
kSetFace 
kSetShoe 
kSetPants 
kSetHand 
kSetPlayerBook 
kSetGlasses 
kSetKI 
kSetEye 
kSetBackpack 
kMaxTileset 
Enumerator:
kTypePants 
kTypeShirt 
kTypeLeftHand 
kTypeRightHand 
kTypeFace 
kTypeHair 
kTypeLeftFoot 
kTypeRightFoot 
kTypeAccessory 
kMaxType 

Constructor & Destructor Documentation

plClothingItem::plClothingItem ( )
virtual plClothingItem::~plClothingItem ( )
virtual

Member Function Documentation

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.

See Also
ClothingLayers
unsigned char plClothingItem::getGroup ( ) const

Returns the group this item belongs to.

See Also
Groups
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.

See Also
LODLevels
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.

See Also
Tilesets
unsigned char plClothingItem::getType ( ) const

Returns the clothing item's item type.

See Also
Types
virtual void plClothingItem::IPrcParse ( const pfPrcTag tag,
plResManager mgr 
)
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.

virtual void plClothingItem::IPrcWrite ( pfPrcHelper prc)
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 void plClothingItem::read ( hsStream ,
plResManager  
)
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.

See Also
ClothingLayers
void plClothingItem::setGroup ( unsigned char  group)

Set the group this item belongs to.

See Also
Groups
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.

See Also
LODLevels
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.

See Also
Tilesets
void plClothingItem::setType ( unsigned char  type)

Set the clothing item's type.

See Also
Types
virtual void plClothingItem::write ( hsStream ,
plResManager  
)
virtual

Writes this creatable directly to the stream. The plResManager is used to manage any key references written by this creatable.

Reimplemented from hsKeyedObject.


The documentation for this class was generated from the following file: