Packagelaya.d3.resource.models
Classpublic class CapsuleMesh
InheritanceCapsuleMesh Inheritance laya.d3.resource.models.PrimitiveMesh

CapsuleMesh 类用于创建胶囊体。



Public Properties
 PropertyDefined By
  height : Number
返回高度
CapsuleMesh
  radius : Number
返回半径
CapsuleMesh
  slices : int
获取宽度分段
CapsuleMesh
  stacks : int
获取高度分段
CapsuleMesh
Public Methods
 MethodDefined By
  
CapsuleMesh(radius:Number = 0.5, height:Number = 2, stacks:int = 16, slices:int = 32)
创建一个胶囊体模型
CapsuleMesh
Protected Methods
 MethodDefined By
  
[override]
CapsuleMesh
Property Detail
heightproperty
height:Number

返回高度


Implementation
    public function get height():Number
    public function set height(value:Number):void
radiusproperty 
radius:Number

返回半径


Implementation
    public function get radius():Number
    public function set radius(value:Number):void
slicesproperty 
slices:int

获取宽度分段


Implementation
    public function get slices():int
    public function set slices(value:int):void
stacksproperty 
stacks:int

获取高度分段


Implementation
    public function get stacks():int
    public function set stacks(value:int):void
Constructor Detail
CapsuleMesh()Constructor
public function CapsuleMesh(radius:Number = 0.5, height:Number = 2, stacks:int = 16, slices:int = 32)

创建一个胶囊体模型

Parameters
radius:Number (default = 0.5) — 半径
 
height:Number (default = 2) — 高度
 
stacks:int (default = 16) — 水平层数,一般设为垂直层数的一半
 
slices:int (default = 32) — 垂直层数
Method Detail
recreateResource()method
override protected function recreateResource():void