void ProcessVertex(ref Vector3F position, out Vector3F result) { Matrix4? nullable = new Matrix4?(PosCenter.Value.ToMatrix4()); Matrix4 matrix4 = nullable ?? Matrix4.Identity; Matrix4F matrix4f = matrix4.ToMatrix4F(); bool inv = matrix4f.Inverse(); MatrixInv = inv; ResPosVec1 = matrix4f * Pos1n.Value.Position.ToVector3F(); result = position; var sc = new Vector3F(0.2f, 0.2f, 0.2f); var rposition = position * sc; var l_r01 = (float)Pos01n.Value.Scale.X; var relp01 = (Pos01n.Value.Position).ToVector3F(); var l_dist1 = (rposition - relp01); float l_l01 = l_dist1.Length(); var l_r02 = (float)Pos02n.Value.Scale.X; var relp02 = (Pos02n.Value.Position).ToVector3F(); var l_dist2 = (rposition - relp02); float l_l02 = l_dist2.Length(); var l_r03 = (float)Pos03n.Value.Scale.X; var relp03 = (Pos03n.Value.Position).ToVector3F(); var l_dist3 = (rposition - relp03); float l_l03 = l_dist3.Length(); var l_r04 = (float)Pos04n.Value.Scale.X; var relp04 = (Pos04n.Value.Position).ToVector3F(); var l_dist4 = (rposition - relp04); float l_l04 = l_dist4.Length(); var f = ((ResPos1.Value.Position - PosCenter.Value.Position) / sc).ToVector3F().GetNormalize(); SphericalDirectionF sd = new SphericalDirectionF(f.X, f.Y); float ax = MathEx.Acos(f.X); float ay = MathEx.Asin(f.X); QuaternionF q = new AnglesF().ToQuaternion(); if (l_l01 <= l_r01) { var relp1 = matrix4f * Pos1n.Value.Position.ToVector3F(); result = relp1; } if (l_l02 <= l_r02) { var relp2 = matrix4f * Pos2n.Value.Position.ToVector3F();; result = relp2; } if (l_l03 <= l_r03) { var relp3 = matrix4f * Pos3n.Value.Position.ToVector3F();; result = relp3; } if (l_l04 <= l_r04) { var relp4 = matrix4f * Pos4n.Value.Position.ToVector3F();; result = relp4; } }