#ifndef AnimatableLengthPoint3D_h
#define AnimatableLengthPoint3D_h
#include "core/animation/AnimatableValue.h"
namespace WebCore {
class AnimatableLengthPoint3D FINAL : public AnimatableValue {
public:
virtual ~AnimatableLengthPoint3D() { }
static PassRefPtrWillBeRawPtr<AnimatableLengthPoint3D> create(PassRefPtrWillBeRawPtr<AnimatableValue> x, PassRefPtrWillBeRawPtr<AnimatableValue> y, PassRefPtrWillBeRawPtr<AnimatableValue> z)
{
return adoptRefWillBeNoop(new AnimatableLengthPoint3D(x, y, z));
}
const AnimatableValue* x() const { return m_x.get(); }
const AnimatableValue* y() const { return m_y.get(); }
const AnimatableValue* z() const { return m_z.get(); }
virtual void trace(Visitor*) OVERRIDE;
protected:
virtual PassRefPtrWillBeRawPtr<AnimatableValue> interpolateTo(const AnimatableValue*, double fraction) const OVERRIDE;
virtual PassRefPtrWillBeRawPtr<AnimatableValue> addWith(const AnimatableValue*) const OVERRIDE;
private:
AnimatableLengthPoint3D(PassRefPtrWillBeRawPtr<AnimatableValue> x, PassRefPtrWillBeRawPtr<AnimatableValue> y, PassRefPtrWillBeRawPtr<AnimatableValue> z)
: m_x(x)
, m_y(y)
, m_z(z)
{
}
virtual AnimatableType type() const OVERRIDE { return TypeLengthPoint3D; }
virtual bool equalTo(const AnimatableValue*) const OVERRIDE;
RefPtrWillBeMember<AnimatableValue> m_x;
RefPtrWillBeMember<AnimatableValue> m_y;
RefPtrWillBeMember<AnimatableValue> m_z;
};
inline const AnimatableLengthPoint3D* toAnimatableLengthPoint3D(const AnimatableValue* value)
{
ASSERT_WITH_SECURITY_IMPLICATION(value && value->isLengthPoint3D());
return static_cast<const AnimatableLengthPoint3D*>(value);
}
}
#endif