Camera¶
Inheritance diagram¶
Classes¶
Camera¶
-
class
ORSModel.ors.Camera¶ Bases:
ORSModel.ors.Unmanagedbrief_description: The camera object, i.e. the view point from which we look at objects. author: Nicolas Piché. All other members of ORS participated. version: 1.0 date: May 2010
-
copy(self) → Camera¶ Gets a copy.
Returns: output (ORSModel.ors.Camera) –
-
copyFrom(self, aCamera: ORSModel.ors.Camera) → None¶ Copy the parameters of a given camera.
Parameters: aCamera (ORSModel.ors.Camera) –
-
createFromPythonRepresentation(aPythonRepresentation: str) → Camera¶ Create aCamera from a python representation a static method.
Parameters: aPythonRepresentation (str) – Returns: output (ORSModel.ors.Camera) –
-
fromPythonRepresentation(self, aPythonRepresentation: str) → bool¶ set aCamera from a python representation
Parameters: aPythonRepresentation (str) – Returns: output (bool) –
-
getAngleOfView(self) → float¶ Gets angle of view.
Returns: output (float) –
-
getCameraDirection(self) → Vector3¶ Gets the look at direction.
Returns: output (ORSModel.ors.Vector3) –
-
getCameraLeft(self) → Vector3¶ Gets the left direction.
Returns: output (ORSModel.ors.Vector3) –
-
getCameraPivot(self) → Vector3¶ Gets the pivot position.
Returns: output (ORSModel.ors.Vector3) –
-
getCameraPosition(self) → Vector3¶ Gets the location.
Returns: output (ORSModel.ors.Vector3) –
-
getCameraRight(self) → Vector3¶ Gets the right direction.
Returns: output (ORSModel.ors.Vector3) –
-
getCameraUp(self) → 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) → 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) –
-
getLineOfSight(self, positionOnView: ORSModel.ors.Vector3) → 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) → 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) → Rectangle¶ Get camera near plane.
Returns: output (ORSModel.ors.Rectangle) – the near plane (a Rectangle)
-
getOrthoZoomFactor(self) → float¶ method getOrthoZoomFactor
Returns: output (float) –
-
getPythonRepresentation(self) → str¶ Gets a Python evaluable string representation.
Returns: output (str) –
-
getRectangle(self, fDistance: float) → 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) → Camera¶ Gets a new camera rotated around an axis around a specified location by an angle.
Parameters: - rotationAxis (ORSModel.ors.Vector3) –
- rotationPivot (ORSModel.ors.Vector3) –
- angle (float) –
Returns: output (ORSModel.ors.Camera) –
-
getSceneNormalizationMatrix(self) → Matrix4x4¶ Get scene normalization matrix.
Returns: output (ORSModel.ors.Matrix4x4) –
-
getSceneNormalizationRotationMatrix(self) → Matrix4x4¶ Get scene normalization matrix.
Returns: output (ORSModel.ors.Matrix4x4) –
-
getSceneNormalizationScaleMatrix(self) → Matrix4x4¶ Get scene normalization matrix.
Returns: output (ORSModel.ors.Matrix4x4) –
-
getSceneNormalizationTranslationMatrix(self) → Matrix4x4¶ Get scene normalization matrix.
Returns: output (ORSModel.ors.Matrix4x4) –
-
getScreenToWorldCoordinate(self, xCoordinate: float, yCoordinate: float) → Vector3¶ Gets screen to world coordinate.
Parameters: - xCoordinate (float) –
- yCoordinate (float) –
Returns: output (ORSModel.ors.Vector3) –
-
getScreenToWorldDirection(self, xCoordinate: float, yCoordinate: float) → 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) → 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.__init__() -> Camera
-
rotateAroundAxis(self, rotationAxis: ORSModel.ors.Vector3, rotationPivot: ORSModel.ors.Vector3, angle: float) → None¶ Rotates the camera around an axis around a specified location by an angle.
Parameters: - rotationAxis (ORSModel.ors.Vector3) –
- rotationPivot (ORSModel.ors.Vector3) –
- angle (float) –
-
setAngleOfView(self, aValue: float) → None¶ Sets angle of view.
Parameters: aValue (float) –
-
setCameraDirection(self, inputVector: ORSModel.ors.Vector3) → None¶ Sets the look at direction.
Parameters: inputVector (ORSModel.ors.Vector3) –
-
setCameraPivot(self, inputVector: ORSModel.ors.Vector3) → None¶ Sets the pivot position.
Parameters: inputVector (ORSModel.ors.Vector3) –
-
setCameraPosition(self, inputVector: ORSModel.ors.Vector3) → None¶ Sets the location.
Parameters: inputVector (ORSModel.ors.Vector3) –
-
setCameraUp(self, inputVector: ORSModel.ors.Vector3) → None¶ Sets the up direction.
Parameters: inputVector (ORSModel.ors.Vector3) –
-
setDepthOfField(self, aValue: float) → None¶ Sets depth of field.
Parameters: aValue (float) –
-
setFocalLength(self, aValue: float) → None¶ Sets focal length.
Parameters: aValue (float) –
-
setFromViewMatrix(self, aMatrix: ORSModel.ors.Matrix4x4) → None¶ Sets the parameters from a left-handed view matrix.
Parameters: aMatrix (ORSModel.ors.Matrix4x4) –
-
setOrthoZoomFactor(self, zoomFactor: float) → None¶ method setOrthoZoomFactor
Parameters: zoomFactor (float) –
-
setSceneNormalizationRotationMatrix(self, aMatrix: ORSModel.ors.Matrix4x4) → None¶ Set scene normalization matrix.
Parameters: aMatrix (ORSModel.ors.Matrix4x4) –
-
setSceneNormalizationScaleMatrix(self, aMatrix: ORSModel.ors.Matrix4x4) → None¶ Set scene normalization matrix.
Parameters: aMatrix (ORSModel.ors.Matrix4x4) –
-
setSceneNormalizationTranslationMatrix(self, aMatrix: ORSModel.ors.Matrix4x4) → None¶ Set scene normalization matrix.
Parameters: aMatrix (ORSModel.ors.Matrix4x4) –
-
setUse3DOrthoApproximationProjection(self, aValue: bool) → None¶ Sets 3D ortho approximationprojection.
Parameters: aValue (bool) –
-
setUseOrthoProjection(self, aValue: bool) → None¶ Sets ortho projection.
Parameters: aValue (bool) –
-
setViewPortFar(self, aValue: float) → None¶ Sets viewport far.
Parameters: aValue (float) –
-
setViewPortHeight(self, aValue: int) → None¶ Sets viewport height.
Parameters: aValue (int) –
-
setViewPortNear(self, aValue: float) → None¶ Sets viewport near.
Parameters: aValue (float) –
-
setViewPortTopLeftX(self, aValue: int) → None¶ Sets viewport top left x.
Parameters: aValue (int) –
-
setViewPortTopLeftY(self, aValue: int) → None¶ Sets viewport top left y.
Parameters: aValue (int) –
-
setViewPortWidth(self, aValue: int) → None¶ Sets viewport width.
Parameters: aValue (int) –
-
Unmanaged¶
-
class
ORSModel.ors.Unmanaged Bases:
ORSModel.ors.ORSBaseClassbrief_description: Abstract class for objects that are not managed by the core library. author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Jan 2005
-
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) – a managed 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) → Unmanaged Create aUnmanaged Object from a python representation a static method.
Parameters: aPythonRepresentation (str) – Returns: output (ORSModel.ors.Unmanaged) –
-
classmethod
getAllSubclasses(outputCollection=None)
-
classmethod
getClassDenomination()
-
static
getClassFromProgId(progId)
-
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) –
-
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) –
-
classmethod
getIsSubclassOf(parentClass)
-
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.__init__() -> Unmanaged
-
ORSBaseClass¶
-
class
ORSModel.ors.ORSBaseClass -
getPythonTraceBack() → typing.List[str] Set the python traceback for a call from python.
Returns: output (typing.List[str]) –
-
isManaged(self) → bool Returns: output (bool) –
-
isNone(self) → bool Returns: output (bool) –
-
setPythonTraceBack(tb: ORSModel.ors.typing.List[str]) → None Set the python traceback for a call from python.
Parameters: tb (typing.List[str]) –
-