CEL

Public API Reference

propclass/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 
00097 struct iPcMeshSelect : public virtual iBase
00098 {
00099   SCF_INTERFACE (iPcMeshSelect, 0, 0, 2);
00100 
00105   virtual void AddMeshSelectListener (iPcMeshSelectListener* listener) = 0;
00109   virtual void RemoveMeshSelectListener (iPcMeshSelectListener* listener) = 0;
00110 
00114   virtual void SetCamera (iPcCamera* camera) = 0;
00115 
00121   virtual void SetMouseButtons (int buttons) = 0;
00122 
00128   virtual void SetMouseButtons (const char* buttons) = 0;
00132   virtual int GetMouseButtons () const = 0;
00133 
00141   virtual void SetGlobalSelection (bool glob) = 0;
00145   virtual bool HasGlobalSelection () const = 0;
00146 
00155   virtual void SetFollowMode (bool follow) = 0;
00159   virtual bool HasFollowMode () const = 0;
00160 
00166   virtual void SetFollowAlwaysMode (bool followalways) = 0;
00170   virtual bool HasFollowAlwaysMode () const = 0;
00171 
00178   virtual void SetDragMode (bool drag) = 0;
00182   virtual bool HasDragMode () const = 0;
00183 
00193   virtual void SetDragPlaneNormal (const csVector3& drag_normal,
00194         bool camera_space) = 0;
00198   virtual void GetDragPlaneNormal (csVector3& drag_normal,
00199         bool& camera_space) const = 0;
00200 
00206   virtual void SetSendmoveEvent (bool mov) = 0;
00210   virtual bool HasSendmoveEvent () const = 0;
00211 
00216   virtual void SetSendupEvent (bool su) = 0;
00220   virtual bool HasSendupEvent () const = 0;
00221 
00226   virtual void SetSenddownEvent (bool sd) = 0;
00230   virtual bool HasSenddownEvent () const = 0;
00231 
00236   virtual void SetMaxSelectionDistance (float distance) = 0;
00237 
00241   virtual float GetMaxSelectionDistance () const = 0;
00242 };
00243 
00244 #endif // __CEL_PF_MESHSEL__
00245 

Generated for CEL: Crystal Entity Layer by doxygen 1.4.6