• The Physics Class

    1. public void createWorld(double winWidth,double winHeight,float lowerBoundX, float lowerBoundY,  
    2. float upperBoundX, float upperBoundY, float wind , float gravity)  
    3. // creates the world of Physics, the parameters lowerBoundX,lowerBoundY,upperBoundX,upperBoundY refer to the  
    4. // dimension of the screen in which the physics will have influence.  
    5. public void createWorld(double winWidth, double winHeight)  
    6. // creates the world of Physics.  
    7. public void createBodyFromSprite(Sprite spr, boolean isStatic)  
    8. // creates a body for the sprite.  
    9. public void update()  
    10. // updates all that is within the limits of the physic screen.  
    11. public void setGravity(float g)  
    12. // assigns a value to gravity  
    13. public float getGravity()  
    14. // returns the gravity  
    15. public void setWind(float w)  
    16. // assigns a value to the wind  
    17. public float getWind()  
    18. // returns the wind.  
    19. public void setWidhtWindow(double width)  
    20. // assigns a value to the width of the window  
    21. public void setHeightWindow(double height)  
    22. // assigns a value to the height of the window  
    23. public void setTimeStep(float ts)  
    24. // assigns value to the frame rate  

    UFF - Universidade Federal Fluminense - Institudo de Computação - Ciência da Computação