Пример #1
0
		/// The constructor sets the default fixture definition values.
		public FixtureDef()
		{
			shape = null;
			UserData = null;
			friction = 0.2f;
			restitution = 0.0f;
			Density = 0.0f;
			IsSensor = false;
			Filter = new Filter();
		}
Пример #2
0
		// We need separation create/destroy functions from the constructor/destructor because
		// the destructor cannot access the allocator (no destructor arguments allowed by C++).
		internal void Create(Body body, FixtureDef def){
			m_userData = def.UserData;
			m_friction = def.friction;
			m_restitution = def.restitution;

			m_body = body;
			m_next = null;

			m_filter = def.Filter;

			m_isSensor = def.IsSensor;

			m_shape = def.shape.Clone();

			// Reserve proxy space
			int childCount = m_shape.GetChildCount();
			m_proxies = new List<FixtureProxy>();

			m_Density = def.Density;
		}