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


IPropertyArray Interface

GetCount
GetProperty
GetName
SetProperty
GetPropertyEx

All indices in DG Kenel are 0-based

IPropertyArray is an alternative to QueryInterface() way to obtain access to some generic interfaces. IPropertyArray retrieves interfaces by its name. For example IPropertyArray implemented by a generic 3D Object has a property named "TextureArray". See Properties topic for the list of all available properties.

In this release all properties are arrays themselves (this not necessarily will be the case in future releases.), which may be confusing. So practically the property array is array of arrays or a method to distinguish between different IArray interfaces implemented by the object. 

IPropertyArray2 interface is an alternative for environments which can not interpret some of data types present in the interface

See also Properties, IPropertyArray2, Light Sample, Texture Sample, ITexture, IArray Interface, Interface List


HRESULT GetCount(int * pnCount)

Parameters

pnCount- [out] Pointer to an integer variable which will be set to number of properties in the array

Returns

S_OK in case of success.

HRESULT GetProperty(char* szPropertyName, IUnknown **ppIUnkn)

Parameters

szPropertyName - [in] name of the property to retrieve.

ppIUnkn - [out] pointer to a IUnknown* variable, which will contain interface to the property

Return Values

S_OK in case of success.

DISP_E_PARAMNOTOPTIONAL - if the property  is not available.

Remarks:
 
This method gives access to the named property of the object, which implements the IPropertyArray. Most often actual type of the interface is different from IUnknown and can be cast to the specific type, which is described for each specific use of the IPropertyArray interface. 

HRESULT GetName(int index, char* szName)

Parameters

index - [in] index of the property to retrieve

szName - [out] pointer to a variable, which will be set assigned the name of the property. Maximal length of a property name in the current release is 30 characters. This length can be retrieved programmatically as value of member of enumeration EDIConst. C++ declaration of the enumeration can be found in Samples\VC\Include\DITypes.h file (include DIInterface.h)

Return Values

S_OK in case of success.

DISP_E_BADINDEX - if the index is out of range

DISP_E_PARAMNOTOPTIONAL - if the property  is szName is NULL.

Remarks:
 
Call this method to query for available properties.

HRESULT SetProperty(char* szPropertyName, IUnknown *iUnknown)

Parameters

szPropertyName - [in] name of the property to retrieve.

iUnknown - [in] reference to a IUnknown, which will be assigned an appropriate  interface which gives access to the property..

Return Values

S_OK in case of success.

DISP_E_PARAMNOTOPTIONAL - if the property  is not available.

Remarks:
 
AAssigns new value to the property. One usage: When this IPropertyArray is implemented by a model (queried form IModel) call SetProperty("RawUserData", NULL) will delete the unformatted user defined data embedded in the model.

HRESULT GetPropertyEx(char* szPropertyName, int par0, int par1, IUnknown **ppIUnkn)

PParameters

szPropertyName - [in] name of the property to retrieve.

par0, par1 - [in] Additional property - dependent parameters.

ppIUnkn -- [out,retval] pointer to a IUnknown* variable, which will contain interface to the property. Most often this interface can be cast to a more complex type specific to the property

Remarks:
 
This method returns the named property of the object. The relevant attributes are created if they did not exist so far. The parameters par0, par1 can be used to specify the type of the created attributes. Meaning of par0, par1 is explained in documentation of each specific property.