在SCNShadable
内,获取u_modelViewTransform
矩阵很简单,但是如何在变换后正确获取当前顶点位置?
float4 position = u_modelViewTransform * _geometry.position;
错误
program_source:443:19:错误:使用未声明的标识符'u_modelViewTransform' float4 position = u_modelViewTransform * _geometry.position;
我特别是,试图以这种方式得到SCNPlane
的平面方程,所以这可能是错误的方法吗?
答案 0 :(得分:1)
您应该有_geometry.position
_geometry
SCNShaderGeometry
SCNShaderModifierEntryPointGeometry
类型def make_prediction(label, prediction):
X = df[[col1, col2, col3]].values
y = df[label].values
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.2)
X_train.shape, X_test.shape
clf = linear_model.LinearRegression()
clf.fit(X_train, y_train)
output = clf.predict(X)
result = np.c_[X, output]
df_result = pd.DataFrame(result, columns=[col1, col2, col3, prediction])
return df_result
new ActionBar().TabListener()
{/ 1}}