private void AgentHeightWidthHandler(Packet packet, LLAgent agent) { AgentHeightWidthPacket hw = (AgentHeightWidthPacket)packet; agent.CameraHeight = hw.HeightWidthBlock.Height; agent.CameraWidth = hw.HeightWidthBlock.Width; }
void AgentHeightWidthHandler(Packet packet, Agent agent) { AgentHeightWidthPacket heightWidth = (AgentHeightWidthPacket)packet; // TODO: These are the screen size dimensions. Useful when we start doing frustum culling //Logger.Log(String.Format("Agent wants to set height={0}, width={1}", // heightWidth.HeightWidthBlock.Height, heightWidth.HeightWidthBlock.Width), Helpers.LogLevel.Info); }
/// <summary> /// Set the height and the width of your avatar. This is used to scale /// the avatar mesh. /// </summary> /// <param name="height">New height of the avatar</param> /// <param name="width">New width of the avatar</param> public void SetHeightWidth(ushort height, ushort width) { AgentHeightWidthPacket heightwidth = new AgentHeightWidthPacket(); heightwidth.AgentData.AgentID = Client.Network.AgentID; heightwidth.AgentData.SessionID = Client.Network.SessionID; heightwidth.AgentData.CircuitCode = Client.Network.CurrentSim.CircuitCode; heightwidth.HeightWidthBlock.Height = height; heightwidth.HeightWidthBlock.Width = width; heightwidth.HeightWidthBlock.GenCounter = HeightWidthGenCounter++; Client.Network.SendPacket((Packet)heightwidth); }
/// <summary> /// Set the height and the width of the client window. This is used /// by the server to build a virtual camera frustum for our avatar /// </summary> /// <param name="height">New height of the viewer window</param> /// <param name="width">New width of the viewer window</param> public void SetHeightWidth(ushort height, ushort width) { AgentHeightWidthPacket heightwidth = new AgentHeightWidthPacket(); heightwidth.AgentData.AgentID = Client.Self.AgentID; heightwidth.AgentData.SessionID = Client.Self.SessionID; heightwidth.AgentData.CircuitCode = Client.Network.CircuitCode; heightwidth.HeightWidthBlock.Height = height; heightwidth.HeightWidthBlock.Width = width; heightwidth.HeightWidthBlock.GenCounter = heightWidthGenCounter++; Client.Network.SendPacket(heightwidth); }