void _lucEigenvectorsCrossSection_AssignFromXML( void* drawingObject, Stg_ComponentFactory* cf, void* data )
{
   lucEigenvectorsCrossSection* self = (lucEigenvectorsCrossSection*)drawingObject;

   /* Construct Parent */
   self->defaultResolution = 8;  /* Default sampling res */
   _lucCrossSection_AssignFromXML( self, cf, data );
   self->gatherData = False;     /* Drawn in parallel */
   strcpy(self->fieldVariableName, "TensorField");

   _lucEigenvectorsCrossSection_Init(
      self,
      Stg_ComponentFactory_GetRootDictUnsignedInt( cf, (Dictionary_Entry_Key)"dim", 2  ),
      Stg_ComponentFactory_GetString( cf, self->name, (Dictionary_Entry_Key)"leastColour", "black"  ),
      Stg_ComponentFactory_GetString( cf, self->name, (Dictionary_Entry_Key)"middleColour", "black"  ),
      Stg_ComponentFactory_GetString( cf, self->name, (Dictionary_Entry_Key)"greatestColour", "black"  ),
      Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"arrowHeadSize", 0.3  ),
      Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"lengthScale", 1.0  ),
      Stg_ComponentFactory_GetUnsignedInt( cf, self->name, (Dictionary_Entry_Key)"glyphs", 3),
      Stg_ComponentFactory_GetBool( cf, self->name, (Dictionary_Entry_Key)"useEigenValue", True  ),
      Stg_ComponentFactory_GetBool( cf, self->name, (Dictionary_Entry_Key)"plotEigenVector", True  ),
      Stg_ComponentFactory_GetBool( cf, self->name, (Dictionary_Entry_Key)"plotEigenValue", False  ),
      Stg_ComponentFactory_GetString( cf, self->name, (Dictionary_Entry_Key)"leastColourForNegative", "black"  ),
      Stg_ComponentFactory_GetString( cf, self->name, (Dictionary_Entry_Key)"middleColourForNegative", "black"  ),
      Stg_ComponentFactory_GetString( cf, self->name, (Dictionary_Entry_Key)"greatestColourForNegative", "black" ) );
}
Ejemplo n.º 2
0
void _lucMeshCrossSection_AssignFromXML( void* drawingObject, Stg_ComponentFactory* cf, void* data )
{
   lucMeshCrossSection*     self = (lucMeshCrossSection*)drawingObject;

   /* Construct Parent */
   _lucCrossSection_AssignFromXML( self, cf, data );
   self->gatherData = False;     /* Force allocate on all procs */

   _lucMeshCrossSection_Init(self);
}
void _lucScalarFieldCrossSection_AssignFromXML( void* drawingObject, Stg_ComponentFactory* cf, void* data )
{
   lucScalarFieldCrossSection*     self = (lucScalarFieldCrossSection*)drawingObject;

   /* Construct Parent */
   self->defaultResolution = 100;   /* Default sampling res */
   _lucCrossSection_AssignFromXML( self, cf, data );

   _lucScalarFieldCrossSection_Init(self);
}
void _lucVectorArrowCrossSection_AssignFromXML( void* drawingObject, Stg_ComponentFactory* cf, void* data )
{
   lucVectorArrowCrossSection* self = (lucVectorArrowCrossSection*)drawingObject;

   /* Construct Parent */
   self->defaultResolution = 8;  /* Default sampling res */
   _lucCrossSection_AssignFromXML( self, cf, data );
   self->gatherData = False;     /* Drawn in parallel */
   strcpy(self->fieldVariableName, "VectorVariable");

   _lucVectorArrowCrossSection_Init(
      self,
      Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"arrowHeadSize", 0.3  ),
      Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"maximum", 1.0  ),
      Stg_ComponentFactory_GetBool( cf, self->name, (Dictionary_Entry_Key)"dynamicRange", True  ),
      Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"lengthScale", 0.3  ),
      Stg_ComponentFactory_GetUnsignedInt( cf, self->name, (Dictionary_Entry_Key)"glyphs", 3));
}
void _lucContourCrossSection_AssignFromXML( void* drawingObject, Stg_ComponentFactory* cf, void* data )
{
   lucContourCrossSection*      self = (lucContourCrossSection*)drawingObject;

   /* Construct Parent */
   self->defaultResolution = 8;   /* Default sampling res */
   _lucCrossSection_AssignFromXML( self, cf, data );

   _lucContourCrossSection_Init(
      self,
      Stg_ComponentFactory_GetBool( cf, self->name, (Dictionary_Entry_Key)"showValues", True  ),
      Stg_ComponentFactory_GetBool( cf, self->name, (Dictionary_Entry_Key)"printUnits", False  ),
      Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"minIsovalue", 0 ),
      Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"maxIsovalue", 0 ),
      Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"interval", 0.33 )  ) ;

   /* Drawing settings for this component */
   //TODO: Set via python properties
   //self->lit = False;
}
void _lucIsosurfaceCrossSection_AssignFromXML( void* drawingObject, Stg_ComponentFactory* cf, void* data )
{
   lucIsosurfaceCrossSection*     self = (lucIsosurfaceCrossSection*)drawingObject;
   IJK              resolution = {100,100,100};
   lucIsosurface*          isosurface;

   /* Construct Parent */
   self->defaultResolution = 100;   /* Default sampling res */
   _lucCrossSection_AssignFromXML( self, cf, data );

   /* Create and initialise isosurface object */
   isosurface = (lucIsosurface*)_lucIsosurface_DefaultNew(self->name);
   _lucIsosurface_AssignFromXML(isosurface, cf, data );
   /* Force global sampling on */
   isosurface->sampleGlobal = True;

   _lucIsosurfaceCrossSection_Init(
      self,
      resolution,
      Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"minIsovalue", 0 ),
      Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"maxIsovalue", 0 ),
      Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"interval", 0.33 ),
      isosurface);
}