这篇教程C++ updateViewMatrix函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中updateViewMatrix函数的典型用法代码示例。如果您正苦于以下问题:C++ updateViewMatrix函数的具体用法?C++ updateViewMatrix怎么用?C++ updateViewMatrix使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了updateViewMatrix函数的26个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: updateViewMatrixvoid Camera::rotate(float angle, const Vector3& axis){ Matrix44 R; R.setRotation(angle,axis); Vector3 new_front = R * (center - eye); center = eye + new_front; updateViewMatrix();}
开发者ID:quimromo,项目名称:Jocs_Electronics_2013,代码行数:8,
示例2: updateViewMatrixvoid Camera::setAxes(const Vec3& right, const Vec3& up, const Vec3& front) { m_right = right; m_up = up; m_front = front; updateViewMatrix(); updateViewProjectionMatrix(); updateFrustumPlanesAndPoints();}
开发者ID:ardneran,项目名称:Framework,代码行数:8,
示例3: updateViewMatrix // updates only if needed const Mat44& Camera::getViewMatrix() { if (mMatrixUpdateFlags) { updateViewMatrix(); } return mViewMatrix; }
开发者ID:dextero,项目名称:sandbox,代码行数:9,
示例4: updateViewMatrixvoid Camera::Lookat(Mesh* mesh){ unsigned int mid_index = mesh->vertex_number_/2; EigenVector3 lookat = mesh->vec_current_position_.block_vector(mid_index); m_lookat = glm::vec3(lookat[0], lookat[1], lookat[2]); updateViewMatrix();}
开发者ID:f-YoshiHiro,项目名称:dss-cloth,代码行数:8,
示例5: updateViewMatrixvoid Camera::onLateUpdate(){ if (dImpl->dirty) { updateViewMatrix(); dImpl->dirty = false; }}
开发者ID:henrya2,项目名称:OpenGL-Samples,代码行数:8,
示例6: ShadowData void ShadowManager::addShadowLight(Light *const light) { light->addObserver(this, Light::MOVE); shadowDatas[light] = new ShadowData(light, nbShadowMaps); createShadowMaps(light); updateViewMatrix(light); }
开发者ID:dreamsxin,项目名称:UrchinEngine,代码行数:9,
示例7: updateViewMatrixvoid CCAMERA::ResetXYpos(){ m_parametersChanged = true; m_camera_pos.x = 0.0f; m_camera_pos.y = 0.0f; updateViewMatrix(); updateFrustum();}
开发者ID:asutp,项目名称:kicad-source-mirror,代码行数:9,
示例8: vdirvoid Camera::MouseChangeLookat(float coe, float dx, float dy){ glm::vec3 vdir(m_lookat - m_position); glm::vec3 u(glm::normalize(glm::cross(vdir, m_up))); glm::vec3 v(glm::normalize(glm::cross(u, vdir))); m_lookat += coe * (dy * v - dx * u); updateViewMatrix();}
开发者ID:f-YoshiHiro,项目名称:dss-cloth,代码行数:9,
示例9: updateViewMatrixconst Matrix4& Camera::getViewMatrix(){ if (m_isMatViewDirty) { updateViewMatrix(); m_isMatViewDirty = false; } return m_matView;}
开发者ID:happyfire,项目名称:gles2.0,代码行数:9,
示例10: cwVector3DCWBOOL cwOrthoCamera::init(){ if (!cwCamera::init()) return CWFALSE; m_nPos = cwVector3D(0.0f, 0.0f, -10.0f); updateViewMatrix(); return CWTRUE;}
开发者ID:happysunny2001,项目名称:miniRender,代码行数:9,
示例11: updateViewMatrix void ShadowManager::onResize(int width, int height) { sceneWidth = width; sceneHeight = height; for(std::map<const Light *, ShadowData *>::const_iterator it = shadowDatas.begin(); it!=shadowDatas.end(); ++it) { updateViewMatrix(it->first); } }
开发者ID:dreamsxin,项目名称:UrchinEngine,代码行数:10,
示例12: reset /** * @brief Resets trackball to initial position and orientation */ void reset (void) { quaternion = Eigen::Quaternion<float>::Identity(); zoom = 1.0; translationVector << 0.0, 0.0, 0.0; rotating = false; translating = false; Camera::reset(); updateViewMatrix(); }
开发者ID:mseefelder,项目名称:tucano,代码行数:13,
示例13: D3DXVec3Normalize /** * Set the position at which the camera is looking and update its rendering matrices accordingly * @author Serge Radinovich * @param _pTarget New target of the camera */ void Camera::lookAt(const D3DXVECTOR3* _pTarget) { m_lookPos = *_pTarget; D3DXVECTOR3 _look = m_lookPos - m_transform.translation; D3DXVec3Normalize(&_look, &_look); Transform::setForward(&m_transform, &_look); updateViewMatrix(); }
开发者ID:Project-Apotheosis,项目名称:Apotheosis,代码行数:16,
示例14: updateEditorCameravoid updateEditorCamera(void){ camera_struct* c=&editorCamera; c->viewPosition=c->position; updateViewMatrix(c); updateFrustum(c); fixMatrix(c->transformationMatrix);}
开发者ID:Almamu,项目名称:portalDS,代码行数:11,
示例15: reset /** * @brief Resets camera to initial position and orientation */ void reset (void) override { start_mouse_pos = Eigen::Vector2f::Zero(); rotation_matrix = Eigen::Matrix3f::Identity(); default_translation = Eigen::Vector3f (0.0, 0.0, -2.0); translation_vector = default_translation; rotation_X_axis = 0.0; rotation_Y_axis = 0.0; rotation_Z_axis = 0.0; updateViewMatrix(); }
开发者ID:LCG-UFRJ,项目名称:tucano,代码行数:14,
示例16: updateViewMatrixvoid Camera::set(){ updateViewMatrix(); updateProjectionMatrix(); glMatrixMode( GL_MODELVIEW ); glLoadMatrixf( view_matrix.m ); glMatrixMode( GL_PROJECTION ); glLoadMatrixf( projection_matrix.m ); glMatrixMode( GL_MODELVIEW );}
开发者ID:abeldella,项目名称:JocsElectronics,代码行数:11,
示例17: positionCamera::Camera(vec3 pos, float horiAngle, float vertAngle, float aspectRatio, float fovy, float viewDistance) : position(pos){ this->verticalAngle = vertAngle; this->horizontalAngle = horiAngle; this->aspect = aspectRatio; this->fovy = fovy; this->viewDistance = viewDistance; updateViewMatrix(); updateProjectionMatrix();}
开发者ID:Grevor,项目名称:OSM2-Particle-System,代码行数:11,
示例18: updateViewMatrixvoid Camera::move(const D3DXVECTOR3 &direction, const D3DXVECTOR3 &amount){ // Moves the camera by the specified amount of world units in the specified // direction in world space. m_eye.x += direction.x * amount.x; m_eye.y += direction.y * amount.y; m_eye.z += direction.z * amount.z; updateViewMatrix(false);}
开发者ID:aisi,项目名称:Camera,代码行数:11,
示例19: updateShadervoid DeferredRendererOld::refresh(){ if(shader_->isModified()) updateShader(); mesh_.refresh(); sceneBox_.refresh(); camera_->update(); quadRender_.refresh(); updateViewMatrix();}
开发者ID:julius,项目名称:sdl2-gamedev,代码行数:11,
示例20: updateViewMatrix///////////////////////////////////////////////////////////////////////////////// set the camera position and rotation///////////////////////////////////////////////////////////////////////////////void ModelGL::setViewMatrix(float x, float y, float z, float pitch, float heading, float roll){ cameraPosition[0] = x; cameraPosition[1] = y; cameraPosition[2] = z; cameraAngle[0] = pitch; cameraAngle[1] = heading; cameraAngle[2] = roll; updateViewMatrix();}
开发者ID:Sudoka,项目名称:MatrixModelView,代码行数:14,
示例21: rotate void rotate(const glm::vec2& delta) { // create orientation vectors auto lookat = orientation * Vectors::UNIT_NEG_Z; auto forward = glm::normalize(vec3(lookat.x, 0, lookat.z)); auto side = glm::cross(Vectors::UP, forward); // rotate camera with quaternions created from axis and angle orientation = glm::angleAxis(delta.x, Vectors::UP) * orientation; orientation = glm::angleAxis(-delta.y, side) * orientation; updateViewMatrix(); }
开发者ID:Atlante45,项目名称:hifi,代码行数:12,
示例22: updateViewMatrixCWVOID cwCamera::lookAt(const cwVector3D& pos, const cwVector3D& target, const cwVector3D& up){ m_nLook = target - pos; m_nLook.normalize(); m_nRight = up.cross(m_nLook); m_nRight.normalize(); m_nUp = m_nLook.cross(m_nRight); m_nPos = pos; updateViewMatrix();}
开发者ID:happysunny2001,项目名称:miniRender,代码行数:12,
示例23: getWindowDimensionsCamera::Camera(GLFWwindow *window) { m_window = window; getWindowDimensions(); centerMouse(); initVars(); setCenter(glm::vec3(0, 0, 5)); setLookAt(glm::vec3(0, 0, 4)); setUp(glm::vec3(0, 1, 0)); setRight(glm::vec3(1, 0, 0)); updateViewMatrix();}
开发者ID:gotcha84,项目名称:asdfgame,代码行数:13,
示例24: updateViewMatrixxtCamera::xtCamera(void){ //this->matrixView.identity(); for ( int i=0; i<3; ++i ) { this->cameraPosition[i] = 0.0; } this->cameraAngle[0] = CAMERA_ANGLE_X; this->cameraAngle[1] = CAMERA_ANGLE_Y; this->cameraAngle[2] = 0.0f; updateViewMatrix();}
开发者ID:softwarekid,项目名称:OpenGL-command,代码行数:13,
示例25: switch void ShadowManager::notify(Observable *observable, int notificationType) { if(dynamic_cast<LightManager *>(observable)) { Light *light = lightManager->getLastUpdatedLight(); switch(notificationType) { case LightManager::ADD_LIGHT: { light->addObserver(this, Light::PRODUCE_SHADOW); if(light->isProduceShadow()) { addShadowLight(light); } break; } case LightManager::REMOVE_LIGHT: { light->removeObserver(this, Light::PRODUCE_SHADOW); if(light->isProduceShadow()) { removeShadowLight(light); } break; } } }else if(Light *light = dynamic_cast<Light *>(observable)) { switch(notificationType) { case Light::MOVE: { updateViewMatrix(light); break; } case Light::PRODUCE_SHADOW: { if(light->isProduceShadow()) { addShadowLight(light); }else { removeShadowLight(light); } break; } } } }
开发者ID:dreamsxin,项目名称:UrchinEngine,代码行数:51,
示例26: updateViewMatrixvoid Camera::orbit( const Vector3& center, float angle, const Vector3& axis ){ Matrix44 R; R.setRotation(angle,axis); Matrix44 T; T.setTranslation( center.x, center.y, center.z ); Matrix44 M = T * R; T.setTranslation( -center.x, -center.y, -center.z ); M = M * T; this->center = M * this->center; this->eye = M * this->eye; updateViewMatrix();}
开发者ID:jagenjo,项目名称:miniengine,代码行数:14,
注:本文中的updateViewMatrix函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ updateVolume函数代码示例 C++ updateView函数代码示例 |