Google 会使用 AI 技术将内容翻译成您偏好的语言。AI 翻译可能包含错误。
形状工厂
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
继承的方法
继承自类 java.lang.Object
|
对象
|
clone()
|
|
布尔值
|
|
|
无效
|
finalize()
|
|
final Class <?>
|
getClass()
|
|
整数
|
hashCode()
|
|
final void |
notify()
|
|
final void |
notifyAll()
|
|
字符串
|
toString()
|
|
final void |
wait(long arg0、int arg1)
|
|
final void |
wait(long arg0)
|
|
final void |
wait()
|
公共方法
参数
| 大小 |
构建立方体的大小 |
| center |
建造的立方体的中心 |
| material |
用于渲染立方体的材料 |
public static ModelRenderable
makeCylinder
(float radius, float height, Vector3 center, Material material)
参数
| 半径范围 |
圆柱体的半径 |
| 高度 |
圆柱体的高度 |
| center |
圆柱体的中心位置 |
| material |
用于呈现圆柱体的材料 |
参数
| 半径范围 |
构造的球面半径 |
| center |
构造的球体的中心 |
| material |
用于渲染球体的材料 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2022-09-26。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2022-09-26。"],[],["`ShapeFactory` constructs `ModelRenderable` objects for cubes, cylinders, and spheres. `makeCube` generates a cube, requiring size, center, and material parameters. `makeCylinder` creates a cylinder, using radius, height, center, and material. `makeSphere` builds a sphere, needing radius, center, and material inputs. Each method returns a `ModelRenderable` of the specified shape with its properties. A default constructor for `ShapeFactory` is available.\n"]]