随笔分类 - 计算机图形学
摘要:平面上点的旋转 在平面坐标上,任意点P(x1,y1),绕一个坐标点Q(x2,y2)逆时针旋转θ角度后,新的坐标设为(x, y)的计算公式: x= (x1 - x2)*cos(θ) - (y1 - y2)*sin(θ) + x2 y= (x1 - x2)*sin(θ) + (y1 - y2)*cos(
阅读全文
摘要:基于BIM与点云数据的塔吊仿真系统 ###########################
阅读全文
摘要:塔吊花车移动计算 void TowerPanel::slotMoveSlider(int sliderValue) { slider_length = sliderValue*1.0f; hook_position_x = center_x*(-0.0f) + slider_length*cos(a
阅读全文
摘要:threejs绘制三角面 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <title>ifc三维场景</title> <style> body { margin: 0; overflow: hidden; } </s
阅读全文
摘要:osg::Geode* createIfcPolygon2() { osg::Geode* geode = new osg::Geode(); //face 8 { osg::Geometry* geom_face1 = new osg::Geometry(); osg::Vec3Array* co
阅读全文
摘要:osg绘制圆柱体 #include <iostream> #include <osgViewer/Viewer> #include <osg/Node> //#include <osgDB/ReadFile> //#include <osgDB/WriteFile> #include <osgUti
阅读全文
摘要:osg绘制圆锥体 #include <iostream> #include <osgViewer/Viewer> #include <osg/Node> //#include <osgDB/ReadFile> //#include <osgDB/WriteFile> #include <osgUti
阅读全文
摘要:osg绘制球体 #include <iostream> #include <osgViewer/Viewer> #include <osg/Node> //#include <osgDB/ReadFile> //#include <osgDB/WriteFile> #include <osgUtil
阅读全文
摘要:基于BIM IFC osg的塔吊吊装对位模拟系统 osg::Matrix cameraMatrix = osg::Matrix::translate(-centerVec3d) *osg::Matrix::scale(1.0f, 1.0f, sz_value) *osg::Matrix::trans
阅读全文
摘要:osg控制相机移动 viewer->getCameraManipulator()->setHomePosition(_homeEye,_homeCenter,_homeUp); osg::Vec3d _homeEye; osg::Vec3d _homeCenter; osg::Vec3d _home
阅读全文
摘要:osg绘制胶囊体 #include <iostream> #include <osgViewer/Viewer> #include <osg/Node> //#include <osgDB/ReadFile> //#include <osgDB/WriteFile> #include <osgUti
阅读全文
摘要:osg抓图、截图、保存图片 #include <osgViewer/Viewer> #include <osgViewer/ViewerBase> #include <osgViewer/GraphicsWindow> #include <osg/Node> #include <osg/Geode>
阅读全文
摘要:osg截取场景图片 #include <osgViewer/Viewer> #include <osgViewer/ViewerBase> #include <osgViewer/GraphicsWindow> #include <osg/Node> #include <osg/Geode> #in
阅读全文
摘要:osg实现三视图 #include <osg/Geode> #include <osg/Geometry> #include <osg/LineWidth> #include <osgViewer/Viewer> #include <osgViewer/CompositeViewer> #inclu
阅读全文
摘要:自己开发一款能够绘制简单三维模型的软件 #######################
阅读全文
摘要:方块 # This file uses centimeters as units for non-parametric coordinates. mtllib 2021090201.mtl g default v -3400.000000 -3400.000000 3400.000000 v 340
阅读全文
摘要:shader复习 // Created by inigo quilez - iq/2015 // I share this piece (art and code) here in Shadertoy and through its Public API, only for educational
阅读全文
摘要:osg绘制圆 自定义圆的半径,然后根据圆的计算公式 X2 +Y2=R2 (圆的标准方程)生成圆周上的每个坐标点 float getY(int x,bool isPositive) { float y = 0.0f; if (isPositive) { y = sqrt((radius*radius)
阅读全文
摘要:osg绘制立方体 #include <iostream> #include <osgViewer/Viewer> #include <osg/Node> //#include <osgDB/ReadFile> //#include <osgDB/WriteFile> #include <osgUti
阅读全文
摘要:直接使用osg渲染ifc数据,提高渲染速度。 #include "teslamanage.h" #include <QtWidgets/QApplication> #include <QtGui/QIcon> #include <osgViewer/Viewer> osg::ref_ptr<osg:
阅读全文