OpenMetaverse Protocol Library Developers API Documentation
PrimEventArgs Class
NamespacesOpenMetaversePrimEventArgs
Provides data for the ObjectUpdateevent
Declaration Syntax
C#
public 
class 
PrimEventArgs : 
EventArgs
Members
All Members Constructors Properties



Icon Member Description
PrimEventArgs(Simulator, Primitive, UInt16, Boolean, Boolean)
Construct a new instance of the PrimEventArgs class

IsAttachment
true if the Primitiveis attached to an Avatar

IsNew
true if the Primitivedid not exist in the dictionary before this update (always true if object tracking has been disabled)

Prim
Get the Primitivedetails

Simulator
Get the simulator the Primitiveoriginated from

TimeDilation
Get the simulator Time Dilation

Remarks

The ObjectUpdateevent occurs when the simulator sends an ObjectUpdatePacketcontaining a Primitive, Foliage or Attachment data

Note 1: The ObjectUpdateevent will not be raised when the object is an Avatar

Note 2: It is possible for the ObjectUpdateto be raised twice for the same object if for example the primitive moved to a new simulator, then returned to the current simulator or if an Avatar crosses the border into a new simulator and returns to the current simulator

Examples
The following code example uses the Prim, Simulator, and IsAttachmentproperties to display new Primitives and Attachments on the Consolewindow.
  Copy imageCopy
// Subscribe to the event that
gives us prim and foliage information
Client.Objects.ObjectUpdate += Objects_ObjectUpdate;


private 
void Objects_ObjectUpdate(
object sender, PrimEventArgs
e)
{
    Console.WriteLine(
"Primitive {0} {1} in {2} is an
attachment {3}", e.Prim.ID, e.Prim.LocalID,
e.Simulator.Name, e.IsAttachment);
}
Inheritance Hierarchy
Object
EventArgs
  PrimEventArgs
See Also

Assembly: OpenMetaverse(Module: OpenMetaverse.dll) Version: 0.9.3.3318 (0.9.3.3318)