Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 27, 2009, 4:11:31 PM (16 years ago)
Author:
landauf
Message:

merged map branch back to trunk

Location:
code/trunk
Files:
2 edited
4 copied

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/tools/CMakeLists.txt

    r2896 r3089  
    88  Timer.cc
    99  WindowEventListener.cc
     10  DynamicLines.cpp
     11  DynamicRenderable.cpp
    1012)
  • code/trunk/src/orxonox/tools/DynamicLines.cpp

    • Property svn:eol-style set to native
    r3087 r3089  
    66using namespace Ogre;
    77
     8namespace orxonox
     9{
    810enum {
    911  POSITION_BINDING,
     
    8183  prepareHardwareBuffers(size,0);
    8284
    83   if (!size) { 
     85  if (!size) {
    8486    mBox.setExtents(Vector3::ZERO,Vector3::ZERO);
    8587    mDirty=false;
    8688    return;
    8789  }
    88  
     90
    8991  Vector3 vaabMin = mPoints[0];
    9092  Vector3 vaabMax = mPoints[0];
     
    141143}
    142144*/
     145}
  • code/trunk/src/orxonox/tools/DynamicLines.h

    • Property svn:eol-style set to native
    r3087 r3089  
    55#include <vector>
    66
    7 
     7namespace orxonox
     8{
    89class DynamicLines : public DynamicRenderable
    910{
     
    3637  void clear();
    3738
    38   /// Call this to update the hardware buffer after making changes. 
     39  /// Call this to update the hardware buffer after making changes.
    3940  void update();
    4041
    4142  /** Set the type of operation to draw with.
    42    * @param opType Can be one of 
     43   * @param opType Can be one of
    4344   *    - RenderOperation::OT_LINE_STRIP
    4445   *    - RenderOperation::OT_LINE_LIST
     
    6263  bool mDirty;
    6364};
    64 
     65}
    6566
    6667#endif
  • code/trunk/src/orxonox/tools/DynamicRenderable.cpp

    • Property svn:eol-style set to native
    r3087 r3089  
    55using namespace Ogre;
    66
     7namespace orxonox
     8{
    79DynamicRenderable::DynamicRenderable()
    810{
     
    3335}
    3436
    35 void DynamicRenderable::prepareHardwareBuffers(size_t vertexCount, 
     37void DynamicRenderable::prepareHardwareBuffers(size_t vertexCount,
    3638                                               size_t indexCount)
    3739{
     
    5759      newVertCapacity >>= 1;
    5860  }
    59   if (newVertCapacity != mVertexBufferCapacity) 
     61  if (newVertCapacity != mVertexBufferCapacity)
    6062  {
    6163    mVertexBufferCapacity = newVertCapacity;
     
    9496
    9597    }
    96     else if (indexCount < newIndexCapacity>>1) 
     98    else if (indexCount < newIndexCapacity>>1)
    9799    {
    98100      // Make capacity the previous power of two
     
    132134   return vDist.squaredLength();
    133135}
     136}
  • code/trunk/src/orxonox/tools/DynamicRenderable.h

    • Property svn:eol-style set to native
    r3087 r3089  
    44#include <OgreSimpleRenderable.h>
    55
     6namespace orxonox
     7{
    68/// Abstract base class providing mechanisms for dynamically growing hardware buffers.
    79class DynamicRenderable : public Ogre::SimpleRenderable
     
    6668  virtual void fillHardwareBuffers() = 0;
    6769};
     70}
    6871
    6972#endif // DYNAMIC_RENDERABLE_H
Note: See TracChangeset for help on using the changeset viewer.