ParallelGraphics Forums
SDK
You are here: [Forums]::[General]::[SDK]

Registration 
Registration
Forgot your password?

Help 
Help
Support

Quick search 

Subscribe to newsletters 

Install Cortona VRML Client for FREE!
Outline 3D
Try RobinZone!
email:  password:
   General - SDK

Subject: Acsessing coordinates in IndexedFaceSet
Sender: filip.krystl@atlas.cz 6.12.06 12:09

Hi,

I have a problem in accessing coordinates in indexedFaceSet node. I have got the access to Node of the coord and also access to field "point" but after this I am lost. I cant get the points to any structure, like field of MFVec3F or in some kind of list. Can some one halp me?

wrl:

DEF Cylinder01 Transform {
translation 1.819 0 65.27
children [
Shape {
appearance Appearance {
material Material {
diffuseColor 0.3373 0.3373 0.3373
}
}
geometry DEF Cylinder01-FACES IndexedFaceSet {
ccw TRUE
solid TRUE
coord DEF Cylinder01-COORD Coordinate { point [
0 0 0, 29.59 0 0, 9.145 0 -28.15, -23.94 0 32]
}
}}}

C++:


    VARIANTARG hhh;
    VariantInit(&hhh);
    hhh.vt = VT_BSTR;
hhh.bstrVal = SysAllocString( L"Cylinder01-COORD" );

    IDispatch* pdisp = m_Cortona.get_Engine();

    INodeObject* pCoordTransform = NULL;
    INodesCollection* pNodes;
    
m_pEngine->get_Nodes(&pNodes);


HRESULT hr=pNodes->get_Item(&hhh,&pCoordTransform );
    pNodes -> Release();
    VariantClear( &hhh );

    IFieldsCollection* pCoordFields;

    hr = pCoordTransform -> get_Fields(&pCoordFields );
    pCoordTransform -> Release();
    

    VariantInit( &hhh );
    hhh.vt = VT_BSTR;
    hhh.bstrVal = SysAllocString( L"point" );

    IFieldObject* pCoordField;


    hr = pCoordFields -> get_Item ( &hhh,&pCoordField);
    pCoordFields -> Release();
    VariantClear( &hhh);
    
?????????????????????????????????????????????????????    
IMFVec3fObject* m_pMFCoord[100];

hr = pCoordField->QueryInterface(IID_IMFVec3fObject,(void**) m_pMFCoord);
???????????????????????????????????????????????????????

 


Acsessing coordinates in IndexedFaceSet / filip.krystl@atlas.cz / 6.12.06 12:09

Messages in thread: 1


© 1998-2007 ParallelGraphics. All rights reserved. Terms of use.