mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-21 15:59:18 +02:00
reformat: remove redundant 'inline' specifier
This commit is contained in:
@@ -78,8 +78,7 @@ class TAnimContainer : std::enable_shared_from_this<TAnimContainer>
|
||||
// wyświetlania
|
||||
TAnimContainer();
|
||||
bool Init(TSubModel *pNewSubModel);
|
||||
inline
|
||||
std::string NameGet() {
|
||||
std::string NameGet() {
|
||||
return pSubModel ? pSubModel->pName : ""; };
|
||||
void SetRotateAnim( glm::vec3 vNewRotateAngles, double fNewRotateSpeed);
|
||||
void SetTranslateAnim( glm::dvec3 vNewTranslate, double fNewSpeed);
|
||||
@@ -88,19 +87,15 @@ class TAnimContainer : std::enable_shared_from_this<TAnimContainer>
|
||||
void UpdateModel();
|
||||
void UpdateModelIK();
|
||||
bool InMovement(); // czy w trakcie animacji?
|
||||
inline
|
||||
double AngleGet() {
|
||||
double AngleGet() {
|
||||
return vRotateAngles.z; }; // jednak ostatnia, T3D ma inny układ
|
||||
inline
|
||||
glm::dvec3 TransGet() {
|
||||
glm::dvec3 TransGet() {
|
||||
return glm::dvec3(-vTranslation.x, vTranslation.z, vTranslation.y); }; // zmiana, bo T3D ma inny układ
|
||||
inline
|
||||
void WillBeAnimated() {
|
||||
void WillBeAnimated() {
|
||||
if (pSubModel)
|
||||
pSubModel->WillBeAnimated(); };
|
||||
void EventAssign(basic_event *ev);
|
||||
inline
|
||||
basic_event * Event() {
|
||||
basic_event * Event() {
|
||||
return evDone; };
|
||||
};
|
||||
|
||||
@@ -120,27 +115,23 @@ public:
|
||||
bool Load(cParser *parser, bool ter = false);
|
||||
std::shared_ptr<TAnimContainer> AddContainer(std::string const &Name);
|
||||
std::shared_ptr<TAnimContainer> GetContainer(std::string const &Name = "");
|
||||
void LightSet( int const n, float const v );
|
||||
void SkinSet( int const Index, material_handle const Material );
|
||||
std::optional<std::tuple<float, float, std::optional<glm::vec3> > > LightGet( int const n );
|
||||
void LightSet( int n, float v );
|
||||
void SkinSet( int Index, material_handle Material );
|
||||
std::optional<std::tuple<float, float, std::optional<glm::vec3> > > LightGet( int n );
|
||||
int TerrainCount();
|
||||
TSubModel * TerrainSquare(int n);
|
||||
int Flags();
|
||||
void on_season_update();
|
||||
inline
|
||||
material_data const *
|
||||
material_data const *
|
||||
Material() const {
|
||||
return &m_materialdata; }
|
||||
inline
|
||||
TModel3d *
|
||||
TModel3d *
|
||||
Model() const {
|
||||
return pModel; }
|
||||
inline
|
||||
void
|
||||
void
|
||||
Angles( glm::vec3 const &Angles ) {
|
||||
vAngle = Angles; }
|
||||
inline
|
||||
glm::vec3
|
||||
glm::vec3
|
||||
Angles() const {
|
||||
return vAngle; }
|
||||
// per-axis scale, applied between rotation and the submodel-local transform chain.
|
||||
@@ -148,19 +139,16 @@ public:
|
||||
// optional `scale <factor>` / `scale <x> <y> <z>` token inside a `node model` block.
|
||||
// Per-axis values let you stretch a model along a single dimension; uniform input
|
||||
// (single float) broadcasts to all three axes.
|
||||
inline
|
||||
void
|
||||
void
|
||||
Scale( glm::vec3 const &Factor ) {
|
||||
m_scale = glm::vec3(
|
||||
Factor.x > 0.0f ? Factor.x : 1.0f,
|
||||
Factor.y > 0.0f ? Factor.y : 1.0f,
|
||||
Factor.z > 0.0f ? Factor.z : 1.0f ); }
|
||||
inline
|
||||
void
|
||||
void
|
||||
Scale( float const Factor ) {
|
||||
Scale( glm::vec3( Factor ) ); }
|
||||
inline
|
||||
glm::vec3 const &
|
||||
glm::vec3 const &
|
||||
Scale() const {
|
||||
return m_scale; }
|
||||
// members
|
||||
@@ -172,7 +160,7 @@ public:
|
||||
public:
|
||||
// methods
|
||||
void RaPrepare(); // ustawienie animacji egzemplarza na wzorcu
|
||||
void RaAnimate( unsigned int const Framestamp ); // przeliczenie animacji egzemplarza
|
||||
void RaAnimate( unsigned int Framestamp ); // przeliczenie animacji egzemplarza
|
||||
|
||||
// radius() subclass details, calculates node's bounding radius
|
||||
float radius_();
|
||||
|
||||
@@ -13,7 +13,7 @@ http://mozilla.org/MPL/2.0/.
|
||||
class TMdlContainer {
|
||||
friend class TModelsManager;
|
||||
private:
|
||||
TModel3d *LoadModel( std::string const &Name, bool const Dynamic );
|
||||
TModel3d *LoadModel( std::string const &Name, bool Dynamic );
|
||||
std::shared_ptr<TModel3d> Model { nullptr };
|
||||
std::string m_name;
|
||||
};
|
||||
@@ -22,7 +22,7 @@ private:
|
||||
class TModelsManager {
|
||||
public:
|
||||
// McZapkie: dodalem sciezke, notabene Path!=Patch :)
|
||||
static TModel3d *GetModel(std::string const &Name, bool const dynamic = false, bool const Logerrors = true , int uid = 0);
|
||||
static TModel3d *GetModel(std::string const &Name, bool dynamic = false, bool Logerrors = true , int uid = 0);
|
||||
|
||||
private:
|
||||
// types:
|
||||
@@ -32,7 +32,7 @@ private:
|
||||
static modelcontainer_sequence m_models;
|
||||
static stringmodelcontainerindex_map m_modelsmap;
|
||||
// methods:
|
||||
static TModel3d *LoadModel(std::string const &Name, const std::string &virtualName, bool const Dynamic );
|
||||
static TModel3d *LoadModel(std::string const &Name, const std::string &virtualName, bool Dynamic );
|
||||
static std::pair<bool, TModel3d *> find_in_databank( std::string const &Name );
|
||||
// checks whether specified file exists. returns name of the located file, or empty string.
|
||||
static std::string find_on_disk( std::string const &Name );
|
||||
|
||||
@@ -160,7 +160,7 @@ public: // chwilowo
|
||||
std::string m_materialname; // robocza nazwa tekstury do zapisania w pliku binarnym
|
||||
std::string pName; // robocza nazwa
|
||||
public:
|
||||
int SeekFaceNormal( std::vector<unsigned int> const &Masks, int const Startface, unsigned int const Mask, glm::vec3 const &Position, gfx::vertex_array const &Vertices );
|
||||
int SeekFaceNormal( std::vector<unsigned int> const &Masks, int Startface, unsigned int Mask, glm::vec3 const &Position, gfx::vertex_array const &Vertices );
|
||||
void RaAnimation(TAnimType a);
|
||||
void RaAnimation(glm::mat4 &m, TAnimType a);
|
||||
// returns true if the submodel is a smoke emitter attachment point, false otherwise
|
||||
@@ -196,11 +196,11 @@ public:
|
||||
void SetTranslate(float3 vNewTransVector);
|
||||
void SetRotateIK1(float3 vNewAngles);
|
||||
TSubModel * GetFromName( std::string const &search, bool i = true );
|
||||
inline float4x4 * GetMatrix() { return fMatrix; };
|
||||
inline float4x4 const * GetMatrix() const { return fMatrix; };
|
||||
float4x4 * GetMatrix() { return fMatrix; };
|
||||
float4x4 const * GetMatrix() const { return fMatrix; };
|
||||
// returns offset vector from root
|
||||
glm::vec3 offset( float const Geometrytestoffsetthreshold = 0.f ) const;
|
||||
inline void Hide() { iVisible = 0; };
|
||||
glm::vec3 offset( float Geometrytestoffsetthreshold = 0.f ) const;
|
||||
void Hide() { iVisible = 0; };
|
||||
|
||||
void create_geometry( std::size_t &Indexoffset, std::size_t &Vertexoffset, gfx::geometrybank_handle const &Bank );
|
||||
uint32_t FlagsCheck();
|
||||
@@ -218,18 +218,18 @@ public:
|
||||
void UnFlagNext() { iFlags &= 0x00FFFFFF; };
|
||||
void ColorsSet( glm::vec3 const &Ambient, glm::vec3 const &Diffuse, glm::vec3 const &Specular );
|
||||
// sets rgb components of diffuse color override to specified value
|
||||
void SetDiffuseOverride( glm::vec3 const &Color, bool const Includechildren = false, bool const Includesiblings = false );
|
||||
void SetDiffuseOverride( glm::vec3 const &Color, bool Includechildren = false, bool Includesiblings = false );
|
||||
// gets rgb components of any freespot diffuse color (searches also in children)
|
||||
std::optional<glm::vec3> GetDiffuse( float Includesiblings = false );
|
||||
// sets visibility level (alpha component) to specified value
|
||||
void SetVisibilityLevel( float const Level, bool const Includechildren = false, bool const Includesiblings = false );
|
||||
void SetVisibilityLevel( float Level, bool Includechildren = false, bool Includesiblings = false );
|
||||
// sets light level (alpha component of illumination color) to specified value
|
||||
void SetLightLevel( glm::vec4 const &Level, bool const Includechildren = false, bool const Includesiblings = false );
|
||||
void SetLightLevel( glm::vec4 const &Level, bool Includechildren = false, bool Includesiblings = false );
|
||||
// sets activation threshold of self-illumination to specitied value
|
||||
void SetSelfIllum( float const Threshold, bool const Includechildren = false, bool const Includesiblings = false );
|
||||
inline float3 Translation1Get() {
|
||||
void SetSelfIllum( float Threshold, bool Includechildren = false, bool Includesiblings = false );
|
||||
float3 Translation1Get() {
|
||||
return fMatrix ? *fMatrix->TranslationGet() + v_TransVector : v_TransVector; }
|
||||
inline float3 Translation2Get() {
|
||||
float3 Translation2Get() {
|
||||
return *fMatrix->TranslationGet() + Child->Translation1Get(); }
|
||||
material_handle GetMaterial() const {
|
||||
return m_material; }
|
||||
@@ -247,9 +247,9 @@ public:
|
||||
std::vector<std::string>&,
|
||||
std::vector<std::string>&,
|
||||
std::vector<float4x4>&);
|
||||
void serialize_geometry( std::ostream &Output, bool const Packed, bool const Indexed, bool const UserData ) const;
|
||||
void serialize_geometry( std::ostream &Output, bool Packed, bool Indexed, bool UserData ) const;
|
||||
int index_size() const;
|
||||
void serialize_indices( std::ostream &Output, int const Size ) const;
|
||||
void serialize_indices( std::ostream &Output, int Size ) const;
|
||||
// places contained geometry in provided ground node
|
||||
};
|
||||
|
||||
@@ -279,7 +279,7 @@ public:
|
||||
~TModel3d();
|
||||
float bounding_radius() const {
|
||||
return Root ? Root->m_boundingradius : 0.f; }
|
||||
inline TSubModel * GetSMRoot() { return Root; };
|
||||
TSubModel * GetSMRoot() { return Root; };
|
||||
TSubModel * GetFromName(std::string const &Name) const;
|
||||
TSubModel * AddToNamed(const char *Name, TSubModel *SubModel);
|
||||
nameoffset_sequence const & find_smoke_sources();
|
||||
|
||||
@@ -32,7 +32,7 @@ struct opengl_texture : public ITexture {
|
||||
static void
|
||||
unbind( size_t unit );
|
||||
virtual bool
|
||||
create( bool const Static = false ) override;
|
||||
create( bool Static = false ) override;
|
||||
// releases resources allocated on the opengl end, storing local copy if requested
|
||||
void
|
||||
release() override;
|
||||
@@ -107,7 +107,7 @@ public:
|
||||
void load_STBI();
|
||||
void load_TGA();
|
||||
void set_filtering() const;
|
||||
void downsize( GLuint const Format );
|
||||
void downsize( GLuint Format );
|
||||
void flip_vertical();
|
||||
void gles_match_internalformat(GLuint format);
|
||||
|
||||
@@ -144,15 +144,15 @@ public:
|
||||
|
||||
// activates specified texture unit
|
||||
void
|
||||
unit( GLint const Textureunit );
|
||||
unit( GLint Textureunit );
|
||||
// creates texture object out of data stored in specified file
|
||||
texture_handle
|
||||
create( std::string Filename, bool const Loadnow = true, GLint Formathint = GL_SRGB_ALPHA );
|
||||
create( std::string Filename, bool Loadnow = true, GLint Formathint = GL_SRGB_ALPHA );
|
||||
// binds specified texture to specified texture unit
|
||||
void
|
||||
bind( std::size_t const Unit, texture_handle const Texture );
|
||||
bind( std::size_t Unit, texture_handle Texture );
|
||||
opengl_texture &
|
||||
mark_as_used( texture_handle const Texture );
|
||||
mark_as_used( texture_handle Texture );
|
||||
// provides direct access to specified texture object
|
||||
opengl_texture &
|
||||
texture( texture_handle const Texture ) const { return *m_textures[Texture].first; }
|
||||
|
||||
@@ -35,7 +35,7 @@ struct opengl_material : public IMaterial {
|
||||
opengl_material();
|
||||
|
||||
// methods
|
||||
bool deserialize(cParser &Input, bool const Loadnow);
|
||||
bool deserialize(cParser &Input, bool Loadnow);
|
||||
virtual void finalize(bool Loadnow) override;
|
||||
virtual bool update() override;
|
||||
virtual float get_or_guess_opacity() const override;
|
||||
@@ -74,7 +74,7 @@ private:
|
||||
// methods
|
||||
// imports member data pair from the config file
|
||||
bool
|
||||
deserialize_mapping( cParser &Input, int const Priority, bool const Loadnow );
|
||||
deserialize_mapping( cParser &Input, int Priority, bool Loadnow );
|
||||
void log_error(const std::string &str);
|
||||
|
||||
// members
|
||||
@@ -108,7 +108,7 @@ public:
|
||||
material_manager() { m_materials.emplace_back( opengl_material() ); } // empty bindings for null material
|
||||
|
||||
material_handle
|
||||
create( std::string const &Filename, bool const Loadnow );
|
||||
create( std::string const &Filename, bool Loadnow );
|
||||
opengl_material const &
|
||||
material( material_handle const Material ) const { return m_materials[ Material ]; }
|
||||
opengl_material &
|
||||
|
||||
Reference in New Issue
Block a user