Package teilchen.util

Class StableSpringQuad


  • public class StableSpringQuad
    extends java.lang.Object
    • Constructor Detail

      • StableSpringQuad

        public StableSpringQuad​(Physics pParticleSystem,
                                processing.core.PVector pA,
                                processing.core.PVector pB,
                                processing.core.PVector pC,
                                processing.core.PVector pD)
        this utility method creates a 'stable' shape from 4 positions. in this case a stable shape is created by connecting the four positions' edge plus two diagonals to create a stable quad. the positions should be in counter clockwise order. the positions are stored as reference which means that if you change either of the vectors afterwards it will also change the position of the connected particles.
        Parameters:
        pParticleSystem - ParticleSystem
        pA - vertex A
        pB - vertex B
        pC - vertex C
        pD - vertex D