SCNShadable获取变换顶点

时间:2016-05-30 12:03:13

标签: scenekit

SCNShadable内,获取u_modelViewTransform矩阵很简单,但是如何在变换后正确获取当前顶点位置?

float4 position = u_modelViewTransform * _geometry.position;

错误

  

program_source:443:19:错误:使用未声明的标识符'u_modelViewTransform'   float4 position = u_modelViewTransform * _geometry.position;

更详细一点

我特别是,试图以这种方式得到SCNPlane的平面方程,所以这可能是错误的方法吗?

1 个答案:

答案 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}}

的访问权限