Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5431 in orxonox.OLD for trunk/src


Ignore:
Timestamp:
Oct 24, 2005, 11:54:17 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: changed the static values back

Location:
trunk/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/collision_detection/obb_tree.h

    r5039 r5431  
    3636    Material* getTransparentMaterial(unsigned int depth) { return this->transparentMaterial[depth%5]; }
    3737    Material* getCollisionMaterial() { return this->collisionMaterial; }
     38
    3839    int getID() { return ++this->id;}
    3940    inline OBBTreeNode* getRootNode() { return this->rootNode; }
  • trunk/src/lib/collision_detection/obb_tree_node.cc

    r5430 r5431  
    2929
    3030#include "lin_alg.h"
    31 
     31#include "glincl.h"
    3232
    3333
     
    3737OBBTree*  OBBTreeNode::obbTree = NULL;
    3838
    39 float**  OBBTreeNode_coMat = NULL;
    40 float**  OBBTreeNode_eigvMat = NULL;
    41 float*   OBBTreeNode_eigvlMat = NULL;
    42 int*     OBBTreeNode_rotCount = NULL;
     39float**  OBBTreeNode::coMat = NULL;
     40float**  OBBTreeNode::eigvMat = NULL;
     41float*   OBBTreeNode::eigvlMat = NULL;
     42int*     OBBTreeNode::rotCount = NULL;
    4343GLUquadricObj* OBBTreeNode_sphereObj = NULL;
    4444
     
    5353  this->bvElement = NULL;
    5454
    55   if(OBBTreeNode_coMat == NULL)
    56   {
    57     OBBTreeNode_coMat = new float*[4];
     55  if(OBBTreeNode::coMat == NULL)
     56  {
     57    OBBTreeNode::coMat = new float*[4];
    5858    for(int i = 0; i < 4; i++)
    59       OBBTreeNode_coMat[i] = new float[4];
    60   }
    61   if(OBBTreeNode_eigvMat == NULL)
    62   {
    63     OBBTreeNode_eigvMat = new float*[4];
     59      OBBTreeNode::coMat[i] = new float[4];
     60  }
     61  if(OBBTreeNode::eigvMat == NULL)
     62  {
     63    OBBTreeNode::eigvMat = new float*[4];
    6464    for(int i = 0; i < 4; i++)
    65       OBBTreeNode_eigvMat[i] = new float[4];
    66   }
    67   if( OBBTreeNode_eigvlMat == NULL)
    68   {
    69     OBBTreeNode_eigvlMat = new float[4];
    70   }
    71   if( OBBTreeNode_rotCount == NULL)
    72     OBBTreeNode_rotCount = new int;
     65      OBBTreeNode::eigvMat[i] = new float[4];
     66  }
     67  if( OBBTreeNode::eigvlMat == NULL)
     68  {
     69    OBBTreeNode::eigvlMat = new float[4];
     70  }
     71  if( OBBTreeNode::rotCount == NULL)
     72    OBBTreeNode::rotCount = new int;
    7373
    7474  if (OBBTreeNode_sphereObj == NULL)
     
    360360  Vector*              axis = new Vector[3];                //!< the references to the obb axis
    361361
    362   OBBTreeNode_coMat[1][1] = box->covarianceMatrix[0][0]; OBBTreeNode_coMat[1][2] = box->covarianceMatrix[0][1]; OBBTreeNode_coMat[1][3] = box->covarianceMatrix[0][2];
    363   OBBTreeNode_coMat[2][1] = box->covarianceMatrix[1][0]; OBBTreeNode_coMat[2][2] = box->covarianceMatrix[1][1]; OBBTreeNode_coMat[2][3] = box->covarianceMatrix[1][2];
    364   OBBTreeNode_coMat[3][1] = box->covarianceMatrix[2][0]; OBBTreeNode_coMat[3][2] = box->covarianceMatrix[2][1]; OBBTreeNode_coMat[3][3] = box->covarianceMatrix[2][2];
     362  OBBTreeNode::coMat[1][1] = box->covarianceMatrix[0][0]; OBBTreeNode::coMat[1][2] = box->covarianceMatrix[0][1]; OBBTreeNode::coMat[1][3] = box->covarianceMatrix[0][2];
     363  OBBTreeNode::coMat[2][1] = box->covarianceMatrix[1][0]; OBBTreeNode::coMat[2][2] = box->covarianceMatrix[1][1]; OBBTreeNode::coMat[2][3] = box->covarianceMatrix[1][2];
     364  OBBTreeNode::coMat[3][1] = box->covarianceMatrix[2][0]; OBBTreeNode::coMat[3][2] = box->covarianceMatrix[2][1]; OBBTreeNode::coMat[3][3] = box->covarianceMatrix[2][2];
    365365
    366366//   OBBTreeNode::coMat[0][0] = box->covarianceMatrix[0][0];
     
    378378
    379379  /* new jacobi tests */
    380   JacobI(OBBTreeNode_coMat, 3, OBBTreeNode_eigvlMat, OBBTreeNode_eigvMat, OBBTreeNode_rotCount);
     380  JacobI(OBBTreeNode::coMat, 3, OBBTreeNode::eigvlMat, OBBTreeNode::eigvMat, OBBTreeNode::rotCount);
    381381  PRINTF(3)("-- Done Jacobi Decomposition\n");
    382382
     
    388388//     for(int k = 1; k < 4; ++k)
    389389//     {
    390 //       PRINTF(3)(" \b%f ", OBBTreeNode_OBBTreeNode_eigvMat[j][k]);
     390//       PRINTF(3)(" \b%f ", OBBTreeNode::OBBTreeNode::eigvMat[j][k]);
    391391//     }
    392392//     PRINTF(3)(" |\n");
    393393//   }
    394394
    395   axis[0].x = OBBTreeNode_eigvMat[1][1]; axis[0].y = OBBTreeNode_eigvMat[2][1]; axis[0].z = OBBTreeNode_eigvMat[3][1];
    396   axis[1].x = OBBTreeNode_eigvMat[1][2]; axis[1].y = OBBTreeNode_eigvMat[2][2]; axis[1].z = OBBTreeNode_eigvMat[3][2];
    397   axis[2].x = OBBTreeNode_eigvMat[1][3]; axis[2].y = OBBTreeNode_eigvMat[2][3]; axis[2].z = OBBTreeNode_eigvMat[3][3];
     395  axis[0].x = OBBTreeNode::eigvMat[1][1]; axis[0].y = OBBTreeNode::eigvMat[2][1]; axis[0].z = OBBTreeNode::eigvMat[3][1];
     396  axis[1].x = OBBTreeNode::eigvMat[1][2]; axis[1].y = OBBTreeNode::eigvMat[2][2]; axis[1].z = OBBTreeNode::eigvMat[3][2];
     397  axis[2].x = OBBTreeNode::eigvMat[1][3]; axis[2].y = OBBTreeNode::eigvMat[2][3]; axis[2].z = OBBTreeNode::eigvMat[3][3];
    398398  axis[0].normalize();
    399399  axis[1].normalize();
  • trunk/src/lib/collision_detection/obb_tree_node.h

    r5430 r5431  
    88#define _OBB_TREE_NODE_H
    99
    10 #include "glincl.h"
    1110#include "bv_tree_node.h"
    1211
     
    6968    int                 tmpLen1;                    //!< len vert data obbox1
    7069    int                 tmpLen2;                    //!< len vert data obbox2
     70
     71    static float**      coMat;
     72    static float**      eigvMat;
     73    static float*       eigvlMat;
     74    static int*         rotCount;
    7175};
    7276
  • trunk/src/world_entities/world_entity.cc

    r5428 r5431  
    213213
    214214
    215 void WorldEntity::drawBVTree(int depth, int drawMode)
     215void WorldEntity::drawBVTree(unsigned int depth, int drawMode)
    216216{
    217217  glMatrixMode(GL_MODELVIEW);
  • trunk/src/world_entities/world_entity.h

    r5356 r5431  
    5959  virtual void tick (float time);
    6060  virtual void draw ();
    61   void drawBVTree(int depth, int drawMode);
     61  void drawBVTree(unsigned int depth, int drawMode);
    6262
    6363 protected:
Note: See TracChangeset for help on using the changeset viewer.