Package | laya.d3.resource.models |
Class | public class CapsuleMesh |
Inheritance | CapsuleMesh laya.d3.resource.models.PrimitiveMesh |
CapsuleMesh
类用于创建胶囊体。
Property | Defined By | ||
---|---|---|---|
height : Number
返回高度
| CapsuleMesh | ||
radius : Number
返回半径
| CapsuleMesh | ||
slices : int
获取宽度分段
| CapsuleMesh | ||
stacks : int
获取高度分段
| CapsuleMesh |
Method | Defined By | ||
---|---|---|---|
CapsuleMesh(radius:Number = 0.5, height:Number = 2, stacks:int = 16, slices:int = 32)
创建一个胶囊体模型
| CapsuleMesh |
Method | Defined By | ||
---|---|---|---|
recreateResource():void [override] | CapsuleMesh |
height | property |
height:Number
返回高度
public function get height():Number
public function set height(value:Number):void
radius | property |
radius:Number
返回半径
public function get radius():Number
public function set radius(value:Number):void
slices | property |
slices:int
获取宽度分段
public function get slices():int
public function set slices(value:int):void
stacks | property |
stacks:int
获取高度分段
public function get stacks():int
public function set stacks(value:int):void
CapsuleMesh | () | Constructor |
public function CapsuleMesh(radius:Number = 0.5, height:Number = 2, stacks:int = 16, slices:int = 32)
创建一个胶囊体模型
Parametersradius:Number (default = 0.5 ) — 半径
| |
height:Number (default = 2 ) — 高度
| |
stacks:int (default = 16 ) — 水平层数,一般设为垂直层数的一半
| |
slices:int (default = 32 ) — 垂直层数
|
recreateResource | () | method |
override protected function recreateResource():void