void RigidBox::Update( const Bounds3D& bounds ) { RigidBody::Update( bounds ); // calc mesh for box m_MeshTarget->Clear(); #ifdef _HAS_OPENGL_ MeshPtr mesh = Mesh::Create(); // TODO: Make trianlge strips... std::vector<float> va = bounds.asQuadStrips(); mesh->SetVertices( va.size()/3, &va[0] ); mesh->SetIndices( 10, indexArray ); Material mat; mat.SetColor( m_RenderColor ); mesh->AddPolygon( GL_QUAD_STRIP, 10, 0, mat ); m_MeshTarget->AddMesh( mesh ); #endif }