本文整理汇总了Java中mil.nga.wkb.geom.Point.setM方法的典型用法代码示例。如果您正苦于以下问题:Java Point.setM方法的具体用法?Java Point.setM怎么用?Java Point.setM使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mil.nga.wkb.geom.Point
的用法示例。
在下文中一共展示了Point.setM方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createPoint
import mil.nga.wkb.geom.Point; //导入方法依赖的package包/类
/**
* Create a random point
*
* @param hasZ
* @param hasM
* @return
*/
public static Point createPoint(boolean hasZ, boolean hasM) {
double x = Math.random() * 180.0 * (Math.random() < .5 ? 1 : -1);
double y = Math.random() * 90.0 * (Math.random() < .5 ? 1 : -1);
Point point = new Point(hasZ, hasM, x, y);
if (hasZ) {
double z = Math.random() * 1000.0;
point.setZ(z);
}
if (hasM) {
double m = Math.random() * 1000.0;
point.setM(m);
}
return point;
}
示例2: createPoint
import mil.nga.wkb.geom.Point; //导入方法依赖的package包/类
/**
* Create a random point
*
* @param hasZ
* @param hasM
* @return
*/
public static Point createPoint(boolean hasZ, boolean hasM) {
double x = Math.random() * 180.0 * (Math.random() < .5 ? 1 : -1);
double y = Math.random() * 90.0 * (Math.random() < .5 ? 1 : -1);
Point point = new Point(hasZ, hasM, x, y);
if (hasZ) {
double z = Math.random() * 1000.0;
point.setZ(z);
}
if (hasM) {
double m = Math.random() * 1000.0;
point.setM(m);
}
return point;
}
示例3: createPoint
import mil.nga.wkb.geom.Point; //导入方法依赖的package包/类
/**
* Create a random point
*
* @param hasZ
* @param hasM
* @return point
*/
public static Point createPoint(boolean hasZ, boolean hasM) {
double x = Math.random() * 180.0 * (Math.random() < .5 ? 1 : -1);
double y = Math.random() * 90.0 * (Math.random() < .5 ? 1 : -1);
Point point = new Point(hasZ, hasM, x, y);
if (hasZ) {
double z = Math.random() * 1000.0;
point.setZ(z);
}
if (hasM) {
double m = Math.random() * 1000.0;
point.setM(m);
}
return point;
}
示例4: readPoint
import mil.nga.wkb.geom.Point; //导入方法依赖的package包/类
/**
* Read a Point
*
* @param reader
* @param hasZ
* @param hasM
* @return point
*/
public static Point readPoint(ByteReader reader, boolean hasZ, boolean hasM) {
double x = reader.readDouble();
double y = reader.readDouble();
Point point = new Point(hasZ, hasM, x, y);
if (hasZ) {
double z = reader.readDouble();
point.setZ(z);
}
if (hasM) {
double m = reader.readDouble();
point.setM(m);
}
return point;
}
示例5: createPoint
import mil.nga.wkb.geom.Point; //导入方法依赖的package包/类
/**
* Create a random point
*
* @param hasZ
* @param hasM
* @return
*/
public static Point createPoint(boolean hasZ, boolean hasM) {
double x = Math.random() * 180.0 * (Math.random() < .5 ? 1 : -1);
double y = Math.random() * 90.0 * (Math.random() < .5 ? 1 : -1);
Point point = new Point(hasZ, hasM, x, y);
if (hasZ) {
double z = Math.random() * 1000.0;
point.setZ(z);
}
if (hasM) {
double m = Math.random() * 1000.0;
point.setM(m);
}
return point;
}
示例6: updatePoint
import mil.nga.wkb.geom.Point; //导入方法依赖的package包/类
/**
* Update a point
*
* @param point
*/
private static void updatePoint(Point point) {
point.setX(POINT_UPDATED_X);
point.setY(POINT_UPDATED_Y);
if (point.hasZ()) {
point.setZ(POINT_UPDATED_Z);
}
if (point.hasM()) {
point.setM(POINT_UPDATED_M);
}
}