Usually, this is done by setting the Colors property in the PointGeometry3D object of your PointGeometryModel3D. You have to build the Geometry on your own.
- Create the render positions
- Create the colors
Tell the renderer the order of your position and colors (List indices in Positions/Colors)
//create PointGeometryModel3D object
PointGeometryModel3D pgm = new PointGeometryModel3D();
//create positions
pgm.Geometry.Positions = new HelixToolkit.Wpf.SharpDX.Core.Vector3Collection();
pgm.Geometry.Positions.AddRange(
new SharpDX.Vector3[]
{ new SharpDX.Vector3(0,1,2),
new SharpDX.Vector3(1,2,3),
new SharpDX.Vector3(3,2,3),
});
//create colors
pgm.Geometry.Colors = new HelixToolkit.Wpf.SharpDX.Core.Color4Collection();
pgm.Geometry.Colors.AddRange(
new SharpDX.Color4[]
{
new SharpDX.Color4(1f,0,0,1),
new SharpDX.Color4(0,1f,0,1),
new SharpDX.Color4(0,0,1f,1)
});
//create indices
pgm.Geometry.Indices = new HelixToolkit.Wpf.SharpDX.Core.IntCollection();
pgm.Geometry.Indices.AddRange(
new int[]
{
0,
1,
2,
});
Please let me know if it worked for you. I couldn't make it work with LineGeometry3D and different line colors. There must somewhere be an option to make the renderer use the Color vertices instead of the (single) color property.