Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/lib/collision_detection/obb_tree_node.cc @ 4542

Last change on this file since 4542 was 4542, checked in by patrick, 19 years ago

some more structural work and start of spawn tree function

File size: 1.8 KB
Line 
1/*
2   orxonox - the future of 3D-vertical-scrollers
3
4   Copyright (C) 2004 orx
5
6   This program is free software; you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by
8   the Free Software Foundation; either version 2, or (at your option)
9   any later version.
10
11   ### File Specific:
12   main-programmer: Patrick Boenzli
13   co-programmer: ...
14*/
15
16#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_COLLISION
17
18#include "obb_tree_node.h"
19#include "list.h"
20#include "obb.h"
21
22using namespace std;
23
24
25/**
26   \brief standard constructor
27*/
28OBBTreeNode::OBBTreeNode () 
29{
30   this->setClassID(CL_OBB_TREE_NODE, "OBBTreeNode"); 
31
32}
33
34
35/**
36   \brief standard deconstructor
37
38*/
39OBBTreeNode::~OBBTreeNode () 
40{
41  // delete what has to be deleted here
42}
43
44
45
46/**
47   \brief creates a new BVTree or BVTree partition
48   \param depth: the depth of the tree
49   \param verticesList: the list of vertices of the object - each vertices triple is interpreted as a triangle
50*/
51void OBBTreeNode::spawnBVTree(const int depth, tList<sVec3D> *verticesList)
52{
53  float     area[verticesList->getSize()];           //!< surface area of the i'th triangle of the convex hull
54  float     areaTotal;                               //!< surface area of the entire convex hull
55  float     centroid[verticesList->getSize()];       //!< centroid of the i'th convex hull 
56  OBB*      obb = new OBB();                         //!< the new obb to add
57
58  /* fist compute all the convex hull particles */
59  for(int i = 0; i < verticesList->getSize(); ++i)
60    {
61     
62    }
63}
64
65
66void OBBTreeNode::collideWith(const BVTree &tree)
67{}
68
69
70void OBBTreeNode::drawBV(int currentDepth, const int depth) const
71{}
72
73
74void OBBTreeNode::drawBVPolygon(int currentDepth, const int depth) const
75{}
76
77
78void OBBTreeNode::drawBVBlended(int currentDepth, const int depth) const
79{}
Note: See TracBrowser for help on using the repository browser.