Article | 60001175 |
Type | Wish |
Product | Engine |
Version | 6018 |
Date Added | 6/23/2010 |
Fixed | Yes [7/9/2010] |
Submitted by | Wayne Romer |
Keywords |
In version 6019 a new property GradientColors was added in vdPolyFace object.
Description: Get/Set an array of elevations with their colors used for gradient rendering.
Example in C#:
//If the first entity in the Model entities is a vdPolyface object
//then select gradient colors for 5 diferent levels between minimum and maximum elevation of the entity bounding box
vdPolyface pf = doc.Model.Entities[0] as vdPolyface;
if(pf != null){
ElevatedGradientColors elevColors = new ElevatedGradientColors();
Box bound = pf.BoundingBox;
int ncolors = 5;
for (int i = 0; i < ncolors; i++)
{
elevColors.SetAt(i * (bound.ZMax - bound.ZMin) / ncolors, doc.Palette[i].SystemColor);
}
pf.GradientColors = elevColors;
}
//GradientColors are supported only with vdRender.Mode.Shade , vdRender.Mode.ShadeOn and vdRender.Mode.Render
doc.RenderMode = vdRender.Mode.Shade;