#include "boxpermanentrenderer.h" BoxGLRenderer BoxPermanentRenderer::m_basicDrawRenderer = BoxGLRenderer(); BoxPermanentRenderer::BoxPermanentRenderer() : BoxDefaultInstancedPermanentRendererSuperClass() { setVertexArray(&m_basicDrawRenderer.getValues()); setNormalIndicesArray(&m_basicDrawRenderer.getIndices()); } void BoxPermanentRenderer::addBox(const double& cx, const double& cy, const double &cz, const float& width, const float& height, const float& length, const Eigen::Vector3f& widthAxisDirection, const Eigen::Vector3f& heightAxisDirection, const ElementInfo &info, IChunk** chunk) { Chunk::ShaderParamsType params; // TODO : use all in comment when the InstancedPermanentRenderer::createOrGetChunkForElement method will use other than just the center of the bbox /*params = Chunk::ShaderParamsType::staticConstructFromValues(cx, cy, cz, width, height, length, widthAxisDirection, heightAxisDirection, Eigen::Vector3d(0,0,0)); Eigen::Matrix4f m = Eigen::Matrix4f::Identity(); params.getMatrix4f(m); Eigen::Vector3f min, max; min[0] = std::numeric_limits::max(); min[1] = min[0]; min[2] = min[0]; max[0] = -min[0]; max[1] = -min[0]; max[2] = -min[0]; const std::vector &values = m_basicDrawRenderer.getValues(); const std::size_t& size = values.size(); for(size_t i=0; i