Xonotic
Model Class Reference
+ Inheritance diagram for Model:
+ Collaboration diagram for Model:

Public Member Functions

 ATTRIB (Model, model_str, string())
 
 ATTRIB (Model, model_str_, string)
 
 Model ::Model (string() path)
 
virtual void Model ::model_precache ()
 

Public Attributes

int m_id = 0
 

Detailed Description

Definition at line 3 of file model.qh.

Member Function Documentation

◆ ATTRIB() [1/2]

Model::ATTRIB ( Model  ,
model_str  ,
string()   
)

◆ ATTRIB() [2/2]

Model::ATTRIB ( Model  ,
model_str_  ,
string   
)

◆ Model ::Model()

Model::Model ::Model ( string()  path)
inline

Definition at line 7 of file model.qh.

References CONSTRUCT.

8  {
10  this.model_str = path;
11  }
#define CONSTRUCT(cname,...)
Definition: oo.qh:111
Definition: model.qh:3

◆ Model ::model_precache()

virtual void Model::Model ::model_precache ( )
inlinevirtual

Definition at line 12 of file model.qh.

References ENDCLASS, fexists(), LOG_WARNF, strcpy, and TC.

13  {
14  TC(Model, this);
15  string s = this.model_str();
16  if (s != "" && s != "null" && !fexists(s)) {
17  LOG_WARNF("Missing model: \"%s\"", s);
18  return;
19  }
20  //profile(sprintf("precache_model(\"%s\")", s));
21  precache_model(s);
22  strcpy(this.model_str_, s);
23  }
#define strcpy(this, s)
Definition: string.qh:49
#define LOG_WARNF(...)
Definition: log.qh:67
Definition: model.qh:3
#define TC(T, sym)
Definition: _all.inc:82
ERASEABLE bool fexists(string f)
Definition: file.qh:4
+ Here is the call graph for this function:

Member Data Documentation

◆ m_id

int Model::m_id = 0

Definition at line 4 of file model.qh.


The documentation for this class was generated from the following file: