資源簡介
基于osgOcean代碼修改的基于河流渲染的代碼。它有以下特點:
可以控制流向。
可以用顏色來反映河水的深度。
可以認為是迄今為止最好的河流模擬效果。
代碼片段和文件信息
#include?
#include?
using?namespace?osgRiver;
/*
//
vector?RiverSegment::CreateFromPoints(RiverFunction&?riverFunction?vector?points?RiverControlPoint?curvePoint)?{
}
//
vector?RiverSegment::MergeRiverSegments(vector?branch1?vector?branch2?RiverControlPoint?nextControlPoint)?{
vector?total;
RiverSegment*?last1?=?branch1[branch1.size()-1];
RiverSegment*?last2?=?branch2[branch2.size()-1];
RiverControlPoint?lastControl1?=?last1->getControlPoint3();
RiverControlPoint?lastControl2?=?last2->getControlPoint3();
RiverControlPoint?lastControlAvg?=?(lastControl1?+?lastControl2)?*?0.5;
RiverControlPoint?nextControl1?=?last1->getControlPoint3()?+?(last1->getControlPoint3()?-?last1->getControlPoint2());
RiverControlPoint?nextControl2?=?last2->getControlPoint3()?+?(last2->getControlPoint3()?-?last2->getControlPoint2());
RiverControlPoint?nextControlAvg?=?(nextControl1?+?nextControl2)?*?0.5;
RiverSegment*?nextRiverSegment?=?new?RiverSegment(last1->getRiverFunction()?lastControlAvg?nextControlAvg?nextControlPoint);
last1->addChild(nextRiverSegment);
last2->addChild(nextRiverSegment);
for?(size_t?i?=?0;?i? total.push_back(branch1[i]);
}
for?(size_t?i?=?0;?i? total.push_back(branch2[i]);
}
total.push_back(nextRiverSegment);
return?total;
}
*/
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????1527650??2010-06-09?23:13??bin\Debug\libfftw3f-3.dll
?????文件????1527650??2010-06-09?23:13??bin\Release\libfftw3f-3.dll
?????文件???????1518??2010-06-09?23:26??include\OceanExample\SkyDome.h
?????文件???????1650??2010-06-09?23:26??include\OceanExample\SphereSegment.h
?????文件???????1851??2010-06-09?23:26??include\osgOcean\Cylinder
?????文件???????2706??2010-06-09?23:26??include\osgOcean\DistortionSurface
?????文件???????1560??2010-06-09?23:26??include\osgOcean\Export
?????文件??????19090??2010-06-09?23:26??include\osgOcean\FFTOceanSurface
?????文件???????3389??2010-06-09?23:26??include\osgOcean\FFTSimulation
?????文件???????5202??2010-06-09?23:26??include\osgOcean\GodRayBlendSurface
?????文件???????6043??2010-06-09?23:26??include\osgOcean\GodRays
?????文件???????3581??2010-06-09?23:26??include\osgOcean\MipmapGeometry
?????文件??????26133??2010-06-10?00:43??include\osgOcean\OceanScene
?????文件???????3981??2010-06-09?23:26??include\osgOcean\OceanTechnique
?????文件???????5675??2010-06-09?23:26??include\osgOcean\OceanTile
?????文件???????2040??2010-06-09?23:26??include\osgOcean\RandUtils
?????文件???????7429??2009-12-16?19:30??include\osgOcean\RiverSurface
?????文件???????1537??2010-06-09?23:26??include\osgOcean\ScreenAlignedQuad
?????文件???????2892??2010-06-09?23:26??include\osgOcean\ShaderManager
?????文件???????9372??2010-06-09?23:26??include\osgOcean\SiltEffect
?????文件???????1138??2010-06-09?23:26??include\osgOcean\Version
?????文件???????2390??2010-06-09?23:26??include\osgOcean\WaterTrochoids
?????文件???????1858??2010-03-09?23:07??include\osgRiver\BezierFunction.h
?????文件????????536??2010-03-09?23:55??include\osgRiver\CubicEquationSolver.h
?????文件???????1560??2010-02-28?21:02??include\osgRiver\Export.h
?????文件???????1197??2010-03-01?00:57??include\osgRiver\RenderSegment.h
?????文件???????1555??2010-03-09?20:32??include\osgRiver\River.h
?????文件????????906??2010-02-28?21:47??include\osgRiver\RiverControlPoint.h
?????文件???????2052??2010-03-01?00:15??include\osgRiver\RiverDebugNode.h
?????文件???????1702??2010-03-09?23:07??include\osgRiver\RiverFunction.h
............此處省略271個文件信息
評論
共有 條評論