collada.camera.OrthographicCamera¶
-
class
collada.camera.OrthographicCamera(id, znear, zfar, xmag=None, ymag=None, aspect_ratio=None, xmlnode=None)¶ Bases:
collada.camera.CameraOrthographic camera as defined in COLLADA tag <orthographic>.
digraph inheritance36891bae67 { rankdir=LR; size="8.0, 12.0"; "BoundCamera" [URL="collada.camera.BoundCamera.html#collada.camera.BoundCamera",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="Base class for bound cameras"]; "BoundOrthographicCamera" [URL="collada.camera.BoundOrthographicCamera.html#collada.camera.BoundOrthographicCamera",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="Orthographic camera bound to a scene with a transform. This gets created when a"]; "BoundCamera" -> "BoundOrthographicCamera" [arrowsize=0.5,style="setlinewidth(0.5)"]; "BoundPerspectiveCamera" [URL="collada.camera.BoundPerspectiveCamera.html#collada.camera.BoundPerspectiveCamera",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="Perspective camera bound to a scene with a transform. This gets created when a"]; "BoundCamera" -> "BoundPerspectiveCamera" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Camera" [URL="collada.camera.Camera.html#collada.camera.Camera",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="Base camera class holding data from <camera> tags."]; "DaeObject" -> "Camera" [arrowsize=0.5,style="setlinewidth(0.5)"]; "DaeObject" [URL="collada.common.DaeObject.html#collada.common.DaeObject",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="This class is the abstract interface to all collada objects."]; "OrthographicCamera" [URL="#collada.camera.OrthographicCamera",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="Orthographic camera as defined in COLLADA tag <orthographic>."]; "Camera" -> "OrthographicCamera" [arrowsize=0.5,style="setlinewidth(0.5)"]; "PerspectiveCamera" [URL="collada.camera.PerspectiveCamera.html#collada.camera.PerspectiveCamera",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="Perspective camera as defined in COLLADA tag <perspective>."]; "Camera" -> "PerspectiveCamera" [arrowsize=0.5,style="setlinewidth(0.5)"]; }-
__init__(id, znear, zfar, xmag=None, ymag=None, aspect_ratio=None, xmlnode=None)¶ Create a new orthographic camera.
Note:
aspect_ratio = xmag / ymag- You can specify one of:
xmagaloneymagalonexmagandymagxmagandaspect_ratioymagandaspect_ratio
Any other combination will raise
collada.common.DaeMalformedErrorParameters: - id (str) – Identifier for the camera
- znear (float) – Distance to the near clipping plane
- zfar (float) – Distance to the far clipping plane
- xmag (float) – Horizontal magnification of the view
- ymag (float) – Vertical magnification of the view
- aspect_ratio (float) – Aspect ratio of the field of view
- xmlnode – If loaded from xml, the xml node
Methods
__init__(id, znear, zfar[, xmag, ymag, …])Create a new orthographic camera. bind(matrix)Create a bound camera of itself based on a transform matrix. load(localscope, node)save()Saves the orthographic camera’s properties back to xmlnode -
id= None¶ Identifier for the camera
-
xmag= None¶ Horizontal magnification of the view
-
ymag= None¶ Vertical magnification of the view
-
aspect_ratio= None¶ Aspect ratio of the field of view
-
znear= None¶ Distance to the near clipping plane
-
zfar= None¶ Distance to the far clipping plane
-
xmlnode= None¶ ElementTree representation of the data.
-
save()¶ Saves the orthographic camera’s properties back to xmlnode
-
bind(matrix)¶ Create a bound camera of itself based on a transform matrix.
Parameters: matrix (numpy.array) – A numpy transformation matrix of size 4x4 Return type: collada.camera.BoundOrthographicCamera
-