MCPcopy Create free account
hub / github.com/ImageEngine/cortex / closestPoint

Method closestPoint

src/IECoreScene/SpherePrimitiveEvaluator.cpp:253–262  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

251}
252
253bool SpherePrimitiveEvaluator::closestPoint( const V3f &p, PrimitiveEvaluator::Result *result ) const
254{
255 assert( dynamic_cast<Result *>( result ) );
256
257 Result *sr = static_cast<Result *>( result );
258
259 sr->m_p = p.normalized() * m_sphere->radius();
260
261 return true;
262}
263
264bool SpherePrimitiveEvaluator::pointAtUV( const Imath::V2f &uv, PrimitiveEvaluator::Result *result ) const
265{

Callers

nothing calls this directly

Calls 1

radiusMethod · 0.80

Tested by

no test coverage detected