Examples of EyeTrackingEvent


Examples of de.dfki.km.text20.services.trackingdevices.eyes.EyeTrackingEvent

        // If the element is not visible, don't do anything
        if (!this.pseudorenderer.getStatus().contains(PseudorendererStatus.VISIBLE))
            return;

        // Put entry in filter
        final EyeTrackingEvent filterEvent = this.filter.filterEvent(event);

        // Update the displacement filter
        this.displacementFilter.updateDocumentOffset(this.pseudorenderer.getViewport());
        this.displacementFilter.updateScreenPosition(this.pseudorenderer.getGeometry());

        final Rectangle region = new Rectangle(event.getGazeCenter(), this.searchSize);
        region.x -= this.searchSize.width / 2;
        region.y -= this.searchSize.height / 2;

        // Update elements in region.
        final Collection<RenderElement> allElementsIntersecting = this.pseudorenderer.getAllElementsIntersecting(region, CoordinatesType.SCREEN_BASED);
        for (final RenderElement renderElement : allElementsIntersecting) {
            this.displacementFilter.updateRenderElement(renderElement);
        }

        final EyeTrackingEvent attracted = this.displacementFilter.filterEvent(filterEvent);

        Point fixation = this.filter.getFixation().getCenter();

        // If nothing changed ...
        if (!(this.filter.isNewFixation() || this.filter.isEndOfFixation())) return;

        if (fixation == null) {
            // Execute all handler
            for (final String h : handler) {
                this.browserPlugin.executeJSFunction(h, -1, -1);
            }
        } else {
            fixation = attracted.getGazeCenter();
            // Find what's below the gaze
            final Point dp = this.pseudorenderer.convertPoint(fixation, CoordinatesType.SCREEN_BASED, CoordinatesType.DOCUMENT_BASED);
            if (dp == null) return;

            // Execute all handler
View Full Code Here

Examples of de.dfki.km.text20.services.trackingdevices.eyes.EyeTrackingEvent

        // If the element is no000000t visible, don't do anything
        if (!this.pseudorenderer.getStatus().contains(PseudorendererStatus.VISIBLE))
            return;

        // a) Put entry in filter
        final EyeTrackingEvent filterEvent = this.fixationFilter.filterEvent(event);

        // b) Update filters with data near the current gaze point
        updateFilter(event);

        // c) And calculate the attracted position using updated data
        //final TrackingEvent attracted = this.displacementFilter.filterEvent(filterEvent);
        final EyeTrackingEvent attracted = filterEvent;

        // We're only interested in new fixations
        if (!this.fixationFilter.isNewFixation()) return;

        // Now we hopefully have better fixation information
        final Point fixation = attracted.getGazeCenter();

        updateFixations(filterEvent.getEventTime(), fixation);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.