Home
Reply
Regular Contributor
castillor
Posts: 74

Associate multiple facets to entities

Hello,

 

Does anyone know a way to associate multiple facet data to a single entity? We use this mainly for combination of display and analysis. Basically, we want to maintain one facet data for display purposes and generate another one for analysis. Thank you.

 

Regards,

Raymond

Spatial Employee
gweedo
Posts: 14

Re: Associate multiple facets to entities

// Make up some random numbers (maybe using the date and time)

uintptr_t MY_MESH_APP_ID =  0x12120148

uintptr_t MY_MESH_USER_ID = 0x12120149

 

 

// To save your mesh, put this statement into your MY_MESH_MANAGER::save_mesh_output(...) function, or override an existing mesh manager.

af_update (entity, MY_MESH_APP_ID, MY_MESH_USER_ID, mesh, TRUE );

 

 

// To get your mesh, do something like the following...

MY_MESH* GetMyMesh(const ENTITY* ent)

{

MESH* mesh = NULL;

af_query((ENTITY*)ent, MY_MESH_APP_ID, MY_MESH_USER_ID, mesh);

return (MY_MESH*)mesh;

}

 

 

// To keep multiple meshes, change  MY_MESH_APP_ID and/or MY_MESH_USER_ID.