DriveHQ Start Menu
Cloud Drive Mapping
Folder Sync
Cloud Backup
True Drop Box
FTP/SFTP Hosting
Group Account
DriveHQ Start Menu
Online File Server
My Storage
|
Manage Shares
|
Publishes
|
Drop Boxes
|
Group Account
WebDAV Drive Mapping
Cloud Drive Home
|
WebDAV Guide
|
Drive Mapping Tool
|
Drive Mapping URL
Complete Data Backup
Backup Guide
|
Online Backup Tool
|
Cloud-to-Cloud Backup
FTP, Email & Web Service
FTP Home
|
FTP Hosting FAQ
|
Email Hosting
|
EmailManager
|
Web Hosting
Help & Resources
About
|
Enterprise Service
|
Partnership
|
Comparisons
|
Support
Quick Links
Security and Privacy
Download Software
Service Manual
Use Cases
Group Account
Online Help
Blog
Contact
Cloud Surveillance
Sign Up
Login
Features
Business Features
Online File Server
FTP Hosting
Cloud Drive Mapping
Cloud File Backup
Email Backup & Hosting
Cloud File Sharing
Folder Synchronization
Group Management
True Drop Box
Full-text Search
AD Integration/SSO
Mobile Access
IP Camera & DVR Solution
More...
Personal Features
Personal Cloud Drive
Backup All Devices
Mobile APPs
Personal Web Hosting
Sub-Account (for Kids)
Home/PC/Kids Monitoring
More...
Software
DriveHQ Drive Mapping Tool
DriveHQ FileManager
DriveHQ Online Backup
DriveHQ Mobile Apps
Pricing
Business Plans & Pricing
Personal Plans & Pricing
Price Comparison with Others
Feature Comparison with Others
Install Mobile App
Sign up
Creating account...
Invalid character in username! Only 0-9, a-z, A-Z, _, -, . allowed.
Username is required!
Invalid email address!
E-mail is required!
Password is required!
Password is invalid!
Password and confirmation do not match.
Confirm password is required!
I accept
Membership Agreement
Please read the Membership Agreement and check "I accept"!
Free Quick Sign-up
Sign-up Page
Log in
Signing in...
Username or e-mail address is required!
Password is required!
Keep me logged in
Quick Login
Forgot Password
Up
Upload
Download
Share
Publish
New Folder
New File
Copy
Cut
Delete
Paste
Rate
Upgrade
Rotate
Effect
Edit
Slide
History
/* ----------------------------------------------------------------------------- This source file is part of OGRE (Object-oriented Graphics Rendering Engine) For the latest info, see http://www.ogre3d.org/ Copyright (c) 2000-2006 Torus Knot Software Ltd Also see acknowledgements in Readme.html This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA, or go to http://www.gnu.org/copyleft/lesser.txt. You may alternatively use this source under the terms of a specific version of the OGRE Unrestricted License provided you have obtained such a license from Torus Knot Software Ltd. ----------------------------------------------------------------------------- */ #ifndef __KeyFrame_H__ #define __KeyFrame_H__ #include "OgrePrerequisites.h" #include "OgreVector3.h" #include "OgreQuaternion.h" #include "OgreAny.h" #include "OgreHardwareVertexBuffer.h" #include "OgreIteratorWrappers.h" namespace Ogre { /** A key frame in an animation sequence defined by an AnimationTrack. @remarks This class can be used as a basis for all kinds of key frames. The unifying principle is that multiple KeyFrames define an animation sequence, with the exact state of the animation being an interpolation between these key frames. */ class _OgreExport KeyFrame { public: /** Default constructor, you should not call this but use AnimationTrack::createKeyFrame instead. */ KeyFrame(const AnimationTrack* parent, Real time); virtual ~KeyFrame() {} /** Gets the time of this keyframe in the animation sequence. */ Real getTime(void) const { return mTime; } /** Clone a keyframe (internal use only) */ virtual KeyFrame* _clone(AnimationTrack* newParent) const; protected: Real mTime; const AnimationTrack* mParentTrack; }; /** Specialised KeyFrame which stores any numeric value. */ class _OgreExport NumericKeyFrame : public KeyFrame { public: /** Default constructor, you should not call this but use AnimationTrack::createKeyFrame instead. */ NumericKeyFrame(const AnimationTrack* parent, Real time); ~NumericKeyFrame() {} /** Get the value at this keyframe. */ virtual const AnyNumeric& getValue(void) const; /** Set the value at this keyframe. @remarks All keyframe values must have a consistent type. */ virtual void setValue(const AnyNumeric& val); /** Clone a keyframe (internal use only) */ KeyFrame* _clone(AnimationTrack* newParent) const; protected: AnyNumeric mValue; }; /** Specialised KeyFrame which stores a full transform. */ class _OgreExport TransformKeyFrame : public KeyFrame { public: /** Default constructor, you should not call this but use AnimationTrack::createKeyFrame instead. */ TransformKeyFrame(const AnimationTrack* parent, Real time); ~TransformKeyFrame() {} /** Sets the translation associated with this keyframe. @remarks The translation factor affects how much the keyframe translates (moves) it's animable object at it's time index. @param trans The vector to translate by */ virtual void setTranslate(const Vector3& trans); /** Gets the translation applied by this keyframe. */ const Vector3& getTranslate(void) const; /** Sets the scaling factor applied by this keyframe to the animable object at it's time index. @param scale The vector to scale by (beware of supplying zero values for any component of this vector, it will scale the object to zero dimensions) */ virtual void setScale(const Vector3& scale); /** Gets the scaling factor applied by this keyframe. */ virtual const Vector3& getScale(void) const; /** Sets the rotation applied by this keyframe. @param rot The rotation applied; use Quaternion methods to convert from angle/axis or Matrix3 if you don't like using Quaternions directly. */ virtual void setRotation(const Quaternion& rot); /** Gets the rotation applied by this keyframe. */ virtual const Quaternion& getRotation(void) const; /** Clone a keyframe (internal use only) */ KeyFrame* _clone(AnimationTrack* newParent) const; protected: Vector3 mTranslate; Vector3 mScale; Quaternion mRotate; }; /** Specialised KeyFrame which stores absolute vertex positions for a complete buffer, designed to be interpolated with other keys in the same track. */ class _OgreExport VertexMorphKeyFrame : public KeyFrame { public: /** Default constructor, you should not call this but use AnimationTrack::createKeyFrame instead. */ VertexMorphKeyFrame(const AnimationTrack* parent, Real time); ~VertexMorphKeyFrame() {} /** Sets the vertex buffer containing the source positions for this keyframe. @remarks We assume that positions are the first 3 float elements in this buffer, although we don't necessarily assume they're the only ones in there. @param buf Vertex buffer link; will not be modified so can be shared read-only data */ void setVertexBuffer(const HardwareVertexBufferSharedPtr& buf); /** Gets the vertex buffer containing positions for this keyframe. */ const HardwareVertexBufferSharedPtr& getVertexBuffer(void) const; /** Clone a keyframe (internal use only) */ KeyFrame* _clone(AnimationTrack* newParent) const; protected: HardwareVertexBufferSharedPtr mBuffer; }; /** Specialised KeyFrame which references a Mesh::Pose at a certain influence level, which stores offsets for a subset of the vertices in a buffer to provide a blendable pose. */ class _OgreExport VertexPoseKeyFrame : public KeyFrame { public: /** Default constructor, you should not call this but use AnimationTrack::createKeyFrame instead. */ VertexPoseKeyFrame(const AnimationTrack* parent, Real time); ~VertexPoseKeyFrame() {} /** Reference to a pose at a given influence level @remarks Each keyframe can refer to many poses each at a given influence level. **/ struct PoseRef { /** The linked pose index. @remarks The Mesh contains all poses for all vertex data in one list, both for the shared vertex data and the dedicated vertex data on submeshes. The 'target' on the parent track must match the 'target' on the linked pose. */ ushort poseIndex; /** Influence level of the linked pose. 1.0 for full influence (full offset), 0.0 for no influence. */ Real influence; PoseRef(ushort p, Real i) : poseIndex(p), influence(i) {} }; typedef std::vector
PoseRefList; /** Add a new pose reference. @see PoseRef */ void addPoseReference(ushort poseIndex, Real influence); /** Update the influence of a pose reference. @see PoseRef */ void updatePoseReference(ushort poseIndex, Real influence); /** Remove reference to a given pose. @param poseIndex The pose index (not the index of the reference) */ void removePoseReference(ushort poseIndex); /** Remove all pose references. */ void removeAllPoseReferences(void); /** Get a const reference to the list of pose references. */ const PoseRefList& getPoseReferences(void) const; typedef VectorIterator
PoseRefIterator; typedef ConstVectorIterator
ConstPoseRefIterator; /** Get an iterator over the pose references. */ PoseRefIterator getPoseReferenceIterator(void); /** Get a const iterator over the pose references. */ ConstPoseRefIterator getPoseReferenceIterator(void) const; /** Clone a keyframe (internal use only) */ KeyFrame* _clone(AnimationTrack* newParent) const; protected: PoseRefList mPoseRefs; }; } #endif
OgreKeyFrame.h
Page URL
File URL
Prev
81/217
Next
Download
( 8 KB )
Note: The DriveHQ service banners will NOT be displayed if the file owner is a paid member.
Comments
Total ratings:
0
Average rating:
Not Rated
Would you like to comment?
Join DriveHQ
for a free account, or
Logon
if you are already a member.