Class: Vertex

Raphael3d. Vertex

represents vertex

new Vertex(x, y, z)

Vertex implementation
This:
Parameters:
Name Type Argument Description
x number <optional>
x coordinat (real)
y number <optional>
z coordinat (real)
z number <optional>
z coordinat (real)
Properties:
Name Type Description
x number x coordinat (real)
y number y coordinat (real)
z number z coordinat (real)
projected Raphael3d.Vector3 projected position
edges Array.<Raphael3d.Edge> array if edges
faces Array.<Raphael3d.Face> array if faces
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 629

Members

add

Vertex sum, see Raphael3d.Vertex#add
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 648

cross

Vertex cross product, see Raphael3d.Vertex#cross
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 654

dot

Vertex dot product, see Raphael3d.Vertex#dot
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 652

isEqualTo

Vertex equality check, see Raphael3d.Vertex#isEqualTo
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 656

setCoordinates

Vertex new coordinates, see Raphael3d.Vertex#setCoordinates
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 658

sub

Vertex difference, see Raphael3d.Vertex#sub
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 650

Methods

<static> create(x, y, z) → {Raphael3d.Vertex}

Creates new Vertex object
Parameters:
Name Type Argument Description
x number <optional>
x coordinat (real)
y number <optional>
z coordinat (real)
z number <optional>
z coordinat (real)
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 643
Returns:
new Vertex objects
Type
Raphael3d.Vertex

<static> FromVector3(v) → {Raphael3d.Vertex}

Returns new Vertex object from given Vector3 object
Parameters:
Name Type Description
v Raphael3d.Vector3
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 806
Returns:
new Vertex object
Type
Raphael3d.Vertex

computeDistFromFace(f, updateFace) → {number}

Computes distance from receiver to passed face (assuming face is planar)
Parameters:
Name Type Description
f Raphael3d.Face face whose distance will be computed
updateFace boolean update face before computation
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 764
Returns:
distance from receiver to given face
Type
number

computeDistFromVertex(v) → {number}

Computes distance from receiver to another Vertex or Vector3
Parameters:
Name Type Description
v Raphael3d.Vertex | Raphael3d.Vector3 point whose distance from receiver will be computed
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 786
Returns:
distance from receiver to given point
Type
number

computeSqrDistFromVertex(v) → {number}

Computes squared distance from receiver to another Vertex or Vector3
Parameters:
Name Type Description
v Raphael3d.Vertex | Raphael3d.Vector3 point whose squared distance from receiver will be computed
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 777
Returns:
squared distance from receiver to given point
Type
number

connectWith(v, paper, attrs) → {Raphael3d.Edge}

Returns existing edge between receiver and v, or creates new Edge and returns it
Parameters:
Name Type Argument Description
v Raphael3d.Vertex vertex to be connected
paper Raphael.Paper paper instance
attrs Object <optional>
attrs to be passed to Edge constructor
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 751
Returns:
existing or newly created Edge between receiver and v
Type
Raphael3d.Edge

fromVector3(v) → {Raphael3d.Vertex}

Copies coordinates from given Vector3 object to receiver, returns modified receiver
Parameters:
Name Type Description
v Raphael3d.Vector3
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 794
Returns:
modified receiver
Type
Raphael3d.Vertex

giveCommonEdgeWith(v) → {Raphael3d.Edge|null}

Gives common edge with given Vertex
Parameters:
Name Type Description
v Raphael3d.Vertex vertex to be checked
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 734
Returns:
common edge if exists, null otherwise
Type
Raphael3d.Edge | null

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

Gives array of neighbors of receiver (connected with edges)
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 706
Returns:
array on neighboring vertices
Type
Array.<Raphael3d.Vertex>

isNeighborOf(v) → {boolean}

Checks if receiver is neighbor of given Vertex
Parameters:
Name Type Description
v Raphael3d.Vertex vertex to be checked
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 719
Returns:
true if receiver and v are neighbors, false otherwise
Type
boolean

project(m)

Project receiver according to given matrix (i.e. does not change real coordinates, only Vertex.projected attribute)
Parameters:
Name Type Argument Description
m Raphael3d.Matrix4x4 <optional>
transformation matrix
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 685

transform(m)

Transforms receiver according to given matrix (i.e. change real coordinates of receiver)
Parameters:
Name Type Argument Description
m Raphael3d.Matrix4x4 <optional>
transformation matrix
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 663