AnyCAD Rapid API 2023
Help you to create a better world!
载入中...
搜索中...
未找到
Camera类 参考

Public 成员函数

 Camera (long width, long height, Vector3 position, Vector3 target, Vector3 up)
 
Vector3 GetPosition ()
 
void SetPosition (Vector3 val)
 
Vector3 GetUp ()
 
void SetUp (Vector3 val)
 
Vector3 GetTarget ()
 
void SetTarget (Vector3 val)
 
Vector2 GetPageOffset ()
 
void SetPageOffset (Vector2 val)
 
Matrix4 GetViewMatrix ()
 
float GetNear ()
 
void SetNear (float val)
 
float GetFar ()
 
void SetFar (float val)
 
float GetFovy ()
 
void SetFovy (float val)
 
ViewPosition GetOrigin ()
 
void SetOrigin (ViewPosition val)
 
ViewPosition GetSize ()
 
void SetSize (ViewPosition val)
 
long GetWidth ()
 
void SetWidth (long val)
 
long GetHeight ()
 
void SetHeight (long val)
 
float GetOrthoZoomFactor ()
 
void SetOrthoZoomFactor (float val)
 
EnumProjectionType GetProjectionType ()
 
void SetProjectionType (EnumProjectionType val)
 
Matrix4 GetProjectionMatrix ()
 
boolean GetLockNearFar ()
 
void SetLockNearFar (boolean val)
 
Vector3 GetDirection ()
 
Vector3 GetRight ()
 
void UpdateNearFar (AABox sceneBox)
 
float GetDistance ()
 
void LookAt (Vector3 position, Vector3 target, Vector3 up)
 
void LookByDirection (Vector3 target, Vector3 dir, Vector3 up)
 
void UpdateViewMatrix ()
 
void UpdateProjectionMatrix ()
 
Vector2 GetViewportSize ()
 
Vector2 GetViewportOrigin ()
 
Vector4 GetViewport ()
 
Vector2 GetViewportCenter ()
 
void Resize (long width, long height)
 
void Zoom (float ratio, float distance)
 
Matrix4 ComputeOrthoMatrix (float zoomFactor)
 
void Dump ()
 
boolean Contain (long winX, long winY)
 

详细描述

<>
viewport:

  1. Orgion [left, bottom]
    h
    ^------—
    | |
    | |
    O------—> w
    Origon and Size can be Absolute or Relative mode.
    参见
    EnumPositionType2. Camera can be shared among viewports.

成员函数说明

◆ Contain()

boolean Camera.Contain ( long  winX,
long  winY 
)

Test if window point is in camera

参数
winXthe x value
winYthe y value
返回
true if in camera.

◆ GetViewportOrigin()

Vector2 Camera.GetViewportOrigin ( )

Get the origin point on screen.

返回
the origin.

◆ GetViewportSize()

Vector2 Camera.GetViewportSize ( )

Get the size on screen.

返回
the width and heigth.

◆ Zoom()

void Camera.Zoom ( float  ratio,
float  distance 
)

Zoom by ratio

参数
ratio(0, 2)