Hello, I want set different color in different plane of the box primitive. And I have modify the 'buildUp' method in ccBox.cpp, but it don't work.
So is there any solution to do this? Thanks.
How to set the plane of the box primitive with different color
Re: How to set the plane of the box primitive with different color
You'll have to add 'materials' to the primitive:
- define 6 materials (one per face). The color should be set on the 'diffuse' component of the material.
- then add per-triangle material indexes
- define the index for each triangle (each face of the box has 2 triangles)
- and don't forget to set 'showMaterials' to true
- define 6 materials (one per face). The color should be set on the 'diffuse' component of the material.
- then add per-triangle material indexes
- define the index for each triangle (each face of the box has 2 triangles)
- and don't forget to set 'showMaterials' to true
Daniel, CloudCompare admin
Re: How to set the plane of the box primitive with different color
Thanks daniel, I can set different color now.
And I want ask another question, how can I hide the bounding box of the box primitive or other primitive entity? I see other people have asked, but there is no answer.
And I want ask another question, how can I hide the bounding box of the box primitive or other primitive entity? I see other people have asked, but there is no answer.
Re: How to set the plane of the box primitive with different color
You mean programatically? If yes then you can simply call 'setSelected(false)'.
Daniel, CloudCompare admin