FS2_Open
Open source remastering of the Freespace 2 engine
|
#include "globalincs/globals.h"
#include "globalincs/pstypes.h"
#include "graphics/2d.h"
#include "object/object.h"
Go to the source code of this file.
Classes | |
struct | submodel_instance_info |
struct | submodel_instance |
struct | polymodel_instance |
struct | stepped_rotation |
struct | model_subsystem |
struct | model_special |
struct | model_tmap_vert |
struct | bsp_collision_node |
struct | bsp_collision_leaf |
struct | bsp_collision_tree |
class | bsp_info |
struct | mp_vert |
struct | model_path |
struct | w_bank |
struct | glow_point |
struct | thruster_bank |
struct | glow_point_bank |
struct | glow_point_bank_override |
struct | dock_bay |
struct | ship_bay |
struct | shield_tri |
struct | shield_vertex |
struct | shield_info |
struct | bsp_light |
struct | model_octant |
struct | eye |
struct | cross_section |
struct | insignia |
class | texture_info |
class | texture_map |
class | polymodel |
struct | mc_info |
struct | mst_info |
#define MAX_REPLACEMENT_TEXTURES MAX_MODEL_TEXTURES * TM_NUM_TYPES |
#define MSS_MODEL_FLAG_MASK (MSS_FLAG_CREWPOINT | MSS_FLAG_ROTATES | MSS_FLAG_TRIGGERED | MSS_FLAG_ARTILLERY | MSS_FLAG_STEPPED_ROTATE) |
typedef struct cross_section cross_section |
typedef struct glow_point_bank glow_point_bank |
typedef struct glow_point_bank_override glow_point_bank_override |
typedef struct model_octant model_octant |
typedef struct model_path model_path |
typedef struct model_special model_special |
typedef struct model_subsystem model_subsystem |
typedef struct model_tmap_vert model_tmap_vert |
typedef struct polymodel_instance polymodel_instance |
typedef struct shield_info shield_info |
typedef struct shield_tri shield_tri |
typedef struct shield_vertex shield_vertex |
typedef struct ship_bay ship_bay_t |
typedef struct stepped_rotation stepped_rotation_t |
typedef struct submodel_instance submodel_instance |
typedef struct submodel_instance_info submodel_instance_info |
typedef struct thruster_bank thruster_bank |
Finds the current location of a submodel (in the ship's frame of reference), taking into account the rotations of any parent submodels it might have.
*outpnt | Output point |
model_instance_num | Index into Polygon_model_instances |
submodel_num | The number of the submodel we're interested in |
Definition at line 4258 of file modelread.cpp.
void find_submodel_instance_point_normal | ( | vec3d * | outpnt, |
vec3d * | outnorm, | ||
int | model_instance_num, | ||
int | submodel_num, | ||
const vec3d * | submodel_pnt, | ||
const vec3d * | submodel_norm | ||
) |
Finds the current location and rotation (in the ship's frame of reference) of a submodel point, taking into account the rotations of the submodel and any parent submodels it might have.
*outpnt | Output point |
*outnorm | Output normal |
model_instance_num | Index into Polygon_model_instances |
submodel_num | The number of the submodel we're interested in |
*submodel_pnt | The point which's current position we want, in the submodel's frame of reference |
*submodel_norm | The normal which's current direction we want, in the ship's frame of reference |
Definition at line 4302 of file modelread.cpp.
void find_submodel_instance_point_orient | ( | vec3d * | outpnt, |
matrix * | outorient, | ||
int | model_instance_num, | ||
int | submodel_num, | ||
const vec3d * | submodel_pnt, | ||
const matrix * | submodel_orient | ||
) |
Same as find_submodel_instance_point_normal, except that this takes and returns matrices instead of normals.
Finds the current location and rotation (in the ship's frame of reference) of a submodel point, taking into account the rotations of the submodel and any parent submodels it might have.
*outpnt | Output point |
*outorient | Output matrix |
model_instance_num | Index into Polygon_model_instances |
submodel_num | The number of the submodel we're interested in |
*submodel_pnt | The point which's current position we want, in the submodel's frame of reference |
*submodel_orient | The local matrix which's current orientation in the ship's frame of reference we want |
Definition at line 4370 of file modelread.cpp.
void find_submodel_instance_world_point | ( | vec3d * | outpnt, |
int | model_instance_num, | ||
int | submodel_num, | ||
const matrix * | objorient, | ||
const vec3d * | objpos | ||
) |
Finds the current world location of a submodel, taking into account the rotations of any parent submodels it might have.
*outpnt | Output point |
model_instance_num | Index into Polygon_model_instances |
submodel_num | The number of the submodel we're interested in |
Definition at line 4431 of file modelread.cpp.
SCP_vector<glow_point_bank_override>::iterator get_glowpoint_bank_override_by_name | ( | const char * | name | ) |
Definition at line 5550 of file modelread.cpp.
float get_world_closest_box_point_with_delta | ( | vec3d * | closest_box_point, |
object * | box_obj, | ||
vec3d * | start_point, | ||
int * | is_inside, | ||
float | delta | ||
) |
Definition at line 3935 of file modelinterp.cpp.
void glowpoint_init | ( | ) |
Definition at line 5779 of file modelread.cpp.
void interp_render_arc | ( | vec3d * | v1, |
vec3d * | v2, | ||
color * | primary, | ||
color * | secondary, | ||
float | arc_width | ||
) |
Definition at line 1502 of file modelinterp.cpp.
Definition at line 5003 of file modelread.cpp.
Definition at line 4624 of file modelread.cpp.
void model_clear_instance_info | ( | submodel_instance_info * | sii | ) |
Definition at line 4669 of file modelread.cpp.
void model_clear_submodel_instance | ( | submodel_instance * | sm_instance, |
bsp_info * | sm | ||
) |
Definition at line 4684 of file modelread.cpp.
Definition at line 4696 of file modelread.cpp.
Definition at line 1230 of file modelcollide.cpp.
void model_collide_parse_bsp | ( | bsp_collision_tree * | tree, |
void * | model_ptr, | ||
int | version | ||
) |
Definition at line 731 of file modelcollide.cpp.
Definition at line 1392 of file modelcollide.cpp.
void model_copy_subsystems | ( | int | n_subsystems, |
model_subsystem * | d_sp, | ||
model_subsystem * | s_sp | ||
) |
Definition at line 505 of file modelread.cpp.
int model_create_bsp_collision_tree | ( | ) |
Definition at line 5162 of file modelread.cpp.
Definition at line 2855 of file modelread.cpp.
Definition at line 2907 of file modelread.cpp.
Definition at line 4878 of file modelread.cpp.
Definition at line 4927 of file modelread.cpp.
Docking bay and fighter bay paths
Definition at line 1423 of file modelinterp.cpp.
Docking bay and fighter bay paths
Definition at line 1378 of file modelinterp.cpp.
Definition at line 1194 of file modelinterp.cpp.
Debug code to show all the paths of a model
Definition at line 1273 of file modelinterp.cpp.
Debug code to show all the paths of a model
Definition at line 1324 of file modelinterp.cpp.
int model_find_2d_bound | ( | int | model_num, |
matrix * | orient, | ||
vec3d * | pos, | ||
int * | x1, | ||
int * | y1, | ||
int * | x2, | ||
int * | y2 | ||
) |
Find 2D bound for model
Note that x1,y1,x2,y2 aren't clipped to 2D screen coordinates.
Definition at line 3301 of file modelread.cpp.
int model_find_2d_bound_min | ( | int | model_num, |
matrix * | orient, | ||
vec3d * | pos, | ||
int * | x1, | ||
int * | y1, | ||
int * | x2, | ||
int * | y2 | ||
) |
Definition at line 3168 of file modelread.cpp.
Definition at line 5142 of file modelread.cpp.
float model_find_closest_point | ( | vec3d * | outpnt, |
int | model_num, | ||
int | submodel_num, | ||
matrix * | orient, | ||
vec3d * | pos, | ||
vec3d * | eye_pos | ||
) |
Definition at line 2197 of file modelinterp.cpp.
Definition at line 5031 of file modelread.cpp.
Definition at line 5055 of file modelread.cpp.
void model_find_obj_dir | ( | vec3d * | w_vec, |
vec3d * | m_vec, | ||
int | model_instance_num, | ||
int | submodel_num, | ||
matrix * | objorient | ||
) |
Definition at line 3383 of file modelread.cpp.
Definition at line 4041 of file modelread.cpp.
See if the given texture is used by the passed model. 0 if not used, 1 if used, -1 on error
Definition at line 3854 of file modelinterp.cpp.
void model_find_world_dir | ( | vec3d * | out_dir, |
vec3d * | in_dir, | ||
int | model_num, | ||
int | submodel_num, | ||
const matrix * | objorient | ||
) |
Definition at line 4551 of file modelread.cpp.
void model_find_world_point | ( | vec3d * | outpnt, |
vec3d * | mpnt, | ||
int | model_num, | ||
int | submodel_num, | ||
const matrix * | objorient, | ||
const vec3d * | objpos | ||
) |
Definition at line 4099 of file modelread.cpp.
Definition at line 382 of file modelinterp.cpp.
void model_free_all | ( | ) |
Definition at line 337 of file modelread.cpp.
Definition at line 3134 of file modelread.cpp.
bsp_collision_tree* model_get_bsp_collision_tree | ( | int | tree_index | ) |
Definition at line 5189 of file modelread.cpp.
Definition at line 3114 of file modelread.cpp.
Definition at line 5120 of file modelread.cpp.
Definition at line 5103 of file modelread.cpp.
Definition at line 5128 of file modelread.cpp.
polymodel_instance* model_get_instance | ( | int | model_instance_num | ) |
Definition at line 3154 of file modelread.cpp.
Definition at line 5112 of file modelread.cpp.
Definition at line 3105 of file modelread.cpp.
void model_get_rotating_submodel_list | ( | SCP_vector< int > * | submodel_vector, |
object * | objp | ||
) |
Definition at line 4468 of file modelread.cpp.
void model_get_submodel_tree_list | ( | SCP_vector< int > & | submodel_vector, |
polymodel * | pm, | ||
int | mn | ||
) |
Definition at line 4533 of file modelread.cpp.
bool model_get_team_color | ( | team_color * | clr, |
const SCP_string & | team, | ||
const SCP_string & | secondaryteam, | ||
fix | timestamp, | ||
int | fadetime | ||
) |
Definition at line 5179 of file modelinterp.cpp.
void model_init | ( | ) |
Definition at line 409 of file modelread.cpp.
void model_init_submodel_axis_pt | ( | submodel_instance_info * | sii, |
int | model_num, | ||
int | submodel_num | ||
) |
Definition at line 4936 of file modelread.cpp.
void model_instance_find_obj_dir | ( | vec3d * | w_vec, |
vec3d * | m_vec, | ||
int | model_instance_num, | ||
int | submodel_num, | ||
matrix * | objorient | ||
) |
Definition at line 3416 of file modelread.cpp.
void model_instance_find_world_dir | ( | vec3d * | out_dir, |
vec3d * | in_dir, | ||
int | model_instance_num, | ||
int | submodel_num, | ||
const matrix * | objorient | ||
) |
Definition at line 4587 of file modelread.cpp.
void model_instance_find_world_point | ( | vec3d * | outpnt, |
vec3d * | mpnt, | ||
int | model_instance_num, | ||
int | submodel_num, | ||
const matrix * | objorient, | ||
const vec3d * | objpos | ||
) |
Definition at line 4135 of file modelread.cpp.
void model_instance_free_all | ( | ) |
Definition at line 355 of file modelread.cpp.
Definition at line 5240 of file modelinterp.cpp.
Definition at line 5227 of file modelinterp.cpp.
void model_interp_set_team_color | ( | const SCP_string & | team, |
const SCP_string & | secondaryteam, | ||
fix | timestamp, | ||
int | fadetime | ||
) |
Definition at line 5221 of file modelinterp.cpp.
int model_load | ( | char * | filename, |
int | n_subsystems, | ||
model_subsystem * | subsystems, | ||
int | ferror = 1 , |
||
int | duplicate = 0 |
||
) |
Definition at line 2573 of file modelread.cpp.
Definition at line 2412 of file modelread.cpp.
void model_make_turret_matrix | ( | int | model_num, |
model_subsystem * | turret | ||
) |
Definition at line 3846 of file modelread.cpp.
Given a newly loaded model, page in all textures
Definition at line 3967 of file modelinterp.cpp.
Definition at line 3993 of file modelinterp.cpp.
Definition at line 5197 of file modelread.cpp.
void model_render_DEPRECATED | ( | int | model_num, |
matrix * | orient, | ||
vec3d * | pos, | ||
uint | flags = MR_DEPRECATED_NORMAL , |
||
int | objnum = -1 , |
||
int | lighting_skip = -1 , |
||
int * | replacement_textures = NULL , |
||
int | render = MODEL_RENDER_ALL , |
||
const bool | is_skybox = false |
||
) |
Definition at line 2006 of file modelinterp.cpp.
Definition at line 1841 of file modelinterp.cpp.
Definition at line 1804 of file modelinterp.cpp.
int model_rotate_gun | ( | int | model_num, |
model_subsystem * | turret, | ||
matrix * | orient, | ||
angles * | base_angles, | ||
angles * | gun_angles, | ||
vec3d * | pos, | ||
vec3d * | dst, | ||
int | obj_idx, | ||
bool | reset = false |
||
) |
Definition at line 3904 of file modelread.cpp.
Set model transparency for use with MR_ALL_XPARENT
Definition at line 3846 of file modelinterp.cpp.
Definition at line 3692 of file modelinterp.cpp.
Set the forces bitmap
Definition at line 3838 of file modelinterp.cpp.
Set the insignia bitmap to be used when rendering a ship with an insignia (-1 switches it off altogether)
Definition at line 3825 of file modelinterp.cpp.
void model_set_instance | ( | int | model_num, |
int | sub_model_num, | ||
submodel_instance_info * | sii, | ||
int | flags = 0 |
||
) |
Definition at line 4726 of file modelread.cpp.
void model_set_instance_info | ( | submodel_instance_info * | sii, |
float | turn_rate, | ||
float | turn_accel | ||
) |
Definition at line 4708 of file modelread.cpp.
Definition at line 4772 of file modelread.cpp.
Definition at line 3677 of file modelinterp.cpp.
Definition at line 3685 of file modelinterp.cpp.
Definition at line 3830 of file modelinterp.cpp.
Scales the engines thrusters by this much
Definition at line 437 of file modelinterp.cpp.
void model_set_warp_globals | ( | float | scale_x = 1.0f , |
float | scale_y = 1.0f , |
||
float | scale_z = 1.0f , |
||
int | bitmap_id = -1 , |
||
float | alpha = -1.0f |
||
) |
Definition at line 5158 of file modelinterp.cpp.
Definition at line 358 of file modelinterp.cpp.
Definition at line 5084 of file modelinterp.cpp.
Definition at line 3790 of file modelinterp.cpp.
Definition at line 162 of file modelread.cpp.
void model_update_instance | ( | int | model_instance_num, |
int | sub_model_num, | ||
submodel_instance_info * | sii, | ||
int | flags | ||
) |
Definition at line 4796 of file modelread.cpp.
int model_which_octant | ( | vec3d * | pnt, |
int | model_num, | ||
matrix * | model_orient, | ||
vec3d * | model_pos, | ||
model_octant ** | oct | ||
) |
Definition at line 468 of file modeloctant.cpp.
int model_which_octant_distant | ( | vec3d * | pnt, |
int | model_num, | ||
matrix * | model_orient, | ||
vec3d * | model_pos, | ||
model_octant ** | oct | ||
) |
Definition at line 429 of file modeloctant.cpp.
void moldel_calc_facing_pts | ( | vec3d * | top, |
vec3d * | bot, | ||
vec3d * | fvec, | ||
vec3d * | pos, | ||
float | w, | ||
float | z_add, | ||
vec3d * | Eyeposition | ||
) |
Definition at line 2230 of file modelinterp.cpp.
void parse_triggersint | ( | int & | n_trig, |
queued_animation ** | triggers, | ||
char * | props | ||
) |
int submodel_find_2d_bound_min | ( | int | model_num, |
int | submodel, | ||
matrix * | orient, | ||
vec3d * | pos, | ||
int * | x1, | ||
int * | y1, | ||
int * | x2, | ||
int * | y2 | ||
) |
Definition at line 3232 of file modelread.cpp.
Returns number of tmaps & flat polys in a submodel
Definition at line 3778 of file modelinterp.cpp.
Returns number of verts in a submodel;
Definition at line 3700 of file modelinterp.cpp.
Definition at line 3123 of file modelread.cpp.
void submodel_get_two_random_points | ( | int | model_num, |
int | submodel_num, | ||
vec3d * | v1, | ||
vec3d * | v2, | ||
vec3d * | n1, | ||
vec3d * | n2 | ||
) |
Gets two random points on a model
Definition at line 3583 of file modelinterp.cpp.
void submodel_get_two_random_points_better | ( | int | model_num, |
int | submodel_num, | ||
vec3d * | v1, | ||
vec3d * | v2 | ||
) |
Definition at line 3631 of file modelinterp.cpp.
void submodel_render_DEPRECATED | ( | int | model_num, |
int | submodel_num, | ||
matrix * | orient, | ||
vec3d * | pos, | ||
uint | flags = MR_DEPRECATED_NORMAL , |
||
int | objnum = -1 , |
||
int * | replacement_textures = NULL , |
||
int | render = MODEL_RENDER_ALL |
||
) |
Definition at line 3343 of file modelinterp.cpp.
void submodel_rotate | ( | model_subsystem * | psub, |
submodel_instance_info * | sii | ||
) |
Definition at line 3688 of file modelread.cpp.
void submodel_rotate | ( | bsp_info * | sm, |
submodel_instance_info * | sii | ||
) |
Definition at line 3704 of file modelread.cpp.
void submodel_stepped_rotate | ( | model_subsystem * | psub, |
submodel_instance_info * | sii | ||
) |
Definition at line 3474 of file modelread.cpp.
int subobj_find_2d_bound | ( | float | radius, |
matrix * | orient, | ||
vec3d * | pos, | ||
int * | x1, | ||
int * | y1, | ||
int * | x2, | ||
int * | y2 | ||
) |
Find 2D bound for sub object
Note that x1,y1,x2,y2 aren't clipped to 2D screen coordinates.
Definition at line 3345 of file modelread.cpp.
void world_find_model_instance_point | ( | vec3d * | out, |
vec3d * | world_pt, | ||
const polymodel_instance * | pmi, | ||
int | submodel_num, | ||
const matrix * | orient, | ||
const vec3d * | pos | ||
) |
Definition at line 4215 of file modelread.cpp.
void world_find_model_point | ( | vec3d * | out, |
vec3d * | world_pt, | ||
const polymodel * | pm, | ||
int | submodel_num, | ||
const matrix * | orient, | ||
const vec3d * | pos | ||
) |
Definition at line 4182 of file modelread.cpp.
flag_def_list Dock_type_names[] |
Definition at line 115 of file modelread.cpp.
SCP_vector<glow_point_bank_override> glowpoint_bank_overrides |
Definition at line 124 of file modelread.cpp.
flag_def_list model_render_flags[] |
Definition at line 40 of file modelread.cpp.
int model_render_flags_size |
Definition at line 50 of file modelread.cpp.
int modelstats_num_polys |
Definition at line 45 of file modelinterp.cpp.
int modelstats_num_polys_drawn |
Definition at line 46 of file modelinterp.cpp.
int modelstats_num_sortnorms |
Definition at line 48 of file modelinterp.cpp.
int modelstats_num_verts |
Definition at line 47 of file modelinterp.cpp.
int Num_dock_type_names |
Definition at line 122 of file modelread.cpp.
char* Subsystem_types[SUBSYSTEM_MAX] |
Definition at line 95 of file modelread.cpp.