Package com.ngt.jopenmetaverse.shared.sim

Examples of com.ngt.jopenmetaverse.shared.sim.Avatar$Statistics


          //endregion
        }

        //region Create an Avatar from the decoded data

        Avatar avatar = GetAvatar(simulator, block.ID, block.FullID);

        objectupdate.Avatar = true;
        // Textures
        objectupdate.Textures = new TextureEntry(block.TextureEntry, 0,
            block.TextureEntry.length);

        onObjectDataBlockUpdate.raiseEvent(new ObjectDataBlockUpdateEventArgs(simulator, avatar, data, block, objectupdate, nameValues));

        long oldSeatID = avatar.ParentID;

        avatar.ID = block.FullID;
        avatar.LocalID = block.ID;
        avatar.Scale = block.Scale;
        avatar.CollisionPlane = objectupdate.CollisionPlane;
        avatar.Position = objectupdate.Position;
        avatar.Velocity = objectupdate.Velocity;
        avatar.Acceleration = objectupdate.Acceleration;
        avatar.Rotation = objectupdate.Rotation;
        avatar.AngularVelocity = objectupdate.AngularVelocity;
        avatar.NameValues = nameValues;
        avatar.PrimData = data;
        if (block.Data.length > 0)
        {
          JLogger.warn("Unexpected Data field for an avatar update, length " + block.Data.length);
        }
        avatar.ParentID = block.ParentID;
        avatar.RegionHandle = update.RegionData.RegionHandle;
        JLogger.debug("Set an avatar: " + avatar.getName()
            + "\n with name values:\n" + NameValue.NameValuesToString(avatar.NameValues));
       
        SetAvatarSittingOn(simulator, avatar, block.ParentID, oldSeatID);

        // Textures
View Full Code Here


  {
    if (Client.settings.AVATAR_TRACKING)
    {
      synchronized (simulator.ObjectsPrimitives.getDictionary())
      {
        Avatar avatar;

        if ((avatar = simulator.ObjectsAvatars.get(localID))!=null)
        {
          JLogger.debug("Found Avatar: " + avatar.LocalID);
          return avatar;
        }
        else
        {
          avatar = new Avatar();
          avatar.LocalID = localID;
          avatar.ID = fullID;
          avatar.RegionHandle = simulator.Handle;

          simulator.ObjectsAvatars.add(localID, avatar);
          JLogger.debug(String.format("Added Avatar: ID %s LocalID %d", fullID, avatar.LocalID));
          return avatar;
        }
      }
    }
    else
    {
      return new Avatar();
    }
  }
View Full Code Here

        // Iterate through all of this sims avatars
        sim.ObjectsAvatars.foreach(new Action<Entry<Long, Avatar>>()
            {
          public void execute(Entry<Long, Avatar> e) {
            Avatar avatar = e.getValue();
            //region Linear Motion
            // Only do movement interpolation (extrapolation) when there is a non-zero velocity but
            // no acceleration
            if (avatar.Acceleration.equals(Vector3.Zero) && avatar.Velocity.equals(Vector3.Zero))
            {
View Full Code Here

TOP

Related Classes of com.ngt.jopenmetaverse.shared.sim.Avatar$Statistics

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.