File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -93,13 +93,18 @@ namespace geode
9393
9494 struct AttributeLinearInterpolation
9595 {
96- AttributeLinearInterpolation ( absl::FixedArray< index_t > indices,
97- absl::FixedArray< double > lambdas )
98- : indices_{ std::move ( indices ) } , lambdas_{ std::move ( lambdas ) }
96+ AttributeLinearInterpolation ( absl::Span< const index_t > indices,
97+ absl::Span< const double > lambdas )
98+ : indices_( indices.size() ) , lambdas_( lambdas.size() )
9999 {
100100 OPENGEODE_EXCEPTION ( indices_.size () == lambdas_.size (),
101101 " [AttributeLinearInterpolation] Both arrays should have the "
102102 " same size" );
103+ for ( const auto index : Indices{ indices } )
104+ {
105+ indices_[index] = indices[index];
106+ lambdas_[index] = lambdas[index];
107+ }
103108 }
104109
105110 template < template < typename > class Attribute , typename T >
@@ -109,8 +114,8 @@ namespace geode
109114 *this , attribute );
110115 }
111116
112- const absl::FixedArray< index_t > indices_;
113- const absl::FixedArray< double > lambdas_;
117+ absl::FixedArray< index_t > indices_;
118+ absl::FixedArray< double > lambdas_;
114119 };
115120
116121#define IMPLICIT_ATTRIBUTE_LINEAR_INTERPOLATION ( Type ) \
You can’t perform that action at this time.
0 commit comments