I’d like to draw point or point cloud objects with colours and transparency individually set for each point. I managed to set individual colours by setting ON_PointCloud::m_C in the case of point cloud. But, transparency set in the same way as the colour is effective only when it is the drawn as “square with white centre” set from “display options”. Is it expected behaviour? I’d like to draw points as solid round dots and with transparency. Is there any way to do that? And is there any way to set how to draw points for individual objects? I assume setting it by CDisplayPipelineAttributes effects to all point or point cloud objects in the document.
CDisplayPipelineAttributes these properties, where
// Points specific attributes...
Everybody’s on vacation. I pretend I know something.
Thanks a lot for your response, while you’re on vacation too I assume. I guess the properties are effective to all point objects in a document, but I’d like to set them for each object individually.
If it was in a DisplayConduit, I would do this:
int count = points.Count();
int alpha = i * (255 / count);
ON_Color _color(255, 0, 0,alpha);
dp.DrawPoint(points[i], 4, RPS_ROUND_DOT, _color);
Thanks!! it seems what I wanted. I haven’t used DisplayConduit before, but I try.
If you want to set the point color in the RhinoDoc.
This should help you
Is there any way to do the same for PointCloud objects – to set colour and transparency for each point?
afaik no. PointCloud is a compacted data structure which doesn’t allow much per-point customization.
@stevebaer - is this something you can help with?
Point clouds do not currently support transparency.
Thanks for the info. Then, point could shown with transparency when “square with white centre” in display options is selected is not an expected behaviour? It would be appreciated if you could consider supporting it in the future release.