/// <summary> /// Constructor /// </summary> /// <param name="owner"></param> public CollisionSkin(Body owner) { this.ID = idCounter++; this.owner = owner; collSystem = null; }
/// <summary> /// Constructor /// </summary> public CollisionSkin() { this.ID = idCounter++; this.owner = null; collSystem = null; }
/// <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; }
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); }
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); }