TrueReality  v0.1.1912
trCore::SceneObjects::SkyBoxNode Class Reference

A sky box class that creates an object that is always positioned around the camera. This class can load any geometry, box or dome... More...

#include <SkyBoxNode.h>

Inheritance diagram for trCore::SceneObjects::SkyBoxNode:
Collaboration diagram for trCore::SceneObjects::SkyBoxNode:

Public Types

using BaseClass = osg::Transform
 

Public Member Functions

 SkyBoxNode ()
 Adds an easy and swappable access to the base class. More...
 
virtual bool computeLocalToWorldMatrix (osg::Matrix &matrix, osg::NodeVisitor *nv) const override
 Calculates the local to world matrix. More...
 
virtual bool computeWorldToLocalMatrix (osg::Matrix &matrix, osg::NodeVisitor *nv) const override
 Calculates the world to local matrix. More...
 
bool LoadFile (std::string fileName)
 Loads a geometry file. More...
 

Protected Member Functions

 ~SkyBoxNode ()
 Destructor. More...
 

Protected Attributes

trBase::SmrtPtr< osg::Node > mNode = nullptr
 

Detailed Description

A sky box class that creates an object that is always positioned around the camera. This class can load any geometry, box or dome...

Author
Maxim Serebrennik

Definition at line 44 of file SkyBoxNode.h.

Member Typedef Documentation

◆ BaseClass

Definition at line 48 of file SkyBoxNode.h.

Constructor & Destructor Documentation

◆ SkyBoxNode()

trCore::SceneObjects::SkyBoxNode::SkyBoxNode ( )

Adds an easy and swappable access to the base class.

Default constructor.

Definition at line 31 of file SkyBoxNode.cpp.

◆ ~SkyBoxNode()

trCore::SceneObjects::SkyBoxNode::~SkyBoxNode ( )
protected

Destructor.

Definition at line 85 of file SkyBoxNode.cpp.

Member Function Documentation

◆ computeLocalToWorldMatrix()

bool trCore::SceneObjects::SkyBoxNode::computeLocalToWorldMatrix ( osg::Matrix &  matrix,
osg::NodeVisitor *  nv 
) const
overridevirtual

Calculates the local to world matrix.

Parameters
[in,out]matrixThe matrix.
[in,out]nvIf non-null, the nv.
Returns
True if it succeeds, false if it fails.

Definition at line 40 of file SkyBoxNode.cpp.

◆ computeWorldToLocalMatrix()

bool trCore::SceneObjects::SkyBoxNode::computeWorldToLocalMatrix ( osg::Matrix &  matrix,
osg::NodeVisitor *  nv 
) const
overridevirtual

Calculates the world to local matrix.

Parameters
[in,out]matrixThe matrix.
[in,out]nvIf non-null, the nv.
Returns
True if it succeeds, false if it fails.

Definition at line 55 of file SkyBoxNode.cpp.

◆ LoadFile()

bool trCore::SceneObjects::SkyBoxNode::LoadFile ( std::string  fileName)

Loads a geometry file.

Path and file name should be passed in

Parameters
fileNameFilename of the file.
Returns
True if it succeeds, false if it fails.

Definition at line 70 of file SkyBoxNode.cpp.

References mNode, and trBase::SmrtPtr< T >::Valid().

Here is the call graph for this function:

Member Data Documentation

◆ mNode

trBase::SmrtPtr<osg::Node> trCore::SceneObjects::SkyBoxNode::mNode = nullptr
protected

Definition at line 94 of file SkyBoxNode.h.

Referenced by LoadFile().


The documentation for this class was generated from the following files: