diff options
author | Jason Sams <rjsams@android.com> | 2010-03-10 17:30:41 -0800 |
---|---|---|
committer | Jason Sams <rjsams@android.com> | 2010-03-16 12:26:30 -0700 |
commit | c1ed589021e280cda59a0521cb96b3e9eb629e1b (patch) | |
tree | 906779810fa438745498a368e1703b4b83069b98 /rsAnimation.h | |
parent | a2cf755a28a1e7ffff2955df656d714f40e4d715 (diff) | |
download | rs-c1ed589021e280cda59a0521cb96b3e9eb629e1b.tar.gz |
checkpoint animations
Change-Id: I14ef05bf56470565e4b0cb706f9fb358cdcb42ff
Diffstat (limited to 'rsAnimation.h')
-rw-r--r-- | rsAnimation.h | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/rsAnimation.h b/rsAnimation.h new file mode 100644 index 00000000..b8db6618 --- /dev/null +++ b/rsAnimation.h @@ -0,0 +1,68 @@ +/* + * Copyright (C) 2009 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ANDROID_RS_ANIMATION_H +#define ANDROID_RS_ANIMATION_H + +#include "rsUtils.h" +#include "rsObjectBase.h" + +// --------------------------------------------------------------------------- +namespace android { +namespace renderscript { + + +class Animation : public ObjectBase +{ +public: + ~Animation(); + + static Animation * create(Context *rsc, + const float *inValues, const float *outValues, + uint32_t valueCount, RsAnimationInterpolation, + RsAnimationEdge pre, RsAnimationEdge post); + + float eval(float) const; + + +protected: + Animation(Context *rsc); + + + + float evalInRange(float) const; + + + + const float *mValuesInput; + const float *mValuesOutput; + uint32_t mValueCount; + RsAnimationInterpolation mInterpolation; + RsAnimationEdge mEdgePre; + RsAnimationEdge mEdgePost; + + // derived + float mInputMin; + float mInputMax; +}; + + + + +} +} +#endif //ANDROID_STRUCTURED_ELEMENT_H + |