AnimaL |
Tutorial |
Documentation |
00001 // 00002 // C++ Interface: ManipulatedMeshVertex 00003 // 00004 // Description: 00005 // 00006 // 00007 // Author: Mathieu Coquerelle <>, (C) 2004 00008 // 00009 // Copyright: See COPYING file that comes with this distribution 00010 // 00011 // 00012 #ifndef ANIMAL_OCTREE_MANIPULATEDMESHVERTEX_H 00013 #define ANIMAL_OCTREE_MANIPULATEDMESHVERTEX_H 00014 00015 00016 //#include "FixedParticleConstraintNode.h" 00017 #include <animal/picking.h> 00018 #include "SFVec3fCellConstrained.h" 00019 #include "DeformableOctreeNode.h" 00020 00021 namespace animal 00022 { 00023 00024 namespace octree 00025 { 00026 00027 00033 class ManipulatedMeshVertex : 00034 public ConstrainedItem 00035 00036 { 00037 public: 00038 //ManipulatedMeshVertex( Octree *octree, SFVec3fCellConstrained * vertex ); 00039 00040 ManipulatedMeshVertex( X3DTK::X3D::DeformableOctreeNode *dosn, const X3DTK::SFVec3f *meshVertex ); 00041 00042 ~ManipulatedMeshVertex(); 00043 00044 SFVec3fCellConstrained * getVertex() const 00045 { 00046 return _vertex; 00047 }; 00048 00050 virtual void getPoint( float&, float&, float& ) const; 00051 00052 virtual void moveTo( float, float, float ); 00053 00054 virtual bool operator==(const ConstrainedItem*) const; 00055 00056 virtual void draw(); 00057 00058 protected: 00059 X3DTK::X3D::DeformableOctreeNode * _dosn; 00060 SFVec3fCellConstrained *_vertex; 00061 Vec3d _initPos; 00062 00063 }; 00064 00065 }; 00066 00067 }; 00068 00069 00070 00071 00072 // template<typename t_ParticleSystemEngine> 00073 // class ManipulatedParticleConstraint 00074 // : public FixedParticleConstraint<typename t_ParticleSystemEngine::Vector> 00075 // , public ConstrainedItem 00076 // { 00077 // public: 00078 // typedef t_ParticleSystemEngine ParticleSystemEngine; 00079 // typedef typename ParticleSystemEngine::Vector Vector; 00080 // typedef typename FixedParticleConstraint<Vector>::Vec Vec; 00081 // 00082 // ManipulatedParticleConstraint( ParticleSystemEngine*, Vector*, int index, const Vec& location ); 00083 // 00084 // ~ManipulatedParticleConstraint(); 00085 // 00086 // 00087 // 00088 // /// Get the current 3D position of the selected object. 00089 // virtual void getPoint( float&, float&, float& ) const; 00090 // 00091 // /** Constrain the selected object to the given 3D position. Then the engine which manages the selected object has to maintain it there until the ConstrainedItem is deleted. 00092 // */ 00093 // virtual void moveTo( float, float, float ); 00094 // 00095 // /** Comparison of a given ConstrainedItem pointer with the current ConstrainedItem. True iff the given pointer points to an ConstrainedItem which represents the same element. This method is used to avoid attaching several manipulators to the same object. 00096 // */ 00097 // virtual bool operator == ( const ConstrainedItem* ) const; 00098 // 00099 // virtual void draw(); 00100 // 00101 // protected: 00102 // Vector* e_coord; 00103 // ParticleSystemEngine* e_particleSystem; 00104 // }; 00105 // 00106 // 00107 // }; 00108 // 00109 // #endif 00110 00111 00112 00113 00114 #endif