CEL

Public API Reference

Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members

meshsel.h

00001 /*
00002     Crystal Space Entity Layer
00003     Copyright (C) 2001 by Jorrit Tyberghein
00004   
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Library General Public
00007     License as published by the Free Software Foundation; either
00008     version 2 of the License, or (at your option) any later version.
00009   
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Library General Public License for more details.
00014   
00015     You should have received a copy of the GNU Library General Public
00016     License along with this library; if not, write to the Free
00017     Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00018 */
00019 
00020 #ifndef __CEL_PF_MESHSEL__
00021 #define __CEL_PF_MESHSEL__
00022 
00023 #include "cstypes.h"
00024 #include "csutil/scf.h"
00025 
00026 struct iPcCamera;
00027 struct iPcMovable;
00028 struct iPcMesh;
00029 struct iPcMeshSelect;
00030 class csVector3;
00031 
00032 #define CEL_MOUSE_BUTTON1 1
00033 #define CEL_MOUSE_BUTTON2 2
00034 #define CEL_MOUSE_BUTTON3 4
00035 
00039 struct iPcMeshSelectListener : public virtual iBase
00040 {
00041   SCF_INTERFACE (iPcMeshSelectListener, 0, 0, 1);
00042 
00046   virtual void MouseDown (iPcMeshSelect* meshsel,
00047         int x, int y, int button, iCelEntity* entity) = 0;
00048 
00052   virtual void MouseUp (iPcMeshSelect* meshsel,
00053         int x, int y, int button, iCelEntity* entity) = 0;
00054 
00058   virtual void MouseMove (iPcMeshSelect* meshsel,
00059         int x, int y, int button, iCelEntity* entity) = 0;
00060 };
00061 
00096 struct iPcMeshSelect : public virtual iBase
00097 {
00098   SCF_INTERFACE (iPcMeshSelect, 0, 0, 2);
00099 
00104   virtual void AddMeshSelectListener (iPcMeshSelectListener* listener) = 0;
00108   virtual void RemoveMeshSelectListener (iPcMeshSelectListener* listener) = 0;
00109 
00113   virtual void SetCamera (iPcCamera* camera) = 0;
00114 
00120   virtual void SetMouseButtons (int buttons) = 0;
00124   virtual int GetMouseButtons () const = 0;
00125 
00133   virtual void SetGlobalSelection (bool glob) = 0;
00137   virtual bool HasGlobalSelection () const = 0;
00138 
00147   virtual void SetFollowMode (bool follow) = 0;
00151   virtual bool HasFollowMode () const = 0;
00152 
00158   virtual void SetFollowAlwaysMode (bool followalways) = 0;
00162   virtual bool HasFollowAlwaysMode () const = 0;
00163 
00170   virtual void SetDragMode (bool drag) = 0;
00174   virtual bool HasDragMode () const = 0;
00175 
00185   virtual void SetDragPlaneNormal (const csVector3& drag_normal,
00186         bool camera_space) = 0;
00190   virtual void GetDragPlaneNormal (csVector3& drag_normal,
00191         bool& camera_space) const = 0;
00192 
00198   virtual void SetSendmoveEvent (bool mov) = 0;
00202   virtual bool HasSendmoveEvent () const = 0;
00203 
00208   virtual void SetSendupEvent (bool su) = 0;
00212   virtual bool HasSendupEvent () const = 0;
00213 
00218   virtual void SetSenddownEvent (bool sd) = 0;
00222   virtual bool HasSenddownEvent () const = 0;
00223 
00228   virtual void SetMaxSelectionDistance (float distance) = 0;
00229 
00233   virtual float GetMaxSelectionDistance () const = 0;
00234 };
00235 
00236 #endif // __CEL_PF_MESHSEL__
00237 

Generated for CEL: Crystal Entity Layer by doxygen 1.4.4