摘要: 问题如题目,求物体的光照强度物体0和物体1相互作用. 阅读全文
posted @ 2013-01-08 17:38 geometry_ 阅读(120) 评论(0) 推荐(0) 编辑
摘要: Let there be light.介绍了光与物体之间的作用,主要是pixel与颜色之间的关系.其中提到了cos公式,为了做本章的图,我用python产生数据,gnuplot队数据进行展现.python 代码:import mathimport iooutput = io.open("LightsData.txt",'w');thetaStart = -2*math.pithetaEnd = 2*math.pithetaCount = 10000deltaTheta = (thetaEnd-thetaStart)/thetaCountiRange = ra 阅读全文
posted @ 2012-12-25 15:20 geometry_ 阅读(188) 评论(0) 推荐(0) 编辑
摘要: http://msdn.microsoft.com/zh-cn/library/windows/desktop/bb173922(v=vs.85).aspx需求,从mesh中获得节点信息.HRESULT GetVertexDescription( [out] const D3D10_INPUT_ELEMENT_DESC **ppDesc, [in] UINT *pDeclCount); 阅读全文
posted @ 2012-12-21 11:16 geometry_ 阅读(124) 评论(0) 推荐(0) 编辑
摘要: struct halfedge{ Edge *hedge; Loop *hloop; Vertex *hvert; HalfEdge *next; HalfEdge *prev; int aliveh;};struct edge{ HalfEdge *he1; HalfEdge *he2; Solid *esolid; Edge *next; Edge *prev; int alive;};根据实体网格结构,struct solid{ Face ... 阅读全文
posted @ 2012-08-30 15:08 geometry_ 阅读(405) 评论(0) 推荐(0) 编辑
摘要: 对于开源代码我看的相对来说还蛮多的。但是对自我的提高很局限,分析原因,无非在于没有目标盲目的扫视! 阅读全文
posted @ 2012-08-08 19:00 geometry_ 阅读(104) 评论(0) 推荐(0) 编辑
摘要: class MeshInformer { public: static size_t getVertices(Ogre::Vector3* pDst, const Ogre::VertexData* vertexData); template <typename DestType, typename SrcType> static size_t getTriangleIndices(DestType* pDest, ... 阅读全文
posted @ 2012-07-26 20:10 geometry_ 阅读(431) 评论(0) 推荐(0) 编辑
摘要: triangledir = "\\";trianglwireframetriangle = Import[triangledir <> "triangle.off", "PolygonData"];trianglewireframevertexdata = Import[triangledir <>TXFindBoundaryTriangleLocalconstructor.off", "VertexData"]; Graphics3D[ Table[ GraphicsComple 阅读全文
posted @ 2012-07-18 21:24 geometry_ 阅读(194) 评论(0) 推荐(0) 编辑
摘要: randompointlist = {RandomReal[{0, 1}, {1000}], RandomReal[{0, 1}, {1000}]};randompointlist = Transpose[randompointlist];randompointlistGraphs = Table[Graphics[{RGBColor[RandomReal[], RandomReal[], RandomReal[]], PointSize[RandomReal[]/20.], Point[randompointlist[[i]]]}], {i, 1, Length[... 阅读全文
posted @ 2012-07-18 19:12 geometry_ 阅读(464) 评论(0) 推荐(0) 编辑
摘要: 实现RAII chromium 有两个类一个是 RefCounted 类需要实现引用计数的的类都要继承此类// A base class for reference counted classes. Otherwise, known as a cheap// knock-off of WebKit's RefCounted<T> class. To use this guy just extend your// class from it like so://// class MyFoo : public base::RefCounted<MyFoo> {// 阅读全文
posted @ 2012-07-08 14:39 geometry_ 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 对chrome 的IPC 感兴趣,想通过他的单元测试来窥探。无意中看到有一个command_line 类,因为是第二次碰到OSG中也有一个command类正好可以放在一起以备不时之需!相比较,OSG的 ArgumentParser 更全面一些,接口更多一些。 阅读全文
posted @ 2012-07-06 23:20 geometry_ 阅读(126) 评论(0) 推荐(0) 编辑