Constructor
new TeleportationSet(neighbors, usesNearestNeighbors, creepingType)
- Source:
Constructor
Parameters:
Name | Type | Default | Description |
---|---|---|---|
neighbors |
Array.<{elt:GroupElement, inv:GroupElement}> | the list of neighbors when using nearest neighbors. The elements come by pair : an element and its inverse. defining the structure of the group element and the related functions |
|
usesNearestNeighbors |
boolean |
false
|
|
creepingType |
number | type of creeping used for quotient manifold (see description in the constants) |
Classes
Members
creepingType
- Source:
Flag : type of creeping used Default is CREEPING_OFF.
group :Group
- Source:
Shortcut to the underlying group. If the list of teleportations is empty, use the trivial group.
Type:
neighbors
- Source:
The list of neighbors when using nearest neighbors.
teleportations :Array.<Teleportation>
- Source:
The list of teleports "generating" the subgroups. The order matters (see the class description).
Type:
- Array.<Teleportation>
usesCreeping
- Source:
Return true if the set uses some kind of creeping
usesNearestNeighbors
- Source:
Flag : uses nearest neighbor or not (for local SDF) Default is false.
Methods
add(jsTest, glslTest, elt, inv, glslCreep) → {TeleportationSet}
- Source:
Add a teleportation to the list of teleportations
Parameters:
Name | Type | Description |
---|---|---|
jsTest |
function | A JS test saying if a teleportation is needed. The test is a function with the signature Point -> boolean. |
glslTest |
string | a chunk of GLSL performing the same test. The test should be encapsulated in a function with signature Point -> bool |
elt |
GroupElement | the isometry to apply when teleporting |
inv |
GroupElement | the inverse of the isometry (optional) If the inverse is not passed as an argument, it is computed automatically. |
glslCreep |
string | a chunk of GLSL to move to the boundary defined by the test |
Returns:
- the teleportation set
- Type
- TeleportationSet
shader(shaderBuilder)
- Source:
Goes through all the teleportations in the discrete subgroup and build the GLSL code performing the associated test.
Parameters:
Name | Type | Description |
---|---|---|
shaderBuilder |
ShaderBuilder |