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

Method doConversion

src/IECoreGL/ToGLSphereConverter.cpp:59–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59IECore::RunTimeTypedPtr ToGLSphereConverter::doConversion( IECore::ConstObjectPtr src, IECore::ConstCompoundObjectPtr operands ) const
60{
61 const IECoreScene::SpherePrimitive *coreSphere = static_cast<const IECoreScene::SpherePrimitive *>( src.get() );
62 IECoreGL::SpherePrimitivePtr glSphere = new IECoreGL::SpherePrimitive( coreSphere->radius(), coreSphere->zMin(), coreSphere->zMax(), coreSphere->thetaMax() );
63
64 for( IECoreScene::PrimitiveVariableMap::const_iterator it = coreSphere->variables.begin(), eIt = coreSphere->variables.end(); it != eIt; ++it )
65 {
66 if( it->second.data )
67 {
68 glSphere->addPrimitiveVariable( it->first, it->second );
69 }
70 else
71 {
72 IECore::msg( IECore::Msg::Warning, "ToGLSphereConverter", boost::format( "No data given for primvar \"%s\"" ) % it->first );
73 }
74 }
75
76 return glSphere;
77}

Callers

nothing calls this directly

Calls 8

radiusMethod · 0.80
zMinMethod · 0.80
zMaxMethod · 0.80
thetaMaxMethod · 0.80
getMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
addPrimitiveVariableMethod · 0.45

Tested by

no test coverage detected