Package ch.bfh.ti.kybernetik.engine.controller.roboter

Examples of ch.bfh.ti.kybernetik.engine.controller.roboter.RoboterConstruction


          public void performAction(RoboterController roboterController) {
            // System.out.println("Simulator: Iterate RoboterController");
            double leftSensorIntensity = 0;
            double rightSensorIntensity = 0;
            Roboter roboter = roboterController.getRoboter();
            RoboterConstruction roboterConstruction = roboterController.getRoboterConstruction();
            for (LightBulbController lightBulbController : lightBulbControllers) {

              // Left Light Sensor
              Point2d leftLightSensorPoint = roboterConstruction.getRoboterElementPoint(roboter.getLeftLightSensor());
              Vector2d leftLightSensorVector = roboterConstruction.getRoboterElementAngleVector(roboter.getLeftLightSensor());

              leftSensorIntensity = leftSensorIntensity
                  + lightBulbController.calculateIntensity(leftLightSensorPoint, roboter.getLeftLightSensor(),
                      leftLightSensorVector);

              // Right Light Sensor
              Point2d rightLightSensorPoint = roboterConstruction.getRoboterElementPoint(roboter.getRightLightSensor());
              Vector2d rightLightSensorVector = roboterConstruction.getRoboterElementAngleVector(roboter
                  .getRightLightSensor());

              rightSensorIntensity = rightSensorIntensity
                  + lightBulbController.calculateIntensity(rightLightSensorPoint, roboter.getRightLightSensor(),
                      rightLightSensorVector);
View Full Code Here

TOP

Related Classes of ch.bfh.ti.kybernetik.engine.controller.roboter.RoboterConstruction

Copyright © 2018 www.massapicom. 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.