#ifndef CRATEWALL_H #define CRATEWALL_H #include #include "dynamicboxobject.h" class CrateWall { public: CrateWall(sgVec3 pos, int w, int h, dWorldID world, dSpaceID space, ssgEntity *model) : cnt(w*h) { branch = new ssgBranch(); branch->setName("cratewall branch"); boxes = new DynamicBoxObject* [cnt]; MakeDisplayLists(model); float dx = 0.55; float dz = 0.40; int i=0; for (int z=0; zname = "crate"; boxes[i]->SetMass(1.0); branch->addKid(boxes[i]->GetEntity()); i++; } } } ~CrateWall() { delete [] boxes; } void Sustain(float dt) { for (int i=0; iSustain(dt); } ssgEntity *GetEntity(void) { return branch; } protected: int cnt; DynamicBoxObject **boxes; ssgBranch *branch; }; #endif