Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
OPC_HybridModel.h
Go to the documentation of this file.
1
/*
3
* OPCODE - Optimized Collision Detection
4
* Copyright (C) 2001 Pierre Terdiman
5
* Homepage: http://www.codercorner.com/Opcode.htm
6
*/
8
10
16
19
// Include Guard
20
#ifndef __OPC_HYBRIDMODEL_H__
21
#define __OPC_HYBRIDMODEL_H__
22
24
struct
LeafTriangles
25
{
26
udword
Data
;
27
29
33
inline_
udword
GetNbTriangles
()
const
{
return
(
Data
& 15)+1; }
35
37
41
inline_
udword
GetTriangleIndex
()
const
{
return
Data
>>4; }
43
inline_
void
SetData
(
udword
nb,
udword
index
) {
OPASSERT
(nb>0 && nb<=16); nb--;
Data
= (index<<4)|(nb&15); }
44
};
45
46
class
OPCODE_API
HybridModel
:
public
BaseModel
47
{
48
public
:
49
// Constructor/Destructor
50
HybridModel
();
51
virtual
~
HybridModel
();
52
54
59
override
(
BaseModel
)
bool
Build
(
const
OPCODECREATE
& create);
61
63
67
override
(
BaseModel
)
udword
GetUsedBytes
()
const
;
69
71
77
override
(
BaseModel
)
bool
Refit
();
79
81
85
inline_
const
LeafTriangles
* GetLeafTriangles()
const
{
return
mTriangles; }
87
89
93
inline_
const
udword
* GetIndices()
const
{
return
mIndices; }
95
96
private
:
97
udword
mNbLeaves;
98
LeafTriangles
* mTriangles;
99
udword
mNbPrimitives;
100
udword
* mIndices;
101
102
// Internal methods
103
void
Release();
104
};
105
106
#endif // __OPC_HYBRIDMODEL_H__
src
cmd
collide2
OPC_HybridModel.h
Generated on Fri May 29 2015 23:07:12 for Vegastrike 0.5.1 rc1 by
1.8.4