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 
00091 struct iPcMeshSelect : public virtual iBase
00092 {
00093   SCF_INTERFACE (iPcMeshSelect, 0, 0, 2);
00094 
00099   virtual void AddMeshSelectListener (iPcMeshSelectListener* listener) = 0;
00103   virtual void RemoveMeshSelectListener (iPcMeshSelectListener* listener) = 0;
00104 
00108   virtual void SetCamera (iPcCamera* camera) = 0;
00109 
00115   virtual void SetMouseButtons (int buttons) = 0;
00116 
00122   virtual void SetMouseButtons (const char* buttons) = 0;
00126   virtual int GetMouseButtons () const = 0;
00127 
00135   virtual void SetGlobalSelection (bool glob) = 0;
00139   virtual bool HasGlobalSelection () const = 0;
00140 
00149   virtual void SetFollowMode (bool follow) = 0;
00153   virtual bool HasFollowMode () const = 0;
00154 
00160   virtual void SetFollowAlwaysMode (bool followalways) = 0;
00164   virtual bool HasFollowAlwaysMode () const = 0;
00165 
00172   virtual void SetDragMode (bool drag) = 0;
00176   virtual bool HasDragMode () const = 0;
00177 
00187   virtual void SetDragPlaneNormal (const csVector3& drag_normal,
00188         bool camera_space) = 0;
00192   virtual void GetDragPlaneNormal (csVector3& drag_normal,
00193         bool& camera_space) const = 0;
00194 
00200   virtual void SetSendmoveEvent (bool mov) = 0;
00204   virtual bool HasSendmoveEvent () const = 0;
00205 
00210   virtual void SetSendupEvent (bool su) = 0;
00214   virtual bool HasSendupEvent () const = 0;
00215 
00220   virtual void SetSenddownEvent (bool sd) = 0;
00224   virtual bool HasSenddownEvent () const = 0;
00225 
00230   virtual void SetMaxSelectionDistance (float distance) = 0;
00231 
00235   virtual float GetMaxSelectionDistance () const = 0;
00236 };
00237 
00238 #endif // __CEL_PF_MESHSEL__
00239 

Generated for CEL: Crystal Entity Layer 1.2 by doxygen 1.4.7