Jump to content

Problem with 3dmodeling struct


Recommended Posts

Hello everyone!

I got a problem accessing the members in a struct created in cc+ in conjuction with LabView.

I´m no Labview freak, learning though :-)

I got a struct

typedef struct {

long dimSizes[3];

unsigned char Numeric[1];

} TD2;

typedef TD2 **TD2Hdl;

A varible

static TD2Hdl hClassification3DModel_g;

A function for mapping the varible

static BOOL bCreateClassification3DModelFiberPos()

{

hClassification3DModelFiberPos_g = (TD2**)DSNewHandle(sizeof(TD2) + (sizeof(BYTE) * ((lSizeA_g * lSizeB_g * lSizeC_g) - 1)));

if (hClassification3DModelFiberPos_g == NULL)

return FALSE;

(*hClassification3DModelFiberPos_g)->dimSizes[0] = (lSizeA_g);

(*hClassification3DModelFiberPos_g)->dimSizes[1] = (lSizeB_g);

(*hClassification3DModelFiberPos_g)->dimSizes[2] = (lSizeB_g);

return TRUE;

}

How do i assing values to this struct.

I want to loop over all the positions and assign it a value to the right position.

As i said, I´m not familiar with LabView but i can type a pseudocode i c

for(int i=0; i<lSizeA_g;i++){

for(int j=0; j<lSizeB_g; j++){

for(int k=0; k<lsizeC_g; k++){

hClassification3DModel[j][k] = data;

}

}

}

How do I do this?

Tried (*hClassification3DModel)->Numeric = data. But how do I get it to loop over all the 3d picture?

Thanks in advance

Kresh

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.