Basic Image AlgorithmS Library
2.8.0
|
Implements narrow access to OpenSceneGraph. More...
#include <GLviewer/Scenes/SceneOpenSceneGraph.hh>
Public Types | |
enum | EChannel { C_BothMono, C_LeftOnly, C_RightOnly, C_BothStereo } |
Public Member Functions | |
void | AddDebugLevel (const long int lv) |
void | AddDebugLevel (const std::string &name) |
void | AddMirror (const BIAS::Vector3< double > &ul, const BIAS::Vector3< double > &ur, const BIAS::Vector3< double > &ll, const BIAS::Vector3< double > &lr, const std::string &mirrortexture, bool cutUpperHalf=false) |
adds a rectangular mirror surface into the scene More... | |
void | AddParticles () |
void | AppendSubTree (osg::ref_ptr< osg::Node > &childNode) |
Append an OSG subtree to the constructed root tree. More... | |
int | AppendSubTreeFromFile (const std::string &fileName, osg::ref_ptr< osg::Node > &childNode, bool optimize=false) |
Loads contents from file into scene graph. More... | |
int | AppendSubTreeFromFile (const std::string &fileName) |
int | AppendSubTreeFromImageFile (const std::string &fileName, const double &width_mm, osg::ref_ptr< osg::Node > &imageNode) |
Loads contents from 2D image file into scene graph. More... | |
int | AppendSubTreeSwitch (osg::ref_ptr< osg::Node > &switchNode, eNodeType NodeType=eNT_Default) |
Append an OSG subtree to the constructed root tree with switch node. More... | |
void | ApplyTimeStep (const double &delta=1.0, const BIAS::Vector3< double > &gravity=BIAS::Vector3< double >(0,-9.81, 0), const double &frictioncoefficient=0.999) |
change position using a small time step of delta seconds and change velocity using gravity vector in m/s^2 More... | |
void | Clear () |
std::list< BIAS::HomgPoint3D > | CornersFromBoundingBox (const BIAS::Vector3< double > &b1, const BIAS::Vector3< double > &b2) |
osg::Node * | createMirroredScene (osg::Node *model, const BIAS::Vector3< double > &ul, const BIAS::Vector3< double > &ur, const BIAS::Vector3< double > &ll, const BIAS::Vector3< double > &lr, const std::string &mirrortexture, bool cutUpperHalf) |
helper function for mirror effects, called for all subscenes More... | |
bool | DebugLevelIsSet (const long int lv) const |
bool | DebugLevelIsSet (const std::string &name) const |
void | DumpInfo () const |
dump info about the scene More... | |
std::list< BIAS::HomgPlane3D > | FacesFromBoundingBox (const BIAS::Vector3< double > &b1, const BIAS::Vector3< double > &b2) |
enum EChannel | GetActiveChannel () const |
Returns the active color channel. More... | |
virtual void | GetBoundingBox (BIAS::Vector3< double > &min, BIAS::Vector3< double > &max) |
Returns bounding box around the whole scene. More... | |
BIAS::Vector3< double > | GetBoundingBoxCenter () |
Returns center of bounding box around the whole scene. More... | |
int | GetDebugLevel () const |
std::ostream & | GetDebugStream () const |
void | GetDebugStream (std::ostream &os) const |
double | GetElasticity () |
returns the elasticity value More... | |
virtual GLProjectionParametersInterface * | GetGLProjectionParametersInterface () |
Get the camera as projectionparametersinterface, can be of type GLProjection of of any from GLProjectionParametersBase derived class. More... | |
bool | GetGravityImmunity () const |
is this scene accelerated by gravity ? More... | |
void | GetMomentum (double &mass, BIAS::Vector3< double > &velocity) const |
get mass and velocity in m/s More... | |
const NodeInfoMap & | GetNodeInfoMapRef () |
POINT_DRAW_STYLE | GetPointDrawStyle () |
Get the drawing style for points. More... | |
osg::ref_ptr< osg::Node > | GetSceneRoot () |
returns ref_ptr to root of tree More... | |
TreeDescr | GetTreeDescr () |
TRIANGLEMESH_DRAW_STYLE | GetTriangleMeshDrawStyle () |
Get the drawing style for triangles. More... | |
virtual bool | HasBoundingBoxCollision (SceneBase *otherScene) |
check if bounding boxes of two scenes overlap More... | |
void | HeadlightSwitch (bool on=true) |
Toggles the headlight. More... | |
int | Init () |
Initializes OpenSG tree for scene appendance. More... | |
bool | IsActive () const |
Returns whether the scene is active or not. More... | |
bool | IsEditableNode (osg::Node *node) |
void | LightRepresentationVisibleSwitch () |
Toggle the light visible switch. More... | |
bool | Load (std::string filename) |
void | MakeOpaque () |
void | MakeRootShadowNode (osg::ref_ptr< osg::LightSource > lightSource) |
void | MakeTransparent (const double transparency) |
virtual void | MoveScene (const double &delta=1.0) |
this moves the scene (no rotation yet) More... | |
long int | Name2DebugLevel (const std::string &name) const |
looks up a debuglevel in the internal map, returns 0 if not found More... | |
long int | NewDebugLevel (const std::string &name) |
creates a new debuglevel More... | |
bool | OpenSceneGraphAnimationIsPlaying () |
void | OpenSceneGraphAnimationNextFrame () |
virtual void | PerformCollision (SceneBase *otherscene, const BIAS::Vector3< double > &contactnormal=BIAS::Vector3< double >(-1e10,-1e10,-1e10)) |
compute momentum of each scene after collision More... | |
void | PrintDebugLevel (std::ostream &os=std::cout) const |
void | RemoveDebugLevel (const long int lv) |
void | RemoveDebugLevel (const std::string &name) |
void | RemoveSubTree (osg::ref_ptr< osg::Node > &childNode) |
void | RemoveSubTree (osg::Node *childNode) |
void | RemoveSubTreeAndParents (osg::Node *Node) |
removes the subtree and the parents except the globalroot of a given node More... | |
virtual void | Render () |
this is the entry point seen from GLProjectionParametersBase. More... | |
virtual void | RenderBoundingBox () |
render the bounding box of the scene using gl-lines More... | |
void | Reset () |
deletes internal pointers More... | |
virtual void | ResetSelection () |
Reset the selection, overwrite to react on calls to this function in derived classes. More... | |
bool | RightMouseDoubleClicked (int x, int y) |
bool | Save (std::string filename) |
bool | SaveSubTree (osg::Node *node, const std::string &fileName) |
Saves contents beginning at node into a file. More... | |
SceneOpenSceneGraph (bool redirect=true) | |
virtual bool | SelectObjectAt (BIAS::Vector3< double > &p) |
Select a scene element/primitive at position p. More... | |
void | SetActive (bool b) |
Set whether the scene is active or not. More... | |
void | SetActiveChannel (const enum EChannel channel) |
Set a color channel active. More... | |
void | SetAnimate (const bool animate) |
void | SetAnimationTime (const double current_time, bool CallDraw=true) |
setanimationtime() calls draw. More... | |
void | SetClearMask (int clearMask) |
void | SetColorMask (bool red=true, bool green=true, bool blue=true, bool alpha=true) |
sets a color mask for the scene rendering More... | |
void | SetDebugLevel (const long int lv) |
void | SetDebugLevel (const std::string &name) |
void | SetDebugStream (const std::ostream &os) |
void | SetElasticity (const double &elas) |
set collision behaviour: 1.0=elastic, no energy is lost, >1 superelastic (requires energy from outside) <1 plastic, converts kinetic into other energy More... | |
void | SetFixedDirectionalLight (bool on, BIAS::Vector3< double > dirDirectionalLight) |
void | SetFixedPointLight (bool on, BIAS::Vector3< double > posPointLight) |
Removes the camera as a beacon for the lights and sets a fixed position for Point Light or fixed direction for Directional Light. More... | |
virtual void | SetGLProjectionParametersInterface (GLProjectionParametersInterface *nc) |
Set the camera as projectionparametersinterface, can be of type GLProjection of of any from GLProjectionParametersBase derived class. More... | |
void | SetGravityImmunity (bool i) |
set behaviour with respect to gravity More... | |
void | SetMomentum (const double &mass, const BIAS::Vector3< double > &velocity) |
set mass and velocity in m/s More... | |
void | SetNodeMarkerID (osg::Node *node, const unsigned long long &id) |
void | SetNodeOccluder (osg::Node *node, const bool state) |
void | SetNodeVisible (osg::Node *node, const bool visible) |
sets node visbility in guis like treectrlopensgwx this changes only the nodeinfomap and has no effect on the rendering of the node. More... | |
void | SetPointDrawStyle (POINT_DRAW_STYLE style) |
Set the drawing style for points. More... | |
virtual void | SetRenderBoundingBox (bool render) |
Set whether to render the boundign box or not. More... | |
void | SetTriangleMeshDrawStyle (TRIANGLEMESH_DRAW_STYLE style) |
Set the drawing style for triangles. More... | |
void | ShowDebugLevel (std::ostream &os=std::cout) const |
prints all internally known debuglevels More... | |
void | StartOpenSceneGraphAnimation () |
void | StopOpenSceneGraphAnimation () |
virtual double | TimeToContact (SceneBase *otherScene, BIAS::Vector3< double > &collisionpoint) |
compute time to contact of bounding boxes More... | |
virtual void | UpdateCameraRelatedState () |
Method is called by GLProjection if its params have changed. More... | |
void | UpdateTraversal () |
virtual | ~SceneOpenSceneGraph () |
Static Public Member Functions | |
static void | AnimationAndCollision (std::vector< SceneBase * > scenes, const BIAS::Vector3< double > &gravity=BIAS::Vector3< double >(0, 10, 0), const double &friction=0.999) |
call this method for a vector of scenes to solve the collision problem. More... | |
static double | GetAnimationSpeed () |
get time quantization for animations More... | |
static long int | GetGlobalDebugLevel () |
static void | SetAnimationSpeed (double s) |
set time quantization for animations More... | |
static void | SetGlobalDebugLevel (long int lev) |
Protected Member Functions | |
long | ConsumeNextFreeDebuglevel_ () |
returns the next available debuglevel More... | |
void | CreateStandardNodes_ () |
void | DisableZWriteForTransparentNodes_ () |
virtual void | Draw () |
To do anything usefull, overload this method, assume context is ready and draw. More... | |
std::string | NodePtr2IDString_ (osg::Node *node) |
void | UpdateLightRepresentation_ () |
Static Protected Attributes | |
static std::ostream | _zDebugStream |
static double | animationSpeed_ = 1.0 |
how long does a single step in time take for animations ? More... | |
static long int | GlobalDebugLevel = 0 |
Implements narrow access to OpenSceneGraph.
Definition at line 79 of file SceneOpenSceneGraph.hh.
|
inherited |
Enumerator | |
---|---|
C_BothMono | |
C_LeftOnly | |
C_RightOnly | |
C_BothStereo |
Definition at line 71 of file SceneBase.hh.
SceneOpenSceneGraph::SceneOpenSceneGraph | ( | bool | redirect = true | ) |
Definition at line 74 of file SceneOpenSceneGraph.cpp.
References BIAS::Debug::AddDebugLevel(), BIAS::Debug::NewDebugLevel(), and Reset().
|
virtual |
Definition at line 85 of file SceneOpenSceneGraph.cpp.
References initialized_, and Reset().
|
inlineinherited |
Definition at line 355 of file Debug.hh.
Referenced by BIAS::GLProjectionParametersBase::AddDebugLevel(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), BIAS::ShowCamWxVideoSourceFactory::OpenDevice(), and SceneOpenSceneGraph().
|
inlineinherited |
void SceneOpenSceneGraph::AddMirror | ( | const BIAS::Vector3< double > & | ul, |
const BIAS::Vector3< double > & | ur, | ||
const BIAS::Vector3< double > & | ll, | ||
const BIAS::Vector3< double > & | lr, | ||
const std::string & | mirrortexture, | ||
bool | cutUpperHalf = false |
||
) |
adds a rectangular mirror surface into the scene
ul,..,lr | upper left and lower right corners of the mirror |
mirrortexture | filename for texture (color) of the mirror glass, if the file cannot be opened, white texture is used. |
This function adds a mirror into the scene, specified by its four corners. However, in the texture of the mirror, you can reduce the mirror area by setting alpha values to zero. The color values of the mirror are mixed with the reflection. Mirror works only when stencil buffer is available.
Definition at line 1667 of file SceneOpenSceneGraph.cpp.
References createMirroredScene(), and rootTree_.
void SceneOpenSceneGraph::AddParticles | ( | ) |
Definition at line 1694 of file SceneOpenSceneGraph.cpp.
References rootTree_.
|
staticinherited |
call this method for a vector of scenes to solve the collision problem.
STATIC and THUS CONST !!!
Definition at line 407 of file SceneBase.cpp.
References BIAS::SceneBase::animationSpeed_, BIAS::SceneBase::GetGravityImmunity(), and BIAS::SceneBase::HasBoundingBoxCollision().
void SceneOpenSceneGraph::AppendSubTree | ( | osg::ref_ptr< osg::Node > & | childNode | ) |
Append an OSG subtree to the constructed root tree.
Definition at line 288 of file SceneOpenSceneGraph.cpp.
References rootTree_, and SetNodeOccluder().
Referenced by AppendSubTreeFromFile().
int SceneOpenSceneGraph::AppendSubTreeFromFile | ( | const std::string & | fileName, |
osg::ref_ptr< osg::Node > & | childNode, | ||
bool | optimize = false |
||
) |
Loads contents from file into scene graph.
optimize,: | unused at the moment, only for compatibility with OpenSG |
Definition at line 328 of file SceneOpenSceneGraph.cpp.
References BIAS::AnimationManagerFinder::_am, BIAS::OpenSceneGraphHelper::AddOrSetInfo(), animationManager_, AppendSubTree(), BIAS::FileHandling::Basename(), BIAS::eNT_FromDisk, hasOpenSceneGraphAnimation_, NodeInfoMap_, BIAS::NodeType2String(), rootTree_, SetNodeVisible(), BIAS::FileHandling::SplitName(), and BIAS::FileHandling::Suffix().
|
inline |
Definition at line 116 of file SceneOpenSceneGraph.hh.
int SceneOpenSceneGraph::AppendSubTreeFromImageFile | ( | const std::string & | fileName, |
const double & | width_mm, | ||
osg::ref_ptr< osg::Node > & | imageNode | ||
) |
Loads contents from 2D image file into scene graph.
Definition at line 466 of file SceneOpenSceneGraph.cpp.
References BIAS::OpenSceneGraphHelper::AddOrSetInfo(), BIAS::FileHandling::Basename(), BIAS::eNT_FromImageFile, NodeInfoMap_, BIAS::NodeType2String(), rootTree_, SetNodeOccluder(), SetNodeVisible(), and BIAS::FileHandling::Suffix().
int SceneOpenSceneGraph::AppendSubTreeSwitch | ( | osg::ref_ptr< osg::Node > & | switchNode, |
eNodeType | NodeType = eNT_Default |
||
) |
Append an OSG subtree to the constructed root tree with switch node.
WARNING:
switchNode | is updated from the input node to the now prepended switch node. So that the user has a reference to the complete scene branch |
Definition at line 298 of file SceneOpenSceneGraph.cpp.
References BIAS::OpenSceneGraphHelper::AddOrSetInfo(), NodeInfoMap_, BIAS::NodeType2String(), rootTree_, SetNodeOccluder(), and SetNodeVisible().
|
inherited |
change position using a small time step of delta seconds and change velocity using gravity vector in m/s^2
No collision detection and handling here, since other scenes are unknown at this level.
Definition at line 326 of file SceneBase.cpp.
References BIAS::SceneBase::gravityImmunity_, BIAS::SceneBase::mass_, BIAS::SceneBase::MoveScene(), BIAS::Vector3< T >::NormL2(), BIAS::Vector3< T >::ScalarProduct(), and BIAS::SceneBase::velocity_.
void SceneOpenSceneGraph::Clear | ( | ) |
Definition at line 526 of file SceneOpenSceneGraph.cpp.
References CreateStandardNodes_(), and NodeInfoMap_.
|
inlineprotectedinherited |
|
inherited |
Definition at line 42 of file SceneBase.cpp.
Referenced by BIAS::SceneBase::HasBoundingBoxCollision(), BIAS::SceneBase::RenderBoundingBox(), and BIAS::SceneBase::TimeToContact().
osg::Node * SceneOpenSceneGraph::createMirroredScene | ( | osg::Node * | model, |
const BIAS::Vector3< double > & | ul, | ||
const BIAS::Vector3< double > & | ur, | ||
const BIAS::Vector3< double > & | ll, | ||
const BIAS::Vector3< double > & | lr, | ||
const std::string & | mirrortexture, | ||
bool | cutUpperHalf | ||
) |
helper function for mirror effects, called for all subscenes
Definition at line 1317 of file SceneOpenSceneGraph.cpp.
References BIAS::Vector3< T >::Normalize().
Referenced by AddMirror().
|
protected |
Definition at line 130 of file SceneOpenSceneGraph.cpp.
References clearMask_, embedWindow_, frameStamp_, light_, lightRepresentationGeode_, lightRepresentationSwitch_, lightRepresentationVisible_, lightTransform_, rootTree_, sceneView_, SetFixedPointLight(), SetNodeVisible(), and startTick_.
|
inlineinherited |
Definition at line 341 of file Debug.hh.
Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), BIAS::MonteCarloTransform::GetSamples_(), and BIAS::MonteCarloTransform::Transform().
|
inlineinherited |
|
protected |
Definition at line 270 of file SceneOpenSceneGraph.cpp.
References rootTree_.
|
protectedvirtual |
To do anything usefull, overload this method, assume context is ready and draw.
Draw() is called from Render() only if the scene object is active (IsActive == true).
Implements BIAS::SceneBase.
Definition at line 1033 of file SceneOpenSceneGraph.cpp.
References animate_, frameStamp_, headlight_, lightTransform_, sceneView_, startTick_, and timeOffset_.
Referenced by SetAnimationTime().
|
inherited |
dump info about the scene
Definition at line 350 of file SceneBase.cpp.
References BIAS::SceneBase::ActiveChannel_, BIAS::SceneBase::camera_, BIAS::SceneBase::colorMask_, BIAS::SceneBase::elasticity_, BIAS::SceneBase::IsActive_, BIAS::SceneBase::mass_, and BIAS::SceneBase::velocity_.
|
inherited |
Definition at line 66 of file SceneBase.cpp.
Referenced by BIAS::SceneBase::HasBoundingBoxCollision(), and BIAS::SceneBase::TimeToContact().
|
inlineinherited |
Returns the active color channel.
Definition at line 132 of file SceneBase.hh.
|
inlinestaticinherited |
get time quantization for animations
Definition at line 247 of file SceneBase.hh.
|
virtual |
Returns bounding box around the whole scene.
min[out],: | minimum bounding box value |
max[out],: | maximum bounding box value |
Reimplemented from BIAS::SceneBase.
Definition at line 1134 of file SceneOpenSceneGraph.cpp.
References rootTree_.
BIAS::Vector3< double > SceneOpenSceneGraph::GetBoundingBoxCenter | ( | ) |
Returns center of bounding box around the whole scene.
Definition at line 1124 of file SceneOpenSceneGraph.cpp.
References rootTree_.
|
inlineinherited |
Definition at line 332 of file Debug.hh.
Referenced by BIAS::listenthread(), BIAS::Image< StorageType >::operator=(), and BIAS::ImageBase::operator=().
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
returns the elasticity value
Definition at line 184 of file SceneBase.hh.
|
inlinestaticinherited |
|
inlinevirtualinherited |
Get the camera as projectionparametersinterface, can be of type GLProjection of of any from GLProjectionParametersBase derived class.
Definition at line 85 of file SceneBase.hh.
Referenced by BIAS::SceneGridGround::Draw(), and RightMouseDoubleClicked().
|
inlineinherited |
is this scene accelerated by gravity ?
Definition at line 194 of file SceneBase.hh.
Referenced by BIAS::SceneBase::AnimationAndCollision().
|
inlineinherited |
get mass and velocity in m/s
Definition at line 162 of file SceneBase.hh.
|
inline |
Definition at line 192 of file SceneOpenSceneGraph.hh.
|
inlineinherited |
Get the drawing style for points.
Definition at line 100 of file SceneBase.hh.
osg::ref_ptr< osg::Node > SceneOpenSceneGraph::GetSceneRoot | ( | ) |
returns ref_ptr to root of tree
Definition at line 1167 of file SceneOpenSceneGraph.cpp.
References rootTree_.
Referenced by GetTreeDescr().
TreeDescr SceneOpenSceneGraph::GetTreeDescr | ( | ) |
Definition at line 1174 of file SceneOpenSceneGraph.cpp.
References GetSceneRoot(), NodeInfoMap_, BIAS::TreeDescr::pNodeInfoMap, and BIAS::TreeDescr::RootNode.
|
inlineinherited |
Get the drawing style for triangles.
Definition at line 106 of file SceneBase.hh.
|
virtualinherited |
check if bounding boxes of two scenes overlap
Definition at line 78 of file SceneBase.cpp.
References BIAS::SceneBase::CornersFromBoundingBox(), BIAS::SceneBase::FacesFromBoundingBox(), and BIAS::SceneBase::GetBoundingBox().
Referenced by BIAS::SceneBase::AnimationAndCollision().
void SceneOpenSceneGraph::HeadlightSwitch | ( | bool | on = true | ) |
Toggles the headlight.
Initial headlight state is on.
Definition at line 822 of file SceneOpenSceneGraph.cpp.
References headlight_.
int SceneOpenSceneGraph::Init | ( | ) |
Initializes OpenSG tree for scene appendance.
Definition at line 112 of file SceneOpenSceneGraph.cpp.
References animTime_, CreateStandardNodes_(), and initialized_.
|
inlineinherited |
Returns whether the scene is active or not.
Definition at line 127 of file SceneBase.hh.
bool SceneOpenSceneGraph::IsEditableNode | ( | osg::Node * | node | ) |
Definition at line 1253 of file SceneOpenSceneGraph.cpp.
References BIAS::OpenSceneGraphHelper::HasInfo(), BIAS::NodeInfoMap::NodeHasNodeInfo(), and NodeInfoMap_.
|
inline |
Toggle the light visible switch.
Definition at line 144 of file SceneOpenSceneGraph.hh.
bool SceneOpenSceneGraph::Load | ( | std::string | filename | ) |
Definition at line 735 of file SceneOpenSceneGraph.cpp.
References NodeInfoMap_, rootTree_, sceneView_, BIAS::FileHandling::SplitName(), BIAS::NodeInfoRestoreNameOp::targetMap, and BIAS::XMLBase::XMLRead().
|
inline |
Definition at line 161 of file SceneOpenSceneGraph.hh.
void SceneOpenSceneGraph::MakeRootShadowNode | ( | osg::ref_ptr< osg::LightSource > | lightSource | ) |
Definition at line 1282 of file SceneOpenSceneGraph.cpp.
References rootTree_.
void SceneOpenSceneGraph::MakeTransparent | ( | const double | transparency | ) |
Definition at line 975 of file SceneOpenSceneGraph.cpp.
References rootTree_, and sceneView_.
|
virtualinherited |
this moves the scene (no rotation yet)
Reimplemented in BIAS::SceneThreeDOutWrapper.
Definition at line 345 of file SceneBase.cpp.
Referenced by BIAS::SceneBase::ApplyTimeStep().
|
inlineinherited |
|
inlineinherited |
creates a new debuglevel
Definition at line 474 of file Debug.hh.
Referenced by BIAS::COSAC< SolutionType >::COSAC(), BIAS::ProjectionParametersPerspectiveDepth::Init(), BIAS::MonteCarloTransform::MonteCarloTransform(), BIAS::PMatrixEstimation::PMatrixEstimation(), BIAS::PreemptiveRANSAC< SolutionType >::PreemptiveRANSAC(), BIAS::RANSACPreKnowledge< SolutionType >::RANSACPreKnowledge(), BIAS::ROI::ROI(), BIAS::RotationAveraging::RotationAveraging(), SceneOpenSceneGraph(), BIAS::ThreeDOutOpenSceneGraph::ThreeDOutOpenSceneGraph(), BIAS::Triangulation::Triangulation(), and BIAS::UnscentedTransform::UnscentedTransform().
|
protected |
Definition at line 781 of file SceneOpenSceneGraph.cpp.
Referenced by Save().
|
inline |
Definition at line 251 of file SceneOpenSceneGraph.hh.
|
inline |
Definition at line 256 of file SceneOpenSceneGraph.hh.
|
virtualinherited |
compute momentum of each scene after collision
see http://de.wikipedia.org/wiki/Sto%C3%9F_(Physik)
contactnormal | the normal of the plane between the two objects at the moment they collide (imagine a piece of paper in between) |
Definition at line 218 of file SceneBase.cpp.
References BIAS::SceneBase::elasticity_, BIAS::SceneBase::GetBoundingBox(), BIAS::SceneBase::gravityImmunity_, BIAS::SceneBase::mass_, BIAS::Vector3< T >::Normalize(), BIAS::Vector3< T >::NormL2(), BIAS::Vector3< T >::ScalarProduct(), and BIAS::SceneBase::velocity_.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
void SceneOpenSceneGraph::RemoveSubTree | ( | osg::ref_ptr< osg::Node > & | childNode | ) |
Definition at line 558 of file SceneOpenSceneGraph.cpp.
References NodeInfoMap_, and rootTree_.
Referenced by RemoveSubTreeAndParents().
void SceneOpenSceneGraph::RemoveSubTree | ( | osg::Node * | childNode | ) |
Definition at line 667 of file SceneOpenSceneGraph.cpp.
References NodeInfoMap_, and rootTree_.
void SceneOpenSceneGraph::RemoveSubTreeAndParents | ( | osg::Node * | Node | ) |
removes the subtree and the parents except the globalroot of a given node
Definition at line 534 of file SceneOpenSceneGraph.cpp.
References RemoveSubTree(), and rootTree_.
|
virtualinherited |
this is the entry point seen from GLProjectionParametersBase.
It is called whenever redrawing is required. It checks the IsActive flag and eventually call Draw().
Definition at line 26 of file SceneBase.cpp.
References BIAS::SceneBase::colorMask_, BIAS::SceneBase::Draw(), BIAS::SceneBase::IsActive_, BIAS::SceneBase::RenderBoundingBox(), and BIAS::SceneBase::renderBoundingBox_.
Referenced by BIAS::GLProjectionParametersBase::EndDraw_().
|
virtualinherited |
render the bounding box of the scene using gl-lines
Definition at line 362 of file SceneBase.cpp.
References BIAS::SceneBase::CornersFromBoundingBox(), and BIAS::SceneBase::GetBoundingBox().
Referenced by BIAS::SceneBase::Render().
void SceneOpenSceneGraph::Reset | ( | ) |
deletes internal pointers
Definition at line 92 of file SceneOpenSceneGraph.cpp.
References animate_, clearMask_, frameNumber_, frameStamp_, headlight_, initialized_, lastPauseTime_, lightRepresentationGeode_, lightRepresentationSwitch_, lightRepresentationVisible_, lightTransform_, rootTree_, sceneView_, and timeOffset_.
Referenced by SceneOpenSceneGraph(), and ~SceneOpenSceneGraph().
|
inlinevirtualinherited |
Reset the selection, overwrite to react on calls to this function in derived classes.
Definition at line 95 of file SceneBase.hh.
bool SceneOpenSceneGraph::RightMouseDoubleClicked | ( | int | x, |
int | y | ||
) |
bool SceneOpenSceneGraph::Save | ( | std::string | filename | ) |
Definition at line 684 of file SceneOpenSceneGraph.cpp.
References NodeInfoMap_, NodePtr2IDString_(), rootTree_, BIAS::FileHandling::SplitName(), and BIAS::XMLBase::XMLWrite().
bool SceneOpenSceneGraph::SaveSubTree | ( | osg::Node * | node, |
const std::string & | fileName | ||
) |
Saves contents beginning at node into a file.
Definition at line 573 of file SceneOpenSceneGraph.cpp.
References BIAS::FileHandling::SplitName().
|
inlinevirtualinherited |
Select a scene element/primitive at position p.
Overwrite in derived class to react to selections
p | [in]: position to select object at. |
Definition at line 92 of file SceneBase.hh.
|
inlineinherited |
Set whether the scene is active or not.
Definition at line 129 of file SceneBase.hh.
|
inlineinherited |
Set a color channel active.
Definition at line 135 of file SceneBase.hh.
void SceneOpenSceneGraph::SetAnimate | ( | const bool | animate | ) |
Definition at line 829 of file SceneOpenSceneGraph.cpp.
References animate_, lastPauseTime_, startTick_, and timeOffset_.
|
inlinestaticinherited |
set time quantization for animations
Definition at line 242 of file SceneBase.hh.
void SceneOpenSceneGraph::SetAnimationTime | ( | const double | current_time, |
bool | CallDraw = true |
||
) |
setanimationtime() calls draw.
this may not be the desired behaviour in certain cases. therefore a "CallDraw" flag has been added.
Definition at line 1017 of file SceneOpenSceneGraph.cpp.
References animate_, Draw(), and frameStamp_.
|
inline |
Definition at line 224 of file SceneOpenSceneGraph.hh.
|
inlineinherited |
sets a color mask for the scene rendering
Definition at line 139 of file SceneBase.hh.
Referenced by BIAS::SceneBase::SceneBase().
|
inlineinherited |
Definition at line 318 of file Debug.hh.
Referenced by BIAS::ShowCamWxVideoSourceFactory::CreateBumbleBee(), BIAS::ShowCamWxVideoSourceFactory::CreateDCAM(), BIAS::VideoSource_MDcam::ScanBus(), BIAS::GLProjectionParametersBase::SetDebugLevel(), BIAS::VideoSource_Disk::VideoSource_Disk(), BIAS::VideoSource_DV2::VideoSource_DV2(), BIAS::VideoSource_DV::VideoSource_DV_Internal_Init_(), and BIAS::VideoSource_V4L::VideoSource_V4L().
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
set collision behaviour: 1.0=elastic, no energy is lost, >1 superelastic (requires energy from outside) <1 plastic, converts kinetic into other energy
Definition at line 179 of file SceneBase.hh.
void SceneOpenSceneGraph::SetFixedDirectionalLight | ( | bool | on, |
BIAS::Vector3< double > | dirDirectionalLight | ||
) |
Definition at line 815 of file SceneOpenSceneGraph.cpp.
void SceneOpenSceneGraph::SetFixedPointLight | ( | bool | on, |
BIAS::Vector3< double > | posPointLight | ||
) |
Removes the camera as a beacon for the lights and sets a fixed position for Point Light or fixed direction for Directional Light.
Definition at line 791 of file SceneOpenSceneGraph.cpp.
References headlight_, light_, and lightTransform_.
Referenced by CreateStandardNodes_().
|
inlinestaticinherited |
|
inlinevirtualinherited |
Set the camera as projectionparametersinterface, can be of type GLProjection of of any from GLProjectionParametersBase derived class.
Definition at line 80 of file SceneBase.hh.
Referenced by BIAS::View::AppendScene(), BIAS::RenderContextBase::AppendScene(), and BIAS::View::InsertSceneAt().
|
inlineinherited |
set behaviour with respect to gravity
Definition at line 189 of file SceneBase.hh.
|
inlineinherited |
set mass and velocity in m/s
Definition at line 168 of file SceneBase.hh.
void SceneOpenSceneGraph::SetNodeMarkerID | ( | osg::Node * | node, |
const unsigned long long & | id | ||
) |
Definition at line 1196 of file SceneOpenSceneGraph.cpp.
References BIAS::OpenSceneGraphHelper::AddOrSetInfo(), and NodeInfoMap_.
void SceneOpenSceneGraph::SetNodeOccluder | ( | osg::Node * | node, |
const bool | state | ||
) |
Definition at line 1206 of file SceneOpenSceneGraph.cpp.
References BIAS::OpenSceneGraphHelper::AddOrSetInfo(), and NodeInfoMap_.
Referenced by AppendSubTree(), AppendSubTreeFromImageFile(), and AppendSubTreeSwitch().
void SceneOpenSceneGraph::SetNodeVisible | ( | osg::Node * | node, |
const bool | visible | ||
) |
sets node visbility in guis like treectrlopensgwx this changes only the nodeinfomap and has no effect on the rendering of the node.
if you want to toggle the rendering of nodes use open scene graph methods e.g. node switches.
Definition at line 1184 of file SceneOpenSceneGraph.cpp.
References BIAS::OpenSceneGraphHelper::AddOrSetInfo(), and NodeInfoMap_.
Referenced by AppendSubTreeFromFile(), AppendSubTreeFromImageFile(), AppendSubTreeSwitch(), and CreateStandardNodes_().
|
inlineinherited |
Set the drawing style for points.
Definition at line 98 of file SceneBase.hh.
|
inlinevirtualinherited |
Set whether to render the boundign box or not.
Definition at line 109 of file SceneBase.hh.
|
inlineinherited |
Set the drawing style for triangles.
Definition at line 103 of file SceneBase.hh.
|
inlineinherited |
|
inline |
Definition at line 235 of file SceneOpenSceneGraph.hh.
|
inline |
Definition at line 244 of file SceneOpenSceneGraph.hh.
|
virtualinherited |
compute time to contact of bounding boxes
Definition at line 118 of file SceneBase.cpp.
References BIAS::SceneBase::CornersFromBoundingBox(), BIAS::SceneBase::FacesFromBoundingBox(), BIAS::SceneBase::GetBoundingBox(), BIAS::Vector3< T >::ScalarProduct(), and BIAS::SceneBase::velocity_.
|
inlinevirtualinherited |
Method is called by GLProjection if its params have changed.
The method should then take necassary steps for adapting the rendering state. Needed information should then be fetched through the camera_ pointer. This method is only called if the abstract set of parameters has changed, say the parameters that are also contained in BIAS::Projection
Definition at line 119 of file SceneBase.hh.
|
protected |
Definition at line 279 of file SceneOpenSceneGraph.cpp.
References lightRepresentationGeode_, lightRepresentationSwitch_, and lightRepresentationVisible_.
|
inline |
Definition at line 229 of file SceneOpenSceneGraph.hh.
|
protectedinherited |
Definition at line 510 of file Debug.hh.
Referenced by BIAS::Debug::operator=(), and BIAS::ImageBase::operator=().
|
protectedinherited |
new concept, debuglevel are managed here in the debug class
Definition at line 516 of file Debug.hh.
Referenced by BIAS::Debug::operator=().
|
protectedinherited |
Definition at line 517 of file Debug.hh.
Referenced by BIAS::Debug::operator=().
|
staticprotectedinherited |
Definition at line 511 of file Debug.hh.
Referenced by BIAS::Debug::operator=().
|
protectedinherited |
Definition at line 265 of file SceneBase.hh.
Referenced by BIAS::SceneBase::DumpInfo().
|
protected |
Definition at line 279 of file SceneOpenSceneGraph.hh.
Referenced by Draw(), Reset(), SetAnimate(), and SetAnimationTime().
|
protected |
Definition at line 281 of file SceneOpenSceneGraph.hh.
Referenced by AppendSubTreeFromFile().
|
staticprotectedinherited |
how long does a single step in time take for animations ?
Definition at line 254 of file SceneBase.hh.
Referenced by BIAS::SceneBase::AnimationAndCollision().
|
protected |
Definition at line 282 of file SceneOpenSceneGraph.hh.
Referenced by Init().
|
protectedinherited |
Definition at line 266 of file SceneBase.hh.
Referenced by BIAS::SceneBase::DumpInfo().
|
protected |
Definition at line 297 of file SceneOpenSceneGraph.hh.
Referenced by CreateStandardNodes_(), and Reset().
|
protectedinherited |
Definition at line 267 of file SceneBase.hh.
Referenced by BIAS::SceneBase::DumpInfo(), and BIAS::SceneBase::Render().
|
protectedinherited |
Definition at line 260 of file SceneBase.hh.
Referenced by BIAS::SceneBase::SceneBase().
|
protectedinherited |
Definition at line 261 of file SceneBase.hh.
Referenced by BIAS::SceneBase::SceneBase().
|
protectedinherited |
the more elastic the less enegry is lost in collisions
Definition at line 276 of file SceneBase.hh.
Referenced by BIAS::SceneBase::DumpInfo(), BIAS::SceneBase::PerformCollision(), and BIAS::SceneBase::SceneBase().
|
protected |
Definition at line 264 of file SceneOpenSceneGraph.hh.
Referenced by CreateStandardNodes_().
|
protected |
Definition at line 275 of file SceneOpenSceneGraph.hh.
Referenced by Reset().
|
protected |
Definition at line 272 of file SceneOpenSceneGraph.hh.
Referenced by CreateStandardNodes_(), Draw(), Reset(), and SetAnimationTime().
|
staticprotectedinherited |
|
protectedinherited |
if true, scene is not accelerated by gravity
Definition at line 274 of file SceneBase.hh.
Referenced by BIAS::SceneBase::ApplyTimeStep(), BIAS::SceneBase::PerformCollision(), and BIAS::SceneBase::SceneBase().
|
protected |
Definition at line 261 of file SceneOpenSceneGraph.hh.
Referenced by AppendSubTreeFromFile().
|
protected |
Definition at line 277 of file SceneOpenSceneGraph.hh.
Referenced by Draw(), HeadlightSwitch(), Reset(), and SetFixedPointLight().
|
protected |
Definition at line 262 of file SceneOpenSceneGraph.hh.
Referenced by Init(), Reset(), and ~SceneOpenSceneGraph().
|
protectedinherited |
Definition at line 263 of file SceneBase.hh.
Referenced by BIAS::SceneBase::DumpInfo(), and BIAS::SceneBase::Render().
|
protected |
Time when the animation was paused for the last time.
Definition at line 274 of file SceneOpenSceneGraph.hh.
Referenced by Reset(), and SetAnimate().
|
protected |
Definition at line 269 of file SceneOpenSceneGraph.hh.
Referenced by CreateStandardNodes_(), and SetFixedPointLight().
|
protected |
Definition at line 268 of file SceneOpenSceneGraph.hh.
Referenced by CreateStandardNodes_(), Reset(), and UpdateLightRepresentation_().
|
protected |
Definition at line 267 of file SceneOpenSceneGraph.hh.
Referenced by CreateStandardNodes_(), Reset(), and UpdateLightRepresentation_().
|
protected |
Definition at line 278 of file SceneOpenSceneGraph.hh.
Referenced by CreateStandardNodes_(), Reset(), and UpdateLightRepresentation_().
|
protected |
Definition at line 266 of file SceneOpenSceneGraph.hh.
Referenced by CreateStandardNodes_(), Draw(), Reset(), and SetFixedPointLight().
|
protectedinherited |
for collision:
Definition at line 270 of file SceneBase.hh.
Referenced by BIAS::SceneBase::ApplyTimeStep(), BIAS::SceneBase::DumpInfo(), BIAS::SceneBase::PerformCollision(), and BIAS::SceneBase::SceneBase().
|
protected |
Definition at line 291 of file SceneOpenSceneGraph.hh.
Referenced by AppendSubTreeFromFile(), AppendSubTreeFromImageFile(), AppendSubTreeSwitch(), Clear(), GetTreeDescr(), IsEditableNode(), Load(), RemoveSubTree(), Save(), SetNodeMarkerID(), SetNodeOccluder(), and SetNodeVisible().
|
protectedinherited |
show the bounding box ?
Definition at line 278 of file SceneBase.hh.
Referenced by BIAS::SceneBase::Render(), and BIAS::SceneBase::SceneBase().
|
protected |
Definition at line 265 of file SceneOpenSceneGraph.hh.
Referenced by AddMirror(), AddParticles(), AppendSubTree(), AppendSubTreeFromFile(), AppendSubTreeFromImageFile(), AppendSubTreeSwitch(), CreateStandardNodes_(), DisableZWriteForTransparentNodes_(), GetBoundingBox(), GetBoundingBoxCenter(), GetSceneRoot(), Load(), MakeRootShadowNode(), MakeTransparent(), RemoveSubTree(), RemoveSubTreeAndParents(), Reset(), and Save().
|
protected |
Definition at line 263 of file SceneOpenSceneGraph.hh.
Referenced by CreateStandardNodes_(), Draw(), Load(), MakeTransparent(), and Reset().
|
protected |
Definition at line 271 of file SceneOpenSceneGraph.hh.
Referenced by CreateStandardNodes_(), Draw(), and SetAnimate().
|
protected |
Time offset because of time "pauses".
Definition at line 273 of file SceneOpenSceneGraph.hh.
Referenced by Draw(), Reset(), and SetAnimate().
|
protected |
Definition at line 270 of file SceneOpenSceneGraph.hh.
|
protectedinherited |
scene velocity in m/s
Definition at line 272 of file SceneBase.hh.
Referenced by BIAS::SceneBase::ApplyTimeStep(), BIAS::SceneBase::DumpInfo(), BIAS::SceneBase::PerformCollision(), and BIAS::SceneBase::TimeToContact().