5 private ref class Material
8 Material(
bool skinned, System::String^ shadername, System::Guid guid);
9 Material(kmyGfx::Material* mtl,
bool addref);
10 Material(System::String^ defimage, System::Guid guid, System::String^ name);
13 System::String^ getName();
14 void setName(System::String^ name);
16 void setShader(System::String^ shadername);
17 void setParameterF(System::String^ slotname,
float x,
float y,
float z,
float w);
18 void setParameterI(System::String^ slotname,
int x,
int y,
int z,
int w);
19 void setParameterB(System::String^ slotname,
bool b);
20 void setTextureFileName(System::String^ slotname, System::String^ texfilename);
21 void setTexture(System::String^ slotname, Texture^ tex);
22 Texture^ getTexture(System::String^ slotname);
23 Texture^ getTexture(
int index);
24 int getEnumCount(System::String^ slotname);
25 System::String^ getEnumString(System::String^ slotname,
int index);
26 static int getMaterialTextureNumMax() {
return USER_FP_TEXTURE_NUM_MAX; }
28 System::String^ getShaderName();
30 bool getSlotName(
int idx, UNIFORMPARAMTYPE %paramtype,
32 [Runtime::InteropServices::Out] System::String ^%name);
34 float getParameterF(System::String^ slotname,
int channel);
35 int getParameterI(System::String^ slotname,
int channel);
36 float getParameterMin(System::String^ slotname,
int channel);
37 float getParameterMax(System::String^ slotname,
int channel);
38 bool getParameterB(System::String^ slotname);
39 System::String^ getTextureFileName(System::String^ slotname);
41 float getUScrollSpeed();
42 float getVScrollSpeed();
43 void setUScrollSpeed(
float v);
44 void setVScrollSpeed(
float v);
45 unsigned int getUDiv();
46 unsigned int getVDiv();
47 void setUDiv(
unsigned int v);
48 void setVDiv(
unsigned int v);
49 float getUVStepInterval();
50 void setUVStepInterval(
float v);
51 bool getUVStepUseModelUVOrigin();
52 void setUVStepUseModelUVOrigin(
bool v);
53 unsigned int getUVStepFrameCount();
54 void setUVStepFrameCount(
unsigned int v);
55 void enableUScrollAnim(
bool flg);
56 void enableVScrollAnim(
bool flg);
57 void enableUVStepAnim(
bool flg);
58 bool isEnableUScrollAnim();
59 bool isEnableVScrollAnim();
60 bool isEnableUVStepAnim();
61 void enableEmissiveBlink(
bool flg);
62 bool isEnableEmissiveBlink();
63 void setEmissiveBlinkSpeed(
float v);
64 float getEmissiveBlinkSpeed();
65 void enableEmissiveLinkBuildingLight(
bool flg);
66 bool isEmissiveLinkBuildingLight();
67 void setCastShadow(
bool flg);
69 bool isEnableSetSortIndex();
70 int getSortIndex() {
return obj!=
nullptr ? obj->getSortIdx() : 0; }
71 void setSortIndex(
int val) {
if (obj)obj->setSortIdx(val); }
72 void setUVOffset(XXSharpKmyMath::Vector2 v);
73 XXSharpKmyMath::Vector2 getUVOffset();
74 void setUVScale(XXSharpKmyMath::Vector2 v);
75 XXSharpKmyMath::Vector2 getUVScale();
76 CULLTYPE getCullType() {
return (CULLTYPE)obj->getPolygonState().m_cullType; }
77 void setCullType(CULLTYPE t) {
78 auto ps = obj->getPolygonState();
79 ps.m_cullType = (kmyGfx::CULLTYPE)t;
80 obj->setPolygonState(ps);
82 void setDrawOutlineEnable(
bool flg)
84 if (obj)obj->setDrawOutlineEnable(flg);
86 bool getDrawOutlineEnable()
88 if (obj)
return obj->getDrawOutlineEnable();
91 void setOutlineWidth(
float w)
93 if (obj)obj->setOutlineWidth(w);
95 float getOutlineWidth()
97 if (obj)
return obj->getOutlineWidth();
100 void setOutlineColor(Color color)
102 if (obj)obj->setOutlineColor(kmyGfx::Color(color.r, color.g, color.b, color.a));
104 Color getOutlineColor()
106 kmyGfx::Color c = kmyGfx::Color::black();
107 if(obj)c = obj->getOutlineColor();
108 return Color(c.r, c.g, c.b, c.a);
110 void setOverrideOutlineSetting(
bool flg)
112 if (obj)obj->setOverrideOutlineSetting(flg);
114 bool getOverrideOutlineSetting()
116 if (obj)
return obj->getOverrideOutlineSetting();
119 void setDistanceFadeEnable(
bool flg) {
if (obj)obj->setDistanceFadeEnable(flg); }
120 bool getDistanceFadeEnable() {
return obj ? obj->getDistanceFadeEnable() :
false; }
121 void setReceiveDecal(
bool flg) {
if (obj)obj->setReceiveDecal(flg); }
122 bool getReceiveDecal() {
return obj ? obj->getReceiveDecal() :
false; }
124 static bool getCommonDrawOutlineEnable()
126 return kmyGfx::Material::getCommonDrawOutlineEnable();
128 static void setCommonDrawOutlineEnable(
bool flg)
130 return kmyGfx::Material::setCommonDrawOutlineEnable(flg);
132 static float getCommonOutlineWidth()
134 return kmyGfx::Material::getCommonOutlineWidth();
136 static void setCommonOutlineWidth(
float w)
138 kmyGfx::Material::setCommonOutlineWidth(w);
140 static Color getCommonOutlineColor()
142 kmyGfx::Color c = kmyGfx::Material::getCommonOutlineColor();
143 return Color(c.r, c.g, c.b, c.a);
145 static void setCommonOutlineColor(Color color)
147 kmyGfx::Color c(color.r, color.g, color.b, color.a);
148 kmyGfx::Material::setCommonOutlineColor(c);
151 bool isEnableSetCastShadow() {
return obj->isEnableSetCastShadow(); }
153 System::String^ getDefText();
154 void setDefByText(System::String^ text);
156 kmyGfx::Material *obj =
nullptr;
UNIFORMPARAMTYPE
Definition: GfxTypes.cs:90
CULLTYPE
Definition: GfxTypes.cs:82