- 디아4 시즌 5 1시간43분 내용 17분안에 요약해봤습니다. [15]
- FCO 뿌꾸님께 부탁 드립니다 [68]
- FCO 쇼케이스 다 재끼고 시bar 이게 레전드임 ㅋㅋㅋ [17]
- 걸그룹 뉴진스 How Sweet 강해린 극락 파트 [4]
- 차벤 보통 통풍시트 수리하는 비용이 얼마정도 나올까요 ? [5]
- 차벤 직진차선 불법유턴 비율은? [6]
void HelloWorld::setBox2dWorld()
{
_parent = this->addNewSprite(Vec2(240, 160), Size(0, 0),
b2_kinematicBody, nullptr, 0);
b2Body* body0 = this->addNewSprite(Vec2(240, 180), Size(32, 32),
b2_dynamicBody, "SpinningPeas.png", 1);
b2Body* body1 = this->addNewSprite(Vec2(240, 160 - 100), Size(200, 10),
b2_dynamicBody, nullptr, 2);
b2Body* body2 = this->addNewSprite(Vec2(240, 160 + 100), Size(200, 10),
b2_dynamicBody, nullptr, 2);
b2Body* body3 = this->addNewSprite(Vec2(240 - 100, 160), Size(10, 200),
b2_dynamicBody, nullptr, 2);
b2Body* body4 = this->addNewSprite(Vec2(240 + 100, 160), Size(10, 200),
b2_dynamicBody, nullptr, 2);
b2Body* body5 = this->addNewSprite(Vec2(240, 110), Size(10, 100),
b2_dynamicBody, nullptr, 2);
b2WeldJointDef weldJointDef1;
weldJointDef1.Initialize(body1, _parent, body1->GetPosition());
b2WeldJoint* weldJoint1 = (b2WeldJoint *)_world->CreateJoint(&weldJointDef1);
b2WeldJointDef weldJointDef2;
weldJointDef2.Initialize(body2, _parent, body2->GetPosition());
b2WeldJoint* weldJoint2 = (b2WeldJoint *)_world->CreateJoint(&weldJointDef2);
b2WeldJointDef weldJointDef3;
weldJointDef3.Initialize(body3, _parent, body3->GetPosition());
b2WeldJoint* weldJoint3 = (b2WeldJoint *)_world->CreateJoint(&weldJointDef3);
b2WeldJointDef weldJointDef4;
weldJointDef4.Initialize(body4, _parent, body4->GetPosition());
b2WeldJoint* weldJoint4 = (b2WeldJoint *)_world->CreateJoint(&weldJointDef4);
b2WeldJointDef weldJointDef5;
weldJointDef5.Initialize(body5, _parent, body5->GetPosition());
b2WeldJoint* weldJoint5 = (b2WeldJoint *)_world->CreateJoint(&weldJointDef5);
_parent->SetAngularVelocity(0.5f);
}
내폰젤무거워