private BodyPlugin3DViewSettings(BodyPlugin3DViewSettings source)
            : base(source)
        {
            if (source == null)
            {
                throw new ArgumentNullException("source");
            }

            this.jointOrientations = source.jointOrientations;
            this.info = source.info;
        }
Ejemplo n.º 2
0
        // object owning data should be locked
        private static void Render3D(IPluginViewSettings pluginViewSettings, EventTypePluginData data, nui.Registration registration)
        {
            Debug.Assert(data != null);

            BodyPlugin3DViewSettings bodyPluginViewSettings = pluginViewSettings as BodyPlugin3DViewSettings;

            if ((bodyPluginViewSettings != null) && (registration != null) && (data.body != null) && data.bodiesValid)
            {
                if (bodyPluginViewSettings.RenderBodies || bodyPluginViewSettings.RenderHands)
                {
                    data.body.Begin();

                    for (uint i = 0; i < BodyPlugin.bodyOptions.Length; ++i)
                    {
                        if (bodyPluginViewSettings.RenderBodies)
                        {
                            BodyOptions bodyOption = BodyPlugin.bodyOptions[i];

                            data.body.RenderBones(i, bodyOption.BoneEffect);

                            if (bodyPluginViewSettings.RenderJointOrientations)
                            {
                                data.body.RenderJointOrientations(i, bodyOption.JointEffect);
                            }

                            data.body.RenderJoints(i, bodyOption.JointEffect);

                            if (bodyPluginViewSettings.RenderInfo && (data.font != null))
                            {
                                // PlayderIndex (sic)
                                data.body.RenderInfo(i, viz.BodyInfoFlag.PlayderIndex, data.font, bodyOption.ColorVector);
                            }
                        }

                        if (bodyPluginViewSettings.RenderHands)
                        {
                            data.body.RenderHandStates(i);
                        }
                    }

                    data.body.End(0.0f);
                }
            }
        }
Ejemplo n.º 3
0
        public IPluginViewSettings Add3DView(EventType eventType, Panel hostControl)
        {
            IPluginViewSettings pluginViewSettings = new BodyPlugin3DViewSettings();

            return(pluginViewSettings);
        }
        public IPluginViewSettings Add3DView(EventType eventType, Panel hostControl)
        {
            IPluginViewSettings pluginViewSettings = new BodyPlugin3DViewSettings();

            return pluginViewSettings;
        }
        private BodyPlugin3DViewSettings(BodyPlugin3DViewSettings source)
            :base(source)
        {
            if (source == null)
            {
                throw new ArgumentNullException("source");
            }

            this.jointOrientations = source.jointOrientations;
            this.info = source.info;
        }