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
vel3dmod
u3d_grid_cell.hpp
1
/* u3d_grid_cell.hpp */
2
/* $Id: u3d_grid_cell.hpp,v 1.10 2008/03/31 07:58:19 guser1 Exp $ */
3
4
/***********************************************************************
5
* UNIVERS subpart
6
* (C)opyright GEOVERS LTD, 2004
7
* All rights reserved
8
***********************************************************************/
9
10
//#include <vector>
11
12
#include <u3d_defines.hpp>
13
#include <u3d_box.hpp>
14
15
#ifndef __u3d_grid_cell_hpp
16
#define __u3d_grid_cell_hpp
17
18
//const int U3D_MAX_CELL_TRIANGLES = 20;
19
21
struct
U3dDivCell
22
{
23
int
s_idBody1
;
24
int
s_idBody2
;
25
int
s_idBound
;
26
unsigned
char
s_nTriangles
;
28
std::vector<int>
s_idTriangles
;
29
};
30
31
33
struct
U3dGridCell
34
{
35
unsigned
m_ID;
36
38
U3dBox
m_Box
;
39
40
//U3dCellId m_cellId;
42
unsigned
char
m_numBodies
;
43
45
unsigned
char
m_Depth
;
46
48
U3dGridCell
*
m_Parent
;
49
51
int
m_surfaceId
;
52
54
int
m_startPointBodyId
;
55
57
union
content {
59
U3dGridCell
*
c_Childs
[8];
63
int
c_idBody
;
66
U3dDivCell
*
c_b2
;
67
70
} m_cellContent;
71
72
U3dGridCell
(
unsigned
cellId,
unsigned
char
bodiesNum,
unsigned
char
depth,
U3dGridCell
* parent,
int
surfId,
int
stPBodyId,
int
bodyId) :
73
m_ID(cellId),
74
m_numBodies
(bodiesNum),
75
m_Depth
(depth),
76
m_Parent
(parent),
77
m_surfaceId
(surfId),
78
m_startPointBodyId
(stPBodyId)
79
{ m_cellContent.
c_idBody
= bodyId; }
80
81
~
U3dGridCell
()
82
{
83
if
(0==
m_numBodies
) {
84
for
(
unsigned
char
i=0; i<8; ++i)
85
delete
m_cellContent.
c_Childs
[i];
86
}
87
if
(
m_numBodies
>1)
delete
m_cellContent.
c_b2
;
88
}
89
};
90
91
typedef
safe_vector<U3dGridCell*>
U3dGridCellsArray;
92
93
//#define PtrType U3dGridCell*
94
//#define PtrAr U3dGridCellsArray
95
//#include <mix/PtrAr.H> // generates class dbContextAr
96
97
#endif
/* u3d_grid_cell.hpp */
98
99
100
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::m_startPointBodyId
int m_startPointBodyId
Definition:
u3d_grid_cell.hpp:53
U3dGridCell
Definition:
u3d_grid_cell.hpp:32
safe_vector
Definition:
u3d_defines.hpp:188
Generated by
1.8.5