public MyIntersectionResultLineTriangle(ref MyTriangle_Vertexes triangle, ref MyTriangle_BoneWeigths? boneWeigths, ref Vector3 triangleNormal, double distance)
 {
     InputTriangle = triangle;
     InputTriangleNormal = triangleNormal;
     Distance = distance;
     BoneWeights = boneWeigths;
 }
        public MyTriangle_BoneWeigths? GetBoneWeights(int triangleIndex)
        {
            if (m_bonesWeights == null)
                return null;

            MyTriangleVertexIndices indices = Triangles[triangleIndex];

            MyCompressedBoneWeights boneWeightV0 = m_bonesWeights[indices.I0];
            MyCompressedBoneWeights boneWeightV1 = m_bonesWeights[indices.I1];
            MyCompressedBoneWeights boneWeightV2 = m_bonesWeights[indices.I2];

            Vector4 indicesV0 = boneWeightV0.Indices.ToVector4();
            Vector4 weightsV0 = boneWeightV0.Weights.ToVector4();

            Vector4 indicesV1 = boneWeightV1.Indices.ToVector4();
            Vector4 weightsV1 = boneWeightV1.Weights.ToVector4();

            Vector4 indicesV2 = boneWeightV2.Indices.ToVector4();
            Vector4 weightsV2 = boneWeightV2.Weights.ToVector4();

            MyTriangle_BoneWeigths ret = new MyTriangle_BoneWeigths()
            {
                Vertex0 = new MyVertex_BoneWeight() { Indices = new Vector3(indicesV0), Weights = new Vector3(weightsV0) },
                Vertex1 = new MyVertex_BoneWeight() { Indices = new Vector3(indicesV1), Weights = new Vector3(weightsV1) },
                Vertex2 = new MyVertex_BoneWeight() { Indices = new Vector3(indicesV2), Weights = new Vector3(weightsV2) }
            };
            return ret;
        }