DG Kernel (ActiveX) Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
What is new
Upgrading Native Apps
Licensing
Collapse ModelsModels
Collapse DG Kernel ControlsDG Kernel Controls
Collapse API ReferenceAPI Reference
Interface List
Vector Space
Collapse General GeometryGeneral Geometry
Collapse ModelModel
Collapse ViewView
Collapse General ComputingGeneral Computing
Collapse ViewsViews
Collapse Samples and TutorialsSamples and Tutorials
Collapse GraphicsGraphics
Collapse Math ObjectsMath Objects
Collapse DeprecatedDeprecated
Redistribution
Model Viewer
Open Source
Support
Skip Navigation Links Go to DGKC docs Search Documentation


I3DGrid(64) Interface

Create
GetCellCount
GetRanges
GetBox
FindBox
GetCover

I3DGrid interface gives access to 3D grid of of an object. It can be queried from the relevant ISection interface.

See also: Interface List


HRESULT Create(int cellsMaxDimension)

Parameters

cellsMaxDimension - [in] number of cells the longest dimension of the Bounding Box of the object will be divided into.

Remarks:

Creates the grid for the object I3DGrid was queried form. The method obtains Axis Aligned Bounding Box of the object, copies it as initial size of the box of the grid, divides its longest side into cellsMaxDimension cells. Two other dimensions of the bounding box are are adjusted by increasing its size to satisfy requirements. After this number of cells in remaining dimensions are calculated. These parameters can be retrieved with calls to GetRanges and GetCellCount methods below.


HRESULT GetCellCount(KCN3* cellCount)

Parameters

cellCount - [out]  The returned count of cells in each dimension.

Remarks:

Returns count of cells in each dimension.


HRESULT GetRanges(KCBox* ranges)

Parameters

ranges - [out] The returned dimensions of the box of the grid.

Remarks:

Returns dimensions of the box of the grid


HRESULT GetBox(KCN3* index, KCBox* ranges)

Parameters

ranges [out] The returned subdivision box of cell index

Remarks:

Returns location and dimensions of the subdivision box identified by its 3D index.


HRESULT FindBox(DIPoint* point, KCN3* index)

Parameters

point - [in] Input point to find a box for.

index - [out] The returned 3D index of the subdivision box where the point belongs
Remarks:

For a 3D point calculates index of the box there the point belongs.


HRESULT GetCover(VARIANT_BOOL intern, VARIANT_BOOL shell, VARIANT_BOOL external, IList** cover, KCN3* count)

Parameters

intern - [in] Indicates whether boxes fully inside the internal area of the object should be added to the cover list.

shell - [in] Indicates whether boxes covering external surface of the object should be added to the cover list.

external - [in] Indicates whether boxes fully outside of the object should be added to the cover list.

count - [out] Returned count of internal (element 0), shell (element 1) and external (element 2) boxes in the cover list.

Remarks:

All subdivision boxes in the grid are divided in three categories: internal, external and ones which have non-empty intersection with the geometric surface of the object. The method lists all boxes of the requested categories in the cover list. Elements of the list have type of KCN3*, and are 3D indices of the boxes. Use GetBox method above to obtain location of the boxes.