Example #1
0
        public override bool isVisible(Camera c)
        {
            if (myLightType == Type.DIRECTIONAL)
            {
                DebugRenderer.addLine(position, Vector3.Zero, color, Fill.WIREFRAME, false, 0);
                DebugRenderer.addSphere(position, 0.1f, color, Fill.TRANSPARENT, false, 0);
                return(true);
            }

            DebugRenderer.addSphere(position, 0.1f, color, Fill.TRANSPARENT, false, 0);

            return(c.containsSphere(position, size));
        }
Example #2
0
        public void debugDraw(Vector3 pos, Quaternion ori)
        {
            foreach (Bone b in myBones)
            {
                Vector3 p = pos + Vector3.Transform(b.myWorldBindMatrix.ExtractTranslation(), ori);
                DebugRenderer.addSphere(p, 0.02f, Color4.Orange, Fill.TRANSPARENT, false, 0.0f);

                if (b.myParent != -1)
                {
                    Vector3 p1 = pos + Vector3.Transform(b.myWorldBindMatrix.ExtractTranslation(), ori);
                    Vector3 p2 = pos + Vector3.Transform(myBones[b.myParent].myWorldBindMatrix.ExtractTranslation(), ori);
                    DebugRenderer.addLine(p1, p2, Color4.Red, Fill.WIREFRAME, false, 0.0f);
                }
            }
        }
Example #3
0
        public void debugDraw(List <Matrix4> pose, Vector3 pos, Quaternion ori)
        {
            List <Matrix4> untxBones = new List <Matrix4>();

            for (int i = 0; i < skeleton.boneCount; i++)
            {
                Bone b = skeleton.myBones[i];
                untxBones.Add(b.myWorldBindMatrix * pose[i]);

                Vector3 p = pos + Vector3.Transform(untxBones[i].ExtractTranslation(), ori);
                DebugRenderer.addSphere(p, 0.05f, Color4.Green, Fill.TRANSPARENT, false, 0.0f);

                if (b.myParent != -1)
                {
                    Vector3 p1 = pos + Vector3.Transform(untxBones[i].ExtractTranslation(), ori);
                    Vector3 p2 = pos + Vector3.Transform(untxBones[b.myParent].ExtractTranslation(), ori);
                    DebugRenderer.addLine(p1, p2, Color4.Blue, Fill.WIREFRAME, false, 0.0f);
                }
            }
        }