void SampleProCtrl::GetValue(TimeValue t, void *ptr, Interval &valid, GetSetMethod method) { Point3 p3OurAbsValue(0, 0, 0); p3OurAbsValue.x = 15*sin((float)t/960); p3OurAbsValue.y = (float)t/192; valid.Set(t,t+1); if (method == CTRL_ABSOLUTE) { Point3* p3InVal = (Point3*)ptr; *p3InVal = p3OurAbsValue; } else // CTRL_RELATIVE { Matrix3* m3InVal = (Matrix3*)ptr; m3InVal->PreTranslate(p3OurAbsValue); } }
void SampleKFCtrl::GetValue(TimeValue t, void *ptr, Interval &valid, GetSetMethod method) { //We read the values for our X & Y component from our referenced float controllers Point3 p3OurAbsValue(0, 0, 0); mpXCtrl->GetValue(t, &p3OurAbsValue.x, valid, CTRL_ABSOLUTE); mpYCtrl->GetValue(t, &p3OurAbsValue.y, valid, CTRL_ABSOLUTE); if (method == CTRL_ABSOLUTE) { Point3* p3InVal = (Point3*)ptr; *p3InVal = p3OurAbsValue; } else // CTRL_RELATIVE { Matrix3* m3InVal = (Matrix3*)ptr; m3InVal->PreTranslate(p3OurAbsValue); } }