Exemplo n.º 1
0
typename T::Ptr vectorDataFromTypeDesc( TypeDesc type, void *&basePointer )
{
    typename T::Ptr result = new T();
    result->writable().resize( type.arraylen, typename T::ValueType::value_type( 0 ) );
    basePointer = result->baseWritable();
    return result;
}
Exemplo n.º 2
0
static DataPtr evaluatePrimitiveVariable( std::vector<GxSurfacePoint> &points, const std::string &primVarName )
{
	typename T::Ptr result = new T;
	result->writable().resize( points.size() );
	if( points.size() )
	{
		GxEvaluateSurface( points.size(), &(points[0]), primVarName.c_str(), result->baseSize() / points.size(), result->baseWritable() );
	}
	return result;
}