Represents a 3D lattice. This is an abstract class documenting the interface which all lattices must implement.
The main responsibility of the lattice is to translate between 3D coordinates and "lattice" coordinates (or "lattice positions"). A lattice position is an array of 3 or 4 numbers:
[helix X position (a), helix Y position (b), helix Z position (voxel number) (c), base index (d)]
The base index d is optional, and should be a position between 0
and <code>#length(a,b,c)</code>.
Access properties with .nameand .name = value.
NumberSize of the lattice in the z-direction
StringTextual description of the lattice's configuration
NumberSize of the lattice in the y-direction
NumberSize of the lattice in the x-direction
Call methods with.name(),.name(arguments)or just .name arguments .
[w], [h], [d], options)
-> vox.lattice.Lattice#NumberWidth of the lattice
(Optional)NumberHeight of the lattice
(Optional)NumberDepth of the lattice
(Optional)ObjectOptions to be copied to the lattice
a, b, c, d, dir)
-> Object#Get the geometry associated with a particular base; relies on cellSpline
Number
Number
Number
Number
NumberDirection of the base: +1 for 5' to 3' along the helical axis, -1 for 3' to 5'
Object
a, b, c)
-> THREE.Geometry#Returns a geometry associated with the 2d "footprint" of the cell,
centered at the origin in world coordinates.
These geometries for each cell are concatenated together to form
the grid.
Geometries should be in the THREE.LinePieces format (e.g. elements
of the THREE.Geometry.vertices should be in pairs, where
elements i and i+1 each represent a line segment.
Number
Number
Number
THREE.GeometryGeometry of the footprint
a, b, c)
-> THREE.Geometry#Returns a geometry for the cell at position a,b,c in the lattice, centered at the origin in world coordinates.
Number
Number
Number
THREE.GeometryGeometry of the cell
a, b, c)
-> THREE.SplineCurve3#Returns a Catmull-Rom spline pointing from position
a, b, c-1 to position a, b, c+1, through the center of cell
a, b, c. The center of the spline (t=0.5) should correspond to
the middle of the cell and should be at the origin in world
coordinates.
Number
Number
Number
THREE.SplineCurve3
[type]#Returns the position o
[type][description]
iterator)
-> undefined#Apply method to each vector on the lattice
FunctionIterator to recieve point argument
a, b, c, [d])
-> Boolean#Determines if a vector (a,b,c) is on the lattice
Number
Number
Number
Number
(Optional; defaults to 0)Booleantrue if the vector is on the lattice, else false
a, b, c)
-> Array#Accepts a position on the lattice and gives the center point of that cell in 3D space
Number
Number
Number
ArrayPoint in 3D space
a, b, c)
-> Number#Returns the length of the given voxel, in bases
Number
Number
Number
NumberLength
Array#Returns the top/right/front position of the lattice---the highest- numbered valid position on the lattice.
Array[X position, Y position, Z position]
Array#Returns the bottom/left/back position of the lattice---the lowest- numbered valid position on the lattice.
Array[X position, Y position, Z position]
a, b, c, d, dir, neighbor)
-> Number[]#Gets the 5' or 3' neighbor of a base at [a, b, c, d] running in the given direction
Number
Number
Number
Number
NumberDirection of the strand; +1 is 5' -> 3', -1 is 3' -> 5'f
NumberWhich neighbor; +1 is 3', -1 is 5'
Number[]Position of the neighboring base [a', b', c', d']
a, b, c, d, dir)
-> Number[]#Gets the 3' neighbor of a base at [a, b, c, d] running in the given direction
Number
Number
Number
Number
NumberDirection of the strand; +1 is 5' -> 3', -1 is 3' -> 5'
Number[]Position of the neighboring base [a', b', c', d']
a, b, c, d, dir)
-> Number[]#Gets the 5' neighbor of a base at [a, b, c, d] running in the given direction
Number
Number
Number
Number
NumberDirection of the strand; +1 is 5' -> 3', -1 is 3' -> 5'
Number[]Position of the neighboring base [a', b', c', d']
x, y, z)
-> Array#Snaps a point in 3D space to the center of the corresponding lattice cell.
Number
Number
Number
ArrayCenter point in 3D space
x, y, z, base)
-> Array#Converts a point in 3D space to a position vector on the lattice
Number
Number
Number
Booleantrue to give the base index as the fourth position value
ArrayPosition on the lattice
Array#Returns the shape of the lattice: [width, height, depth]
ArrayShape of the lattice