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

Method PointsPrimitiveEvaluator

src/IECoreScene/PointsPrimitiveEvaluator.cpp:157–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155//////////////////////////////////////////////////////////////////////////
156
157PointsPrimitiveEvaluator::PointsPrimitiveEvaluator( ConstPointsPrimitivePtr points )
158 : m_pointsPrimitive( points->copy() ), m_haveTree( false )
159{
160 PrimitiveVariableMap::iterator pIt = m_pointsPrimitive->variables.find( "P" );
161 if( pIt==m_pointsPrimitive->variables.end() )
162 {
163 throw InvalidArgumentException( "No PrimitiveVariable named P on PointsPrimitive." );
164 }
165 m_p = pIt->second;
166 if( !m_p.data || !m_p.data->isInstanceOf( V3fVectorData::staticTypeId() ) )
167 {
168 throw InvalidArgumentException( "PrimitiveVariable P is not of type V3fVectorData." );
169 }
170 m_pVector = &( boost::static_pointer_cast<const V3fVectorData>( m_p.data )->readable() );
171}
172
173PointsPrimitiveEvaluator::~PointsPrimitiveEvaluator()
174{

Callers 2

testConstructMethod · 0.80
testClosestPointMethod · 0.80

Calls 6

InvalidArgumentExceptionFunction · 0.85
isInstanceOfMethod · 0.80
readableMethod · 0.80
copyMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by 2

testConstructMethod · 0.64
testClosestPointMethod · 0.64