Scene3D Class Reference

#include <scene3D.h>

Collaboration diagram for Scene3D:

Collaboration graph
[legend]

Public Member Functions

 Scene3D ()
 ~Scene3D ()
void attach (osgProducer::Viewer *)
void update ()
void createScene ()
void initSound ()
void optimize (osg::Node *root)
void setSky ()
void setVisibilityRange (float range)
void setSkyDome (osg::Node *skyDome)
void setClouds (osg::Node *node, float height)
void setSkyLightColor (const osg::Vec4 &color)
void setSkyLightPosition (const osg::Vec2 &headingAzimuth)
void addTree (const std::string &strFile, float x, float y, float z)
osg::Node * addObject (osg::Node *node, osg::Vec3d pos, osg::Vec3d scale)
osg::ref_ptr< osgAL::SoundNode > addSound (const std::string &name)
void addSoundSource (const std::string &strFile, float x, float y, float z, float factor, float dist)
osg::ref_ptr< osg::Group > getRootNode ()
osg::ref_ptr< osg::MatrixTransform > getRoot ()
bool isSoundEnabled ()
osg::Node * createMovingModel (osg::Node *n, float scale, const std::string &strFile, const osg::Vec3 &center, float radius, float speed)
void creerChutesEtAnim (osg::Group *scene)
void setTrees (bool b)
void setFogs (bool b)

Private Member Functions

osg::Drawable * createShrub (const float &scale, osg::StateSet *bbState)

Private Attributes

osgProducer::Viewer * viewer
osg::ref_ptr< osgAL::SoundRoot > sound_root
osg::ref_ptr< osg::Group > rootNode
osg::ref_ptr< osg::MatrixTransform > root
osg::ref_ptr< osg::StateSet > rootStateSet
osg::ref_ptr< osg::MatrixTransform > sky
osg::ref_ptr< osg::MatrixTransform > skyDome
osg::ref_ptr< osg::LightSource > skyLight
osg::ref_ptr< osg::LightSource > backLight
osg::ref_ptr< osg::MatrixTransform > clouds
LightManager lightManager
SoundManagersoundMgr
bool sound
bool trees
bool fogs

Detailed Description

end

Definition at line 47 of file scene3D.h.


Constructor & Destructor Documentation

Scene3D::Scene3D (  ) 

Definition at line 86 of file scene3D.cpp.

References fogs, rootNode, rootStateSet, sound, soundMgr, and trees.

Scene3D::~Scene3D (  ) 

Definition at line 95 of file scene3D.cpp.

References soundMgr.


Member Function Documentation

void Scene3D::attach ( osgProducer::Viewer *   ) 

Definition at line 104 of file scene3D.cpp.

References rootNode, and viewer.

Referenced by _tmain().

void Scene3D::update (  ) 

Definition at line 110 of file scene3D.cpp.

void Scene3D::createScene (  ) 

Definition at line 133 of file scene3D.cpp.

References addObject(), addSoundSource(), SkyBox::createSkyBox(), creerChutesEtAnim(), fogs, Terrain3D::getGeode(), LightManager::getOrCreateLight(), LightManager::init(), initWater(), lightManager, Terrain3D::Ok(), LightManager::ONE, quaternion, rootNode, LightManager::THREE, trees, LightManager::TWO, and viewer.

Referenced by _tmain().

Here is the call graph for this function:

void Scene3D::initSound (  ) 

Definition at line 123 of file scene3D.cpp.

References SoundManager::init(), rootNode, sound, and soundMgr.

Referenced by _tmain().

Here is the call graph for this function:

void Scene3D::optimize ( osg::Node *  root  ) 

Definition at line 116 of file scene3D.cpp.

void Scene3D::setSky (  ) 

Definition at line 345 of file scene3D.cpp.

References backLight, clouds, root, rootNode, rootStateSet, sky, skyDome, and skyLight.

void Scene3D::setVisibilityRange ( float  range  ) 

Definition at line 403 of file scene3D.cpp.

References rootStateSet.

void Scene3D::setSkyDome ( osg::Node *  skyDome  ) 

void Scene3D::setClouds ( osg::Node *  node,
float  height 
)

Set the Clouds node to use.

Definition at line 415 of file scene3D.cpp.

References clouds, and rootStateSet.

void Scene3D::setSkyLightColor ( const osg::Vec4 &  color  ) 

Set the color of the SkyLight. See getSkyLightColor().

Definition at line 430 of file scene3D.cpp.

References backLight, and skyLight.

void Scene3D::setSkyLightPosition ( const osg::Vec2 &  headingAzimuth  ) 

Set the SkyLightPosition. See getSkyLightPosition().

Definition at line 445 of file scene3D.cpp.

References backLight, rootStateSet, and skyLight.

void Scene3D::addTree ( const std::string &  strFile,
float  x,
float  y,
float  z 
)

La méthode addTree permet d'ajouter des arbres à une position donnée. Ces arbres sont des billboards orientables selon l'axe Z

Definition at line 640 of file scene3D.cpp.

References createShrub(), and rootNode.

Here is the call graph for this function:

osg::Node * Scene3D::addObject ( osg::Node *  node,
osg::Vec3d  pos,
osg::Vec3d  scale 
)

Definition at line 465 of file scene3D.cpp.

Referenced by createScene().

osg::ref_ptr<osgAL::SoundNode> Scene3D::addSound ( const std::string &  name  ) 

void Scene3D::addSoundSource ( const std::string &  strFile,
float  x,
float  y,
float  z,
float  factor,
float  dist 
)

Ajout d'une source sonore à une position précise (x,y,z) . "factor" permet de régler le gain maximal à fournir au son lorsque l'on est sur lui.

Definition at line 538 of file scene3D.cpp.

References rootNode, and sound_root.

Referenced by createScene().

osg::ref_ptr< osg::Group > Scene3D::getRootNode (  ) 

Definition at line 675 of file scene3D.cpp.

References rootNode.

osg::ref_ptr< osg::MatrixTransform > Scene3D::getRoot (  ) 

Definition at line 679 of file scene3D.cpp.

References root.

bool Scene3D::isSoundEnabled (  ) 

Definition at line 684 of file scene3D.cpp.

References sound.

osg::Node* Scene3D::createMovingModel ( osg::Node *  n,
float  scale,
const std::string &  strFile,
const osg::Vec3 &  center,
float  radius,
float  speed 
)

void Scene3D::creerChutesEtAnim ( osg::Group *  scene  ) 

Definition at line 689 of file scene3D.cpp.

References FogCube::addFog(), keyboardEventHandler::addFunction(), CHU, C_Chute::Creer_Chute(), descendre(), C_Chute::enableAcc, C_Chute::enableShooter, geo2, HZ, C_Chute::lifeTime, C_Chute::mass, monter(), C_Chute::nbGenerate, NUAG, pat1, pat2_2, C_Chute::phiRangeMax, C_Chute::phiRangeMin, quaternion, C_Chute::radiusRangeMax, C_Chute::radiusRangeMin, C_Chute::range_max, C_Chute::range_min, findNodeVisitor::results, FogCube::setCube(), findNodeVisitor::setSearchName(), C_Chute::speedRangeMax, C_Chute::speedRangeMin, stop(), C_Chute::thetaRangeMax, C_Chute::thetaRangeMin, C_Chute::type, C_Chute::vecAcceleration, and viewer.

Referenced by createScene().

Here is the call graph for this function:

void Scene3D::setTrees ( bool  b  )  [inline]

Definition at line 74 of file scene3D.h.

References trees.

Referenced by _tmain().

void Scene3D::setFogs ( bool  b  )  [inline]

Definition at line 75 of file scene3D.h.

Referenced by _tmain().

osg::Drawable * Scene3D::createShrub ( const float &  scale,
osg::StateSet *  bbState 
) [private]

Méthode : CreateShurb Classe : Scene3D Cette méthode permet de creer un Shurb que l'on pourra ensuite ajouter à nos billboards

Definition at line 597 of file scene3D.cpp.

Referenced by addTree().


Field Documentation

osgProducer::Viewer* Scene3D::viewer [private]

Definition at line 75 of file scene3D.h.

Referenced by attach(), createScene(), and creerChutesEtAnim().

osg::ref_ptr<osgAL::SoundRoot> Scene3D::sound_root [private]

Definition at line 80 of file scene3D.h.

Referenced by addSoundSource().

osg::ref_ptr<osg::Group> Scene3D::rootNode [private]

Definition at line 81 of file scene3D.h.

Referenced by addSoundSource(), addTree(), attach(), createScene(), getRootNode(), initSound(), Scene3D(), and setSky().

osg::ref_ptr<osg::MatrixTransform> Scene3D::root [private]

Definition at line 82 of file scene3D.h.

Referenced by getRoot(), and setSky().

osg::ref_ptr<osg::StateSet> Scene3D::rootStateSet [private]

Definition at line 83 of file scene3D.h.

Referenced by Scene3D(), setClouds(), setSky(), setSkyLightPosition(), and setVisibilityRange().

osg::ref_ptr<osg::MatrixTransform> Scene3D::sky [private]

Definition at line 84 of file scene3D.h.

Referenced by setSky().

osg::ref_ptr<osg::MatrixTransform> Scene3D::skyDome [private]

Definition at line 85 of file scene3D.h.

Referenced by setSky().

osg::ref_ptr<osg::LightSource> Scene3D::skyLight [private]

Definition at line 86 of file scene3D.h.

Referenced by setSky(), setSkyLightColor(), and setSkyLightPosition().

osg::ref_ptr<osg::LightSource> Scene3D::backLight [private]

Definition at line 87 of file scene3D.h.

Referenced by setSky(), setSkyLightColor(), and setSkyLightPosition().

osg::ref_ptr<osg::MatrixTransform> Scene3D::clouds [private]

Definition at line 88 of file scene3D.h.

Referenced by setClouds(), and setSky().

LightManager Scene3D::lightManager [private]

Definition at line 89 of file scene3D.h.

Referenced by createScene().

SoundManager* Scene3D::soundMgr [private]

Definition at line 90 of file scene3D.h.

Referenced by initSound(), Scene3D(), and ~Scene3D().

bool Scene3D::sound [private]

Definition at line 91 of file scene3D.h.

Referenced by initSound(), isSoundEnabled(), and Scene3D().

bool Scene3D::trees [private]

Definition at line 92 of file scene3D.h.

Referenced by createScene(), Scene3D(), and setTrees().

bool Scene3D::fogs [private]

Definition at line 93 of file scene3D.h.

Referenced by createScene(), and Scene3D().


The documentation for this class was generated from the following files:
Generated on Tue Jun 5 16:57:26 2007 for Anidam by  doxygen 1.5.1