inline void setCamera(const glm::vec3& pos, const glm::vec3& target, const glm::vec3& up) { camera.pos = pos; camera.target = target; camera.up = up; updateTransformations(); }
void KisScratchPad::setOnScreenResolution(qreal scaleX, qreal scaleY) { m_scaleBorderWidth = BORDER_SIZE(qMax(scaleX, scaleY)); m_scaleTransform = QTransform::fromScale(scaleX, scaleY); updateTransformations(); update(); }
void KisScratchPad::doPan(KoPointerEvent *event) { QPointF docOffset = event->point - m_panDocPoint; m_translateTransform.translate(-docOffset.x(), -docOffset.y()); updateTransformations(); update(); }
void setPerspectiveProj(float fovy, float aspect, float zNear, float zFar) { proj.fovy = fovy; proj.aspect = aspect; proj.zNear = zNear; proj.zFar = zFar; updateTransformations(); }
Pipeline(unsigned int w, unsigned int h, unsigned int t = 4) : width(w), height(h), numTiles(t), tileTransformations(t) { updateTransformations(); }
bool SensorProcessorBase::process( const pcl::PointCloud<pcl::PointXYZRGB>::ConstPtr pointCloudInput, const Eigen::Matrix<double, 6, 6>& robotPoseCovariance, const pcl::PointCloud<pcl::PointXYZRGB>::Ptr pointCloudMapFrame, Eigen::VectorXf& variances) { pcl::PointCloud<pcl::PointXYZRGB>::Ptr pointCloudSensorFrame(new pcl::PointCloud<pcl::PointXYZRGB>); pcl::copyPointCloud(*pointCloudInput, *pointCloudSensorFrame); cleanPointCloud(pointCloudSensorFrame); ros::Time timeStamp; timeStamp.fromNSec(1000 * pointCloudSensorFrame->header.stamp); if (!updateTransformations(pointCloudSensorFrame->header.frame_id, timeStamp)) return false; if (!transformPointCloud(pointCloudSensorFrame, pointCloudMapFrame, mapFrameId_)) return false; std::vector<pcl::PointCloud<pcl::PointXYZRGB>::Ptr> pointClouds({pointCloudMapFrame, pointCloudSensorFrame}); removePointsOutsideLimits(pointCloudMapFrame, pointClouds); if (!computeVariances(pointCloudSensorFrame, robotPoseCovariance, variances)) return false; return true; }
void GLRenderer::renderActor(Actor* actor) { if(actor->isHidden()) { return; } for(Model::MeshesIterator it = actor->getModel().begin(); it != actor->getModel().end(); ++it) { std::string meshName = (*it)->getMeshName(); if(meshName.size() == 0) { return; // ... this is to the lack of thread safety with finding the line. TODO fixme } BasicMesh* mesh = Game::getInstance().getMeshManager().getMesh(meshName); const std::string& materialName = (*it)->getMaterialInstance()->getMaterialName(); Material* mi = Game::getInstance().getMaterialsManager().getMaterial(materialName); setProgram(mi); (*it)->getMaterialInstance()->fillMaterial(); updateTransformations(actor, mi); drawMesh(mesh, true, mi); } }
inline void setTiles(unsigned int tiles) { numTiles = tiles; tileTransformations = std::vector<glm::mat4>(tiles); updateTransformations(); }