public class Region extends GamsJNI
| Constructor and Description |
|---|
Region()
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addVertex(GpsPosition point)
Adds a GPS vertex to this region
|
boolean |
contains(GpsPosition point)
Checks to see if the point is contained in this region
|
protected void |
finalize()
Cleans up underlying C resources
|
void |
free()
Deletes the C instantiation.
|
void |
fromContainer(ai.madara.knowledge.KnowledgeBase kb)
Helper function for copying values from a MADARA knowledge base
|
void |
fromContainer(ai.madara.knowledge.KnowledgeBase kb,
String name)
Helper function for copying values from a MADARA knowledge base
|
static Region |
fromPointer(long cptr)
Creates a java object instance from a C/C++ pointer
|
static Region |
fromPointer(long cptr,
boolean shouldManage)
Creates a java object instance from a C/C++ pointer
|
double |
getArea()
Gets area of the region
|
Region |
getBoundingBox()
Gets bounding box
|
double |
getDistance(GpsPosition point)
Get distance from any point in this region
|
double |
getMaxAlt()
Gets the maximum altitude
|
double |
getMaxLat()
Gets the maximum latitude
|
double |
getMaxLong()
Gets the maximum longitude
|
double |
getMinAlt()
Gets the minimum altitude
|
double |
getMinLat()
Gets the minimum latitude
|
double |
getMinLong()
Gets the minimum longitude
|
String |
getName()
Get name of the region
|
GpsPosition[] |
getVertices()
Gets the GPS vertices that form the region boundary
|
void |
modify()
Calls toContainer with previous values
|
void |
setName(String n)
Set name of the region
|
void |
toContainer(ai.madara.knowledge.KnowledgeBase kb)
Helper function for copying values to a MADARA knowledge base
|
void |
toContainer(ai.madara.knowledge.KnowledgeBase kb,
String name)
Helper function for copying values to a MADARA knowledge base
|
String |
toString()
Converts the position into a string
|
public String toString()
public String getName() throws GamsDeadObjectException
GamsDeadObjectExceptionpublic void setName(String n) throws GamsDeadObjectException
n - new name of the regionGamsDeadObjectExceptionpublic void addVertex(GpsPosition point) throws GamsDeadObjectException
point - point to checkGamsDeadObjectExceptionpublic double getArea()
throws GamsDeadObjectException
GamsDeadObjectExceptionpublic Region getBoundingBox() throws GamsDeadObjectException
GamsDeadObjectExceptionpublic boolean contains(GpsPosition point) throws GamsDeadObjectException
point - point to checkGamsDeadObjectExceptionpublic double getDistance(GpsPosition point) throws GamsDeadObjectException
point - point to checkGamsDeadObjectExceptionpublic GpsPosition[] getVertices() throws GamsDeadObjectException
GamsDeadObjectExceptionpublic double getMaxAlt()
throws GamsDeadObjectException
GamsDeadObjectExceptionpublic double getMinAlt()
throws GamsDeadObjectException
GamsDeadObjectExceptionpublic double getMaxLat()
throws GamsDeadObjectException
GamsDeadObjectExceptionpublic double getMinLat()
throws GamsDeadObjectException
GamsDeadObjectExceptionpublic double getMaxLong()
throws GamsDeadObjectException
GamsDeadObjectExceptionpublic double getMinLong()
throws GamsDeadObjectException
GamsDeadObjectExceptionpublic static Region fromPointer(long cptr) throws GamsDeadObjectException
cptr - C pointer to the objectGamsDeadObjectExceptionpublic static Region fromPointer(long cptr, boolean shouldManage) throws GamsDeadObjectException
cptr - C pointer to the objectshouldManage - if true, manage the pointerGamsDeadObjectExceptionpublic void fromContainer(ai.madara.knowledge.KnowledgeBase kb)
throws GamsDeadObjectException
kb - KnowledgeBase to copy region information toGamsDeadObjectExceptionpublic void fromContainer(ai.madara.knowledge.KnowledgeBase kb,
String name)
throws GamsDeadObjectException
kb - KnowledgeBase to copy region information toname - name of the regionGamsDeadObjectExceptionpublic void toContainer(ai.madara.knowledge.KnowledgeBase kb)
throws GamsDeadObjectException
kb - KnowledgeBase with region informationGamsDeadObjectExceptionpublic void toContainer(ai.madara.knowledge.KnowledgeBase kb,
String name)
throws GamsDeadObjectException
kb - KnowledgeBase with region informationname - name of the regionGamsDeadObjectExceptionpublic void modify()
public void free()
Copyright © 2018. All rights reserved.