Packageaway3d.primitives
Classpublic class PrimitiveBase
InheritancePrimitiveBase Inheritance Geometry Inheritance NamedAssetBase Inheritance flash.events.EventDispatcher
Subclasses CapsuleGeometry, CubeGeometry, CylinderGeometry, PlaneGeometry, SphereGeometry, TorusGeometry

PrimitiveBase is an abstract base class for mesh primitives, which are prebuilt simple meshes.



Public Properties
 PropertyDefined By
 InheritedassetFullPath : Array
[read-only]
NamedAssetBase
 InheritedassetNamespace : String
[read-only]
NamedAssetBase
 InheritedassetType : String
[read-only]
Geometry
 Inheritedname : String
NamedAssetBase
 InheritedoriginalName : String
[read-only] The original name used for this asset in the resource (e.g.
NamedAssetBase
  subGeometries : Vector.<SubGeometry>
[override] [read-only] A collection of SubGeometry objects, each of which contain geometrical data such as vertices, normals, etc.
PrimitiveBase
Protected Properties
 PropertyDefined By
  _geomDirty : Boolean = true
PrimitiveBase
  _uvDirty : Boolean = true
PrimitiveBase
Public Methods
 MethodDefined By
  
Creates a new PrimitiveBase object.
PrimitiveBase
 Inherited
addSubGeometry(subGeometry:SubGeometry):void
Adds a new SubGeometry object to the list.
Geometry
  
applyTransformation(transform:Matrix3D):void
[override]
PrimitiveBase
 Inherited
assetPathEquals(name:String, ns:String):Boolean
NamedAssetBase
  
[override] Clones the geometry.
PrimitiveBase
 Inherited
dispose():void
Clears all resources used by the Geometry object, including SubGeometries.
Geometry
 Inherited
removeSubGeometry(subGeometry:SubGeometry):void
Removes a new SubGeometry object from the list.
Geometry
 Inherited
resetAssetPath(name:String, ns:String = null, overrideOriginal:Boolean = true):void
NamedAssetBase
  
scale(scale:Number):void
[override] Scales the geometry.
PrimitiveBase
  
scaleUV(scaleU:Number = 1, scaleV:Number = 1):void
[override] Scales the uv coordinates (tiling)
PrimitiveBase
Protected Methods
 MethodDefined By
  
Builds the primitive's geometry when invalid.
PrimitiveBase
  
buildUVs(target:SubGeometry):void
Builds the primitive's uv coordinates when invalid.
PrimitiveBase
  
Invalidates the primitive's geometry, causing it to be updated when requested.
PrimitiveBase
  
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
_geomDirtyproperty
protected var _geomDirty:Boolean = true

_uvDirtyproperty 
protected var _uvDirty:Boolean = true

subGeometriesproperty 
subGeometries:Vector.<SubGeometry>  [read-only] [override]

A collection of SubGeometry objects, each of which contain geometrical data such as vertices, normals, etc.


Implementation
    public function get subGeometries():Vector.<SubGeometry>
Constructor Detail
PrimitiveBase()Constructor
public function PrimitiveBase()

Creates a new PrimitiveBase object.

Method Detail
applyTransformation()method
override public function applyTransformation(transform:Matrix3D):void

Parameters

transform:Matrix3D

buildGeometry()method 
protected function buildGeometry(target:SubGeometry):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:SubGeometry

buildUVs()method 
protected function buildUVs(target:SubGeometry):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:SubGeometry

clone()method 
override public function clone():Geometry

Clones the geometry.

Returns
Geometry — An exact duplicate of the current Geometry object.
invalidateGeometry()method 
protected function invalidateGeometry():void

Invalidates the primitive's geometry, causing it to be updated when requested.

invalidateUVs()method 
protected function invalidateUVs():void

Invalidates the primitive's uv coordinates, causing them to be updated when requested.

scale()method 
override public function scale(scale:Number):void

Scales the geometry.

Parameters

scale:Number — The amount by which to scale.

scaleUV()method 
override public function scaleUV(scaleU:Number = 1, scaleV:Number = 1):void

Scales the uv coordinates (tiling)

Parameters

scaleU:Number (default = 1) — The amount by which to scale on the u axis. Default is 1;
 
scaleV:Number (default = 1) — The amount by which to scale on the v axis. Default is 1;

validate()method 
override arcane function validate():void