Starshatter_Open
Open source Starshatter engine
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
DetailSet.h
Go to the documentation of this file.
1
/* Project Starshatter 4.5
2
Destroyer Studios LLC
3
Copyright © 1997-2004. All Rights Reserved.
4
5
SUBSYSTEM: Stars.exe
6
FILE: DetailSet.h
7
AUTHOR: John DiCamillo
8
9
10
OVERVIEW
11
========
12
Level of Detail Manger class
13
*/
14
15
#ifndef DetailSet_h
16
#define DetailSet_h
17
18
#include "
Types.h
"
19
#include "
Geometry.h
"
20
#include "
Graphic.h
"
21
#include "
List.h
"
22
23
// +--------------------------------------------------------------------+
24
25
class
Sim
;
26
class
SimRegion
;
27
28
// +--------------------------------------------------------------------+
29
30
class
DetailSet
31
{
32
public
:
33
enum
{
MAX_DETAIL
= 4 };
34
35
DetailSet
();
36
virtual
~DetailSet
();
37
38
int
DefineLevel
(
double
r,
Graphic
* g=0,
Point
* offset=0,
Point
*
spin
=0);
39
void
AddToLevel
(
int
level,
Graphic
* g,
Point
* offset=0,
Point
*
spin
=0);
40
int
NumLevels
()
const
{
return
levels
; }
41
int
NumModels
(
int
level)
const
;
42
43
void
ExecFrame
(
double
seconds);
44
void
SetLocation
(
SimRegion
*
rgn
,
const
Point
&
loc
);
45
static
void
SetReference
(
SimRegion
*
rgn
,
const
Point
&
loc
);
46
47
int
GetDetailLevel
();
48
Graphic
*
GetRep
(
int
level,
int
n=0);
49
Point
GetOffset
(
int
level,
int
n=0);
50
Point
GetSpin
(
int
level,
int
n=0);
51
void
Destroy
();
52
53
protected
:
54
List<Graphic>
rep
[
MAX_DETAIL
];
55
List<Point>
off
[
MAX_DETAIL
];
56
double
rad
[
MAX_DETAIL
];
57
58
List<Point>
spin
;
59
List<Point>
rate
;
60
61
int
index
;
62
int
levels
;
63
SimRegion
*
rgn
;
64
Point
loc
;
65
66
static
SimRegion
*
ref_rgn
;
67
static
Point
ref_loc
;
68
};
69
70
// +--------------------------------------------------------------------+
71
72
#endif DetailSet_h
73
Stars45
DetailSet.h
Generated on Tue Jun 5 2012 20:46:51 for Starshatter_Open by
1.8.1