예제 #1
0
inline PolygonShape::PolygonShape()
{
	m_type = e_polygon;
	m_radius = polygonRadius;
	m_count = 0;
	m_centroid.SetZero();
}
예제 #2
0
파일: Body.hpp 프로젝트: ZhuangChun/Box2D
inline void Body::SetAwake(bool flag)
{
	if (flag)
	{
		if ((m_flags & e_awakeFlag) == 0)
		{
			m_flags |= e_awakeFlag;
			m_sleepTime = 0.0f;
		}
	}
	else
	{
		m_flags &= ~e_awakeFlag;
		m_sleepTime = 0.0f;
		m_linearVelocity.SetZero();
		m_angularVelocity = 0.0f;
		m_force.SetZero();
		m_torque = 0.0f;
	}
}