形状工厂

public final class ShapeFactory

用于为各种形状动态构造 ModelRenderable 的实用程序类。

公共构造函数

形状()

公共方法

static ModelRenderable
makeCubeVector3 大小、Vector3 中心、Material 材料)
根据给定规范创建立方体形式的 ModelRenderable
static ModelRenderable
makeCylinder(浮动半径、浮点高度、Vector3 中心、Material 材料)
根据给定规范创建圆柱体形状的 ModelRenderable
static ModelRenderable
makeSphere(浮动半径、Vector3 中心、Material 材料)
用于根据指定的规范创建球形的 ModelRenderable

继承的方法

公共构造函数

public ShapeFactory ()

公共方法

public static ModelRenderable makeCube (Vector3 大小、Vector3 中心、Material 材料)

根据给定规范创建立方体形式的 ModelRenderable

参数
大小 构建立方体的大小
center 建造的立方体的中心
material 用于渲染立方体的材料
返回
  • 可呈现具有指定参数的立方体的可渲染对象

public static ModelRenderable makeCylinder (float radius, float height, Vector3 center, Material material)

根据给定规范创建圆柱体形状的 ModelRenderable

参数
半径范围 圆柱体的半径
高度 圆柱体的高度
center 圆柱体的中心位置
material 用于呈现圆柱体的材料
返回
  • 可呈现具有指定参数的圆柱体的可渲染对象

public static ModelRenderable makeSphere (float radius, Vector3 center, Material material)

用于根据指定的规范创建球形的 ModelRenderable

参数
半径范围 构造的球面半径
center 构造的球体的中心
material 用于渲染球体的材料
返回
  • 可呈现具有指定参数的球体