CylinderGeometry没有getAttribute属性
时间: 2024-01-05 22:02:09 浏览: 31
`CylinderGeometry`是three.js中的一个旧版本的几何体类,它没有`getAttribute`方法。但是,你可以调用`CylinderGeometry`的`vertices`、`faces`、`faceVertexUvs`属性来获取几何体的顶点、面和UV坐标。
例如,要获取一个`CylinderGeometry`的顶点坐标,可以这样做:
```
var geometry = new THREE.CylinderGeometry( 5, 5, 10, 32 );
var vertices = geometry.vertices;
```
这将返回一个包含所有顶点的数组。同样,你可以通过访问`geometry.faces`来获取面信息。注意,这些属性都是旧版本的three.js中的属性,从r125版本开始被弃用,建议使用BufferGeometry代替。
相关问题
model 有没有getAttribute 方法
在一些 Python 模块中,确实可以使用 `getattr` 函数来获取某个对象的属性。不过在机器学习模型中,通常我们并不使用这个方法来获取模型的属性。相反,我们会使用模型的公共方法来访问和修改它的属性,比如 `model.parameters()` 方法可以用来获取模型的所有参数,`model.eval()` 方法可以将模型设置为评估模式等。如果你能提供更具体的信息,我可以更准确地回答你的问题。
HttpSession getAttribute 没有值
如果 HttpSession 的 getAttribute 方法返回 null,则表示该属性没有被设置或者已经被移除了。您可以通过检查返回值是否为 null,来判断属性是否存在。如果属性确实存在,但是 getAttribute 方法返回 null,那么可能是因为在设置属性时出现了问题,或者在获取属性时出现了一些错误。您可以检查设置属性的代码,确保正确地设置了属性,并且没有覆盖或者移除该属性。另外,您可以检查是否正确地获取了 HttpSession 对象,以及是否正确地调用了 getAttribute 方法。如果问题仍然存在,您可以考虑使用调试工具来进一步排查问题。
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)