File: model.h

package info (click to toggle)
freespace2 24.2.0%2Brepack-1
  • links: PTS, VCS
  • area: non-free
  • in suites: forky, sid
  • size: 43,716 kB
  • sloc: cpp: 595,001; ansic: 21,741; python: 1,174; sh: 457; makefile: 248; xml: 181
file content (132 lines) | stat: -rw-r--r-- 2,256 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
#pragma once

#include "scripting/ade_api.h"

#include "model/model.h"

namespace scripting {
namespace api {

//**********HANDLE: model
class model_h
{
 protected:
	int model_num;

 public:
	explicit model_h(int n_modelnum);
	explicit model_h(polymodel *n_model);
	model_h();

	polymodel *Get() const;
	int GetID() const;

	bool isValid() const;
};
DECLARE_ADE_OBJ(l_Model, model_h);

class submodel_h
{
protected:
	int model_num;
	int submodel_num;

public:
	explicit submodel_h(int n_modelnum, int n_submodelnum);
	explicit submodel_h(polymodel *n_model, int n_submodelnum);
	submodel_h();

	polymodel *GetModel() const;
	int GetModelID() const;

	bsp_info *GetSubmodel() const;
	int GetSubmodelIndex() const;

	bool isValid() const;
};
DECLARE_ADE_OBJ(l_Submodel, submodel_h);

DECLARE_ADE_OBJ(l_ModelSubmodels, model_h);

DECLARE_ADE_OBJ(l_ModelTextures, model_h);

DECLARE_ADE_OBJ(l_ModelEyepoints, model_h);

// Thrusters:
DECLARE_ADE_OBJ(l_ModelThrusters, model_h);

// Thrusterbank:
struct thrusterbank_h
{
	model_h modelh;
	int thrusterbank_index;

	thrusterbank_h();
	thrusterbank_h(int in_model_num, int in_thrusterbank_index);

	thruster_bank *Get() const;

	bool isValid() const;
};
DECLARE_ADE_OBJ(l_Thrusterbank, thrusterbank_h);

// Glow points:
DECLARE_ADE_OBJ(l_ModelGlowpointbanks, model_h);

// Glowpointbank:
struct glowpointbank_h
{
	model_h modelh;
	int glowpointbank_index;

	glowpointbank_h();
	glowpointbank_h(int in_model_num, int in_glowpointbank_index);

	glow_point_bank *Get() const;

	bool isValid() const;
};
DECLARE_ADE_OBJ(l_Glowpointbank, glowpointbank_h);

// Glowpoint:
struct glowpoint_h
{
	glowpointbank_h glowpointbankh;
	thrusterbank_h thrusterbankh;
	int glowpoint_index;

	glowpoint_h();
	glowpoint_h(int in_model_num, int in_glowpointbank_index, int in_thrusterbank_index, int in_glowpoint_index);

	glow_point* Get() const;

	bool isValid() const;
};
DECLARE_ADE_OBJ(l_Glowpoint, glowpoint_h);

// Docking bays:
DECLARE_ADE_OBJ(l_ModelDockingbays, model_h);

class dockingbay_h
{
 private:
	model_h modelh;
	int dock_id;

 public:
	dockingbay_h(polymodel *pm, int dock_idx);
	dockingbay_h();

	dock_bay* getDockingBay() const;

	bool isValid() const;
};
DECLARE_ADE_OBJ(l_Dockingbay, dockingbay_h);


}
}