Class: Edge

Raphael3d. Edge

represents edge connecting 2 Vertex instances

new Edge(v1, v2, paper, attrs)

Edge implementation
This:
Parameters:
Name Type Argument Description
v1 Raphael3d.Vertex 1st vertex
v2 Raphael3d.Vertex 2nd vertex
paper Raphael.Paper <optional>
raphael paper instance
attrs Object <optional>
attrs passed to paper.path.attr
Properties:
Name Type Description
v1 Raphael3d.Vertex 1st vertex
v2 Raphael3d.Vertex 2nd vertex
path Raphael.el paper.path instance
faces Array.<Raphael3d.Face> array of faces this belongs to
isBoundary boolean if receiver is on visibility boundary
isBackFace boolean if receiver is on back face
aabb Raphael3d.AABB receiver's axis aligned bounding box
aabbProjected Raphael3d.AABB aabb of receiver's projection
coveredByList Array list of objects receiver is covered by (defined by the user)
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 832

Methods

<static> create(v1, v2, paper, attrs) → {Raphael3d.Edge}

Creates new Edge object, see Raphael3d.Edge
Parameters:
Name Type Argument Description
v1 Raphael3d.Vertex
v2 Raphael3d.Vertex
paper Raphael.Paper <optional>
attrs Object <optional>
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 854
Returns:
new Edge instance
Type
Raphael3d.Edge

computeLength() → {number}

Computes length of receiver
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 879
Returns:
length of receiver
Type
number

computeLengthSqr() → {number}

Computes squared length of receiver
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 871
Returns:
squared length of receiver
Type
number

computeProjectedLength() → {number}

Computes length of receiver's projection
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 894
Returns:
length of receiver's projection
Type
number

computeProjectedLengthSqr() → {number}

Computes squared length of receiver's projection
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 886
Returns:
squared length of receiver's projection
Type
number

give2ndVertex(v) → {Raphael3d.Vertex}

Returns the other vertex of receiver than the argunemt
Parameters:
Name Type Description
v Raphael3d.Vertex a vertex
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 920
Returns:
the other vertex
Type
Raphael3d.Vertex

giveNeighbors() → {Array.<Raphael3d.Edge>}

Returns array of edges have 1 vertex in common with receiver
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 932
Returns:
array of neighboring edges
Type
Array.<Raphael3d.Edge>

isCoveredBy(b) → {boolean}

Checks if receiver is covered by given object (i.e. if the given object is present in initially empty coveredByList attribute, filled by the user)
Parameters:
Name Type Description
b Raphael3d.Edge | Raphael3d.Face | Raphael3d.Surface given object
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 1025
Returns:
true if receiver is covered by given object, false otherwise
Type
boolean

isNeighborOf(e) → {boolean}

Checks if receiver is a neighbor of given edge (if they have common vertex)
Parameters:
Name Type Description
e Raphael3d.Edge given edge
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 956
Returns:
true in case of common vertex, false otherwise
Type
boolean

isProjectedZParallel() → {boolean}

Checks if receiver's projection is parallel to Z axis
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 901
Returns:
true is receiver's projection is parallel to Z axis, false otherwise
Type
boolean

project(m) → {Raphael3d.Edge}

Project receiver (i.e. change projected coordinates of vertices) according to given matrix
Parameters:
Name Type Description
m Raphael3d.Matrix4x4 transformation matrix
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 986
Returns:
projected receiver
Type
Raphael3d.Edge

render()

Render receiver (update raphael path)
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 908

transform(m) → {Raphael3d.Edge}

Transforsm receiver (i.e. change real coordinates of vertices) according to given matrix
Parameters:
Name Type Description
m Raphael3d.Matrix4x4 transformation matrix
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 976
Returns:
transformed receiver
Type
Raphael3d.Edge

update() → {Raphael3d.Edge}

Updates receiver (isBackFace and isBoundary attributes)
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 861
Returns:
updated receiver
Type
Raphael3d.Edge

updateAABB() → {Raphael3d.Edge}

Updates AABB (axis aligned bounding box) of receiver
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 996
Returns:
receiver
Type
Raphael3d.Edge