I am developing plugin to create 3D Annotation Object.
I have written code of Default View. But it is not activating when 3D Annotation object is opened.
However it is activated when i click on "Default View" on 3D Toolbar, but background color, rendering style and lighting type for 3D object are also changing.
I dont want Background Color, Rendering Style and Lighting type to change!!!
My code:
CosDoc cosDoc = CosObjGetDoc(cosAnnot);
CosObj cosView = CosNewDict (cosDoc, true, 8);
CosDictPutKeyString(cosView,"XN",CosNewString(cosDoc, false, "Default View", strlen("Default View")));
CosDictPutKeyString(cosView, "Type", CosNewName(cosDoc, false, ASAtomFromString("3DView")));
double gMatrixVals[12] =
{
-1.0, 0.0, 0.0,
0.0, 0.0, 1.0,
0.0, 1.0, 0.0,
0.0, -255.0, 0.0
};
float gCOvalue = (float) 255;
CosDictPutKeyString(cosView, "MS",CosNewNameFromString(cosDoc, false, "M"));
CosDictPutKeyString(cosView, "CO", CosNewFixed(cosDoc, false,FloatToASFixed(gCOvalue)));
CosObj matrixArray = CosNewArray(cosDoc, false, 12);
for(int i=0; i<12; i++)
CosArrayPut(matrixArray, i,CosNewFloat(cosDoc, false, (float) gMatrixVals[i]));
CosDictPutKeyString(cosView, "C2W", matrixArray);
CosDictPutKeyString(cosAnnot, "3DV", cosView);
Can anyone help me?
Thanks in Advance.