public void GetData(FacePoint facepoint, List <IDataBuffer> buffers) { if (facepoint.BufferIndices == null) { return; } for (int i = 0; i < facepoint.BufferIndices.Count; ++i) { IDataBuffer b = buffers[i]; int index = facepoint.BufferIndices[i]; EBufferType type = b.Type; switch (type) { case EBufferType.Position: Position = (Vec3)b[index]; break; case EBufferType.Normal: Normal = (Vec3)b[index]; break; case EBufferType.Binormal: Binormal = (Vec3)b[index]; break; case EBufferType.Tangent: Tangent = (Vec3)b[index]; break; case EBufferType.Color: Color = (ColorF4)b[index]; break; case EBufferType.TexCoord: TexCoord = (Vec2)b[index]; break; } } }
/// <summary> /// Convert VulkanCore.ColorF4 to Spectrum.Color.RGB /// </summary> /// <param name="color"></param> /// <returns></returns> public static Color.RGB ToSpectrum(this ColorF4 color) { return(new Color.RGB((byte)(color.R * 255), (byte)(color.G * 255), (byte)(color.B * 255))); }
public VertexPosTexColor(Vector3 position, Vector2 texCoord, ColorF4 color) { Position = position; TexCoord = texCoord; Color = color; }
public VertexPosColor(Vector3 position, ColorF4 color) { Position = position; Color = color; }
/// <summary> /// Initializes a new instance of the <see cref="DebugMarkerMarkerInfoExt"/> structure. /// </summary> /// <param name="markerName">A unicode string that contains the name of the marker.</param> /// <param name="color"> /// An optional RGBA color value that can be associated with the marker. A particular /// implementation may choose to ignore this color value. The values contain RGBA values in /// order, in the range 0.0 to 1.0. If all elements in color are set to 0.0 then it is ignored. /// </param> public DebugMarkerMarkerInfoExt(string markerName, ColorF4 color = default(ColorF4)) { MarkerName = markerName; Color = color; }
public Vertex(Vec3 position, InfluenceDef inf, Vec3 normal, Vec3 binormal, Vec3 tangent, Vec2 texCoord, ColorF4 color) : this(position, inf, normal, texCoord, color) { Binormal = binormal; Tangent = tangent; }
public Vertex(Vec3 position, InfluenceDef inf, Vec3 normal, Vec2 texCoord, ColorF4 color) : this(position, inf, normal, texCoord) { Color = color; }
public Vertex(Vec3 position, Vec3 normal, Vec3 binormal, Vec3 tangent, Vec2 texCoord, ColorF4 color) : this(position, null, normal, texCoord, color) { Binormal = binormal; Tangent = tangent; }
public Vertex(Vec3 position, Vec3 normal, Vec2 texCoord, ColorF4 color) : this(position, null, normal, texCoord) { Color = color; }