Article | 60000327 |
Type | Wish |
Product | Engine |
Version | 6012 |
Date Added | 11/23/2007 |
Fixed | Yes [5/29/2008] |
Submitted by | George Siarov |
Keywords |
Added in 6013.
New method added in VectorDraw.Geometry.gTriangles object named Volume with the following syntax:
/// <summary>
/// Calculate the volume of the collection sliced portion, using a plane from the passed parameters.
/// </summary>
/// <param name="origin">A point needed to determine the slice plane.</param>
/// <param name="direction">A Vector that is perpendicular to the plane and specifies the direction of the visible portion of the gTriangles.</param>
/// <returns>The volume of the sliced collection portion.</returns>
public double Volume(gPoint origin, Vector direction)
and can be used as following to a vdGroundSurface object :
vdGroundSurface gsurf = new vdGroundSurface();
gsurf.SetUnRegisterDocument(vdFramedControl.BaseControl.ActiveDocument);
gsurf.setDocumentDefaults();
//Fill Points Here
gsurf.Triangles.Volume(new gPoint(0, 0, 0), new Vector());
In the following picture in order to compute the volume above the blue plane we simply call the Volume method of the vdGroundSurface's triangles passing a point and a Vector that determine this Blue plane.