Camera

Inheritance diagram

Inheritance diagram of ORSModel.ors.Camera, ORSModel.ors.Unmanaged, ORSModel.ors.ORSBaseClass

Classes

Camera

class ORSModel.ors.Camera

Bases: Unmanaged

The camera object, i.e. the view point from which we look at objects.

copy(self) ORSModel.ors.Camera

Gets a copy.

Returns:

output (ORSModel.ors.Camera) –

copyFrom(self, aCamera: ORSModel.ors.Camera)

Copy the parameters of a given camera.

Parameters:

aCamera (ORSModel.ors.Camera) –

createFromPythonRepresentation(aPythonRepresentation: str) ORSModel.ors.Camera

Create aCamera from a python representation a static method.

Parameters:

aPythonRepresentation (str) –

Returns:

output (ORSModel.ors.Camera) –

getAngleOfView(self) float

Gets angle of view.

Returns:

output (float) –

getCameraDirection(self) ORSModel.ors.Vector3

Gets the look at direction.

Returns:

output (ORSModel.ors.Vector3) –

getCameraLeft(self) ORSModel.ors.Vector3

Gets the left direction.

Returns:

output (ORSModel.ors.Vector3) –

getCameraPivot(self) ORSModel.ors.Vector3

Gets the pivot position.

Returns:

output (ORSModel.ors.Vector3) –

getCameraPosition(self) ORSModel.ors.Vector3

Gets the location.

Returns:

output (ORSModel.ors.Vector3) –

getCameraRight(self) ORSModel.ors.Vector3

Gets the right direction.

Returns:

output (ORSModel.ors.Vector3) –

getCameraUp(self) ORSModel.ors.Vector3

Gets the up direction.

Returns:

output (ORSModel.ors.Vector3) –

getClassNameStatic() str

getClassNameStatic

Returns:

output (str) –

getDepthOfField(self) float

Gets depth of field.

Returns:

output (float) –

getFarRectangle(self) ORSModel.ors.Rectangle

Get camera far plane.

Returns:

output (ORSModel.ors.Rectangle) – the far plane (a Rectangle)

getFocalLength(self) float

Gets focal length.

Returns:

output (float) –

getIsEqualTo(self, aCamera: ORSModel.ors.Camera) bool

Tests if the cameras have the same parameters.

Parameters:

aCamera (ORSModel.ors.Camera) –

Returns:

output (bool) –

getIsPointInFrontOfCamera(self, aPoint: ORSModel.ors.Vector3) bool

Use to know if a point is behind the camera.

Parameters:

aPoint (ORSModel.ors.Vector3) –

Returns:

output (bool) –

getLineOfSight(self, positionOnView: ORSModel.ors.Vector3) ORSModel.ors.Line

Get the line of sight of the camera from position on screen.

Note

Origin of the line of sight is the camera position.

Parameters:

positionOnView (ORSModel.ors.Vector3) –

Returns:

output (ORSModel.ors.Line) – the line of sigth (an Line)

getLineOfSightOrtho(self) ORSModel.ors.Line

Get the line of sight of the camera.

Note

Origin of the line of sight is the camera position.

Returns:

output (ORSModel.ors.Line) – the line of sigth (an Line)

getNearRectangle(self) ORSModel.ors.Rectangle

Get camera near plane.

Returns:

output (ORSModel.ors.Rectangle) – the near plane (a Rectangle)

getOrthoZoomFactor(self) float

method getOrthoZoomFactor

Returns:

output (float) –

getRectangle(self, fDistance: float) ORSModel.ors.Rectangle

Get camera plane at a given distance in the frustum.

Note

The distance is clipped by [getViewPortNear(), getViewPortFar()]

Parameters:

fDistance (float) –

Returns:

output (ORSModel.ors.Rectangle) – the plane (a Rectangle)

getRotatedAroundAxis(self, rotationAxis: ORSModel.ors.Vector3, rotationPivot: ORSModel.ors.Vector3, angle: float) ORSModel.ors.Camera

Gets a new camera rotated around an axis around a specified location by an angle.

Parameters:
Returns:

output (ORSModel.ors.Camera) –

getSceneNormalizationMatrix(self) ORSModel.ors.Matrix4x4

Get scene normalization matrix.

Returns:

output (ORSModel.ors.Matrix4x4) –

getSceneNormalizationRotationMatrix(self) ORSModel.ors.Matrix4x4

Get scene normalization matrix.

Returns:

output (ORSModel.ors.Matrix4x4) –

getSceneNormalizationScaleMatrix(self) ORSModel.ors.Matrix4x4

Get scene normalization matrix.

Returns:

output (ORSModel.ors.Matrix4x4) –

getSceneNormalizationTranslationMatrix(self) ORSModel.ors.Matrix4x4

Get scene normalization matrix.

Returns:

output (ORSModel.ors.Matrix4x4) –

getScreenToWorldCoordinate(self, xCoordinate: float, yCoordinate: float) ORSModel.ors.Vector3

Gets screen to world coordinate.

Parameters:
  • xCoordinate (float) –

  • yCoordinate (float) –

Returns:

output (ORSModel.ors.Vector3) –

getScreenToWorldDirection(self, xCoordinate: float, yCoordinate: float) ORSModel.ors.Vector3

Gets screen to world direction.

Parameters:
  • xCoordinate (float) –

  • yCoordinate (float) –

Returns:

output (ORSModel.ors.Vector3) –

getUse3DOrthoApproximationProjection(self) bool

Gets 3D ortho approximation projection.

Returns:

output (bool) –

getUseOrthoProjection(self) bool

Gets ortho projection.

Returns:

output (bool) –

getViewMatrix(self) ORSModel.ors.Matrix4x4

Gets the equivalent left-handed view matrix.

Returns:

output (ORSModel.ors.Matrix4x4) –

getViewPortFar(self) float

Gets viewport far.

Returns:

output (float) –

getViewPortHeight(self) int

Gets viewport height.

Returns:

output (int) –

getViewPortNear(self) float

Gets viewport near.

Returns:

output (float) –

getViewPortTopLeftX(self) int

Gets viewport top left x.

Returns:

output (int) –

getViewPortTopLeftY(self) int

Gets viewport top left y.

Returns:

output (int) –

getViewPortWidth(self) int

Gets viewport width.

Returns:

output (int) –

none() Camera
Returns:

output (Camera) –

rotateAroundAxis(self, rotationAxis: ORSModel.ors.Vector3, rotationPivot: ORSModel.ors.Vector3, angle: float)

Rotates the camera around an axis around a specified location by an angle.

Parameters:
setAngleOfView(self, aValue: float)

Sets angle of view.

Parameters:

aValue (float) –

setCameraDirection(self, inputVector: ORSModel.ors.Vector3)

Sets the look at direction.

Parameters:

inputVector (ORSModel.ors.Vector3) –

setCameraPivot(self, inputVector: ORSModel.ors.Vector3)

Sets the pivot position.

Parameters:

inputVector (ORSModel.ors.Vector3) –

setCameraPosition(self, inputVector: ORSModel.ors.Vector3)

Sets the location.

Parameters:

inputVector (ORSModel.ors.Vector3) –

setCameraUp(self, inputVector: ORSModel.ors.Vector3)

Sets the up direction.

Parameters:

inputVector (ORSModel.ors.Vector3) –

setDepthOfField(self, aValue: float)

Sets depth of field.

Parameters:

aValue (float) –

setFocalLength(self, aValue: float)

Sets focal length.

Parameters:

aValue (float) –

setFromViewMatrix(self, aMatrix: ORSModel.ors.Matrix4x4)

Sets the parameters from a left-handed view matrix.

Parameters:

aMatrix (ORSModel.ors.Matrix4x4) –

setOrthoZoomFactor(self, zoomFactor: float)

method setOrthoZoomFactor

Parameters:

zoomFactor (float) –

setSceneNormalizationRotationMatrix(self, aMatrix: ORSModel.ors.Matrix4x4)

Set scene normalization matrix.

Parameters:

aMatrix (ORSModel.ors.Matrix4x4) –

setSceneNormalizationScaleMatrix(self, aMatrix: ORSModel.ors.Matrix4x4)

Set scene normalization matrix.

Parameters:

aMatrix (ORSModel.ors.Matrix4x4) –

setSceneNormalizationTranslationMatrix(self, aMatrix: ORSModel.ors.Matrix4x4)

Set scene normalization matrix.

Parameters:

aMatrix (ORSModel.ors.Matrix4x4) –

setUse3DOrthoApproximationProjection(self, aValue: bool)

Sets 3D ortho approximationprojection.

Parameters:

aValue (bool) –

setUseOrthoProjection(self, aValue: bool)

Sets ortho projection.

Parameters:

aValue (bool) –

setViewPortFar(self, aValue: float)

Sets viewport far.

Parameters:

aValue (float) –

setViewPortHeight(self, aValue: int)

Sets viewport height.

Parameters:

aValue (int) –

setViewPortNear(self, aValue: float)

Sets viewport near.

Parameters:

aValue (float) –

setViewPortTopLeftX(self, aValue: int)

Sets viewport top left x.

Parameters:

aValue (int) –

setViewPortTopLeftY(self, aValue: int)

Sets viewport top left y.

Parameters:

aValue (int) –

setViewPortWidth(self, aValue: int)

Sets viewport width.

Parameters:

aValue (int) –

Unmanaged

class ORSModel.ors.Unmanaged

Bases: ORSBaseClass

Abstract class for objects that are not managed by the core library. Unmanaged objects are transient objects.

atomicLoad(sFilename: str) Unmanaged

Creates an object from a file where an object was saved.

Parameters:

sFilename (str) – path of the file to load

Returns:

output (Unmanaged) – an unmanaged object, or none() if the load fails

atomicSave(self, aFilename: str) int

Saves the object to a file.

Parameters:

aFilename (str) – path of the file to save

Returns:

output (int) – 0 if successful, otherwise an error code

createFromPythonRepresentation(aPythonRepresentation: str) ORSModel.ors.Unmanaged

Create aUnmanaged Object from a python representation a static method.

Parameters:

aPythonRepresentation (str) –

Returns:

output (ORSModel.ors.Unmanaged) –

fromPythonRepresentation(self, aPythonRepresentation: str) bool

Create aUnmanaged object from a Python string representation.

Parameters:

aPythonRepresentation (str) – a Python evaluable string representation (a string)

Returns:

output (bool) – true if parsing worked, false otherwise (a bool)

getClassName(self) str

Retrieves the class name of the core object wrapped by this Interface object.

Returns:

output (str) –

getClassNameStatic() str

getClassNameStatic

Returns:

output (str) –

getDataChecksum(self) str
Returns:

output (str) –

getIsInstanceOf(self, pProgId: str) bool

Queries the object to know if it is an instance of a certain class.

Parameters:

pProgId (str) –

Returns:

output (bool) –

getPythonRepresentation(self) str

Gets a Python evaluable string representation.

Returns:

output (str) –

isNone(self) bool

Checks if the receiver is none.

Returns:

output (bool) –

isNotNone(self) bool

Checks if the receiver is not none.

Returns:

output (bool) –

none() Unmanaged
Returns:

output (Unmanaged) –

ORSBaseClass

class ORSModel.ors.ORSBaseClass

An abstract class from which all objects issued from the ORS Core Library inherit.

getPythonTraceBack() List[str]

Set the python traceback for a call from python.

Returns:

output (List[str]) –

isManaged(self) bool
Returns:

output (bool) –

isNone(self) bool
Returns:

output (bool) –

setPythonTraceBack(tb: List[str])

Set the python traceback for a call from python.

Parameters:

tb (List[str]) –