Safe Haskell | None |
---|---|
Language | Haskell2010 |
Generate and solve all contact constraints for pairs of colliding objects.
- data ObjectFeatureKey k = ObjectFeatureKey {
- _ofkObjKeys :: (k, k)
- _ofkFeatKeys :: (Int, Int)
- ofkObjKeys :: forall k k. Lens (ObjectFeatureKey k) (ObjectFeatureKey k) (k, k) (k, k)
- ofkFeatKeys :: forall k. Lens' (ObjectFeatureKey k) (Int, Int)
- keyedContacts :: (k, k) -> (Shape, Shape) -> Descending (ObjectFeatureKey k, Flipping Contact')
- constraintGen :: ContactBehavior -> Double -> Flipping Contact' -> (PhysicalObj, PhysicalObj) -> ContactResult Constraint
- solutionProcessor :: (Double, Double) -> ContactResult Lagrangian -> ContactResult Lagrangian -> Processed (ContactResult Lagrangian)
Documentation
data ObjectFeatureKey k Source #
Indicates a specific pair of "features" on a specific pair of objects that are touching.
This is how we check if we can reuse a cached solution from the previous frame.
(We can reuse the cached solution if it has the same ObjectFeatureKey
)
ObjectFeatureKey | |
|
Unbox k => Vector Vector (ObjectFeatureKey k) Source # | |
Unbox k => MVector MVector (ObjectFeatureKey k) Source # | |
Eq k => Eq (ObjectFeatureKey k) Source # | |
Ord k => Ord (ObjectFeatureKey k) Source # | |
Show k => Show (ObjectFeatureKey k) Source # | |
Generic (ObjectFeatureKey k) Source # | |
NFData k => NFData (ObjectFeatureKey k) Source # | |
Unbox k => Unbox (ObjectFeatureKey k) Source # | |
data MVector s (ObjectFeatureKey k) Source # | |
type Rep (ObjectFeatureKey k) Source # | |
data Vector (ObjectFeatureKey k) Source # | |
ofkObjKeys :: forall k k. Lens (ObjectFeatureKey k) (ObjectFeatureKey k) (k, k) (k, k) Source #
ofkFeatKeys :: forall k. Lens' (ObjectFeatureKey k) (Int, Int) Source #
keyedContacts :: (k, k) -> (Shape, Shape) -> Descending (ObjectFeatureKey k, Flipping Contact') Source #
Calculate all contacts between a pair of shapes.
constraintGen :: ContactBehavior -> Double -> Flipping Contact' -> (PhysicalObj, PhysicalObj) -> ContactResult Constraint Source #
Build a constraint from a pair of shapes and a contact between them.
:: (Double, Double) | coefficients of friction for a pair of shapes (a, b) |
-> ContactResult Lagrangian | cached solution |
-> ContactResult Lagrangian | new incremental solution |
-> Processed (ContactResult Lagrangian) |
|
Given an already-applied Lagrangian and the newly-calculated Lagrangian, figure out what portion of the newly-calculated Lagrangian should actually be applied.