MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / worldRayIntersection

Method worldRayIntersection

source/MRMesh/MRObjectMesh.cpp:22–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20MR_ADD_CLASS_FACTORY( ObjectMesh )
21
22MeshIntersectionResult ObjectMesh::worldRayIntersection( const Line3f& worldRay, const FaceBitSet* region ) const
23{
24 MeshIntersectionResult res;
25 if ( !data_.mesh )
26 return res;
27 const AffineXf3f rayToMeshXf = worldXf().inverse();
28 res = rayMeshIntersect( { *data_.mesh, region }, transformed( worldRay, rayToMeshXf ) );
29 return res;
30}
31
32void ObjectMesh::setMesh( std::shared_ptr< Mesh > mesh )
33{

Callers

nothing calls this directly

Calls 3

rayMeshIntersectFunction · 0.85
transformedFunction · 0.70
inverseMethod · 0.45

Tested by

no test coverage detected