Example #1
0
        //------------------------------------------------------------------------------
        protected void displayEigen()
        {
            //draw points
            if (NumPts > OctreeNode._MINPTS)
            {
                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());
            }
        }
Example #2
0
 //------------------------------------------------------------------------------
 // Draw()
 public void Draw()
 {
     Gl.glPushMatrix();
     Gl.glTranslated(-_Offeset._X, -_Offeset._Y, -_Offeset._Z);
     Gl.glDisable(Gl.GL_LIGHTING);
     Gl.glGetDoublev(Gl.GL_MODELVIEW_MATRIX, _modelMatrix);
     _Ot.Draw();
     _Sc.Draw();
     GL_Draw.glLine(_ray.position(), _ray.position() + 10.0 * _ray.direction(), Colour.Indian_Red(), Colour.Indian_Red());
     Gl.glEnable(Gl.GL_LIGHTING);
     Gl.glPopMatrix();
 }
Example #3
0
        //------------------------------------------------------------------------------
        private void buildDisplayLists_LN()
        {
            // find all the point in the bbbox
            if (NumPts > 0)
            {
                _DisplayListLN = Gl.glGenLists(1);
                Gl.glNewList(_DisplayListLN, Gl.GL_COMPILE);

                // draw the box
                Gl.glDisable(Gl.GL_LIGHTING);
                Gl.glEnable(Gl.GL_LINE_SMOOTH_HINT);
                GL_Draw.GLBBCube(_bbMin, _bbMax, Colour.Lemon_Chiffon());
                Gl.glDisable(Gl.GL_LINE_SMOOTH_HINT);
                Gl.glEnable(Gl.GL_LIGHTING);
                Gl.glEndList();
            }
        }
Example #4
0
 //------------------------------------------------------------------------------
 private void buildDisplayLists_CentreNorm(bool centroid)
 {
     _DispLstCentreNorm = Gl.glGenLists(1);
     Gl.glNewList(_DispLstCentreNorm, Gl.GL_COMPILE);
     Gl.glDisable(Gl.GL_LIGHTING);
     GL_Draw.GLBBCube(_bbMin, _bbMax, Colour.Dark_Orchid());
     displayEigen();
     displayAdjacent(centroid);
     Gl.glPointSize(5.0f);
     Gl.glEnable(Gl.GL_POINT_SMOOTH);
     Gl.glBegin(Gl.GL_POINTS);
     Gl.glColor3d(1.0d, 0.0d, 0.0d);
     Gl.glVertex3d(Centre._X, Centre._Y, Centre._Z);
     Gl.glEnd();
     Gl.glDisable(Gl.GL_POINT_SMOOTH);
     Gl.glEnable(Gl.GL_LIGHTING);
     Gl.glEndList();
 }