ProgrammierMethodik 2002 - RoboCup

Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

RCViewPort Class Reference

Inheritance diagram for RCViewPort::

JComponent RCType List of all members.

Public Methods

 RCViewPort (RCWorld World)
 Constructor. More...

void paint (Graphics g)
 overload paint. More...

int ccw (int x0, int y0, int x1, int y1, int x2, int y2)
 compute ... More...

boolean intersect (int l1_x1, int l1_y1, int l1_x2, int l1_y2, int l2_x1, int l2_y1, int l2_x2, int l2_y2)
 checks whether the two given lines cross on screen. More...

boolean in (int x, int y, int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3)
 checks whether a given point (e.g. More...

Dimension getPreferredSize ()
 tell our preferred size to anybody who's interested. More...

Dimension getMinimumSize ()
 tell our minimum size to anybody how's interested. More...

Dimension getSize ()
 tell actual size to anyone how's interested. More...

int transX (double x)
 translate world coordinates to image coordiates. More...

int transY (double y)
 now translate world coordinates to image coordinates. More...


Public Attributes

RCWorld World
int Width
int Height
int Scale
int Border

Constructor & Destructor Documentation

RCViewPort::RCViewPort ( RCWorld World ) [inline]
 

Constructor.

Definition at line 48 of file RCViewPort.java.


Member Function Documentation

int RCViewPort::ccw ( int x0,
int y0,
int x1,
int y1,
int x2,
int y2 ) [inline]
 

compute ...

Parameters:
...  

Definition at line 191 of file RCViewPort.java.

Dimension RCViewPort::getMinimumSize ( ) [inline]
 

tell our minimum size to anybody how's interested.

Definition at line 286 of file RCViewPort.java.

Dimension RCViewPort::getPreferredSize ( ) [inline]
 

tell our preferred size to anybody who's interested.

Returns:
our size

Definition at line 276 of file RCViewPort.java.

Dimension RCViewPort::getSize ( ) [inline]
 

tell actual size to anyone how's interested.

Definition at line 296 of file RCViewPort.java.

boolean RCViewPort::in ( int x,
int y,
int x0,
int y0,
int x1,
int y1,
int x2,
int y2,
int x3,
int y3 ) [inline]
 

checks whether a given point (e.g.

an RCObject (Player, Enemy, Ball) is being contained by the given 4-point-polygon

Parameters:
x   and y coordinates of the concerned point/RCObject x0,y0, x1,y1, x2,y2, x3,y3 vertices of the polygon

Definition at line 249 of file RCViewPort.java.

boolean RCViewPort::intersect ( int l1_x1,
int l1_y1,
int l1_x2,
int l1_y2,
int l2_x1,
int l2_y1,
int l2_x2,
int l2_y2 ) [inline]
 

checks whether the two given lines cross on screen.

Parameters:
l1_x1   and l1_y1 starting and l1_x2 and l1_y2 ending point of first line; l2_x1 and L2_y1 starting and l2_x2 and l2_y2 ending point of second line;

Definition at line 222 of file RCViewPort.java.

void RCViewPort::paint ( Graphics g ) [inline]
 

overload paint.

Parameters:
g   paint device

Definition at line 64 of file RCViewPort.java.

int RCViewPort::transX ( double x ) [inline]
 

translate world coordinates to image coordiates.

Parameters:
x   : x-value to translate
no.   2 : the corresponding image value

Definition at line 310 of file RCViewPort.java.

int RCViewPort::transY ( double y ) [inline]
 

now translate world coordinates to image coordinates.

Parameters:
y   y-value to translate
the   corresponding image value

Definition at line 332 of file RCViewPort.java.


Member Data Documentation

int RCViewPort::Border
 

Definition at line 41 of file RCViewPort.java.

int RCViewPort::Height
 

Definition at line 39 of file RCViewPort.java.

int RCViewPort::Scale
 

Definition at line 40 of file RCViewPort.java.

int RCViewPort::Width
 

Definition at line 38 of file RCViewPort.java.

RCWorld RCViewPort::World
 

Definition at line 37 of file RCViewPort.java.


The documentation for this class was generated from the following file:
(c) Copyright by Gruppe 1 :