コード例 #1
0
        private SetFollowCamPropertiesPacket MakePacket(bool enable)
        {
            SetFollowCamPropertiesPacket cameraPacket = new SetFollowCamPropertiesPacket();

            cameraPacket.CameraProperty = new SetFollowCamPropertiesPacket.CameraPropertyBlock[22];
            for (int i = 0; i < 22; i++)
            {
                cameraPacket.CameraProperty[i]      = new SetFollowCamPropertiesPacket.CameraPropertyBlock();
                cameraPacket.CameraProperty[i].Type = i + 1;
            }

            Vector3 offset   = Offset * Frame.Core.Orientation.Quaternion;
            Vector3 position = Frame.Core.Position + offset;

            Vector3 focus = position + Frame.Core.Orientation.LookAtVector;

            cameraPacket.CameraProperty[0].Value  = 0;
            cameraPacket.CameraProperty[1].Value  = 0f;
            cameraPacket.CameraProperty[2].Value  = 0f;
            cameraPacket.CameraProperty[3].Value  = 0f;
            cameraPacket.CameraProperty[4].Value  = 0f;
            cameraPacket.CameraProperty[5].Value  = 0f;
            cameraPacket.CameraProperty[6].Value  = 0f;
            cameraPacket.CameraProperty[7].Value  = 0f;
            cameraPacket.CameraProperty[8].Value  = 0f;
            cameraPacket.CameraProperty[9].Value  = 0f;
            cameraPacket.CameraProperty[10].Value = 0f;
            cameraPacket.CameraProperty[11].Value = enable ? 1f : 0f; //enable
            cameraPacket.CameraProperty[12].Value = 0f;
            cameraPacket.CameraProperty[13].Value = position.X;
            cameraPacket.CameraProperty[14].Value = position.Y;
            cameraPacket.CameraProperty[15].Value = position.Z;
            cameraPacket.CameraProperty[16].Value = 0f;
            cameraPacket.CameraProperty[17].Value = focus.X;
            cameraPacket.CameraProperty[18].Value = focus.Y;
            cameraPacket.CameraProperty[19].Value = focus.Z;
            cameraPacket.CameraProperty[20].Value = 1f;
            cameraPacket.CameraProperty[21].Value = 1f;
            return(cameraPacket);
        }
コード例 #2
0
        private SetFollowCamPropertiesPacket MakePacket(bool enable)
        {
            SetFollowCamPropertiesPacket cameraPacket = new SetFollowCamPropertiesPacket();
            cameraPacket.CameraProperty = new SetFollowCamPropertiesPacket.CameraPropertyBlock[22];
            for (int i = 0; i < 22; i++) {
                cameraPacket.CameraProperty[i] = new SetFollowCamPropertiesPacket.CameraPropertyBlock();
                cameraPacket.CameraProperty[i].Type = i + 1;
            }

            Vector3 offset = Offset * Frame.Core.Orientation.Quaternion;
            Vector3 position = Frame.Core.Position + offset;

            Vector3 focus = position + Frame.Core.Orientation.LookAtVector;
            cameraPacket.CameraProperty[0].Value = 0;
            cameraPacket.CameraProperty[1].Value = 0f;
            cameraPacket.CameraProperty[2].Value = 0f;
            cameraPacket.CameraProperty[3].Value = 0f;
            cameraPacket.CameraProperty[4].Value = 0f;
            cameraPacket.CameraProperty[5].Value = 0f;
            cameraPacket.CameraProperty[6].Value = 0f;
            cameraPacket.CameraProperty[7].Value = 0f;
            cameraPacket.CameraProperty[8].Value = 0f;
            cameraPacket.CameraProperty[9].Value = 0f;
            cameraPacket.CameraProperty[10].Value = 0f;
            cameraPacket.CameraProperty[11].Value = enable ? 1f : 0f; //enable
            cameraPacket.CameraProperty[12].Value = 0f;
            cameraPacket.CameraProperty[13].Value = position.X;
            cameraPacket.CameraProperty[14].Value = position.Y;
            cameraPacket.CameraProperty[15].Value = position.Z;
            cameraPacket.CameraProperty[16].Value = 0f;
            cameraPacket.CameraProperty[17].Value = focus.X;
            cameraPacket.CameraProperty[18].Value = focus.Y;
            cameraPacket.CameraProperty[19].Value = focus.Z;
            cameraPacket.CameraProperty[20].Value = 1f;
            cameraPacket.CameraProperty[21].Value = 1f;
            return cameraPacket;
        }
コード例 #3
0
ファイル: Program.cs プロジェクト: veyvin/ChimeraClean
        private static SetFollowCamPropertiesPacket MakePacket()
        {
            SetFollowCamPropertiesPacket packet = new SetFollowCamPropertiesPacket();

            packet.CameraProperty = new SetFollowCamPropertiesPacket.CameraPropertyBlock[22];
            for (int i = 0; i < 22; i++)
            {
                packet.CameraProperty[i]      = new SetFollowCamPropertiesPacket.CameraPropertyBlock();
                packet.CameraProperty[i].Type = i + 1;
            }

            packet.CameraProperty[0].Value  = 0f;
            packet.CameraProperty[1].Value  = 0f;
            packet.CameraProperty[2].Value  = 0f;
            packet.CameraProperty[3].Value  = 0f;
            packet.CameraProperty[4].Value  = 0f;
            packet.CameraProperty[5].Value  = 0f;
            packet.CameraProperty[6].Value  = 0f;
            packet.CameraProperty[7].Value  = 0f;
            packet.CameraProperty[8].Value  = 0f;
            packet.CameraProperty[9].Value  = 0f;
            packet.CameraProperty[10].Value = 0f;
            packet.CameraProperty[11].Value = 1f;
            packet.CameraProperty[12].Value = 0f;     //Position
            packet.CameraProperty[13].Value = 100f;   //Position X
            packet.CameraProperty[14].Value = 100f;   //Position Y
            packet.CameraProperty[15].Value = 60f;    //Position Z
            packet.CameraProperty[16].Value = 0f;     //Focus
            packet.CameraProperty[17].Value = 128f;   //Focus X
            packet.CameraProperty[18].Value = 128f;   //Focus Y
            packet.CameraProperty[19].Value = 60;     //Focus Z
            packet.CameraProperty[20].Value = 1f;     //Lock Positon
            packet.CameraProperty[21].Value = 1f;     //Lock Focus

            return(packet);
        }
        private void updateTimer_Tick(object sender, EventArgs e)
        {
            avatarsBindingSource.ResetBindings(true);
            if (!mLoggedIn || !sendPacketCheckbox.Checked)
                return;

            SetFollowCamPropertiesPacket packet = new SetFollowCamPropertiesPacket();
            packet.CameraProperty = new SetFollowCamPropertiesPacket.CameraPropertyBlock[22];
            for(int i = 0; i < 22; i++) {
                packet.CameraProperty[i] = new SetFollowCamPropertiesPacket.CameraPropertyBlock();
                packet.CameraProperty[i].Type = i+1;
            }

            Vector3 focus = positionVectorPanel.Value + focusRotationPanel.Vector;

            packet.CameraProperty[0].Value = (float) type1Value.Value;
            packet.CameraProperty[1].Value = (float) type2Value.Value;
            packet.CameraProperty[2].Value = focusOffsetVectorPanel.Value.X;
            packet.CameraProperty[3].Value = focusOffsetVectorPanel.Value.Y;
            packet.CameraProperty[4].Value = focusOffsetVectorPanel.Value.Z;
            packet.CameraProperty[5].Value = (float) type6Value.Value;
            packet.CameraProperty[6].Value = (float) type7Value.Value;
            packet.CameraProperty[7].Value = (float) type8Value.Value;
            packet.CameraProperty[8].Value = (float) type9Value.Value;
            packet.CameraProperty[9].Value = (float) type10Value.Value;
            packet.CameraProperty[10].Value = (float) type11Value.Value;
            packet.CameraProperty[11].Value =  activeCheckbox.Checked ? 1f : 0f;
            packet.CameraProperty[12].Value = (float) type13Value.Value;
            packet.CameraProperty[13].Value = positionVectorPanel.Value.X;
            packet.CameraProperty[14].Value = positionVectorPanel.Value.Y;
            packet.CameraProperty[15].Value = positionVectorPanel.Value.Z;
            packet.CameraProperty[16].Value = (float) type17Value.Value;
            packet.CameraProperty[17].Value = focus.X;
            packet.CameraProperty[18].Value = focus.Y;
            packet.CameraProperty[19].Value = focus.Z;
            packet.CameraProperty[20].Value =  positionLockedCheckbox.Checked ? 1f: 0f;
            packet.CameraProperty[21].Value =  focusLockedCheckbox.Checked ? 1f : 0f;

            if (avatarsListBox.SelectedIndex != -1)
                packet.ObjectData.ObjectID = ((Avatar) avatarsListBox.SelectedValue).ID;

            mProxy.InjectPacket(packet, Direction.Incoming);
        }
コード例 #5
0
 private void StopControllingCamera()
 {
     if (proxyPanel != null) {
         SetFollowCamPropertiesPacket packet = new SetFollowCamPropertiesPacket();
         packet.CameraProperty = new SetFollowCamPropertiesPacket.CameraPropertyBlock[1];
         packet.CameraProperty[0] = new SetFollowCamPropertiesPacket.CameraPropertyBlock();
         packet.CameraProperty[0].Type = 13;
         packet.CameraProperty[0].Value = 0;
         proxyPanel.Proxy.InjectPacket(packet, Direction.Incoming);
     }
 }
コード例 #6
0
ファイル: Program.cs プロジェクト: JohnMcCaffery/ChimeraClean
        private static SetFollowCamPropertiesPacket MakePacket()
        {
            SetFollowCamPropertiesPacket packet = new SetFollowCamPropertiesPacket();
                packet.CameraProperty = new SetFollowCamPropertiesPacket.CameraPropertyBlock[22];
                for (int i = 0; i < 22; i++) {
                    packet.CameraProperty[i] = new SetFollowCamPropertiesPacket.CameraPropertyBlock();
                    packet.CameraProperty[i].Type = i + 1;
                }

                packet.CameraProperty[0].Value = 0f;
                packet.CameraProperty[1].Value = 0f;
                packet.CameraProperty[2].Value = 0f;
                packet.CameraProperty[3].Value = 0f;
                packet.CameraProperty[4].Value = 0f;
                packet.CameraProperty[5].Value = 0f;
                packet.CameraProperty[6].Value = 0f;
                packet.CameraProperty[7].Value = 0f;
                packet.CameraProperty[8].Value = 0f;
                packet.CameraProperty[9].Value = 0f;
                packet.CameraProperty[10].Value = 0f;
                packet.CameraProperty[11].Value = 1f;
                packet.CameraProperty[12].Value = 0f; //Position
                packet.CameraProperty[13].Value = 100f; //Position X
                packet.CameraProperty[14].Value = 100f; //Position Y
                packet.CameraProperty[15].Value = 60f; //Position Z
                packet.CameraProperty[16].Value = 0f; //Focus
                packet.CameraProperty[17].Value = 128f; //Focus X
                packet.CameraProperty[18].Value = 128f; //Focus Y
                packet.CameraProperty[19].Value = 60; //Focus Z
                packet.CameraProperty[20].Value = 1f; //Lock Positon
                packet.CameraProperty[21].Value = 1f; //Lock Focus

                return packet;
        }