Packageaway3d.core.base
Classpublic class Segment
InheritanceSegment Inheritance BaseMeshElement Inheritance flash.events.EventDispatcher

A line element used in the wiremesh and mesh object

See also

away3d.core.base.WireMesh
away3d.core.base.Mesh
Public Properties
 PropertyDefined by
  extra : Object
An optional untyped object that can contain used-defined properties.
Segment
  material : ISegmentMaterial
Defines the material of the segment.
Segment
  maxX : Number
[read-only] Returns the maximum x value of the segment
Segment
  maxY : Number
[read-only] Returns the maximum y value of the segment
Segment
  maxZ : Number
[read-only] Returns the maximum z value of the segment
Segment
  minX : Number
[read-only] Returns the minimum x value of the face
Segment
  minY : Number
[read-only] Returns the minimum y value of the face
Segment
  minZ : Number
[read-only] Returns the minimum y value of the face
Segment
  parent : BaseMesh
Defines the parent 3d object of the segment.
Segment
  radius2 : Number
[read-only] Returns the squared bounding radius of the face.
Segment
  v0 : Vertex
Defines the v0 vertex of the segment.
Segment
  v1 : Vertex
Defines the v1 vertex of the segment.
Segment
  vertices : Array
[read-only] Returns an array of vertex objects that are used by the segment.
Segment
 Inheritedvisible : Boolean
Defines whether the 3d element is visible in the scene.
BaseMeshElement
Public Methods
 MethodDefined by
  
Segment
(v0:Vertex, v1:Vertex, material:ISegmentMaterial = null)
Creates a new Face object.
Segment
  
addOnMaterialChange(listener:Function):void
Default method for adding a materialchanged event listener
Segment
 Inherited
addOnVertexChange(listener:Function):void
Default method for adding a vertexchanged event listener
BaseMeshElement
 Inherited
addOnVertexValueChange(listener:Function):void
Default method for adding a vertexvaluechanged event listener
BaseMeshElement
 Inherited
addOnVisibleChange(listener:Function):void
Default method for adding a visiblechanged event listener
BaseMeshElement
  
removeOnMaterialChange(listener:Function):void
Default method for removing a materialchanged event listener
Segment
 Inherited
removeOnVertexChange(listener:Function):void
Default method for removing a vertexchanged event listener
BaseMeshElement
 Inherited
removeOnVertexValueChange(listener:Function):void
Default method for removing a vertexvaluechanged event listener
BaseMeshElement
 Inherited
removeOnVisibleChange(listener:Function):void
Default method for removing a visiblechanged event listener
BaseMeshElement
Events
 EventSummaryDefined by
   Dispatched when the material of the segment changes.Segment
 Inherited Dispatched when the vertex of a 3d element changes.BaseMeshElement
 Inherited Dispatched when the vertex value of a 3d element changes.BaseMeshElement
 Inherited Dispatched when the visiblity of a 3d element changes.BaseMeshElement
Property detail
extraproperty
public var extra:Object

An optional untyped object that can contain used-defined properties.

materialproperty 
material:ISegmentMaterial  [read-write]

Defines the material of the segment.

Implementation
    public function get material():ISegmentMaterial
    public function set material(value:ISegmentMaterial):void
maxXproperty 
maxX:Number  [read-only]

Returns the maximum x value of the segment

Implementation
    public function get maxX():Number

See also

maxYproperty 
maxY:Number  [read-only]

Returns the maximum y value of the segment

Implementation
    public function get maxY():Number

See also

maxZproperty 
maxZ:Number  [read-only]

Returns the maximum z value of the segment

Implementation
    public function get maxZ():Number

See also

minXproperty 
minX:Number  [read-only]

Returns the minimum x value of the face

Implementation
    public function get minX():Number

See also

minYproperty 
minY:Number  [read-only]

Returns the minimum y value of the face

Implementation
    public function get minY():Number

See also

minZproperty 
minZ:Number  [read-only]

Returns the minimum y value of the face

Implementation
    public function get minZ():Number

See also

parentproperty 
public var parent:BaseMesh

Defines the parent 3d object of the segment.

radius2property 
radius2:Number  [read-only]

Returns the squared bounding radius of the face.

Implementation
    public function get radius2():Number
v0property 
v0:Vertex  [read-write]

Defines the v0 vertex of the segment.

Implementation
    public function get v0():Vertex
    public function set v0(value:Vertex):void
v1property 
v1:Vertex  [read-write]

Defines the v1 vertex of the segment.

Implementation
    public function get v1():Vertex
    public function set v1(value:Vertex):void
verticesproperty 
vertices:Array  [read-only]

Returns an array of vertex objects that are used by the segment.

Implementation
    public function get vertices():Array
Constructor detail
Segment()constructor
public function Segment(v0:Vertex, v1:Vertex, material:ISegmentMaterial = null)Parameters
v0:Vertex — [optional] An initialisation object for specifying default instance properties
 
v1:Vertex
 
material:ISegmentMaterial (default = null)
####INIT####
Method detail
addOnMaterialChange()method
public function addOnMaterialChange(listener:Function):void

Default method for adding a materialchanged event listener

Parameters
listener:Function — The listener function
removeOnMaterialChange()method 
public function removeOnMaterialChange(listener:Function):void

Default method for removing a materialchanged event listener

Parameters
listener:Function — The listener function
Event detail
materialchangedevent 
Event object type: away3d.events.FaceEvent

Dispatched when the material of the segment changes.

Wiki link
Click to go to the wiki page for ####WIKI####

Code examples

Comments