Hi Denial!
I need your help.
Here is my problem, I use CC to read a data and then CC generate a ccGenericPointCloud. now I want to change this ccGenericPointCloud to a ccPointCloud with some scalars and let CC change points' color in this ccPointCloud according to the certain number in the first scalar. How can I do this?
ps: now I could generate ccPointCloud, but I don't know how to associate colormap(or something else) to scalars of ccPointCloud.
How can I change the color of points in ccPointCloud?
-
- Posts: 16
- Joined: Mon Sep 26, 2016 12:46 am
Re: How can I change the color of points in ccPointCloud?
I guess you have already found that ccPointCloud instances are also ccGenericPointCloud instances.
Now if you want to add scalars, you'll need to add a scalar field to the cloud (you can see how this is done in several places, look for methods that creat 'ccScalarField' instances). And you can associate this ccScalarField object to color scales (ccColorScale). the Color Scale Manager (ccColorScaleManager) can provide you with default scales.
If you opt for a relative color scale, scalar fields also have some display settings (min and max saturation, etc.) to let you control how colors are assigned to points.
Now if you want to add scalars, you'll need to add a scalar field to the cloud (you can see how this is done in several places, look for methods that creat 'ccScalarField' instances). And you can associate this ccScalarField object to color scales (ccColorScale). the Color Scale Manager (ccColorScaleManager) can provide you with default scales.
If you opt for a relative color scale, scalar fields also have some display settings (min and max saturation, etc.) to let you control how colors are assigned to points.
Daniel, CloudCompare admin