summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/jedi/base/ForceTemplate.lua
blob: 06b61870ff403e0a2ad0ee93fa1725ccd2a9fb4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
-- Copyright 2014 by Ida Bruhns
--
-- This file may be distributed and/or modified
--
-- 1. under the LaTeX Project Public License and/or
-- 2. under the GNU Public License
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information


--- This is the parent class for forces. It provides a constructor and methods 
-- stubs to be overwritten in the subclasses. 

-- Imports
local lib = require "pgf.gd.lib"

local ForceTemplate = lib.class {}

-- constructor
function ForceTemplate:constructor()
  self.force = self.force
  self.fw_attributes = self.fw_attributes
  if not self.force.time_fun then
    self.force.time_fun = function() return 1 end
  end
end

-- Method stub for preprocessing
--
-- @param v The vertices the list will be build on

function ForceTemplate:preprocess(v)
end

-- Method stub for applying the forces
-- 
-- @param data A table holding data like the table the forces are  collected 
--             in, the current iteration, the current time stamp, some options
--             or the natural spring length
  
function ForceTemplate:applyTo(data)
end

return ForceTemplate