7 [
Attribute(uiwidget: UIWidgets.ResourcePickerThumbnail,
params:
"xob et")]
29 vector m_vAnglesTerrain;
30 float m_vHeightTerrain;
32 IEntitySource m_EntitySource;
38 void SetScale(
float scale)
40 m_vScale = Vector(scale, scale, scale);
57 void SaveTransform(vector transform[4])
59 m_vAngles = Math3D.MatrixToAngles(transform);
60 Math3D.MatrixToQuat(transform, m_fQuat);
67 void LoadTransform(vector outTransform[4])
69 if (m_fQuat[0] != 0 || m_fQuat[1] != 0 || m_fQuat[2] != 0 || m_fQuat[3] != 0)
70 Math3D.QuatToMatrix(m_fQuat, outTransform);
72 Math3D.AnglesToMatrix(Vector(m_vAngles[1], m_vAngles[0], m_vAngles[2]), outTransform);
82 string text =
string.Format(
"prt: %1 | pvt: '%2' | scl: %3 | pos: %4 | ang: %5 | angT: %6 | hT: %7 | flg: %8 | shape: '%9'", m_iParentID, m_iPivotID, m_vScale,
m_vPosition, m_vAngles, m_vAnglesTerrain, m_vHeightTerrain, flagNames, mesh);
83 PrintFormat(
"%1: %2",
index, text);
87 m_iParentID = from.m_iParentID;
89 m_Flags = from.m_Flags;
91 m_iPivotID = from.m_iPivotID;
92 m_vScale = from.m_vScale;
94 m_fQuat = from.m_fQuat;
95 m_vAngles = from.m_vAngles;
96 m_vAnglesTerrain = from.m_vAnglesTerrain;
97 m_vHeightTerrain = from.m_vHeightTerrain;
99 m_EntitySource = from.m_EntitySource;
109 void SaveToContainer(WorldEditorAPI api, IEntitySource entitySource, array<ref ContainerIdPathEntry> entryPath)
111 api.SetVariableValue(entitySource, entryPath,
"m_iParentID", m_iParentID.ToString());
112 api.SetVariableValue(entitySource, entryPath,
"m_Mesh", m_Mesh);
113 api.SetVariableValue(entitySource, entryPath,
"m_Shape",
m_Shape.ToString());
114 api.SetVariableValue(entitySource, entryPath,
"m_iPivotID", m_iPivotID);
115 api.SetVariableValue(entitySource, entryPath,
"m_vScale", m_vScale.ToString(
false));
116 api.SetVariableValue(entitySource, entryPath,
"m_vPosition",
m_vPosition.ToString(
false));
117 api.SetVariableValue(entitySource, entryPath,
"m_vAngles", m_vAngles.ToString(
false));
118 api.SetVariableValue(entitySource, entryPath,
"m_Flags", m_Flags.ToString());