|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xith3d.ui.hud.HUDCoordinatesConverter
public class HUDCoordinatesConverter
The coordinates converter converts sizes and locations from and to different coortinate spaces.
| Constructor Summary | |
|---|---|
HUDCoordinatesConverter(HUD hud)
|
|
| Method Summary | ||
|---|---|---|
void |
getAbsoluteLocationOnHUD(Widget widget,
org.openmali.vecmath2.Tuple2f buffer)
Computes the absolute position of the given Widget on the HUD. |
|
float |
getEqualHeight(float width)
Calculates a height that's visually equal to the given width. |
|
float |
getEqualWidth(float height)
|
|
HUD |
getHUD()
|
|
|
getLocationHUD2Pixels(float x,
float y,
Tuple2i_ buffer)
Calculates pixel location from these HUD-values. |
|
|
getLocationHUD2SG(float x,
float y,
Tuple2f_ buffer)
Calculates scenegraph location from these HUD-values. |
|
|
getLocationPixels2HUD(int x,
int y,
Tuple2f_ buffer)
Calculates HUD location from these pixel-values. |
|
|
getLocationSG2HUD(float x,
float y,
Tuple2f_ buffer)
Calculates HUD location from these scenegraph-values. |
|
|
getSizeHUD2Pixels(float w,
float h,
Dim2i_ buffer)
Calculates pixel size from these HUD-values. |
|
|
getSizeHUD2SG(float w,
float h,
Dim2f_ buffer)
Calculates scenegraph width and height from these HUD-values. |
|
|
getSizeOfPixels(int x,
int y,
Dim2f_ buffer)
Retrieves the size these pixels have on this WidgetContainer. |
|
|
getSizePixels2HUD(int w,
int h,
Dim2f_ buffer)
Calculates HUD size from these pixel-values. |
|
|
getSizeSG2HUD(float w,
float h,
Dim2f_ buffer)
Calculates HUD size from these scenegraph-values. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HUDCoordinatesConverter(HUD hud)
| Method Detail |
|---|
public final HUD getHUD()
public final float getEqualWidth(float height)
height - the height to calculate a visually equal width
public final float getEqualHeight(float width)
width - the width to calculate a visually equal height
public final <Dim2f_ extends org.openmali.types.twodee.Dim2f> Dim2f_ getSizePixels2HUD(int w,
int h,
Dim2f_ buffer)
w - the canvas-x-value to transformh - the canvas-y-value to transformbuffer - the buffer to write the values to
public final <Tuple2f_ extends org.openmali.vecmath2.Tuple2f> Tuple2f_ getLocationPixels2HUD(int x,
int y,
Tuple2f_ buffer)
x - the canvas-x-value to transformy - the canvas-y-value to transformbuffer - the buffer to write the values to
public final <Dim2i_ extends org.openmali.types.twodee.Dim2i> Dim2i_ getSizeHUD2Pixels(float w,
float h,
Dim2i_ buffer)
w - the HUD-x-value to transformh - the HUD-y-value to transformbuffer - the buffer to write the values to
public final <Tuple2i_ extends org.openmali.vecmath2.Tuple2i> Tuple2i_ getLocationHUD2Pixels(float x,
float y,
Tuple2i_ buffer)
x - the HUD-x-value to transformy - the HUD-y-value to transformbuffer - the buffer to write the values to
public final <Dim2f_ extends org.openmali.types.twodee.Dim2f> Dim2f_ getSizeHUD2SG(float w,
float h,
Dim2f_ buffer)
w - the HUD-x-value to transformh - the HUD-y-value to transformbuffer - the buffer to write the values to
public final <Tuple2f_ extends org.openmali.vecmath2.Tuple2f> Tuple2f_ getLocationHUD2SG(float x,
float y,
Tuple2f_ buffer)
x - the HUD-x-value to transformy - the HUD-y-value to transformbuffer - the buffer to write the values to
public final <Dim2f_ extends org.openmali.types.twodee.Dim2f> Dim2f_ getSizeSG2HUD(float w,
float h,
Dim2f_ buffer)
w - the scenegraph-x-value to transformh - the scenegraph-y-value to transformbuffer - the buffer to write the values to
public final <Tuple2f_ extends org.openmali.vecmath2.Tuple2f> Tuple2f_ getLocationSG2HUD(float x,
float y,
Tuple2f_ buffer)
x - the scenegraph-x-value to transformy - the scenegraph-y-value to transformbuffer - the buffer to write the values to
public final <Dim2f_ extends org.openmali.types.twodee.Dim2f> Dim2f_ getSizeOfPixels(int x,
int y,
Dim2f_ buffer)
x - the x-count of pixelsy - the y-count of pixelsbuffer - the buffer to write the values to
public final void getAbsoluteLocationOnHUD(Widget widget,
org.openmali.vecmath2.Tuple2f buffer)
widget - buffer -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||