本文整理匯總了Java中math.geom3d.Vector3D.getZ方法的典型用法代碼示例。如果您正苦於以下問題:Java Vector3D.getZ方法的具體用法?Java Vector3D.getZ怎麽用?Java Vector3D.getZ使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類math.geom3d.Vector3D
的用法示例。
在下文中一共展示了Vector3D.getZ方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: project
import math.geom3d.Vector3D; //導入方法依賴的package包/類
/** Project a point onto plane
*
* @param point point to project
* @return point within plane that lies in direction of normal vector from input point
*/
public Point3D project(Point3D point) {
Vector3D planeNormal = getNormalVector();
// the difference between origin of plane and the point
Vector3D dp = new Vector3D( point, getOrigin() );
// compute ratio of dot products,
double t = Vector3D.dotProduct(planeNormal, dp);
return new Point3D(
point.getX()+t*planeNormal.getX(),
point.getY()+t*planeNormal.getY(),
point.getZ()+t*planeNormal.getZ()
);
}
示例2: plus
import math.geom3d.Vector3D; //導入方法依賴的package包/類
@Override
public Point6D plus(Vector3D v){
return new Point6D(this.getX() + v.getX(),
this.getY()+ v.getY(),
this.getZ() + v.getZ(),
this.normal);
}
示例3: StraightLine3D
import math.geom3d.Vector3D; //導入方法依賴的package包/類
public StraightLine3D(Point3D origin, Vector3D direction) {
this.x0 = origin.getX();
this.y0 = origin.getY();
this.z0 = origin.getZ();
this.dx = direction.getX();
this.dy = direction.getY();
this.dz = direction.getZ();
}
示例4: Plane3D
import math.geom3d.Vector3D; //導入方法依賴的package包/類
public Plane3D(Point3D point, Vector3D vector1, Vector3D vector2) {
this.x0 = point.getX();
this.y0 = point.getY();
this.z0 = point.getZ();
this.dx1 = vector1.getX();
this.dy1 = vector1.getY();
this.dz1 = vector1.getZ();
this.dx2 = vector2.getX();
this.dy2 = vector2.getY();
this.dz2 = vector2.getZ();
}
示例5: Velocity
import math.geom3d.Vector3D; //導入方法依賴的package包/類
public Velocity( Vector3D vector ) {
this(vector.getX(), vector.getY(), vector.getZ());
}
示例6: setBedMin
import math.geom3d.Vector3D; //導入方法依賴的package包/類
public void setBedMin(Vector3D vec){
this.xMin = vec.getX();
this.yMin = vec.getY();
this.zMin =vec.getZ();
this.bedMin = vec;
}
示例7: setBedMax
import math.geom3d.Vector3D; //導入方法依賴的package包/類
public void setBedMax(Vector3D vec){
this.xMax = vec.getX();
this.yMax = vec.getY();
this.zMax =vec.getZ();
this.bedMax = vec;
}
示例8: VectorToStr
import math.geom3d.Vector3D; //導入方法依賴的package包/類
public static String VectorToStr(Vector3D v){
return "{"+ v.getX() + " " + v.getY() + " " +v.getZ() +"}";
}
示例9: projectVector
import math.geom3d.Vector3D; //導入方法依賴的package包/類
public Vector3D projectVector(Vector3D vect) {
Point3D point = new Point3D(x0+vect.getX(), y0+vect.getY(), z0
+vect.getZ());
point = this.projectPoint(point);
return new Vector3D(point.getX()-x0, point.getY()-y0, point.getZ()-z0);
}