void _BelowPlane_AssignFromXML( void* belowPlane, Stg_ComponentFactory* cf, void* data ) { BelowPlane* self = (BelowPlane*) belowPlane; double offset; XYZ minValue; XYZ maxValue; XYZ width; _Stg_Shape_AssignFromXML( self, cf, data ); offset = Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"offset", 0.5 ); minValue[ I_AXIS ] = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"minX", 0.0 ); minValue[ J_AXIS ] = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"minY", 0.0 ); minValue[ K_AXIS ] = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"minZ", 0.0 ); maxValue[ I_AXIS ] = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"maxX", 1.0 ); maxValue[ J_AXIS ] = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"maxY", 1.0 ); maxValue[ K_AXIS ] = Stg_ComponentFactory_GetRootDictDouble( cf, (Dictionary_Entry_Key)"maxZ", 1.0 ); width[ I_AXIS ] = maxValue[ I_AXIS ] - minValue[ I_AXIS ] ; width[ J_AXIS ] = maxValue[ J_AXIS ] - minValue[ J_AXIS ] ; width[ K_AXIS ] = maxValue[ K_AXIS ] - minValue[ K_AXIS ] ; _BelowPlane_Init( self, offset, width, minValue, maxValue ); }
void _BelowCosinePlane_Init( void* belowPlane, double offset, XYZ width, double delta, double period, double phase ) { BelowCosinePlane* self = (BelowCosinePlane*)belowPlane; _BelowPlane_Init( self, offset, width ); self->delta = delta; self->period = period; self->radPeriod = M_PI * period / 180.0; self->phase = phase; }
/*---------------------------------------------------------------------------------------------------------------------------------- ** Constructors */ BelowPlane* BelowPlane_New( Name name, Dimension_Index dim, XYZ centre, double alpha, double beta, double gamma, double offset, XYZ width, XYZ minValue, XYZ maxValue ) { BelowPlane* self = (BelowPlane*) _BelowPlane_DefaultNew( name ); _Stg_Shape_Init( self, dim, centre, False, alpha, beta, gamma ); _BelowPlane_Init( self, offset, width, minValue, maxValue ); return self; }