collada.camera.OrthographicCamera¶
-
class
collada.camera.
OrthographicCamera
(id, znear, zfar, xmag=None, ymag=None, aspect_ratio=None, xmlnode=None)¶ Bases:
collada.camera.Camera
Orthographic camera as defined in COLLADA tag <orthographic>.
-
__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:
xmag
aloneymag
alonexmag
andymag
xmag
andaspect_ratio
ymag
andaspect_ratio
Any other combination will raise
collada.common.DaeMalformedError
Parameters: - 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
(collada, localscope, node)Load and return a class instance from an XML 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
-
static
load
(collada, localscope, node)¶ Load and return a class instance from an XML node.
Inspect the data inside node, which must match this class tag and create an instance out of it.
Parameters: - collada (collada.Collada) – The collada file object where this object lives
- localscope (dict) – If there is a local scope where we should look for local ids (sid) this is the dictionary. Otherwise empty dict ({})
- node – An Element from python’s ElementTree API
-
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
-