Methods
(static) createTopology(name, srid, tolerance) → {module:topo~Topo}
Create topology.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | |
srid |
number | |
tolerance |
number |
Returns:
- Type
- module:topo~Topo
(static) on(topo, name, callback)
Registers a callback for a named event
Parameters:
Name | Type | Description |
---|---|---|
topo |
module:topo~Topo | Topology instance. |
name |
string | Event name. |
callback |
function | Callback function. |
(static) un(topo, name, callback)
Unregisters a callback for a named event
Parameters:
Name | Type | Description |
---|---|---|
topo |
module:topo~Topo | Topology instance. |
name |
string | Event name. |
callback |
function | Callback function. |
Type Definitions
Topo
Topology structure
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
nodes |
Array.<module:node~Node> | |
nodesTree |
Object | |
edges |
Array.<module:edge~Edge> | |
edgesTree |
Object | |
faces |
Array.<module:face~Face> | |
facesTree |
Object | |
universe |
module:face~Face | |
getNodeByPoint |
function | Calls |
addIsoNode |
function | Calls |
removeIsoNode |
function | Calls |
getEdgeByPoint |
function | Calls |
getEdgesByLine |
function | Calls |
addIsoEdge |
function | Calls |
addEdgeNewFaces |
function | Calls |
addEdgeModFace |
function | Calls |
remEdgeNewFace |
function | Calls |
remEdgeModFace |
function | Calls |
newEdgesSplit |
function | Calls |
modEdgeSplit |
function | Calls |
newEdgeHeal |
function | Calls |
getRingEdges |
function | Calls |
getFaceGeometry |
function | Calls |
on |
function | Calls |
un |
function | Calls |
Fires:
- module:topo~event:addface
- module:topo~event:removeface
- module:topo~event:addedge
- module:topo~event:modedge
- module:topo~event:removeedge
- module:topo~event:addnode
- module:topo~event:removenode
Events
addedge
Emitted when an edge has been added to the topology.
Type:
addface
Emitted when a face has been added to the topology.
Type:
addnode
Emitted when a node has been added to the topology.
Type:
modedge
Emitted when an edge has been modified.
Type:
removeedge
Emitted when an edge has been removed from the topology.
Type:
removeface
Emitted when a face has been removed from the topology.
Type:
removenode
Emitted when a node has been removed from the topology.