class SceneCamera
SceneCamera is the camera node in the Simplygon scene graph. SceneCamera contains settings that specify how the camera works and it contains a number of views for that type of camera. A view is a combination of a CameraPosition and a TargetPosition. The SceneCamera can contain any number of views but every element in TargetPositions has to correspond to a tuple element in CameraPosition. TargetPositions is not needed if the camera is set to being omni directional.
Properties
| Property | Description |
|---|---|
| CameraType | The camera type. Perspective, Orthographic, and Omnidirectional are visibility-processing camera types. Perspective consumes CameraPositions, TargetPositions, UseNormalizedCoordinates, FieldOfView in radians, and PixelFieldOfView in radians per pixel. Orthographic consumes CameraPositions, TargetPositions, UseNormalizedCoordinates, and OrthographicCameraPixelSize in scene units per pixel, and ignores FieldOfView and PixelFieldOfView. Omnidirectional consumes CameraPositions, UseNormalizedCoordinates, and PixelFieldOfView in radians per pixel, and ignores TargetPositions, FieldOfView, and OrthographicCameraPixelSize. RenderCameraPerspective and RenderCameraOrthographic are rendering camera types consumed by rendering and material-casting paths. RenderCameraPerspective consumes CameraPositions, TargetPositions, RenderUpVectors, RenderFOVs as horizontal and vertical angular fields of view in degrees, and RenderClippingPlanes. RenderCameraOrthographic consumes CameraPositions, TargetPositions, RenderUpVectors, RenderFOVs as orthographic view width and height in scene units, and RenderClippingPlanes. The rendering camera types ignore UseNormalizedCoordinates, FieldOfView, PixelFieldOfView, and OrthographicCameraPixelSize. |
| FieldOfView | The angular field of view in radians for the visibility-processing Perspective camera type. Other camera types do not consume this value. |
| IsModified | If set, the node is new, copied, or modified by processing modules. This can be useful to track modifications in the scene graph. (Inherited from SceneNode) |
| IsVisible | The IsVisible flag. If set, the node is visible. (Inherited from SceneNode) |
| Name | The name of the SceneCamera object. (Inherited from Object) |
| NodeGUID | The unique id for this node. (Inherited from SceneNode) |
| OriginalName | The OriginalName parameter which can be used to specify the original name of a node, for debugging of merging purposes. This parameter is not copied or cloned, and is not used internally by Simplygon. (Inherited from SceneNode) |
| OrthographicCameraPixelSize | The length of each square pixel in scene units for the visibility-processing Orthographic camera type. Other camera types do not consume this value. |
| PixelFieldOfView | The angular field of view per pixel in radians per pixel, both vertically and horizontally, for the visibility-processing Perspective and Omnidirectional camera types. For example, a Perspective camera with a FieldOfView of PI/2 radians and a PixelFieldOfView of (PI/2)/512 radians per pixel has a resolution of 512x512 pixels. Other camera types do not consume this value. |
| UseNormalizedCoordinates | Normalized coordinates means that the coordinates are relative to the scene: the origin is in the center of the scene and 1 unit length is the distance of the scene radius. This can be used to have cameras in front of or above the scene for instance without having to know the coordinates of the scene. If set to false, then absolute coordinates will be used instead. |
Methods
| Method | Description |
|---|---|
| AddChild | Adds a child node to this node. If the child is already a child of another node, it is removed from this node. (Inherited from SceneNode) |
| AddObserver | Adds a user-defined observer object to the interface, that will receive events from the interface. (Inherited from Object) |
| CalculateExtents | Calculates the axis-aligned bounding box of the node and all its children. If the node tree contains no geometric data, or all data is hidden, the bounding box is not calculated, and the method returns false. (Inherited from SceneNode) |
| CreateChildMesh | Creates a SceneMesh node as a child node to this node. (Inherited from SceneNode) |
| CreateChildPlane | Creates a ScenePlane node as a child node to this node. (Inherited from SceneNode) |
| EvaluateDefaultGlobalTransformation | Evaluates the default global transformation of the node, regardless of node animation. (Inherited from SceneNode) |
| FindNamedChild | Finds the first child that has the name. (Inherited from SceneNode) |
| GetCameraPositions | CameraPositions is an IRealArray (with tuple size 3) where each tuple is a 3d camera position. |
| GetChild | Get a pointer to the i:th child of this node. (Inherited from SceneNode) |
| GetChildCount | The number of direct children of this node. (Inherited from SceneNode) |
| GetClass | Get the name of the SceneCamera class. (Inherited from Object) |
| GetInf | The inferior (minimum) extent of the node. (Inherited from SceneNode) |
| GetNumberOfViews | Returns the number of views. |
| GetParent | The parent node of this node. (Inherited from SceneNode) |
| GetPath | The path to this node in the scene. Please note that only paths where each node has a name can be used to get to the node using the path. (Inherited from SceneNode) |
| GetRelativeTransform | The relative transformation of this node. (Inherited from SceneNode) |
| GetRenderClippingPlanes | RenderClippingPlanes is an IRealArray (with tuple size 2) where each tuple is a 2d vector defining the near and far clipping planes (in that order) of a corresponding camera position. |
| GetRenderFOVs | RenderFOVs is an IRealArray with tuple size 2. For RenderCameraPerspective, each tuple stores the horizontal and vertical angular fields of view, in that order, in degrees. For RenderCameraOrthographic, each tuple uses the same two-component storage for the orthographic view width and height, in that order, in scene units. Other camera types do not consume this array. |
| GetRenderUpVectors | RenderUpVectors is an IRealArray (with tuple size 3) where each tuple is a 3d vector defining the up vector of the corresponding camera position. |
| GetScene | The scene object of the node. (Inherited from SceneNode) |
| GetSup | The superior (maximum) extent of the node. (Inherited from SceneNode) |
| GetTargetPositions | TargetPositions is an IRealArray (with tuple size 3) where each tuple is a 3d camera target position. |
| HasChild | Returns true if the node has the specified child. (Inherited from SceneNode) |
| IsA | Returns true if SceneCamera is a or is a descendant of the class named as the type parameter. (Inherited from Object) |
| IsNull | Returns true if the SceneCamera object is invalid. (Inherited from Object) |
| IsSameObjectAs | Returns true if the SceneCamera object is valid. (Inherited from Object) |
| NewCopy | Deep copies this node tree (this node and all the descendants of this node) and returns the copy top node. Please note that the copy is not added to any scene, and can be added anywhere. Also note that the clone shares all data pointers with the original nodes, such as geometry data objects. (Inherited from SceneNode) |
| NonNull | Returns true if the SceneCamera object is valid. (Inherited from Object) |
| PrintInfo | Prints the content/info of the SceneCamera object to the log. (Inherited from Object) |
| RemoveChild | Removes a child from the node. (Inherited from SceneNode) |
| RemoveChildren | Removes all children of this node. (Inherited from SceneNode) |
| RemoveFromParent | Removes this node from its parent. (Inherited from SceneNode) |
| RemoveObserver | Removes a previously added observer object. (Inherited from Object) |
| SetCustomSphereCameraPath | Creates a set of camera views placed on a custom sphere around the center of the scene. |
| ValidateCamera | Validates the camera properties. Asserts on invalid properties. |
Static methods
| Method | Description |
|---|---|
| IsClassA | Returns true if the class is a or is a descendant of the class named as the type parameter. (Inherited from Object) |
| SafeCast | SafeCast makes sure the input object is of a class that can be cast into spSceneCamera, and if this is the case, returns the object cast into spSceneCamera. (Inherited from Object) |
Properties details
CameraType
The camera type. Perspective, Orthographic, and Omnidirectional are visibility-processing camera types. Perspective consumes CameraPositions, TargetPositions, UseNormalizedCoordinates, FieldOfView in radians, and PixelFieldOfView in radians per pixel. Orthographic consumes CameraPositions, TargetPositions, UseNormalizedCoordinates, and OrthographicCameraPixelSize in scene units per pixel, and ignores FieldOfView and PixelFieldOfView. Omnidirectional consumes CameraPositions, UseNormalizedCoordinates, and PixelFieldOfView in radians per pixel, and ignores TargetPositions, FieldOfView, and OrthographicCameraPixelSize. RenderCameraPerspective and RenderCameraOrthographic are rendering camera types consumed by rendering and material-casting paths. RenderCameraPerspective consumes CameraPositions, TargetPositions, RenderUpVectors, RenderFOVs as horizontal and vertical angular fields of view in degrees, and RenderClippingPlanes. RenderCameraOrthographic consumes CameraPositions, TargetPositions, RenderUpVectors, RenderFOVs as orthographic view width and height in scene units, and RenderClippingPlanes. The rendering camera types ignore UseNormalizedCoordinates, FieldOfView, PixelFieldOfView, and OrthographicCameraPixelSize.
FieldOfView
The angular field of view in radians for the visibility-processing Perspective camera type. Other camera types do not consume this value.
IsModified
If set, the node is new, copied, or modified by processing modules. This can be useful to track modifications in the scene graph.
IsVisible
The IsVisible flag. If set, the node is visible.
Name
The name of the SceneCamera object. (Inherited from Object)
NodeGUID
The unique id for this node.
OriginalName
The OriginalName parameter which can be used to specify the original name of a node, for debugging of merging purposes. This parameter is not copied or cloned, and is not used internally by Simplygon.
OrthographicCameraPixelSize
The length of each square pixel in scene units for the visibility-processing Orthographic camera type. Other camera types do not consume this value.
PixelFieldOfView
The angular field of view per pixel in radians per pixel, both vertically and horizontally, for the visibility-processing Perspective and Omnidirectional camera types. For example, a Perspective camera with a FieldOfView of PI/2 radians and a PixelFieldOfView of (PI/2)/512 radians per pixel has a resolution of 512x512 pixels. Other camera types do not consume this value.
UseNormalizedCoordinates
Normalized coordinates means that the coordinates are relative to the scene: the origin is in the center of the scene and 1 unit length is the distance of the scene radius. This can be used to have cameras in front of or above the scene for instance without having to know the coordinates of the scene. If set to false, then absolute coordinates will be used instead.
Methods details
AddChild
Adds a child node to this node. If the child is already a child of another node, it is removed from this node.
AddObserver
Adds a user-defined observer object to the interface, that will receive events from the interface. (Inherited from Object)
CalculateExtents
Calculates the axis-aligned bounding box of the node and all its children. If the node tree contains no geometric data, or all data is hidden, the bounding box is not calculated, and the method returns false.
CreateChildMesh
Creates a SceneMesh node as a child node to this node.
CreateChildPlane
Creates a ScenePlane node as a child node to this node.
EvaluateDefaultGlobalTransformation
Evaluates the default global transformation of the node, regardless of node animation.
FindNamedChild
Finds the first child that has the name.
GetCameraPositions
CameraPositions is an IRealArray (with tuple size 3) where each tuple is a 3d camera position.
GetChild
Get a pointer to the i:th child of this node.
GetChildCount
The number of direct children of this node.
GetClass
Get the name of the SceneCamera class. (Inherited from Object)
GetInf
The inferior (minimum) extent of the node.
GetNumberOfViews
Returns the number of views.
GetParent
The parent node of this node.
GetPath
The path to this node in the scene. Please note that only paths where each node has a name can be used to get to the node using the path.
GetRelativeTransform
The relative transformation of this node.
GetRenderClippingPlanes
RenderClippingPlanes is an IRealArray (with tuple size 2) where each tuple is a 2d vector defining the near and far clipping planes (in that order) of a corresponding camera position.
GetRenderFOVs
RenderFOVs is an IRealArray with tuple size 2. For RenderCameraPerspective, each tuple stores the horizontal and vertical angular fields of view, in that order, in degrees. For RenderCameraOrthographic, each tuple uses the same two-component storage for the orthographic view width and height, in that order, in scene units. Other camera types do not consume this array.
GetRenderUpVectors
RenderUpVectors is an IRealArray (with tuple size 3) where each tuple is a 3d vector defining the up vector of the corresponding camera position.
GetScene
The scene object of the node.
GetSup
The superior (maximum) extent of the node.
GetTargetPositions
TargetPositions is an IRealArray (with tuple size 3) where each tuple is a 3d camera target position.
HasChild
Returns true if the node has the specified child.
IsA
Returns true if SceneCamera is a or is a descendant of the class named as the type parameter. (Inherited from Object)
IsNull
Returns true if the SceneCamera object is invalid. (Inherited from Object)
IsSameObjectAs
Returns true if the SceneCamera object is valid. (Inherited from Object)
NewCopy
Deep copies this node tree (this node and all the descendants of this node) and returns the copy top node. Please note that the copy is not added to any scene, and can be added anywhere. Also note that the clone shares all data pointers with the original nodes, such as geometry data objects.
NonNull
Returns true if the SceneCamera object is valid. (Inherited from Object)
PrintInfo
Prints the content/info of the SceneCamera object to the log. (Inherited from Object)
RemoveChild
Removes a child from the node.
RemoveChildren
Removes all children of this node.
RemoveFromParent
Removes this node from its parent.
RemoveObserver
Removes a previously added observer object. (Inherited from Object)
SetCustomSphereCameraPath
Creates a set of camera views placed on a custom sphere around the center of the scene.
ValidateCamera
Validates the camera properties. Asserts on invalid properties.
Static methods details
IsClassA
Returns true if the class is a or is a descendant of the class named as the type parameter. (Inherited from Object)
SafeCast
SafeCast makes sure the input object is of a class that can be cast into spSceneCamera, and if this is the case, returns the object cast into spSceneCamera. (Inherited from Object)
