/Source/Base/FieldContainer/Node/OSGNodeCore.cpp

https://github.com/baibaiwei/OpenSGDevMaster · C++ · 167 lines · 75 code · 34 blank · 58 comment · 6 complexity · 413001e211e21130097467339ae0a833 MD5 · raw file

  1. /*---------------------------------------------------------------------------*\
  2. * OpenSG *
  3. * *
  4. * *
  5. * Copyright (C) 2000-2006 by the OpenSG Forum *
  6. * *
  7. * www.opensg.org *
  8. * *
  9. * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
  10. * *
  11. \*---------------------------------------------------------------------------*/
  12. /*---------------------------------------------------------------------------*\
  13. * License *
  14. * *
  15. * This library is free software; you can redistribute it and/or modify it *
  16. * under the terms of the GNU Library General Public License as published *
  17. * by the Free Software Foundation, version 2. *
  18. * *
  19. * This library is distributed in the hope that it will be useful, but *
  20. * WITHOUT ANY WARRANTY; without even the implied warranty of *
  21. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
  22. * Library General Public License for more details. *
  23. * *
  24. * You should have received a copy of the GNU Library General Public *
  25. * License along with this library; if not, write to the Free Software *
  26. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
  27. * *
  28. \*---------------------------------------------------------------------------*/
  29. /*---------------------------------------------------------------------------*\
  30. * Changes *
  31. * *
  32. * *
  33. * *
  34. * *
  35. * *
  36. * *
  37. \*---------------------------------------------------------------------------*/
  38. //---------------------------------------------------------------------------
  39. // Includes
  40. //---------------------------------------------------------------------------
  41. #include <cstdlib>
  42. #include <cstdio>
  43. #include "OSGConfig.h"
  44. #include "OSGNodeCore.h"
  45. OSG_BEGIN_NAMESPACE
  46. // Documentation for this class is emitted in the
  47. // OSGNodeCoreBase.cpp file.
  48. // To modify it, please change the .fcd file (OSGNodeCore.fcd) and
  49. // regenerate the base file.
  50. /***************************************************************************\
  51. * Class variables *
  52. \***************************************************************************/
  53. /***************************************************************************\
  54. * Class methods *
  55. \***************************************************************************/
  56. void NodeCore::initMethod(InitPhase ePhase)
  57. {
  58. Inherited::initMethod(ePhase);
  59. if(ePhase == TypeObject::SystemPost)
  60. {
  61. }
  62. }
  63. /***************************************************************************\
  64. * Instance methods *
  65. \***************************************************************************/
  66. /*-------------------------------------------------------------------------*\
  67. - private -
  68. \*-------------------------------------------------------------------------*/
  69. /*----------------------- constructors & destructors ----------------------*/
  70. NodeCore::NodeCore(void) :
  71. Inherited()
  72. {
  73. }
  74. NodeCore::NodeCore(const NodeCore &source) :
  75. Inherited(source)
  76. {
  77. }
  78. NodeCore::~NodeCore(void)
  79. {
  80. }
  81. /*----------------------------- class specific ----------------------------*/
  82. void NodeCore::accumulateMatrix(Matrix &result)
  83. {
  84. }
  85. void NodeCore::adjustVolume(Volume &volume)
  86. {
  87. }
  88. void NodeCore::invalidateVolume(void)
  89. {
  90. MFParentsType::const_iterator pIt = _mfParents.begin();
  91. MFParentsType::const_iterator pEnd = _mfParents.end ();
  92. for(; pIt != pEnd; ++pIt)
  93. (*pIt)->invalidateVolume();
  94. }
  95. void NodeCore::changed(ConstFieldMaskArg whichField,
  96. UInt32 origin,
  97. BitVector details)
  98. {
  99. Inherited::changed(whichField, origin, details);
  100. }
  101. void NodeCore::dump( UInt32 uiIndent,
  102. const BitVector bvFlags ) const
  103. {
  104. indentLog(uiIndent, PLOG);
  105. PLOG << "Core"
  106. << "("
  107. << std::dec
  108. << this->getId()
  109. << ") : "
  110. << getType().getName()
  111. << " "
  112. << this
  113. << std::endl;
  114. indentLog(uiIndent, PLOG);
  115. PLOG << "[" << std::endl;
  116. indentLog(uiIndent + 4, PLOG);
  117. PLOG << "Parents : " << std::endl;
  118. MFParentsType::const_iterator pIt = _mfParents.begin();
  119. MFParentsType::const_iterator pEnd = _mfParents.end ();
  120. for(UInt32 i = 0; pIt != pEnd; ++pIt)
  121. {
  122. indentLog(uiIndent + 4, PLOG);
  123. PLOG << " " << i << ") " << *pIt << std::endl;
  124. }
  125. Inherited::dump(uiIndent + 4, bvFlags);
  126. indentLog(uiIndent, PLOG);
  127. PLOG << "]" << std::endl;
  128. indentLog(uiIndent, PLOG);
  129. PLOG << "{" << std::endl;
  130. indentLog(uiIndent, PLOG);
  131. PLOG << "}" << std::endl;
  132. }
  133. OSG_END_NAMESPACE