Esempio n. 1
0
void SimpleGMap2::cb_initGL()
{
	Utils::GLSLShader::setCurrentOGLVersion(1) ;

	Geom::BoundingBox<VEC3> bb = Algo::Geometry::computeBoundingBox<PFP>(myMap, position) ;
	VEC3 gPosObj = bb.center() ;
	float tailleX = bb.size(0) ;
	float tailleY = bb.size(1) ;
	float tailleZ = bb.size(2) ;
	float gWidthObj = std::max<float>(std::max<float>(tailleX, tailleY), tailleZ) ;
	setParamObject(gWidthObj, gPosObj.data());
}
Esempio n. 2
0
void SimpleGMap3::cb_initGL()
{
    Geom::BoundingBox<PFP::VEC3> bb = Algo::Geometry::computeBoundingBox<PFP>(myMap, position) ;
    VEC3 gPosObj = bb.center() ;
    float tailleX = bb.size(0) ;
    float tailleY = bb.size(1) ;
    float tailleZ = bb.size(2) ;
    float gWidthObj = std::max<float>(std::max<float>(tailleX, tailleY), tailleZ) ;
    setParamObject(gWidthObj, gPosObj.data());

	m_render_topo = new Algo::Render::GL2::Topo3RenderGMap<PFP>();
    m_render_topo->setDartWidth(2.0f);
    m_render_topo->setInitialDartsColor(1.0f,1.0f,1.0f);
	m_render_topo->updateData(myMap, position, 0.9f,0.9f,0.8f);
}