作者:忧伤玫瑰coco_873 | 来源:互联网 | 2023-09-17 11:48
本文整理了Java中us.ihmc.euclid.tuple3D.interfaces.Vector3DBasics.applyInverseTransform()方法
本文整理了Java中us.ihmc.euclid.tuple3D.interfaces.Vector3DBasics.applyInverseTransform()
方法的一些代码示例,展示了Vector3DBasics.applyInverseTransform()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Vector3DBasics.applyInverseTransform()
方法的具体详情如下:
包路径:us.ihmc.euclid.tuple3D.interfaces.Vector3DBasics
类名称:Vector3DBasics
方法名:applyInverseTransform
暂无
代码示例
代码示例来源:origin: us.ihmc/euclid-geometry
/**
* Transforms this line using the inverse of the given homogeneous transformation matrix.
*
* @param transform the transform to apply on this line's point and vector. Not modified.
*/
@Override
default void applyInverseTransform(Transform transform)
{
getPoint().applyInverseTransform(transform);
getDirection().applyInverseTransform(transform);
}
}
代码示例来源:origin: us.ihmc/euclid-test
actual.set(original);
actual.applyTransform(transform);
actual.applyInverseTransform(transform);
EuclidCoreTestTools.assertTuple3DEquals(expected, actual, 10.0 * getEpsilon());
actual.set(original);
actual.applyTransform(transform);
actual.applyInverseTransform(transform);
EuclidCoreTestTools.assertTuple3DEquals(expected, actual, 10.0 * getEpsilon());
actual.set(original);
actual.applyTransform(transform);
actual.applyInverseTransform(transform);
EuclidCoreTestTools.assertTuple3DEquals(expected, actual, 100.0 * getEpsilon());
代码示例来源:origin: us.ihmc/ihmc-path-planning
/**
* Will return the intersection point between a line and a single planar region. If the line does
* not intersect the region this method will return null.
*/
public static Point3D intersectRegionWithLine(PlanarRegion region, Line3D projectionLineInWorld)
{
RigidBodyTransform regiOnToWorld= new RigidBodyTransform();
region.getTransformToWorld(regionToWorld);
Vector3DReadOnly planeNormal = new Vector3D(0.0, 0.0, 1.0);
Point3DReadOnly pointOnPlane= new Point3D(region.getConvexPolygon(0).getVertex(0));
Point3DBasics pointOnLineInLocal= new Point3D(projectionLineInWorld.getPoint());
Vector3DBasics directiOnOfLineInLocal= new Vector3D(projectionLineInWorld.getDirection());
pointOnLineInLocal.applyInverseTransform(regionToWorld);
directionOfLineInLocal.applyInverseTransform(regionToWorld);
Point3D intersectiOnWithPlaneInLocal= EuclidGeometryTools.intersectionBetweenLine3DAndPlane3D(pointOnPlane, planeNormal, pointOnLineInLocal, directionOfLineInLocal);
if (intersectiOnWithPlaneInLocal== null)
{
return null;
}
if (region.isPointInside(intersectionWithPlaneInLocal.getX(), intersectionWithPlaneInLocal.getY()))
{
intersectionWithPlaneInLocal.applyTransform(regionToWorld);
return intersectionWithPlaneInLocal;
}
return null;
}