Packageaway3d.primitives
Classpublic class CapsuleGeometry
InheritanceCapsuleGeometry Inheritance PrimitiveBase Inheritance Geometry Inheritance NamedAssetBase Inheritance flash.events.EventDispatcher

A UV Capsule primitive mesh.



Public Properties
 PropertyDefined By
 InheritedassetFullPath : Array
[read-only]
NamedAssetBase
 InheritedassetNamespace : String
[read-only]
NamedAssetBase
 InheritedassetType : String
[read-only]
Geometry
  height : Number
The height of the capsule.
CapsuleGeometry
 Inheritedname : String
NamedAssetBase
 InheritedoriginalName : String
[read-only] The original name used for this asset in the resource (e.g.
NamedAssetBase
  radius : Number
The radius of the capsule.
CapsuleGeometry
  segmentsH : uint
Defines the number of vertical segments that make up the capsule.
CapsuleGeometry
  segmentsW : uint
Defines the number of horizontal segments that make up the capsule.
CapsuleGeometry
 InheritedsubGeometries : Vector.<ISubGeometry>
[override] [read-only] A collection of SubGeometry objects, each of which contain geometrical data such as vertices, normals, etc.
PrimitiveBase
  yUp : Boolean
Defines whether the capsule poles should lay on the Y-axis (true) or on the Z-axis (false).
CapsuleGeometry
Protected Properties
 PropertyDefined By
 Inherited_geomDirty : Boolean = true
PrimitiveBase
 Inherited_uvDirty : Boolean = true
PrimitiveBase
Public Methods
 MethodDefined By
  
CapsuleGeometry(radius:Number = 50, height:Number = 100, segmentsW:uint = 16, segmentsH:uint = 12, yUp:Boolean = true)
Creates a new Capsule object.
CapsuleGeometry
 Inherited
addSubGeometry(subGeometry:ISubGeometry):void
Adds a new SubGeometry object to the list.
Geometry
 Inherited
applyTransformation(transform:Matrix3D):void
[override]
PrimitiveBase
 Inherited
assetPathEquals(name:String, ns:String):Boolean
NamedAssetBase
 Inherited
[override] Clones the geometry.
PrimitiveBase
 Inherited
Updates the SubGeometries so all vertex data is represented in different buffers.
Geometry
 Inherited
dispose():void
Clears all resources used by the Geometry object, including SubGeometries.
Geometry
 Inherited
Removes a new SubGeometry object from the list.
Geometry
 Inherited
resetAssetPath(name:String, ns:String = null, overrideOriginal:Boolean = true):void
NamedAssetBase
 Inherited
scale(scale:Number):void
[override] Scales the geometry.
PrimitiveBase
 Inherited
scaleUV(scaleU:Number = 1, scaleV:Number = 1):void
[override] Scales the uv coordinates (tiling)
PrimitiveBase
Protected Methods
 MethodDefined By
  
[override] Builds the primitive's geometry when invalid.
CapsuleGeometry
  
[override] Builds the primitive's uv coordinates when invalid.
CapsuleGeometry
 Inherited
Invalidates the primitive's geometry, causing it to be updated when requested.
PrimitiveBase
 Inherited
Invalidates the primitive's uv coordinates, causing them to be updated when requested.
PrimitiveBase
Public Constants
 ConstantDefined By
 InheritedDEFAULT_NAMESPACE : String = default
[static]
NamedAssetBase
Property Detail
heightproperty
height:Number

The height of the capsule.


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

The radius of the capsule.


Implementation
    public function get radius():Number
    public function set radius(value:Number):void
segmentsHproperty 
segmentsH:uint

Defines the number of vertical segments that make up the capsule. Defaults to 12.


Implementation
    public function get segmentsH():uint
    public function set segmentsH(value:uint):void
segmentsWproperty 
segmentsW:uint

Defines the number of horizontal segments that make up the capsule. Defaults to 16.


Implementation
    public function get segmentsW():uint
    public function set segmentsW(value:uint):void
yUpproperty 
yUp:Boolean

Defines whether the capsule poles should lay on the Y-axis (true) or on the Z-axis (false).


Implementation
    public function get yUp():Boolean
    public function set yUp(value:Boolean):void
Constructor Detail
CapsuleGeometry()Constructor
public function CapsuleGeometry(radius:Number = 50, height:Number = 100, segmentsW:uint = 16, segmentsH:uint = 12, yUp:Boolean = true)

Creates a new Capsule object.

Parameters
radius:Number (default = 50) — The radius of the capsule.
 
height:Number (default = 100) — The height of the capsule.
 
segmentsW:uint (default = 16) — Defines the number of horizontal segments that make up the capsule. Defaults to 16.
 
segmentsH:uint (default = 12) — Defines the number of vertical segments that make up the capsule. Defaults to 12.
 
yUp:Boolean (default = true) — Defines whether the capsule poles should lay on the Y-axis (true) or on the Z-axis (false).
Method Detail
buildGeometry()method
override protected function buildGeometry(target:CompactSubGeometry):void

Builds the primitive's geometry when invalid. This method should not be called directly. The calling should be triggered by the invalidateGeometry method (and in turn by updateGeometry).

Parameters

target:CompactSubGeometry

buildUVs()method 
override protected function buildUVs(target:CompactSubGeometry):void

Builds the primitive's uv coordinates when invalid. This method should not be called directly. The calling should be triggered by the invalidateUVs method (and in turn by updateUVs).

Parameters

target:CompactSubGeometry