コード例 #1
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="owner"></param>
        public CollisionSkin(Body owner)
        {
            this.ID    = idCounter++;
            this.owner = owner;

            collSystem = null;
        }
コード例 #2
0
        /// <summary>
        /// Constructor
        /// </summary>
        public CollisionSkin()
        {
            this.ID    = idCounter++;
            this.owner = null;

            collSystem = null;
        }
コード例 #3
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="owner"></param>
        public CollisionSkin(Body owner)
        {
            this.ID = idCounter++;
            this.owner = owner;

            collSystem = null;
        }
コード例 #4
0
        /// <summary>
        /// Constructor
        /// </summary>
        public CollisionSkin()
        {
            this.ID = idCounter++;
            this.owner = null;

            collSystem = null;
        }
コード例 #5
0
 /// <summary>
 /// Set
 /// </summary>
 /// <param name="sys"></param>
 /// <param name="collisionFunctor"></param>
 /// <param name="collisionPredicate"></param>
 /// <param name="collTolerance"></param>
 internal void Set(CollisionSystem sys, CollisionFunctor collisionFunctor, CollisionSkinPredicate2 collisionPredicate, float collTolerance)
 {
     sys_ = sys;
     collisionFunctor_   = collisionFunctor;
     collisionPredicate_ = collisionPredicate;
     if (collisionPredicate_ == null)
     {
         collisionPredicate_ = this;
     }
     collTolerance_ = collTolerance;
 }
コード例 #6
0
ファイル: CollisionSkin.cs プロジェクト: jdarc/jiglibx
        public void SetTransform(ref Transform transformOld, ref Transform transformNew)
        {
            this.transformOld = transformOld;
            this.transformNew = transformNew;

            for (var prim = primitivesNewWorld.Count; prim-- != 0;)
            {
                primitivesOldWorld[prim].Transform = transformOld * primitivesLocal[prim].Transform;
                primitivesNewWorld[prim].Transform = transformNew * primitivesLocal[prim].Transform;
            }

            UpdateWorldBoundingBox();

            CollisionSystem?.CollisionSkinMoved(this);
        }
コード例 #7
0
ファイル: CollisionSkin.cs プロジェクト: jdarc/jiglibx
        public void SetOldTransform(ref Transform transform)
        {
            transformOld = transform;
            Transform t;

            for (var prim = primitivesNewWorld.Count; prim-- != 0;)
            {
                t = primitivesLocal[prim].Transform;
                primitivesOldWorld[prim].Transform = transform * t;
            }

            UpdateWorldBoundingBox();

            CollisionSystem?.CollisionSkinMoved(this);
        }