本文整理了Java中us.ihmc.robotics.geometry.GeometryTools.getOrthogonalProjectionOnPlane()
方法的一些代码示例,展示了GeometryTools.getOrthogonalProjectionOnPlane()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GeometryTools.getOrthogonalProjectionOnPlane()
方法的具体详情如下:
包路径:us.ihmc.robotics.geometry.GeometryTools
类名称:GeometryTools
方法名:getOrthogonalProjectionOnPlane
[英]Computes the orthogonal projection of a 3D point on a given 3D plane defined by a 3D point and 3D normal.
Edge cases:
代码示例来源:origin: us.ihmc/IHMCRoboticsToolkit
/**
* Computes the orthogonal projection of a 3D point on a given 3D plane defined by a 3D point and 3D normal.
* <p>
* Edge cases:
* <ul>
* <li> if the length of the plane normal is too small, i.e. less than {@link Epsilons#ONE_TRILLIONTH},
* this method fails and returns {@code false}.
* </ul>
* </p>
*
* @param pointToProject the point to compute the projection of. Not modified.
* @param pointOnPlane a point on the plane. Not modified.
* @param planeNormal the normal of the plane. Not modified.
* @return the projection of the point onto the plane, or {@code null} if the method failed.
*/
public static Point3d getOrthogonalProjectionOnPlane(Point3d pointToProject, Point3d pointOnPlane, Vector3d planeNormal)
{
Point3d projection = new Point3d();
boolean success = getOrthogonalProjectionOnPlane(pointToProject, pointOnPlane, planeNormal, projection);
if (!success)
return null;
else
return projection;
}
代码示例来源:origin: us.ihmc/IHMCRoboticsToolkit
/**
* Computes the orthogonal projection of a 3D point on a given 3D plane defined by a 3D point and 3D normal.
* <p>
* Edge cases:
* <ul>
* <li> if the length of the plane normal is too small, i.e. less than {@link Epsilons#ONE_TRILLIONTH},
* this method fails and returns {@code false}.
* </ul>
* </p>
*
* @param pointToProject the point to compute the projection of. Not modified.
* @param pointOnPlane a point on the plane. Not modified.
* @param planeNormal the normal of the plane. Not modified.
* @return the projection of the point onto the plane, or {@code null} if the method failed.
* @throws ReferenceFrameMismatchException if the arguments are not expressed in the same reference frame.
*/
public static FramePoint getOrthogonalProjectionOnPlane(FramePoint pointToProject, FramePoint pointOnPlane, FrameVector planeNormal)
{
FramePoint projection = new FramePoint();
boolean success = getOrthogonalProjectionOnPlane(pointToProject, pointOnPlane, planeNormal, projection);
if (!success)
return null;
else
return projection;
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
/**
* Computes the orthogonal projection of a 3D point on a given 3D plane defined by a 3D point and 3D normal.
* <p>
* Edge cases:
* <ul>
* <li> if the length of the plane normal is too small, i.e. less than {@link Epsilons#ONE_TRILLIONTH},
* this method fails and returns {@code false}.
* </ul>
* </p>
*
* @param pointToProject the point to compute the projection of. Not modified.
* @param pointOnPlane a point on the plane. Not modified.
* @param planeNormal the normal of the plane. Not modified.
* @return the projection of the point onto the plane, or {@code null} if the method failed.
* @throws ReferenceFrameMismatchException if the arguments are not expressed in the same reference frame.
*/
public static FramePoint3D getOrthogonalProjectionOnPlane(FramePoint3D pointToProject, FramePoint3D pointOnPlane, FrameVector3D planeNormal)
{
FramePoint3D projection = new FramePoint3D();
boolean success = getOrthogonalProjectionOnPlane(pointToProject, pointOnPlane, planeNormal, projection);
if (!success)
return null;
else
return projection;
}
代码示例来源:origin: us.ihmc/IHMCRoboticsToolkit
/**
* Computes the orthogonal projection of a 3D point on a given 3D plane defined by a 3D point and 3D normal.
* <p>
* Edge cases:
* <ul>
* <li> if the length of the plane normal is too small, i.e. less than {@link Epsilons#ONE_TRILLIONTH},
* this method fails and returns {@code false}.
* </ul>
* </p>
*
* @param pointToProject the point to compute the projection of. Not modified.
* @param pointOnPlane a point on the plane. Not modified.
* @param planeNormal the normal of the plane. Not modified.
* @param projectionToPack point in which the projection of the point onto the plane is stored. Modified.
* @return whether the method succeeded or not.
* @throws ReferenceFrameMismatchException if the arguments are not expressed in the same reference frame,
* except for {@code projectionToPack}.
*/
public static boolean getOrthogonalProjectionOnPlane(FramePoint pointToProject, FramePoint pointOnPlane, FrameVector planeNormal,
FramePoint projectionToPack)
{
pointToProject.checkReferenceFrameMatch(pointOnPlane);
pointToProject.checkReferenceFrameMatch(planeNormal);
projectionToPack.setToZero(pointToProject.getReferenceFrame());
return getOrthogonalProjectionOnPlane(pointToProject.getPoint(), pointOnPlane.getPoint(), planeNormal.getVector(), projectionToPack.getPoint());
}
内容来源于网络,如有侵权,请联系作者删除!