代码示例
出自Ogre3D开放资源地带
本段落翻译自OGRE3D官方wiki,同时也访问本站的朋友可以把自己的经验代码共享出来。
目录 |
本站的朋友共享
- Ogre中函数调试跟踪器:用于打印跟踪函数运行次序以及运行效率,便于优化。(来自:免费打工仔 的贡献)
几何
顶点以及索引缓存(Vertex and Index Buffers)
- 共享缓存(Sharing buffers) - 在多个模型(mesh)之间共享顶点以及索引缓存
- 创建一个模型 - 通过顶点和索引缓存在内存中创建模型的例子。
- 从模型中还原顶点数据
- 动态增加顶点缓存
- 手动创建一个球体模型,并正确的设置纹理坐标和法线
- 超级椭圆:可以用来创建简单三维图元的超级椭圆类。
- 创建多种几何体/地形模型。
- 管道模型:创建一个管道路径集合的模型。
Manual Object
- ManualObject - 一个简单的例子
- ManualObject_2D - A minimal example (Eihort only)
- ManualObject_AxisObject - A simple Axis using box's.
General
- Setting a vector's length
- Nearest point on a line - Find the nearest point on a line between two points
- 2D line intersection - do 2 lines described by 4 vertices intersect?
- Find Spline index - from global interpolation value
- Raycasting to the polygon level - how to see if a line intersects with a mesh's geometry
- Get Screenspace Coordinates - Get the screenspace (2D) coordinates of a MovableObject.
- Projecting 3D position and size to 2D
- Equal Length Spline - Generating new spline (based on SimpleSpline) which has equal distance between points.
- Nearest point on a Spline - From "Robust and Efficient Computation of the Closest Point on a Spline Curve"
渲染(Rendering)
- 二维精灵(2d Sprite)管理器:一个渲染二维精灵的Class,类似DirectDraw。
- 在三维中绘制线
- Drawing lines in 3D revisited (Example of dynamic buffers code)
- 在三维空间中绘制圆圈
- Displaying 2D Backgrounds
- Displaying a Lens Flare Effect
- Billboard-style Text in 3D (MovableText)
- HDR effects without using full floating-point textures
- Oriented Bounding Box
- A more in depth version of the 2d Sprite Manager




