mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 01:19:19 +02:00
build 170810. multi-texture materials, reflection map support
This commit is contained in:
20
Model3d.h
20
Model3d.h
@@ -14,7 +14,7 @@ http://mozilla.org/MPL/2.0/.
|
||||
#include "dumb3d.h"
|
||||
#include "Float3d.h"
|
||||
#include "VBO.h"
|
||||
#include "Texture.h"
|
||||
#include "material.h"
|
||||
|
||||
using namespace Math3D;
|
||||
|
||||
@@ -122,7 +122,7 @@ private:
|
||||
TSubModel *Next { nullptr };
|
||||
TSubModel *Child { nullptr };
|
||||
geometry_handle m_geometry { NULL, NULL }; // geometry of the submodel
|
||||
texture_handle TextureID { NULL }; // numer tekstury, -1 wymienna, 0 brak
|
||||
material_handle m_material { NULL }; // numer tekstury, -1 wymienna, 0 brak
|
||||
bool bWire { false }; // nie używane, ale wczytywane
|
||||
float Opacity { 1.0f };
|
||||
float f_Angle { 0.0f };
|
||||
@@ -143,7 +143,7 @@ public:
|
||||
TSubModel **smLetter{ nullptr }; // wskaźnik na tablicę submdeli do generoania tekstu (docelowo zapisać do E3D)
|
||||
TSubModel *Parent{ nullptr }; // nadrzędny, np. do wymnażania macierzy
|
||||
int iVisible{ 1 }; // roboczy stan widoczności
|
||||
std::string pTexture; // robocza nazwa tekstury do zapisania w pliku binarnym
|
||||
std::string m_materialname; // robocza nazwa tekstury do zapisania w pliku binarnym
|
||||
std::string pName; // robocza nazwa
|
||||
private:
|
||||
int SeekFaceNormal( std::vector<unsigned int> const &Masks, int const Startface, unsigned int const Mask, glm::vec3 const &Position, vertex_array const &Vertices );
|
||||
@@ -151,7 +151,7 @@ private:
|
||||
|
||||
public:
|
||||
static size_t iInstance; // identyfikator egzemplarza, który aktualnie renderuje model
|
||||
static texture_handle const *ReplacableSkinId;
|
||||
static material_handle const *ReplacableSkinId;
|
||||
static int iAlpha; // maska bitowa dla danego przebiegu
|
||||
static double fSquareDist;
|
||||
static TModel3d *pRoot;
|
||||
@@ -162,7 +162,7 @@ public:
|
||||
void NextAdd(TSubModel *SubModel);
|
||||
TSubModel * NextGet() { return Next; };
|
||||
TSubModel * ChildGet() { return Child; };
|
||||
int TriangleAdd(TModel3d *m, texture_handle tex, int tri);
|
||||
int TriangleAdd(TModel3d *m, material_handle tex, int tri);
|
||||
/*
|
||||
basic_vertex * TrianglePtr(int tex, int pos, glm::vec3 const &Ambient, glm::vec3 const &Diffuse, glm::vec3 const &Specular );
|
||||
*/
|
||||
@@ -186,13 +186,13 @@ public:
|
||||
};
|
||||
void InitialRotate(bool doit);
|
||||
void BinInit(TSubModel *s, float4x4 *m, std::vector<std::string> *t, std::vector<std::string> *n, bool dynamic);
|
||||
void ReplacableSet(texture_handle const *r, int a)
|
||||
void ReplacableSet(material_handle const *r, int a)
|
||||
{
|
||||
ReplacableSkinId = r;
|
||||
iAlpha = a;
|
||||
};
|
||||
void TextureNameSet( std::string const &Name );
|
||||
void NameSet( std::string const &Name );
|
||||
void Name_Material( std::string const &Name );
|
||||
void Name( std::string const &Name );
|
||||
// Ra: funkcje do budowania terenu z E3D
|
||||
int Flags() { return iFlags; };
|
||||
void UnFlagNext() { iFlags &= 0x00FFFFFF; };
|
||||
@@ -203,8 +203,8 @@ public:
|
||||
return fMatrix ? *(fMatrix->TranslationGet()) + v_TransVector : v_TransVector; }
|
||||
inline float3 Translation2Get() {
|
||||
return *(fMatrix->TranslationGet()) + Child->Translation1Get(); }
|
||||
int GetTextureId() {
|
||||
return TextureID; }
|
||||
material_handle GetMaterial() {
|
||||
return m_material; }
|
||||
void ParentMatrix(float4x4 *m);
|
||||
float MaxY( float4x4 const &m );
|
||||
void AdjustDist();
|
||||
|
||||
Reference in New Issue
Block a user