Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __CS_IMESH_ANIMNODE_LOOKAT_H__
00022 #define __CS_IMESH_ANIMNODE_LOOKAT_H__
00023
00028 #include "csutil/scf_interface.h"
00029
00030 #include "imesh/animnode/skeleton2anim.h"
00031
00035 struct iMovable;
00036 struct iCamera;
00037
00038 namespace CS {
00039 namespace Animation {
00040
00041 struct iBodySkeleton;
00042 struct iSkeletonLookAtNodeFactory;
00043 struct iSkeletonLookAtListener;
00044
00049 struct iSkeletonLookAtNodeManager
00050 : public virtual CS::Animation::iSkeletonAnimNodeManager<CS::Animation::iSkeletonLookAtNodeFactory>
00051 {
00052 SCF_ISKELETONANIMNODEMANAGER_INTERFACE (CS::Animation::iSkeletonLookAtNodeManager, 1, 0, 0);
00053 };
00054
00071 struct iSkeletonLookAtNodeFactory : public virtual iSkeletonAnimNodeFactory
00072 {
00073 SCF_INTERFACE(CS::Animation::iSkeletonLookAtNodeFactory, 2, 0, 1);
00074
00085 virtual void SetBodySkeleton (iBodySkeleton* skeleton) = 0;
00086
00090 virtual void SetBone (BoneID boneID) = 0;
00091
00098 virtual void SetMaximumSpeed (float speed) = 0;
00099
00104 virtual void SetAlwaysRotate (bool alwaysRotate) = 0;
00105
00113 virtual void SetListenerDelay (float delay) = 0;
00114
00123 virtual void SetChildNode (iSkeletonAnimNodeFactory* node) = 0;
00124
00128 virtual iSkeletonAnimNodeFactory* GetChildNode () const = 0;
00129
00134 virtual void SetDirection (const csMatrix3& direction) = 0;
00135
00139 virtual void GetDirection (csMatrix3& direction) const = 0;
00140 };
00141
00146 struct iSkeletonLookAtNode : public virtual iSkeletonAnimNode
00147 {
00148 SCF_INTERFACE(CS::Animation::iSkeletonLookAtNode, 2, 0, 0);
00149
00153 virtual bool HasTarget () = 0;
00154
00161 virtual void SetTarget (csVector3 target) = 0;
00162
00170 virtual void SetTarget (iMovable* target, const csVector3& offset) = 0;
00171
00172
00180 virtual void SetTarget (iCamera* target, const csVector3& offset) = 0;
00181
00188 virtual void RemoveTarget () = 0;
00189
00193 virtual void AddListener (iSkeletonLookAtListener* listener) = 0;
00194
00198 virtual void RemoveListener (iSkeletonLookAtListener* listener) = 0;
00199 };
00200
00205 struct iSkeletonLookAtListener : public virtual iBase
00206 {
00207 SCF_INTERFACE (CS::Animation::iSkeletonLookAtListener, 1, 0, 0);
00208
00212 virtual void TargetReached () = 0;
00213
00217 virtual void TargetLost () = 0;
00218 };
00219
00220 }
00221 }
00222
00225 #endif //__CS_IMESH_ANIMNODE_LOOKAT_H__