//------------------------------------------------------------------------------ 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()); } }
//------------------------------------------------------------------------------ // 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(); }