资讯 社区 文档
技术能力
语音技术
文字识别
人脸与人体
图像技术
语言与知识
视频技术

相机控制

Camera

此类描述json相机相关字段(默认节点,建议直接套用)

Fields
Camera cameraDefaultLookAt
默认相机节点属性配置
Camera cameraNodeSuppl
相机节点属性配置
Camera centerPos
相机焦点位置
Camera eyePos
默认相机位置
Camera name
Camera节点名
Camera position
位置
Camera rotation
旋转
Camera scale
大小
Camera type
当前节点类型
Camera upDirection
相机朝向
Camera visible
是否显示
Camera zFar
Z轴最远距离
Camera zNear
Z轴最近距离
Public methods
Camera AllCameraDemo()
Filter示例

AllCameraDemo ()

相机示例

sample:
{
"name": "mainCamera",
"type": "camera",
"visible": "1",
"position": "0,5,70",
"scale": "1,1,1",
"rotation": "0,0,0",
"children": [],
"cameraNodeSuppl": 
{
   "fov": 56,
   "zNear": 20.0,
   "zFar": 1000.0,
   "cameraDefaultLookAt":
   {
      "eyePos": "768,0,1536",
      "centerPos": "0,0,0",
      "upDirection": "0,1,0"
    }
}
},
{
"name": "mainCamera2”,
"type": "camera",
"visible": "1",
"position": "0,5,70",
"scale": "1,1,1",
"rotation": "0,0,0",
"children": [],
"cameraNodeSuppl": 
{
   "fov": 56,
   "zNear": 100.0,
   "zFar": 5000.0,
   "cameraDefaultLookAt":
     {
        "eyePos": "768,0,1536",
        "centerPos": "0,0,0",
        "upDirection": “0,0,1”
      }
}
}

cameraDefaultLookAt

version 8

默认相机节点属性配置(number类型)

sample:
"cameraNodeSuppl": 
{
   "fov": 56,
   "zNear": 20.0,
   "zFar": 1000.0,
   "cameraDefaultLookAt":
    {
       "eyePos": "768,0,1536",
       "centerPos": "0,0,0",
       "upDirection": "0,1,0"
     }
}

cameraNodeSuppl

version 8

相机节点属性配置(number类型)

sample:
"cameraNodeSuppl": 
{
   "fov": 56,
   "zNear": 20.0,
   "zFar": 1000.0,
   "cameraDefaultLookAt":
   {
      "eyePos": "768,0,1536",
      "centerPos": "0,0,0",
      "upDirection": "0,1,0"
   }
}

centerPos

version 8

相机焦点位置

sample:
详见:"cameraDefaultLookAt"字段

eyePos

version 8

默认相机位置

sample:
详见:"cameraDefaultLookAt"字段

name

version 8

Camera节点名(string类型)

sample:
"nodeList":[
{
   "name":"mianCamera"
}
]

position

version 8

位置(string类型)

sample:
"nodeList":[
{
   "position":"1,1,1"
}
]

rotation

version 8

旋转(string类型)

sample:
"nodeList":[
{
   "rotation":"90,0,0"
}
]

scale

version 8

大小(string类型)

sample:
"nodeList":[
{
   "scale":"1,1,1"
}
]

type

version 8

当前节点类型(string类型)

sample:
"nodeList":[
{
   "type":"camera"
}
]

upDirection

version 8

相机朝向

sample:
详见:"cameraDefaultLookAt"字段

visible

version 8

是否显示(1:显示;0:隐藏)(number类型)

sample:
"nodeList":[
{
   "visible":0
}
]

zFar

version 8

Z轴最远距离

sample:
详见:"cameraNodeSuppl"字段

zNear

version 8

Z轴最近距离

sample:
详见:"cameraNodeSuppl"字段version
上一篇
实时跟踪
下一篇
API版本号对照表