|
Sweet Home 3D 4.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.eteks.sweethome3d.model.Compass
public class Compass
A compass used to locate where a home is located and how it's oriented towards North.
Nested Class Summary | |
---|---|
static class |
Compass.Property
The properties of a compass that may change. |
Constructor Summary | |
---|---|
Compass(float x,
float y,
float diameter)
Creates a compass drawn at the given point. |
Method Summary | |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds the property change listener in parameter to this compass. |
Compass |
clone()
Returns a clone of this compass. |
boolean |
containsPoint(float x,
float y,
float margin)
Returns true if the disc of this compass contains
the point at (x , y )
with a given margin . |
float |
getDiameter()
Returns the diameter of this compass. |
float |
getLatitude()
Returns the latitudeInDegrees of this compass in radians. |
float |
getLongitude()
Returns the longitudeInDegrees of this compass in radians. |
float |
getNorthDirection()
Returns the North direction angle of this compass in radians. |
float[][] |
getPoints()
Returns the corner points of the square that contains compass disc. |
float |
getSunAzimuth(long date)
Returns the azimuth angle of the Sun in the sky in radians at a given date in milliseconds since the Epoch. |
float |
getSunElevation(long date)
Returns the elevation angle of the Sun in the sky in radians at a given date in milliseconds since the Epoch. |
String |
getTimeZone()
Returns the time zone identifier of this compass. |
float |
getX()
Returns the abscissa of the center of this compass. |
float |
getY()
Returns the ordinate of the center of this compass. |
boolean |
intersectsRectangle(float x0,
float y0,
float x1,
float y1)
Returns true if the disc of this compass intersects
with the horizontal rectangle which opposite corners are at points
(x0 , y0 ) and (x1 , y1 ). |
boolean |
isVisible()
Returns true if this compass is visible. |
void |
move(float dx,
float dy)
Moves this compass of ( dx , dy ) units. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes the property change listener in parameter from this compass. |
void |
setDiameter(float diameter)
Sets the diameter of this compass. |
void |
setLatitude(float latitude)
Sets the latitudeInDegrees of this compass. |
void |
setLongitude(float longitude)
Sets the longitudeInDegrees of the center of this compass. |
void |
setNorthDirection(float northDirection)
Sets the North direction angle of this compass. |
void |
setTimeZone(String timeZone)
Sets the time zone identifier of this compass. |
void |
setVisible(boolean visible)
Sets whether this compass is visible or not. |
void |
setX(float x)
Sets the abscissa of the center of this compass. |
void |
setY(float y)
Sets the ordinate of the center of this compass. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Compass(float x, float y, float diameter)
Method Detail |
---|
public void addPropertyChangeListener(PropertyChangeListener listener)
listener
in parameter to this compass.
public void removePropertyChangeListener(PropertyChangeListener listener)
listener
in parameter from this compass.
public float getX()
public void setX(float x)
public float getY()
public void setY(float y)
public float getDiameter()
public void setDiameter(float diameter)
public boolean isVisible()
true
if this compass is visible.
public void setVisible(boolean visible)
public float getNorthDirection()
public void setNorthDirection(float northDirection)
public final float getLatitude()
public void setLatitude(float latitude)
public final float getLongitude()
public void setLongitude(float longitude)
public String getTimeZone()
TimeZone
public void setTimeZone(String timeZone)
IllegalArgumentException
- if timeZone
is null
or contains an unknown identifier.TimeZone
public float[][] getPoints()
getPoints
in interface Selectable
public boolean intersectsRectangle(float x0, float y0, float x1, float y1)
true
if the disc of this compass intersects
with the horizontal rectangle which opposite corners are at points
(x0
, y0
) and (x1
, y1
).
intersectsRectangle
in interface Selectable
public boolean containsPoint(float x, float y, float margin)
true
if the disc of this compass contains
the point at (x
, y
)
with a given margin
.
containsPoint
in interface Selectable
public void move(float dx, float dy)
dx
, dy
) units.
move
in interface Selectable
public Compass clone()
clone
in interface Selectable
clone
in class Object
public float getSunElevation(long date)
date
in milliseconds since the Epoch.
See Sun
azimuth and elevation angles for more information.
public float getSunAzimuth(long date)
date
in milliseconds since the Epoch.
See Sun
azimuth and elevation angles for more information.
|
Sweet Home 3D 4.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
![]() |
© Copyrights 2006-2013 eTeks - All rights reserved
Distributed under GNU General Public License |