public class Position extends GamsJNI
| Constructor and Description |
|---|
Position()
Default constructor
|
Position(double inx,
double iny,
double inz)
Constructor for a provided x,y,z coordinate
|
Position(ai.madara.knowledge.containers.NativeDoubleVector cont)
Constructor from container
|
Position(Position input)
Copy constructor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Position other)
Checks two instances for equality
|
protected void |
finalize()
Cleans up underlying C resources
|
void |
free()
Deletes the C instantiation.
|
void |
fromArray(double[] arr)
Copy values from Array.
|
void |
fromContainer(ai.madara.knowledge.containers.NativeDoubleVector cont)
Copy values from a container
|
static Position |
fromPointer(long cptr)
Creates a java object instance from a C/C++ pointer
|
static Position |
fromPointer(long cptr,
boolean shouldManage)
Creates a java object instance from a C/C++ pointer
|
double |
getX()
Returns the latitude
|
double |
getY()
Returns the longitude
|
double |
getZ()
Returns the altitude
|
int |
hashCode()
Gets a unique hashcode for this instance
|
void |
setX(double input)
Sets the latitude/x coord
|
void |
setY(double input)
Sets the longitude/y coord
|
void |
setZ(double input)
Sets the altitude/z coord
|
double[] |
toArray()
Get double array representation of Position
|
void |
toContainer(ai.madara.knowledge.containers.NativeDoubleVector cont)
Copy values to a container
|
String |
toString()
Converts the position into a string
|
public Position()
public Position(double inx,
double iny,
double inz)
inx - the x coordinateiny - the y coordinateinz - the z coordinatepublic Position(ai.madara.knowledge.containers.NativeDoubleVector cont)
throws GamsDeadObjectException,
ai.madara.exceptions.MadaraDeadObjectException
cont - Container to copy fromai.madara.exceptions.MadaraDeadObjectExceptionGamsDeadObjectExceptionpublic Position(Position input)
input - the position to copypublic boolean equals(Position other) throws GamsDeadObjectException
other - other position to check againstGamsDeadObjectExceptionpublic int hashCode()
public String toString()
public double getX()
throws GamsDeadObjectException
GamsDeadObjectExceptionpublic double getY()
throws GamsDeadObjectException
GamsDeadObjectExceptionpublic double getZ()
throws GamsDeadObjectException
GamsDeadObjectExceptionpublic void setX(double input)
throws GamsDeadObjectException
input - the new coordGamsDeadObjectExceptionpublic void setY(double input)
throws GamsDeadObjectException
input - the new coordGamsDeadObjectExceptionpublic void setZ(double input)
throws GamsDeadObjectException
input - the new coordGamsDeadObjectExceptionpublic double[] toArray()
throws GamsDeadObjectException
GamsDeadObjectExceptionpublic void fromArray(double[] arr)
throws GamsDeadObjectException
arr - Array to copyGamsDeadObjectExceptionpublic void toContainer(ai.madara.knowledge.containers.NativeDoubleVector cont)
throws ai.madara.exceptions.MadaraDeadObjectException,
GamsDeadObjectException
cont - Container to copy values toGamsDeadObjectExceptionai.madara.exceptions.MadaraDeadObjectExceptionpublic void fromContainer(ai.madara.knowledge.containers.NativeDoubleVector cont)
throws ai.madara.exceptions.MadaraDeadObjectException,
GamsDeadObjectException
cont - Container to copy values fromGamsDeadObjectExceptionai.madara.exceptions.MadaraDeadObjectExceptionpublic static Position fromPointer(long cptr) throws GamsDeadObjectException
cptr - C pointer to the objectGamsDeadObjectExceptionpublic static Position fromPointer(long cptr, boolean shouldManage) throws GamsDeadObjectException
cptr - C pointer to the objectshouldManage - if true, manage the pointerGamsDeadObjectExceptionpublic void free()
throws GamsDeadObjectException
GamsDeadObjectExceptionCopyright © 2018. All rights reserved.