Camera

Thuộc tính

Properties Camera lớp là một Entity kế thừa từ Frustum và đại diện cho một camera ảo trong cảnh 3D. Gắn nó vào một Node để định vị và định hướng nó trong cây phân cấp cảnh. Trong phiên bản FOSS hiện tại, Camera không tiết lộ các thuộc tính đặc thù cho định dạng; nó đóng vai trò là một dấu hiệu thực thể có kiểu có thể được gắn vào các nút.

using Aspose.ThreeD;
using Aspose.ThreeD.Entities;

var scene = new Scene();
var camera = new Camera();
scene.RootNode.CreateChildNode("MainCamera", camera);

Thuộc tính

NameTypeAccessDescription
ApertureModeApertureModeRead/WriteGets or sets the aperture mode.
FieldOfViewdoubleRead/WriteGets or sets the field of view.
FieldOfViewXdoubleRead/WriteGets or sets the field of view x.
FieldOfViewYdoubleRead/WriteGets or sets the field of view y.
WidthdoubleRead/WriteGets or sets the width.
HeightdoubleRead/WriteGets or sets the height.
AspectRatiodoubleRead/WriteGets or sets the aspect ratio.
MagnificationVector2Read/WriteGets or sets the magnification.
ProjectionTypeProjectionTypeRead/WriteGets or sets the projection type.
RotationModeRotationModeRead/WriteGets or sets the rotation mode.
NearPlanedoubleRead/WriteGets or sets the near plane.
FarPlanedoubleRead/WriteGets or sets the far plane.
AspectdoubleRead/WriteGets or sets the aspect.
OrthoHeightdoubleRead/WriteGets or sets the ortho height.
UpVector3Read/WriteGets or sets the up.
LookAtVector3Read/WriteGets or sets the look at.
DirectionVector3Read/WriteGets or sets the direction.
TargetNodeRead/WriteGets or sets the target.
ExcludedboolRead/WriteGets or sets the excluded.
ParentNodesList<Node>ReadGets the parent nodes.
ParentNodeNodeRead/WriteGets or sets the parent node.
SceneSceneReadGets the scene.
NamestringRead/WriteGets or sets the name.
PropertiesPropertyCollectionReadGets the properties.
SignatureDescription
Camera()Creates a new Camera instance with the specified name
Camera(projectionType: ProjectionType)
Camera(name: string)
Camera(name: string, projectionType: ProjectionType)
MoveForward(distance: double)Not implemented in the FOSS edition — throws at runtime. Move camera forward towards its direction or target.
Entity(name: string)
GetBoundingBox()Gets the bounding box of current entity in its object space coordinate system.
GetEntityRendererKey()Gets the key of the entity renderer registered in the renderer
SceneObject(name: string)
A3DObject()
RemoveProperty(property: Property)Removes a dynamic property.
GetProperty(property: string)Get the value of specified property
SetProperty(property: string, value: object?)Sets the value of specified property
FindProperty(propertyName: string)Finds the property. It can be a dynamic property (Created by CreateDynamicProperty/SetProperty) or native property(Identified by its name)

Xem thêm

 Tiếng Việt