Packageaway3d.core.base
Classpublic class Segment
InheritanceSegment Inheritance Element 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
 Inheritedcommands : Vector.<String>
[read-only] Returns an array of drawing command strings that make up the 3d element.
Element
 Inheritedextra : Object
An optional untyped object that can contain used-defined properties.
Element
  material : Material
Defines the material of the segment.
Segment
  maxX : Number
[override] [read-only] Returns the maximum x value of the segment
Segment
  maxY : Number
[override] [read-only] Returns the maximum y value of the segment
Segment
  maxZ : Number
[override] [read-only] Returns the maximum z value of the segment
Segment
  minX : Number
[override] [read-only] Returns the minimum x value of the face
Segment
  minY : Number
[override] [read-only] Returns the minimum y value of the face
Segment
  minZ : Number
[override] [read-only] Returns the minimum y value of the face
Segment
 Inheritedparent : Geometry
Defines the parent 3d object of the segment.
Element
 InheritedpathCommands : Array
[read-only] Returns an array of drawing command objects that are used by the face.
Element
  radius2 : Number
[override] [read-only] Returns the squared bounding radius of the segment.
Segment
  segmentVO : SegmentVO
Segment
  v0 : Vertex
Defines the v0 vertex of the segment.
Segment
  v1 : Vertex
Defines the v1 vertex of the segment.
Segment
 InheritedvertexDirty : Boolean
Element
 Inheritedvertices : Vector.<Vertex>
[read-only] Returns an array of vertex objects that make up the 3d element.
Element
 Inheritedvisible : Boolean
Determines whether the 3d element is visible in the scene.
Element
Protected Properties
 PropertyDefined By
 Inherited_commands : Vector.<String>
Element
 Inherited_index : int
Element
 Inherited_lastAddedVertex : Vertex
Element
 Inherited_pathCommands : Array
Element
 Inherited_uvs : Vector.<UV>
Element
 Inherited_vertices : Vector.<Vertex>
Element
Public Methods
 MethodDefined By
  
Segment(v0:Vertex = null, v1:Vertex = null, material:Material = null)
Creates a new Segment object.
Segment
 Inherited
addOnMappingChange(listener:Function):void
Default method for adding a mappingchanged event listener
Element
 Inherited
addOnVertexChange(listener:Function):void
Default method for adding a vertexchanged event listener
Element
 Inherited
addOnVertexValueChange(listener:Function):void
Default method for adding a vertexvaluechanged event listener
Element
 Inherited
addOnVisibleChange(listener:Function):void
Default method for adding a visiblechanged event listener
Element
  
curveTo(cx:Number, cy:Number, cz:Number, ex:Number, ey:Number, ez:Number):void
Segment
  
defineSingleCurve(start:Vertex, control:Vertex, end:Vertex):void
Segment
  
drawPath(path:Path):void
Segment
  
lineTo(x:Number, y:Number, z:Number):void
Segment
  
moveTo(x:Number, y:Number, z:Number):void
Segment
 Inherited
offset(x:Number, y:Number, z:Number):void
Offsets the vertices of the face by given amounts in x, y and z.
Element
 Inherited
removeOnMappingChange(listener:Function):void
Default method for removing a mappingchanged event listener
Element
 Inherited
removeOnVertexChange(listener:Function):void
Default method for removing a vertexchanged event listener
Element
 Inherited
removeOnVertexValueChange(listener:Function):void
Default method for removing a vertexvaluechanged event listener
Element
 Inherited
removeOnVisibleChange(listener:Function):void
Default method for removing a visiblechanged event listener
Element
Events
 Event Summary Defined By
  Dispatched when the material of the segment changes.Segment
 InheritedDispatched when the vertex of a 3d element changes.Element
 InheritedDispatched when the vertex value of a 3d element changes.Element
 InheritedDispatched when the visiblity of a 3d element changes.Element
Property Detail
materialproperty
material:Material

Defines the material of the segment.


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

Returns the maximum x value of the segment


Implementation
    public function get maxX():Number

See also

maxYproperty 
maxY:Number  [read-only] [override]

Returns the maximum y value of the segment


Implementation
    public function get maxY():Number

See also

maxZproperty 
maxZ:Number  [read-only] [override]

Returns the maximum z value of the segment


Implementation
    public function get maxZ():Number

See also

minXproperty 
minX:Number  [read-only] [override]

Returns the minimum x value of the face


Implementation
    public function get minX():Number

See also

minYproperty 
minY:Number  [read-only] [override]

Returns the minimum y value of the face


Implementation
    public function get minY():Number

See also

minZproperty 
minZ:Number  [read-only] [override]

Returns the minimum y value of the face


Implementation
    public function get minZ():Number

See also

radius2property 
radius2:Number  [read-only] [override]

Returns the squared bounding radius of the segment.


Implementation
    public function get radius2():Number
segmentVOproperty 
public var segmentVO:SegmentVO

v0property 
v0:Vertex

Defines the v0 vertex of the segment.


Implementation
    public function get v0():Vertex
    public function set v0(value:Vertex):void
v1property 
v1:Vertex

Defines the v1 vertex of the segment.


Implementation
    public function get v1():Vertex
    public function set v1(value:Vertex):void
Constructor Detail
Segment()Constructor
public function Segment(v0:Vertex = null, v1:Vertex = null, material:Material = null)

Creates a new Segment object.

Parameters
v0:Vertex (default = null) — The first vertex object of the segment
 
v1:Vertex (default = null) — The second vertex object of the segment
 
material:Material (default = null) — [optional] The material used by the segment to render
####INIT####
Method Detail
curveTo()method
public function curveTo(cx:Number, cy:Number, cz:Number, ex:Number, ey:Number, ez:Number):void

Parameters

cx:Number
 
cy:Number
 
cz:Number
 
ex:Number
 
ey:Number
 
ez:Number

defineSingleCurve()method 
public function defineSingleCurve(start:Vertex, control:Vertex, end:Vertex):void

Parameters

start:Vertex
 
control:Vertex
 
end:Vertex

drawPath()method 
public function drawPath(path:Path):void

Parameters

path:Path

lineTo()method 
public function lineTo(x:Number, y:Number, z:Number):void

Parameters

x:Number
 
y:Number
 
z:Number

moveTo()method 
public function moveTo(x:Number, y:Number, z:Number):void

Parameters

x:Number
 
y:Number
 
z:Number

Event Detail
materialchanged Event
Event Object Type: away3d.events.FaceEvent
FaceEvent.type property = away3d.events.FaceEvent

Dispatched when the material of the segment changes.