public void SetValue(VertexInfoType type, Vector3 value) { if (inputs.ContainsKey(type)) { inputs[type] = value; } }
public Vector3 GetValue(VertexInfoType type) { if (inputs.ContainsKey(type)) { return(inputs[type]); } else { return(Vector3.Zero); } }
private int GetOffsetForTriangleSourceInput(VertexInfoType inputType) { foreach (Grendgine_Collada_Input_Shared inp in meshData.Triangles[0].Input) { if (VertexData.MapSemanticStringToVertexInfoType(inp.Semantic.ToString()) == inputType) { return(inp.Offset); } } FearLog.Log("Could not find an offset for the inputType " + inputType.ToString(), LogPriority.ALWAYS); return(0); }
public SourceData CreateSourceData(Grendgine_Collada_Source src, VertexInfoType vertType) { SourceData data; switch (vertType) { case VertexInfoType.POSITION: data = new SourceDataPositionImpl(src); break; case VertexInfoType.NORMAL: data = new SourceDataNormalImpl(src); break; case VertexInfoType.TANGENT: data = new SourceDataTangentImpl(src); break; case VertexInfoType.BITANGENT: data = new SourceDataBiTangentImpl(src); break; case VertexInfoType.TEXCOORD1: data = new SourceDataTexcoord1Impl(src); break; case VertexInfoType.TEXCOORD2: data = new SourceDataTexcoord2Impl(src); break; default: throw new UnknownSourceTypeException(); } return(data); }