// --- Methods inherited from Tex3D --- void Splat::ReadSXPData(TCHAR *name, void *sxpdata) { SplatState *state = (SplatState*)sxpdata; if (state != NULL && (state->version == SPLAT_SXP_VERSION)) { SetColor(0, ColorFromCol24(state->col1), TimeValue(0)); SetColor(1, ColorFromCol24(state->col2), TimeValue(0)); SetSize(state->size, TimeValue(0)); SetThresh(state->thresh, TimeValue(0)); } }
void Stucco::ReadSXPData(TCHAR *name, void *sxpdata) { StuccoState *state = (StuccoState*)sxpdata; if (state!=NULL && (state->version==STUCCO_VERS)) { SetColor(0, ColrFromCol24(state->col1),0); SetColor(1, ColrFromCol24(state->col2),0); SetSize(state->size,0); SetThick(state->thickness,0); SetThresh(state->threshold,0); del = state->del; } }
// This method is called to reset the texmap back to its default values. void Stucco::Init() { // Reset the XYZGen or allocate a new one if (xyzGen) xyzGen->Reset(); else ReplaceReference(0, GetNewDefaultXYZGen()); // Set the inital parameters SetColor(0, Color(0.0f, 0.0f, 0.0f), TimeValue(0)); SetColor(1, Color(0.9f, 0.9f, 0.9f), TimeValue(0)); SetSize(20.0f, TimeValue(0)); SetThresh(0.57f, TimeValue(0)); SetThick(0.15f, TimeValue(0)); // Set the validity interval of the texture to empty texValidity.SetEmpty(); }
// This method is called to reset the texmap back to its default values. void Splat::Init() { // Reset the XYZGen or allocate a new one if (xyzGen) xyzGen->Reset(); else ReplaceReference(0, GetNewDefaultXYZGen()); // Set the inital parameters SetColor(0, Color(0.7f, 0.8f, 0.8f), TimeValue(0)); SetColor(1, Color(0.2f, 0.5f, 1.0f), TimeValue(0)); RegisterDistanceDefault(_T("Splat Params"), _T("Size"), 40.0f, IN_TO_M(40.0f)); float size = GetDistanceDefault(_T("Splat Params"), _T("Size")); SetSize(size, TimeValue(0)); SetThresh(0.2f, TimeValue(0)); SetIter(4, TimeValue(0)); // Set the validity interval of the texture to empty texValidity.SetEmpty(); mapValid.SetEmpty(); }