Logo
MaterialInfo.h
1#pragma once
2#include "gfx/mdl/materialInfo.h"
3
4namespace XXSharpKmyGfx
5{
6 private ref class MaterialInfo
7 {
8 kmyGfx::mtlInfo* obj = nullptr;
9
10 System::String^ convert(const char* ptr)
11 {
12 if (*ptr == '\0')return nullptr;
13
14 return XXSharpKmyBase::StringConv::New(ptr);
15 }
16
17 public:
18 MaterialInfo(kmyGfx::mtlInfo* base)
19 {
20 obj = base;
21 }
22
23 //TODO 200820 R[hl
24 System::String^ getName()
25 {
26 return convert(obj->m_name.cstr());
27 }
28
29 System::String^ getDiffuseTextureName()
30 {
31 return convert(obj->m_diffuseTextureName.cstr());
32 }
33
34 System::String^ getAmbientTextureName()
35 {
36 return convert(obj->m_ambientTextureName.cstr());
37 }
38
39 System::String^ getEmissionTextureName()
40 {
41 return convert(obj->m_emissionTextureName.cstr());
42 }
43
44 System::String^ getNormalTextureName()
45 {
46 return convert(obj->m_normalTextureName.cstr());
47 }
48
49 System::String^ getSpecularTextureName()
50 {
51 return convert(obj->m_specularTextureName.cstr());
52 }
53 };
54
55}