Logo Search packages:      
Sourcecode: javamorph version File versions  Download package

void javamorph::CMeshDecorator::mouseMoved ( MouseEvent  e  )  [inline]

Detect where the mouse is before and while moving the mesh point.

Definition at line 134 of file CMeshDecorator.java.

References getIndex(), javamorph::CFrame::getParent(), index, parent, pos, and javamorph::CFrame::scalePoint().

                                        {
        pos = new Point(e.getX(), e.getY());
        parent.scalePoint(pos);
        /* Branch if moving or removing points. */
        if(CConfig.EDIT_MESH_OFF == CConfig.edit_state ||
            CConfig.EDIT_MESH_SUB == CConfig.edit_state){
            int n = getIndex(pos);
            /* Overwrite the index. */
            if(index != n){
                index = n;
                this.parent.getParent().repaint();
            }
        }
        /* Branch if adding points. */
        if(CConfig.EDIT_MESH_ADD == CConfig.edit_state){
            /* Repaint only. */
            this.parent.getParent().repaint();
        }
    }


Generated by  Doxygen 1.6.0   Back to index