• 大小: 1.88MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-01-02
  • 语言: 其他
  • 标签: OSG  源码  

资源简介

OpenSceneGraph三维渲染引擎设计与实践-随书源码,作者精心整理,代码类别清楚。配套电子书可在CSDN搜索。

资源截图

代码片段和文件信息

/* -*-c++-*- Copyright (C) 2009 Wang Rui 
 * OpenSceneGraph Engine Book - Design and Implementation
 * How to create a billboard forest
*/

#include 
#include 
#include 
#include 

#define RAND(min max) ((min) + (double)rand()/(RAND_MAX+1)*((max)-(min)))

void createTrees( osg::Billboard& root )
{
    root.getOrCreateStateSet()->setRenderingHint( osg::StateSet::TRANSPARENT_BIN );
    root.getOrCreateStateSet()->setMode( GL_LIGHTING osg::StateAttribute::OFF );
    
    osg::ref_ptr texture = new osg::Texture2D( osgDB::readImageFile(“tree.rgba“) );
    for ( unsigned int i=0; i<200; ++i )
    {
        osg::ref_ptr tree =
            osg::createTex

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

    .......      1399  2009-09-22 00:13  OpenSceneGraph三维渲染引擎设计与实践-随书源码\billboard\billboard.cpp

    .......       571  2009-09-22 00:13  OpenSceneGraph三维渲染引擎设计与实践-随书源码\billboard\CMakeLists.txt

    .......      1523  2009-09-22 00:13  OpenSceneGraph三维渲染引擎设计与实践-随书源码\birdseye\birdseye.cpp

    .......       640  2009-09-22 00:13  OpenSceneGraph三维渲染引擎设计与实践-随书源码\birdseye\CMakeLists.txt

    .......      1272  2009-09-22 00:13  OpenSceneGraph三维渲染引擎设计与实践-随书源码\bitmap\bitmap.cpp

    .......       640  2009-09-22 00:13  OpenSceneGraph三维渲染引擎设计与实践-随书源码\bitmap\CMakeLists.txt

    .......      2078  2009-09-22 00:13  OpenSceneGraph三维渲染引擎设计与实践-随书源码\callback\callback.cpp

    .......       642  2009-09-22 00:13  OpenSceneGraph三维渲染引擎设计与实践-随书源码\callback\CMakeLists.txt

     文件       2442  2009-11-22 08:56  OpenSceneGraph三维渲染引擎设计与实践-随书源码\CMakeLists.txt

    .......      2173  2009-09-22 00:13  OpenSceneGraph三维渲染引擎设计与实践-随书源码\CMakeModules\CustomModules.cmake

    .......      4182  2009-09-22 00:13  OpenSceneGraph三维渲染引擎设计与实践-随书源码\CMakeModules\FindOpenGL.cmake

    .......      1634  2009-09-22 00:13  OpenSceneGraph三维渲染引擎设计与实践-随书源码\CMakeModules\Findosg.cmake

    .......      1596  2009-09-22 00:13  OpenSceneGraph三维渲染引擎设计与实践-随书源码\CMakeModules\FindosgAnimation.cmake

    .......      1505  2009-09-22 00:13  OpenSceneGraph三维渲染引擎设计与实践-随书源码\CMakeModules\FindosgDB.cmake

    .......      1501  2009-09-22 00:13  OpenSceneGraph三维渲染引擎设计与实践-随书源码\CMakeModules\FindosgFX.cmake

    .......      1513  2009-09-22 00:13  OpenSceneGraph三维渲染引擎设计与实践-随书源码\CMakeModules\FindosgGA.cmake

    .......      1685  2009-09-22 00:13  OpenSceneGraph三维渲染引擎设计与实践-随书源码\CMakeModules\FindosgIntrospection.cmake

    .......      1661  2009-09-22 00:13  OpenSceneGraph三维渲染引擎设计与实践-随书源码\CMakeModules\FindosgManipulator.cmake

    .......      1595  2009-09-22 00:13  OpenSceneGraph三维渲染引擎设计与实践-随书源码\CMakeModules\FindosgParticle.cmake

    .......      1565  2009-09-22 00:13  OpenSceneGraph三维渲染引擎设计与实践-随书源码\CMakeModules\FindosgShadow.cmake

    .......      1513  2009-09-22 00:13  OpenSceneGraph三维渲染引擎设计与实践-随书源码\CMakeModules\FindosgSim.cmake

    .......      1571  2009-09-22 00:13  OpenSceneGraph三维渲染引擎设计与实践-随书源码\CMakeModules\FindosgTerrain.cmake

    .......      1511  2009-09-22 00:13  OpenSceneGraph三维渲染引擎设计与实践-随书源码\CMakeModules\FindosgText.cmake

    .......      1521  2009-09-22 00:13  OpenSceneGraph三维渲染引擎设计与实践-随书源码\CMakeModules\FindosgUtil.cmake

    .......      1551  2009-09-22 00:13  OpenSceneGraph三维渲染引擎设计与实践-随书源码\CMakeModules\FindosgViewer.cmake

    .......      1551  2009-09-22 00:13  OpenSceneGraph三维渲染引擎设计与实践-随书源码\CMakeModules\FindosgVolume.cmake

    .......      1602  2009-09-22 00:13  OpenSceneGraph三维渲染引擎设计与实践-随书源码\CMakeModules\FindosgWidget.cmake

    .......      5437  2009-11-22 08:41  OpenSceneGraph三维渲染引擎设计与实践-随书源码\data\0.JPG

    .......      3343  2009-11-22 08:41  OpenSceneGraph三维渲染引擎设计与实践-随书源码\data\1.JPG

    .......      5681  2009-11-22 08:41  OpenSceneGraph三维渲染引擎设计与实践-随书源码\data\2.JPG

............此处省略137个文件信息

评论

共有 条评论