26 #ifdef G4VIS_BUILD_OI_DRIVER
38 #include <Inventor/nodes/SoMaterial.h>
39 #include <Inventor/nodes/SoDrawStyle.h>
40 #include <Inventor/nodes/SoLightModel.h>
41 #include <Inventor/nodes/SoResetTransform.h>
53 fMaterials =
new SoGroup;
55 fLineStyles =
new SoGroup;
56 addChild(fLineStyles);
57 fLightModels =
new SoGroup;
58 addChild(fLightModels);
59 fResetTransform =
new SoResetTransform;
60 addChild(fResetTransform);
78 for(
int index=0;index<number;index++) {
80 if( (material->diffuseColor[0]==aRGB) &&
81 (material->transparency[0]==aTransparency) ) {
85 SoMaterial* material =
new SoMaterial;
86 material->diffuseColor.setValue(aRGB);
87 material->transparency.setValue(aTransparency);
101 SbColor aRGB(aRed,aGreen,aBlue);
103 for(
int index=0;index<number;index++) {
104 SoMaterial* material = (SoMaterial*)
fMaterials->getChild(index);
105 if( (material->diffuseColor[0]==aRGB) &&
106 (material->transparency[0]==aTransparency) ) {
110 SoMaterial* material =
new SoMaterial;
111 material->diffuseColor.setValue(aRGB);
112 material->transparency.setValue(aTransparency);
159 unsigned short aPattern
166 for(
int index=0;index<number;index++) {
167 SoDrawStyle* drawStyle = (SoDrawStyle*)
fLineStyles->getChild(index);
168 if( (drawStyle->style.getValue()==SoDrawStyle::LINES) &&
169 (drawStyle->lineWidth.getValue()==aWidth) &&
170 (drawStyle->linePattern.getValue()==aPattern) ) {
174 SoDrawStyle* drawStyle =
new SoDrawStyle;
175 drawStyle->style.setValue(SoDrawStyle::LINES);
176 drawStyle->lineWidth.setValue(aWidth);
177 drawStyle->linePattern.setValue(aPattern);
187 SoLightModel* lightModel =
new SoLightModel;
188 lightModel->model.setValue(SoLightModel::PHONG);
198 SoLightModel* lightModel =
new SoLightModel;
199 lightModel->model.setValue(SoLightModel::BASE_COLOR);