info-inventor
[Top] [All Lists]

compiling inventor on 64-bit Suse 10 Linux: red bias

To: <info-inventor@xxxxxxxxxxx>
Subject: compiling inventor on 64-bit Suse 10 Linux: red bias
From: "Audette, Michel" <Michel.Audette@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 13 Dec 2007 13:52:25 +0100
References: <160E3DD4FB702C4CB860C65186686E69015F1ECB@MRZS152229.medizin.uni-leipzig.de> <004c01c83816$bb82b300$8400020a@kitwarein.com> <160E3DD4FB702C4CB860C65186686E690201FBEE@MRZS152229.medizin.uni-leipzig.de> <005e01c83820$12d70710$8400020a@kitwarein.com> <160E3DD4FB702C4CB860C65186686E690201FBFC@MRZS152229.medizin.uni-leipzig.de> <160E3DD4FB702C4CB860C65186686E690201FC00@MRZS152229.medizin.uni-leipzig.de>
Sender: info-inventor-bounce@xxxxxxxxxxx
Thread-index: Acg33u8fUECkh5CUTKyxT/VboarYbAAN4UdgAADGRG8AAVsa4AAyW338AAZedHoBIUhHZA==
Thread-topic: compiling inventor on 64-bit Suse 10 Linux: red bias
Dear all, 

I have compiled inventor on Suse 10 64-bit Linux, and there seems to be an odd 
red bias in what I am seeing. I have modified the example 
05.2.IndexedFaceSet.c++ , as enclosed below... and I am seeing a red stellated 
dodecahedron, even with no color specified at all. If I try to specify a blue, 
I get a magenta, and so on. 

I compiled with -fPIC. Can anyone suggest a course of action. 

#if 0 
// Colors for the 12 faces
static float colors[12][3] =
{
   {1.0, .0, 0}, { .0,  .0, 1.0}, {0, .7,  .7}, { .0, 1.0,  0},
   { .7, .7, 0}, { .7,  .0,  .7}, {0, .0, 1.0}, { .7,  .0, .7},
   { .7, .7, 0}, { .0, 1.0,  .0}, {0, .7,  .7}, {1.0,  .0,  0}
};
#else
// Colors for the 12 faces
static float colors[12][3] =
{
   { 0.0, 0.0,  0.0},{ 0.0, 0.0,  0.0},{ 0.0, 0.0,  0.0},{ 0.0, 0.0,  0.0},
   { 0.0, 0.0,  0.0},{ 0.0, 0.0,  0.0},{ 0.0, 0.0,  0.0},{ 0.0, 0.0,  0.0},
   { 0.0, 0.0,  0.0},{ 0.0, 0.0,  0.0},{ 0.0, 0.0,  0.0},{ 0.0, 0.0,  0.0}
};
#endif

// Routine to create a scene graph representing a dodecahedron
SoSeparator *
makeStellatedDodecahedron()
{
   SoSeparator *result = new SoSeparator;
   result->ref();

   SbVec3f  pos1= SbVec3f(0,0,3); 
   SbVec3f  pos2= SbVec3f(0,0,-3); 
   SbVec3f  colorWhite=  SbVec3f(1,1,1); 
   SoPointLight * light1 = new SoPointLight;
   SoPointLight * light2 = new SoPointLight;
   light1->location.setValue(pos1);
   light1->color.setValue(colorWhite);
   light2->location.setValue(pos2);
   light2->color.setValue(colorWhite);
   result->addChild(light1);               
   result->addChild(light2);               

   // Define colors for the faces
   SoMaterial *myMaterials = new SoMaterial;
   myMaterials->diffuseColor.setValues(0, 12, colors);
   result->addChild(myMaterials);
   SoMaterialBinding *myMaterialBinding = new SoMaterialBinding;
   myMaterialBinding->value = SoMaterialBinding::PER_FACE;
   result->addChild(myMaterialBinding);

   // Define coordinates for vertices
   SoCoordinate3 *myCoords = new SoCoordinate3;
   myCoords->point.setValues(0, 12, vertexPositions);
   result->addChild(myCoords);

   // Define the IndexedFaceSet, with indices into
   // the vertices:
   SoIndexedFaceSet *myFaceSet = new SoIndexedFaceSet;
   myFaceSet->coordIndex.setValues(0, 72, indices);
   result->addChild(myFaceSet);

   result->unrefNoDelete();
   return result;
}

I am a novice with inventor. 

Thanks for your kind assistance. 

Best regards, 

Michel Audette, Ph.D.  
Innovation Center Computer Assisted Surgery (ICCAS)  
Semmelweisstraße 14
Leipzig, Germany
Phone: ++49 (0) 341 / 97 - 1 20 13
Fax: ++49 (0) 341 / 97 - 1 20 09




<Prev in Thread] Current Thread [Next in Thread>
  • compiling inventor on 64-bit Suse 10 Linux: red bias, Audette, Michel <=