public interface Viewer extends Shape
Modifier and Type | Method and Description |
---|---|
int |
getScreenHeight()
Return the screen height.
|
double |
getViewpointX(double x)
Get the horizontal viewpoint from the object location.
|
double |
getViewpointY(double y)
Get the vertical viewpoint from the object location.
|
int |
getViewX()
Get horizontal view offset.
|
int |
getViewY()
Get vertical view offset.
|
boolean |
isViewable(Localizable shape,
int marginX,
int marginY)
Check if the localizable is inside the view area, and so, can be seen.
|
boolean |
isViewable(Shape shape,
int marginX,
int marginY)
Check if the shape is inside the view area, and so, can be seen.
|
getX, getY
double getViewpointX(double x)
x
- The object horizontal location.double getViewpointY(double y)
y
- The object vertical location.int getViewX()
int getViewY()
int getScreenHeight()
boolean isViewable(Localizable shape, int marginX, int marginY)
shape
- The shape to check.marginX
- The horizontal margin.marginY
- The vertical margin.true
if viewable, false
else.boolean isViewable(Shape shape, int marginX, int marginY)
shape
- The shape to check.marginX
- The horizontal margin.marginY
- The vertical margin.true
if viewable, false
else.Copyright © 2017 Byron 3D Games Studio. All rights reserved.