public Frustum () { for (int i = 0; i < 6; i++) { planes[i] = new Plane(new Vector3(), 0); } }
public Frustum () { for (int i = 0; i < 6; i++) { planes[i] = new Plane(new Vector3(), 0); } }
public static void main(String[] args) { Vehicle[] vehicles = { new Plane(), new Car(), new Car(),
class F18{ Plane innerPlane; public F18(){ innerPlane = new Plane(0,0); } }
var Vehicle = function() { var age = 21; //private variable this.setAge = function(age2) {age = age2;}; this.getAge = function() {return age;}; }; var Plane = function(){ Vehicle.apply(this, arguments); }; Plane.prototype = Object.create(Vehicle.prototype); var plane = new Plane(); console.log( plane instanceof Vehicle , plane.getAge());
@Test public void testSplitTriangle () { Plane plane = new Plane(new Vector3(1, 0, 0), 0); SplitTriangle split = new SplitTriangle(3);
@RunWith(MockitoJUnitRunner.class) public class fooTest { private Plane plane; @Mock private DomainService service; @Before public void setUp() { plane = new Plane(); when(service.findObjectByID(any(Car.class))).thenReturn(plane); } [...]
generateDiff(new Car(), new Plane()); // type is inferred as Vehicle MyClass.<Vehicle>generateDiff(new Car(), new Plane());
public static void main(String[] args) { Flyable plane = new Plane(); plane.fly(plane); Flyable airbus = new Airbus(); airbus.fly(airbus); }
public static void main(String args[]) { Plane pl = new Plane() { @Override public void fly() { System.out.println("The plane is flying..."); } }; pl.fly(); }
public static void main(String args []){ List<PlaneSeat> seats = new ArrayList<>(); for(int i =10;i>0;i--) seats.add(new PlaneSeat(i--)); Plane plane = new Plane(); plane.setSeats(seats); System.out.println(plane);//print before sorting plane.sortByCustomers(); System.out.println(plane);//after sorting by customer }
class Main { private final Runway[] runways = { new Runway(), new Runway() }; void main(){ for(int i=0; i<5; i++){ System.out.println("Plane #" + i + " attempting to land."); Runway runway = runways.get(i%runways.length); runway.land(new Plane(i)); } } } class Runway { public synchronized land(Plane plane){ System.out.println(plane + " landed."); } }
public Frustum () { for (int i = 0; i < 6; i++) { planes[i] = new Plane(new Vector3(), 0); } }
Bitmap texture = BitmapFactory.decodeResource(this.mContext.getResources(), ResourceId); planeMat.addTexture(this.mTextureManager.addTexture(texture)); Plane plane = new Plane(1.0f, 1.0f, 1, 1); plane.setRotZ(-90.0f); //plane.setScale(2.8f); plane.setMaterial(planeMat); addChild(plane);
public static void main(String[] args) { // take a mode of transport Transport plane = new Plane(); // put it in a schedule Schedule schedule = new Schedule(plane, "London", "New York", "2013-01-01", "2013-01-02"); // let customers make a booking against the schedule Customer jo = new Customer("Jo", "Smith"); Customer al = new Customer("Al", "Bar"); jo.makeBooking(schedule); al.makeBooking(schedule); }
SimpleMaterial localSimpleMaterial = new SimpleMaterial(); Bitmap localBitmap = BitmapFactory.decodeResource(this.mContext.getResources(), R.drawable.image); localSimpleMaterial.addTexture(this.mTextureManager.addTexture(localBitmap)); Plane localPlane = new Plane(10.0F, 10.0F, 1, 1); localPlane.setRotZ(-90.0F); localPlane.setScale(3.7F); localPlane.setPosition(0.0F, 0.0F, 10.0F); localPlane.setMaterial(localSimpleMaterial); addChild(localPlane);