protected virtual void CreateBoundingBox(List <Vector3> vertexList, float multiplier = 1f) { vertices = new Vector3[vertexList.Count]; for (int i = 0; i < vertexList.Count; i++) { vertices[i] = (Vector3)Vector3.Transform(vertexList[i] * multiplier, world); } boundingBox = BoundingBox.FromPoints(vertices); if (renderingDictionary.ContainsKey(_modelAssetID)) { IAssetWithModel assetWithModel = renderingDictionary[_modelAssetID]; if (assetWithModel.HasRenderWareModelFile()) { triangles = assetWithModel.GetRenderWareModelFile().triangleList.ToArray(); } else { triangles = null; } } else { triangles = null; } }
public static void AddToRenderingDictionary(uint key, IAssetWithModel value) { renderingDictionary[key] = value; }