AnyCAD C++ API  2018
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义 
Public 成员函数 | 所有成员列表
AnyCAD::API::Renderer类 参考

渲染器。 更多...

#include <APIRenderer.h>

Public 成员函数

void SetViewType (const EnumStandardView &nType)
 
EnumStandardView GetViewType () const
 
bool Initialize (long hWnd, int width, int height, const SceneManager &sceneManager, bool bZUp)
 
void Destroy ()
 
int Redraw ()
 
void RequestDraw (int nHint)
 
void Resize (int x, int y, int cx, int cy)
 
bool Print (const String &fileName)
 
RenderWindow GetRenderWindow () const
 
SceneManager GetSceneManager () const
 
CameraOperator GetCameraOperator () const
 
void SetSkyBox (const String &strName)
 
String GetSkyBox () const
 
void SetStandardView (const EnumStandardView &viewType)
 
void LookAt (const Vector3 &pos, const Vector3 &target, const Vector3 &up)
 
void SetDisplayMode (int nMode)
 
int GetDisplayMode () const
 
void FitAll (const float &scale)
 
void FitBBox (const AABox &bbox, const float &scale)
 
void SetPickMode (int nMode)
 
int GetPickMode () const
 
int Highlight (int cx, int cy)
 
int Highlight (const Vector2 &startPt, const Vector2 &endPt)
 
void ClearHighlight ()
 
void QueryHighlight (const SelectionQuery &context) const
 
int Select (bool clearOld)
 
void ClearSelection ()
 
void QuerySelection (const SelectionQuery &context) const
 
int GetSnapFlags () const
 
void SetSnapFlags (int val)
 
SnapNodeManager GetSnapNodeManager () const
 
Vector2 WorldPoint2ScreenPoint (const Vector3 &point) const
 
Vector3 ScreenPoint2WorldPoint (const Vector2 &point) const
 
Vector3 ProjectOnWorkingPlane (const Vector2 &mousePos, const Vector3 &defaultPt) const
 
Ray ComputeScreenRay (int cx, int cy) const
 
Ray ComputeScreenRay (const Vector2 &pt) const
 
void ShowWorkingGrid (bool bShow)
 
WorkingPlane GetWorkingPlane () const
 
SceneEnvironment GetEnvironment () const
 
void SetCoordinateWidget (const SceneNode &node)
 
void RemoveWidgetNode (const ElementId &nId)
 
void AddWidgetNode (const SceneNode &node)
 

详细描述

渲染器。

与窗口绑定的渲染器。

成员函数说明

void AnyCAD::API::Renderer::AddWidgetNode ( const SceneNode node)

增加部件对象。

参数
nodethe widget node.
void AnyCAD::API::Renderer::ClearHighlight ( )

清除预选高亮的模型。

void AnyCAD::API::Renderer::ClearSelection ( )

清楚选择集.

Ray AnyCAD::API::Renderer::ComputeScreenRay ( int  cx,
int  cy 
) const

计算屏幕坐标位置下的射线.

参数
cxthe x of screen point.
cythe y of screen point.
返回
the Ray.
Ray AnyCAD::API::Renderer::ComputeScreenRay ( const Vector2 pt) const

计算屏幕坐标位置下的射线.

参数
ptthe screen point.
返回
the Ray.
void AnyCAD::API::Renderer::Destroy ( )

销毁渲染器.

void AnyCAD::API::Renderer::FitAll ( const float &  scale)

显示模型适用窗口,都能显示在窗口可见的区域。

参数
scalethe scale.
void AnyCAD::API::Renderer::FitBBox ( const AABox bbox,
const float &  scale 
)
      使得指定的包围盒区域适应窗口。
参数
bboxthe bound box to fit.
      @param scale the scale.
CameraOperator AnyCAD::API::Renderer::GetCameraOperator ( ) const

获取相机操作器。

返回
the CameraOperator
int AnyCAD::API::Renderer::GetDisplayMode ( ) const

获取显示模式。

返回
the display mode.
SceneEnvironment AnyCAD::API::Renderer::GetEnvironment ( ) const

获取场景设置。

返回
the SceneEnvironment.
int AnyCAD::API::Renderer::GetPickMode ( ) const

获取拾取模式。

返回
the pick mode.
RenderWindow AnyCAD::API::Renderer::GetRenderWindow ( ) const

获取绘制的窗口。

返回
RenderWindow
SceneManager AnyCAD::API::Renderer::GetSceneManager ( ) const

获取场景管理器。

返回
SceneManager
String AnyCAD::API::Renderer::GetSkyBox ( ) const

Get current skybox name

返回
the name of the SkyBox
int AnyCAD::API::Renderer::GetSnapFlags ( ) const

Get the snap flags.

返回
the flags.
SnapNodeManager AnyCAD::API::Renderer::GetSnapNodeManager ( ) const

Get the snap able node manager.

返回
the Node Manager.
EnumStandardView AnyCAD::API::Renderer::GetViewType ( ) const

Get the view type.

返回
the view type EnumStandardView.
WorkingPlane AnyCAD::API::Renderer::GetWorkingPlane ( ) const

获取工作平面。

返回
the plane.
int AnyCAD::API::Renderer::Highlight ( int  cx,
int  cy 
)

预选在指定屏幕坐标位置下的模型,使之高亮显示。

参数
cxthe x position
cythe y position
返回
the count.
int AnyCAD::API::Renderer::Highlight ( const Vector2 startPt,
const Vector2 endPt 
)

预选在指定屏幕坐标区域下的模型,使之高亮显示。

参数
startPtthe start position
endPtthe end position
返回
the count.
bool AnyCAD::API::Renderer::Initialize ( long  hWnd,
int  width,
int  height,
const SceneManager sceneManager,
bool  bZUp 
)

初始化. If sceneManager is NULL, Renderer will create it automatically.

参数
hWndthe window handle
widththe view width
heightthe view height
sceneManagerthe shared scene manager.
bZUptrue if z direction is (0,0,1), or it's (0,0,-1)
返回
false if failed.
void AnyCAD::API::Renderer::LookAt ( const Vector3 pos,
const Vector3 target,
const Vector3 up 
)

设置相机的方向。

参数
posthe camera position
targetthe look at target
upthe up direction of the camera.
bool AnyCAD::API::Renderer::Print ( const String fileName)

Print the scene as PDF.

参数
fileNamethe image file name.
返回
true if ok.
Vector3 AnyCAD::API::Renderer::ProjectOnWorkingPlane ( const Vector2 mousePos,
const Vector3 defaultPt 
) const

把平面坐标投影的工作平面.

参数
mousePosthe screen point.
defaultPtthe point if failed to compute the world point.
返回
the world point.
void AnyCAD::API::Renderer::QueryHighlight ( const SelectionQuery context) const

查询预选高亮的模型。

参数
contextthe query selection context.
void AnyCAD::API::Renderer::QuerySelection ( const SelectionQuery context) const

查询选择集中的模型.

参数
contextthe query selection context.
int AnyCAD::API::Renderer::Redraw ( )

重新绘制.

void AnyCAD::API::Renderer::RemoveWidgetNode ( const ElementId nId)

移除部件对象.

void AnyCAD::API::Renderer::RequestDraw ( int  nHint)

发起绘制的请求。

参数
nHintdefault is 1. by EnumRedrawHintType
void AnyCAD::API::Renderer::Resize ( int  x,
int  y,
int  cx,
int  cy 
)

改变绘制区域的大小.

参数
xthe start position x
ythe start position y
cxthe width of the view
cythe height of the view
Vector3 AnyCAD::API::Renderer::ScreenPoint2WorldPoint ( const Vector2 point) const

把屏幕坐标转换为世界坐标.

参数
pointthe screen point.
返回
the world point.
int AnyCAD::API::Renderer::Select ( bool  clearOld)

把预选高亮的模型设置为选择状态。

参数
clearOldif to clear the previous selection.
返回
the count.
void AnyCAD::API::Renderer::SetCoordinateWidget ( const SceneNode node)

设置坐标轴显示对象。

参数
nodethe node. Remove the widget nodes.
void AnyCAD::API::Renderer::SetDisplayMode ( int  nMode)

设置显示模式,比如只显示面、只显示边、点等。

参数
nModethe display mode. by EnumDisplayStyle
void AnyCAD::API::Renderer::SetPickMode ( int  nMode)

设置拾取模式,比如只选择面、只选择边等。

参数
nModethe pick mode. By EnumRenderFlags
void AnyCAD::API::Renderer::SetSkyBox ( const String strName)

Set SkyBox by Name

参数
strNamethe skybox name
void AnyCAD::API::Renderer::SetSnapFlags ( int  val)

Set the snap flags.

参数
valthe flags by EnumSnapFlags.
void AnyCAD::API::Renderer::SetStandardView ( const EnumStandardView viewType)

设置相机的方向。

参数
viewTypeby EnumStandardView
void AnyCAD::API::Renderer::SetViewType ( const EnumStandardView nType)

Set the view type.

参数
nTypethe EnumStandardView.
void AnyCAD::API::Renderer::ShowWorkingGrid ( bool  bShow)

显示或隐藏工作平面。

参数
bShowif to show the grid
Vector2 AnyCAD::API::Renderer::WorldPoint2ScreenPoint ( const Vector3 point) const

把世界坐标转换为屏幕坐标。

参数
pointthe world point.
返回
the screen point.

该类的文档由以下文件生成: