예제 #1
0
 public void SetValue(VertexInfoType type, Vector3 value)
 {
     if (inputs.ContainsKey(type))
     {
         inputs[type] = value;
     }
 }
예제 #2
0
 public Vector3 GetValue(VertexInfoType type)
 {
     if (inputs.ContainsKey(type))
     {
         return(inputs[type]);
     }
     else
     {
         return(Vector3.Zero);
     }
 }
예제 #3
0
        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);
        }
예제 #4
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);
        }