C# 클래스 OpenMetaverse.AppearanceManager

파일 보기 프로젝트 열기: N3X15/VoxelSim 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
BAKED_TEXTURE_HASH UUID[]
BakeIndexToTextureIndex byte[]
DEFAULT_AVATAR_TEXTURE UUID
WEARABLE_BAKE_MAP WearableType[][]

공개 메소드들

메소드 설명
AddAttachments ( List attachments, bool removeExistingFirst ) : void

Adds a list of attachments to our agent

AddToOutfit ( InventoryItem wearableItem ) : void

Add a wearable to the current outfit and set appearance

AddToOutfit ( List wearableItems ) : void

Add a list of wearables to the current outfit and set appearance

AppearanceManager ( GridClient client ) : System

Default constructor

Attach ( InventoryItem item, AttachmentPoint attachPoint ) : void

Attach an item to our agent at a specific attach point

Attach ( UUID itemID, UUID ownerID, string name, string description, Permissions perms, uint itemFlags, AttachmentPoint attachPoint ) : void

Attach an item to our agent specifying attachment details

BakeTypeToAgentTextureIndex ( BakeType index ) : AvatarTextureIndex

Converts a BakeType to the corresponding baked texture slot in AvatarTextureIndex

BakeTypeToTextures ( BakeType bakeType ) : List

Converts a BakeType to a list of the texture slots that make up that bake

Detach ( InventoryItem item ) : void

Detach an item from our agent using an OpenMetaverse.InventoryItem object

Detach ( UUID itemID ) : void

Detach an item from our agent

GetWearableAsset ( WearableType type ) : UUID

Returns the AssetID of the asset that is currently being worn in a given WearableType slot

GetWearables ( ) : WearableData>.Dictionary

Returns a copy of the agents currently worn wearables

Avoid calling this function multiple times as it will make a copy of all of the wearable data each time

IsItemWorn ( InventoryItem item ) : WearableType

Checks if an inventory item is currently being worn

MorphLayerForBakeType ( BakeType bakeType ) : AvatarTextureIndex

Gives the layer number that is used for morph mask

RemoveFromOutfit ( InventoryItem wearableItem ) : void

Remove a wearable from the current outfit and set appearance

RemoveFromOutfit ( List wearableItems ) : void

Removes a list of wearables from the current outfit and set appearance

ReplaceOutfit ( List wearableItems ) : void

Replace the current outfit with a list of wearables and set appearance

RequestAgentWearables ( ) : void

Ask the server what textures our agent is currently wearing

RequestCachedBakes ( ) : void

Build hashes out of the texture assetIDs for each baking layer to ask the simulator whether it has cached copies of each baked texture

RequestSetAppearance ( ) : void

Starts the appearance setting thread

RequestSetAppearance ( bool forceRebake ) : void

Starts the appearance setting thread

WearOutfit ( List wearables, bool replaceItems ) : void

Calls either ReplaceOutfit or AddToOutfit depending on the value of replaceItems

WearableTypeToAssetType ( WearableType type ) : AssetType

Converts a WearableType to a bodypart or clothing WearableType

보호된 메소드들

메소드 설명
AgentCachedTextureResponseHandler ( object sender, OpenMetaverse.PacketReceivedEventArgs e ) : void
AgentWearablesUpdateHandler ( object sender, OpenMetaverse.PacketReceivedEventArgs e ) : void
OnAgentCachedBakes ( AgentCachedBakesReplyEventArgs e ) : void

Raises the CachedBakesReply event

OnAgentWearables ( AgentWearablesReplyEventArgs e ) : void

Raises the AgentWearablesReply event

OnAppearanceSet ( AppearanceSetEventArgs e ) : void

Raises the AppearanceSet event

OnRebakeAvatar ( RebakeAvatarTexturesEventArgs e ) : void

Raises the RebakeAvatarRequested event

RebakeAvatarTexturesHandler ( object sender, OpenMetaverse.PacketReceivedEventArgs e ) : void

비공개 메소드들

메소드 설명
AddTextureDownload ( AvatarTextureIndex index, List textures ) : void

Helper method to lookup the TextureID for a single layer and add it to a list if it is not already present

CreateBake ( BakeType bakeType ) : bool

Blocking method to create and upload a baked texture for a single bake layer

CreateBakes ( ) : bool

Blocking method to create and upload baked textures for all of the missing bakes

DecodeWearableParams ( WearableData wearable ) : void

Populates textures and visual params from a decoded asset

DelayedRequestSetAppearance ( ) : void
DownloadTextures ( List bakeLayers ) : void

Blocking method to download all of the textures needed for baking the given bake layers

No return value is given because the baking will happen whether or not all textures are successfully downloaded

DownloadWearables ( ) : bool

Blocking method to download and parse currently worn wearable assets

GetAgentWearables ( ) : bool

Blocking method to populate the Wearables dictionary

GetCachedBakes ( ) : bool

Blocking method to populate the Textures array with cached bakes

GetColorFromParams ( List param ) : Color4

Calculates base color/tint for a specific wearable based on its params

GetFolderWearables ( UUID folder, List &wearables, List &attachments ) : bool
GetFolderWearables ( string folderPath, List &wearables, List &attachments ) : bool
GetTextureDownloadList ( BakeType bakeType ) : List

Get a list of all of the textures that need to be downloaded for a single bake layer

MakeParamValues ( ) : float>.Dictionary

Creates a dictionary of visual param values from the downloaded wearables

Network_OnDisconnected ( object sender, OpenMetaverse.DisconnectedEventArgs e ) : void
Network_OnEventQueueRunning ( object sender, OpenMetaverse.EventQueueRunningEventArgs e ) : void
RebakeScheduleTimerTick ( Object state ) : void
ReplaceOutfit ( List wearableItems ) : void

Replaces the Wearables collection with a list of new wearable items

RequestAgentSetAppearance ( ) : void

Create an AgentSetAppearance packet from Wearables data and the Textures array and send it

SendAgentIsNowWearing ( ) : void

Inform the sim which wearables are part of our current outfit

SetPreviousAppearance ( ) : void
SetPreviousAppearance ( bool allowBake ) : void
UploadBake ( byte textureData ) : UUID

Blocking method to upload a baked texture

메소드 상세

AddAttachments() 공개 메소드

Adds a list of attachments to our agent
public AddAttachments ( List attachments, bool removeExistingFirst ) : void
attachments List A List containing the attachments to add
removeExistingFirst bool If true, tells simulator to remove existing attachment /// first
리턴 void

AddToOutfit() 공개 메소드

Add a wearable to the current outfit and set appearance
public AddToOutfit ( InventoryItem wearableItem ) : void
wearableItem InventoryItem Wearable to be added to the outfit
리턴 void

AddToOutfit() 공개 메소드

Add a list of wearables to the current outfit and set appearance
public AddToOutfit ( List wearableItems ) : void
wearableItems List List of wearable inventory items to /// be added to the outfit
리턴 void

AgentCachedTextureResponseHandler() 보호된 메소드

protected AgentCachedTextureResponseHandler ( object sender, OpenMetaverse.PacketReceivedEventArgs e ) : void
sender object
e OpenMetaverse.PacketReceivedEventArgs
리턴 void

AgentWearablesUpdateHandler() 보호된 메소드

protected AgentWearablesUpdateHandler ( object sender, OpenMetaverse.PacketReceivedEventArgs e ) : void
sender object
e OpenMetaverse.PacketReceivedEventArgs
리턴 void

AppearanceManager() 공개 메소드

Default constructor
public AppearanceManager ( GridClient client ) : System
client GridClient A reference to our agent
리턴 System

Attach() 공개 메소드

Attach an item to our agent at a specific attach point
public Attach ( InventoryItem item, AttachmentPoint attachPoint ) : void
item InventoryItem A to attach
attachPoint AttachmentPoint the on the avatar /// to attach the item to
리턴 void

Attach() 공개 메소드

Attach an item to our agent specifying attachment details
public Attach ( UUID itemID, UUID ownerID, string name, string description, Permissions perms, uint itemFlags, AttachmentPoint attachPoint ) : void
itemID UUID The of the item to attach
ownerID UUID The attachments owner
name string The name of the attachment
description string The description of the attahment
perms Permissions The to apply when attached
itemFlags uint The of the attachment
attachPoint AttachmentPoint The on the agent /// to attach the item to
리턴 void

BakeTypeToAgentTextureIndex() 공개 정적인 메소드

Converts a BakeType to the corresponding baked texture slot in AvatarTextureIndex
public static BakeTypeToAgentTextureIndex ( BakeType index ) : AvatarTextureIndex
index BakeType A BakeType
리턴 AvatarTextureIndex

BakeTypeToTextures() 공개 정적인 메소드

Converts a BakeType to a list of the texture slots that make up that bake
public static BakeTypeToTextures ( BakeType bakeType ) : List
bakeType BakeType A BakeType
리턴 List

Detach() 공개 메소드

Detach an item from our agent using an OpenMetaverse.InventoryItem object
public Detach ( InventoryItem item ) : void
item InventoryItem An object
리턴 void

Detach() 공개 메소드

Detach an item from our agent
public Detach ( UUID itemID ) : void
itemID UUID The inventory itemID of the item to detach
리턴 void

GetWearableAsset() 공개 메소드

Returns the AssetID of the asset that is currently being worn in a given WearableType slot
public GetWearableAsset ( WearableType type ) : UUID
type WearableType WearableType slot to get the AssetID for
리턴 UUID

GetWearables() 공개 메소드

Returns a copy of the agents currently worn wearables
Avoid calling this function multiple times as it will make a copy of all of the wearable data each time
public GetWearables ( ) : WearableData>.Dictionary
리턴 WearableData>.Dictionary

IsItemWorn() 공개 메소드

Checks if an inventory item is currently being worn
public IsItemWorn ( InventoryItem item ) : WearableType
item InventoryItem The inventory item to check against the agent /// wearables
리턴 WearableType

MorphLayerForBakeType() 공개 정적인 메소드

Gives the layer number that is used for morph mask
public static MorphLayerForBakeType ( BakeType bakeType ) : AvatarTextureIndex
bakeType BakeType >A BakeType
리턴 AvatarTextureIndex

OnAgentCachedBakes() 보호된 메소드

Raises the CachedBakesReply event
protected OnAgentCachedBakes ( AgentCachedBakesReplyEventArgs e ) : void
e AgentCachedBakesReplyEventArgs An AgentCachedBakesReplyEventArgs object containing the /// data returned from the data server AgentCachedTextureResponse
리턴 void

OnAgentWearables() 보호된 메소드

Raises the AgentWearablesReply event
protected OnAgentWearables ( AgentWearablesReplyEventArgs e ) : void
e AgentWearablesReplyEventArgs An AgentWearablesReplyEventArgs object containing the /// data returned from the data server
리턴 void

OnAppearanceSet() 보호된 메소드

Raises the AppearanceSet event
protected OnAppearanceSet ( AppearanceSetEventArgs e ) : void
e AppearanceSetEventArgs An AppearanceSetEventArgs object indicating if the operatin was successfull
리턴 void

OnRebakeAvatar() 보호된 메소드

Raises the RebakeAvatarRequested event
protected OnRebakeAvatar ( RebakeAvatarTexturesEventArgs e ) : void
e RebakeAvatarTexturesEventArgs An RebakeAvatarTexturesEventArgs object containing the /// data returned from the data server
리턴 void

RebakeAvatarTexturesHandler() 보호된 메소드

protected RebakeAvatarTexturesHandler ( object sender, OpenMetaverse.PacketReceivedEventArgs e ) : void
sender object
e OpenMetaverse.PacketReceivedEventArgs
리턴 void

RemoveFromOutfit() 공개 메소드

Remove a wearable from the current outfit and set appearance
public RemoveFromOutfit ( InventoryItem wearableItem ) : void
wearableItem InventoryItem Wearable to be removed from the outfit
리턴 void

RemoveFromOutfit() 공개 메소드

Removes a list of wearables from the current outfit and set appearance
public RemoveFromOutfit ( List wearableItems ) : void
wearableItems List List of wearable inventory items to /// be removed from the outfit
리턴 void

ReplaceOutfit() 공개 메소드

Replace the current outfit with a list of wearables and set appearance
public ReplaceOutfit ( List wearableItems ) : void
wearableItems List List of wearable inventory items that /// define a new outfit
리턴 void

RequestAgentWearables() 공개 메소드

Ask the server what textures our agent is currently wearing
public RequestAgentWearables ( ) : void
리턴 void

RequestCachedBakes() 공개 메소드

Build hashes out of the texture assetIDs for each baking layer to ask the simulator whether it has cached copies of each baked texture
public RequestCachedBakes ( ) : void
리턴 void

RequestSetAppearance() 공개 메소드

Starts the appearance setting thread
public RequestSetAppearance ( ) : void
리턴 void

RequestSetAppearance() 공개 메소드

Starts the appearance setting thread
public RequestSetAppearance ( bool forceRebake ) : void
forceRebake bool True to force rebaking, otherwise false
리턴 void

WearOutfit() 공개 메소드

Calls either ReplaceOutfit or AddToOutfit depending on the value of replaceItems
public WearOutfit ( List wearables, bool replaceItems ) : void
wearables List List of wearable inventory items to add /// to the outfit or become a new outfit
replaceItems bool True to replace existing items with the /// new list of items, false to add these items to the existing outfit
리턴 void

WearableTypeToAssetType() 공개 정적인 메소드

Converts a WearableType to a bodypart or clothing WearableType
public static WearableTypeToAssetType ( WearableType type ) : AssetType
type WearableType A WearableType
리턴 AssetType

프로퍼티 상세

BAKED_TEXTURE_HASH 공개적으로 정적으로 프로퍼티

Magic values to finalize the cache check hashes for each bake
public static UUID[] BAKED_TEXTURE_HASH
리턴 UUID[]

BakeIndexToTextureIndex 공개적으로 정적으로 프로퍼티

Mapping between BakeType and AvatarTextureIndex
public static byte[] BakeIndexToTextureIndex
리턴 byte[]

DEFAULT_AVATAR_TEXTURE 공개적으로 정적으로 프로퍼티

Default avatar texture, used to detect when a custom texture is not set for a face
public static UUID DEFAULT_AVATAR_TEXTURE
리턴 UUID

WEARABLE_BAKE_MAP 공개적으로 정적으로 프로퍼티

Map of what wearables are included in each bake
public static WearableType[][] WEARABLE_BAKE_MAP
리턴 WearableType[][]