Chi-Tech
material_property_scalarvalue.h
Go to the documentation of this file.
1#ifndef CHI_PHYSICS_PROPERTY_SCALAR_VALUE_H
2#define CHI_PHYSICS_PROPERTY_SCALAR_VALUE_H
3
5
6
7namespace chi_physics
8{
9
10//###################################################################
11/**Simple scalar material property.*/
13{
14public:
15 double value_=1.0;
16
18
19 double GetScalarValue() override { return value_; }
20 void PushLuaTable(lua_State* L) const override
21 {
22 lua_newtable(L);
23 lua_pushstring(L,"is_empty");
24 lua_pushboolean(L,false);
25 lua_settable(L,-3);
26
27 lua_pushstring(L,"value");
28 lua_pushnumber(L, value_);
29 lua_settable(L,-3);
30 }
31
32};
33
34}//namespace chi_physics
35
36#endif //CHI_PHYSICS_PROPERTY_SCALAR_VALUE_H
void PushLuaTable(lua_State *L) const override