UNIVERS
15.3
UNIVERS base processing software API
Main Page
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
include
rbm
u3d_grid_cell.hpp
1
/* u3d_grid_cell.hpp */
2
/* $Id: u3d_grid_cell.hpp,v 1.1 2008/05/13 12:19:18 sad Exp $ */
3
4
/***********************************************************************
5
* UNIVERS subpart
6
* (C)opyright GEOVERS LTD, 2004
7
* All rights reserved
8
***********************************************************************/
9
10
//#include <vector>
11
12
#include <mth/u3d_box.hpp>
13
14
#ifndef __u3d_grid_cell_hpp
15
#define __u3d_grid_cell_hpp
16
17
//const int U3D_MAX_CELL_TRIANGLES = 20;
18
20
struct
U3dDivCell
21
{
22
int
s_idBody1
;
23
int
s_idBody2
;
24
int
s_idBound
;
25
unsigned
char
s_nTriangles
;
27
std::vector<int>
s_idTriangles
;
28
};
29
30
32
struct
U3dGridCell
33
{
34
unsigned
m_ID;
35
37
U3dBox
m_Box
;
38
39
//U3dCellId m_cellId;
41
unsigned
char
m_numBodies
;
42
44
unsigned
char
m_Depth
;
45
47
U3dGridCell
*
m_Parent
;
48
50
int
m_surfaceId
;
51
53
int
m_startPointBodyId
;
54
56
union
content
{
58
U3dGridCell
*
c_Childs
[8];
62
int
c_idBody
;
65
U3dDivCell
*
c_b2
;
66
69
} m_cellContent;
70
71
U3dGridCell
(
unsigned
cellId,
unsigned
char
bodiesNum,
unsigned
char
depth,
U3dGridCell
* parent,
int
surfId,
int
stPBodyId,
int
bodyId) :
72
m_ID(cellId),
73
m_numBodies
(bodiesNum),
74
m_Depth
(depth),
75
m_Parent
(parent),
76
m_surfaceId
(surfId),
77
m_startPointBodyId
(stPBodyId)
78
{ m_cellContent.
c_idBody
= bodyId; }
79
80
~
U3dGridCell
()
81
{
82
if
(0==
m_numBodies
) {
83
for
(
unsigned
char
i=0; i<8; ++i)
84
delete
m_cellContent.
c_Childs
[i];
85
}
86
if
(
m_numBodies
>1)
delete
m_cellContent.
c_b2
;
87
}
88
};
89
90
typedef
std::vector<U3dGridCell*> U3dGridCellsArray;
91
92
#endif
/* u3d_grid_cell.hpp */
93
94
95
U3dDivCell::s_idBody1
int s_idBody1
Definition:
u3d_grid_cell.hpp:22
U3dGridCell::m_Box
U3dBox m_Box
Definition:
u3d_grid_cell.hpp:37
U3dDivCell::s_nTriangles
unsigned char s_nTriangles
Definition:
u3d_grid_cell.hpp:25
U3dDivCell
Definition:
u3d_grid_cell.hpp:20
U3dGridCell::m_numBodies
unsigned char m_numBodies
Definition:
u3d_grid_cell.hpp:41
U3dGridCell::content::c_Childs
U3dGridCell * c_Childs[8]
Definition:
u3d_grid_cell.hpp:58
U3dDivCell::s_idBound
int s_idBound
Definition:
u3d_grid_cell.hpp:24
U3dBox
Definition:
u3d_box.hpp:24
U3dGridCell::content::c_idBody
int c_idBody
Definition:
u3d_grid_cell.hpp:62
U3dGridCell::m_surfaceId
int m_surfaceId
Definition:
u3d_grid_cell.hpp:50
U3dGridCell::m_Depth
unsigned char m_Depth
Definition:
u3d_grid_cell.hpp:44
U3dGridCell::m_Parent
U3dGridCell * m_Parent
Definition:
u3d_grid_cell.hpp:47
U3dDivCell::s_idBody2
int s_idBody2
Definition:
u3d_grid_cell.hpp:23
U3dGridCell::content::c_b2
U3dDivCell * c_b2
Definition:
u3d_grid_cell.hpp:65
U3dDivCell::s_idTriangles
std::vector< int > s_idTriangles
Definition:
u3d_grid_cell.hpp:27
U3dGridCell::content
Definition:
u3d_grid_cell.hpp:56
U3dGridCell::m_startPointBodyId
int m_startPointBodyId
Definition:
u3d_grid_cell.hpp:53
U3dGridCell
Definition:
u3d_grid_cell.hpp:32
Generated by
1.8.5