예제 #1
0
        //------------------------------------------------------------------------------
        protected void displayEigen()
        {
            //draw points
            if (leafCount > SurfaceController._MINNODESURF)
            {
                Vectors c    = new Vectors();
                Vectors s    = new Vectors();
                Vectors from = new Vectors();
                Vectors to   = new Vectors();
                c.multiply(_vnorm, _rg._X);
                s = _sigma;
                //from= s- c;
                //to =s +c;
                from = Centre - c;
                to   = Centre + c;
                GL_Draw.glLine(from, to, Colour.Blue(), Colour.Blue_Violet());

                c.multiply(_eigenvec2, _rg._Y);
                from = Centre - c;
                to   = Centre + c;
                //from = s - c;
                //to = s + c;
                GL_Draw.glLine(from, to, Colour.Gold(), Colour.Green_Yellow());

                c.multiply(_eigenvec3, _rg._Z);
                from = Centre - c;
                to   = Centre + c;
                //from = s - c;
                //to = s + c;
                GL_Draw.glLine(from, to, Colour.Red(), Colour.Salmon());
            }
        }
예제 #2
0
        private void SurfaceAdj(OctreeLeaf l, Dictionary <OctreeLeaf, Surface> nodesuf, int i, int j, int k)
        {
            OctreeNode n = l.getAdjacentNOde(i - 1, j - 1, k - 1);

            if (n != null)
            {
                Surface s;
                if (nodesuf.TryGetValue((OctreeLeaf)n, out s))
                {
                    if (s != null)
                    {
                        Render.GL_Draw.glLine(l.Sigma, n.Sigma, _g1, s.SurfColour);
                    }
                    else
                    {
                        Render.GL_Draw.glLine(l.Sigma, n.Sigma, _g1, Colour.Blue());
                    }
                }
            }
        }