Package org.movsim.roadmappings

Examples of org.movsim.roadmappings.RoadMappingBezier.endPos()


                // edge lines)
                final RoadMappingBezier bezier = (RoadMappingBezier) roadMapping;
                final GeneralPath path = new GeneralPath();
                posTheta = bezier.startPos(lateralOffset);
                path.moveTo(posTheta.x, posTheta.y);
                posTheta = bezier.endPos(lateralOffset);
                final double cx = bezier.controlX(lateralOffset);
                final double cy = bezier.controlY(lateralOffset);
                path.quadTo(cx, cy, posTheta.x, posTheta.y);
                g.draw(path);
                return;
View Full Code Here


                final int radiusC = 6;
                if (drawBezierPoints) {
                    g.fillOval((int) posTheta.x - radius / 2, (int) posTheta.y - radius / 2, radius, radius);
                }
                path.moveTo(posTheta.x, posTheta.y);
                posTheta = bezier.endPos(lateralOffset);
                path.quadTo(bezier.controlX(lateralOffset), bezier.controlY(lateralOffset), posTheta.x, posTheta.y);
                if (drawBezierPoints) {
                    g.fillOval((int) posTheta.x - radius / 2, (int) posTheta.y - radius / 2, radius, radius);
                    g.fillOval((int) bezier.controlX(lateralOffset) - radiusC / 2, (int) bezier.controlY(lateralOffset)
                            - radiusC / 2, radiusC, radiusC);
View Full Code Here

                    g.fillOval((int) bezier.controlX(lateralOffset) - radiusC / 2, (int) bezier.controlY(lateralOffset)
                            - radiusC / 2, radiusC, radiusC);
                }
                while (iterator.hasNext()) {
                    bezier = iterator.next();
                    posTheta = bezier.endPos(lateralOffset);
                    path.quadTo(bezier.controlX(lateralOffset), bezier.controlY(lateralOffset), posTheta.x, posTheta.y);
                    if (drawBezierPoints) {
                        g.fillOval((int) posTheta.x - radius / 2, (int) posTheta.y - radius / 2, radius, radius);
                        g.fillOval((int) bezier.controlX(lateralOffset) - radiusC / 2,
                                (int) bezier.controlY(lateralOffset) - radiusC / 2, radiusC, radiusC);
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.