AnyCAD C++ API  2018
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义 
APIRenderer.h
浏览该文件的文档.
1 //Public API. Powered by AnyCAD.
2 
3 #ifndef _APIRenderer_H_
4 #define _APIRenderer_H_
5 
6 #include "APIObjectDef.h"
7 
8 namespace AnyCAD{ namespace API
9 {
10  class SelectionQuery;
11  class SceneEnvironment;
12  class RenderWindow;
13  class CameraOperator;
14  class SceneManager;
15  class WorkingPlane;
16  class SnapNodeManager;
17  class SceneNode;
26  {
28  public:
33  void SetViewType (const EnumStandardView& nType) ;
38  EnumStandardView GetViewType () const;
48  bool Initialize (long hWnd, int width, int height, const SceneManager& sceneManager, bool bZUp) ;
52  void Destroy () ;
56  int Redraw () ;
61  void RequestDraw (int nHint) ;
69  void Resize (int x, int y, int cx, int cy) ;
75  bool Print (const String& fileName) ;
80  RenderWindow GetRenderWindow () const;
85  SceneManager GetSceneManager () const;
90  CameraOperator GetCameraOperator () const;
95  void SetSkyBox (const String& strName) ;
100  String GetSkyBox () const;
105  void SetStandardView (const EnumStandardView& viewType) ;
112  void LookAt (const Vector3& pos, const Vector3& target, const Vector3& up) ;
117  void SetDisplayMode (int nMode) ;
122  int GetDisplayMode () const;
127  void FitAll (const float& scale) ;
134  void FitBBox (const AABox& bbox, const float& scale) ;
139  void SetPickMode (int nMode) ;
144  int GetPickMode () const;
151  int Highlight (int cx, int cy) ;
158  int Highlight (const Vector2& startPt, const Vector2& endPt) ;
162  void ClearHighlight () ;
167  void QueryHighlight (const SelectionQuery& context) const;
173  int Select (bool clearOld) ;
177  void ClearSelection () ;
182  void QuerySelection (const SelectionQuery& context) const;
187  int GetSnapFlags () const;
192  void SetSnapFlags (int val) ;
197  SnapNodeManager GetSnapNodeManager () const;
203  Vector2 WorldPoint2ScreenPoint (const Vector3& point) const;
209  Vector3 ScreenPoint2WorldPoint (const Vector2& point) const;
216  Vector3 ProjectOnWorkingPlane (const Vector2& mousePos, const Vector3& defaultPt) const;
223  Ray ComputeScreenRay (int cx, int cy) const;
229  Ray ComputeScreenRay (const Vector2& pt) const;
234  void ShowWorkingGrid (bool bShow) ;
239  WorkingPlane GetWorkingPlane () const;
244  SceneEnvironment GetEnvironment () const;
249  void SetCoordinateWidget (const SceneNode& node) ;
253  void RemoveWidgetNode (const ElementId& nId) ;
258  void AddWidgetNode (const SceneNode& node) ;
259  };//Renderer;
260 }}//API
261 
262 #endif //_APIRenderer_H_
#define AnyPlatformAPI_API
Definition: AnyPlatformAPI.h:8
Ray.
Definition: APIMath.h:364
AABox.
Definition: APIMath.h:281
The SnapeNode manager.
Definition: APISnapNodeManager.h:20
std::string String
Definition: APIString.h:10
The selection context interface.
Definition: APISelectionQuery.h:17
工作平面
Definition: APIWorkingPlane.h:18
Point or vector.
Definition: APIMath.h:16
The id.
Definition: APIElementId.h:16
场景的节点的基类。
Definition: APISceneNode.h:22
场景管理器
Definition: APISceneManager.h:23
The render window.
Definition: APIRenderWindow.h:19
EnumStandardView
Definition: APIEnums.h:56
#define DECLARE_APIOBJECT(className)
Definition: APIObjectDef.h:10
Point or vector.
Definition: APIMath.h:37
The camera operator.
Definition: APICameraOperator.h:19
场景的全局设置
Definition: APISceneEnvironment.h:19
渲染器。
Definition: APIRenderer.h:25