Simplygon C++ API  8.3.35800.0
SimplygonSDK::ISceneCamera Class Referenceabstract

#include <SimplygonSDK.h>

Inheritance diagram for SimplygonSDK::ISceneCamera:
SimplygonSDK::ISceneNode SimplygonSDK::IObject

Public Member Functions

virtual CountedPointer< IRealArrayGetCameraPositions ()=0
 
virtual unsigned int GetCameraType ()=0
 
virtual const char * GetClass ()
 
virtual real GetFieldOfView ()=0
 
virtual unsigned int GetNumberOfViews ()=0
 
virtual real GetOrthographicCameraPixelSize ()=0
 
virtual real GetPixelFieldOfView ()=0
 
virtual CountedPointer< IRealArrayGetTargetPositions ()=0
 
virtual bool GetUseNormalizedCoordinates ()=0
 
virtual bool IsA (const char *type) const
 
virtual void SetCameraType (unsigned int value)=0
 
virtual void SetCustomSphereCameraPath (int fidelity, real pitch_angle, real yaw_angle, real coverage_angle)=0
 
virtual void SetFieldOfView (real value)=0
 
virtual void SetOrthographicCameraPixelSize (real value)=0
 
virtual void SetPixelFieldOfView (real value)=0
 
virtual void SetUseNormalizedCoordinates (bool value)=0
 
virtual bool ValidateCamera ()=0
 
- Public Member Functions inherited from SimplygonSDK::ISceneNode
virtual void AddChild (ISceneNode *child)=0
 
virtual bool CalculateExtents ()=0
 
virtual CountedPointer< ISceneMeshCreateChildMesh (IGeometryData *geom)=0
 
virtual CountedPointer< IScenePlaneCreateChildPlane (const real *position_realInputDataPtr, const real *normal_realInputDataPtr)=0
 
virtual void EvaluateDefaultGlobalTransformation (IMatrix4x4 *global_transform)=0
 
virtual CountedPointer< ISceneNodeFindNamedChild (const char *name)=0
 
virtual CountedPointer< ISceneNodeGetChild (rid index)=0
 
virtual unsigned int GetChildCount ()=0
 
virtual void GetInf (real *realReturnDataPtr)=0
 
virtual bool GetIsFrozen ()=0
 
virtual bool GetIsModified ()=0
 
virtual bool GetIsVisible ()=0
 
virtual rstring GetNodeGUID ()=0
 
virtual rstring GetOriginalName ()=0
 
virtual CountedPointer< ISceneNodeGetParent ()=0
 
virtual rstring GetPath ()=0
 
virtual CountedPointer< IMatrix4x4GetRelativeTransform ()=0
 
virtual CountedPointer< ISceneGetScene ()=0
 
virtual void GetSup (real *realReturnDataPtr)=0
 
virtual bool HasChild (ISceneNode *child)=0
 
virtual CountedPointer< ISceneNodeNewClone ()=0
 
virtual CountedPointer< ISceneNodeNewCopy ()=0
 
virtual void RemoveChild (ISceneNode *child)=0
 
virtual void RemoveChildren ()=0
 
virtual void RemoveFromParent ()=0
 
virtual void SetIsFrozen (bool value)=0
 
virtual void SetIsModified (bool value)=0
 
virtual void SetIsVisible (bool value)=0
 
virtual void SetNodeGUID (const char *value)=0
 
virtual void SetOriginalName (const char *value)=0
 
- Public Member Functions inherited from SimplygonSDK::IObject
virtual rid AddObserver (robserver *Observer, rid EventId)=0
 
virtual void AddRef ()=0
 
virtual rstring GetName ()=0
 
virtual void * GetUserComponentArea (rid userid)=0
 
virtual void PrintInfo ()=0
 
virtual void Release ()=0
 
virtual void RemoveObserver (rid ObserverId)=0
 
virtual void SetName (const char *Name)=0
 

Static Public Member Functions

static bool IsClassA (const char *type)
 
static ISceneCameraSafeCast (IObject *ptr)
 
- Static Public Member Functions inherited from SimplygonSDK::ISceneNode
static bool IsClassA (const char *type)
 
static ISceneNodeSafeCast (IObject *ptr)
 
- Static Public Member Functions inherited from SimplygonSDK::IObject
static bool IsClassA (const char *type)
 
static IObjectSafeCast (IObject *ptr)
 

Detailed Description

ISceneCamera is the camera node in the Simplygon scene graph. ISceneCamera 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.

Definition at line 15089 of file SimplygonSDK.h.

Member Function Documentation

◆ GetCameraPositions()

virtual CountedPointer<IRealArray> SimplygonSDK::ISceneCamera::GetCameraPositions ( )
pure virtual

CameraPositions is an IRealArray (with tuple size 3) where each tuple is a 3d camera position.

Returns
the current array of camera positions

◆ GetCameraType()

virtual unsigned int SimplygonSDK::ISceneCamera::GetCameraType ( )
pure virtual

Specifies the camera type. SG_CAMERATYPE_PERSPECTIVE - A regular camera that uses the FieldOfView. SG_CAMERATYPE_OMNIDIRECTIONAL - An omni directional camera view all directions from its position and ignores the TargetPositions and FieldOfView. SG_CAMERATYPE_ORTHOGRAPHIC - Orthographic cameras render the scene in a direction determined by the vector from CameraPositions to TargetPositions, it uses OrthographicCameraPixelSize and ignores the FieldOfView and UseNormalizedCoordinates.

Returns
the current SG_CAMERATYPE_[...] value.

◆ GetClass()

virtual const char* SimplygonSDK::ISceneCamera::GetClass ( )
virtual

GetClass returns the name of the class of the object.

Returns
the name of the actual class of the object, as a const char string

Reimplemented from SimplygonSDK::ISceneNode.

◆ GetFieldOfView()

virtual real SimplygonSDK::ISceneCamera::GetFieldOfView ( )
pure virtual

The field of view (in radians) of the camera.

Returns
the current FieldOfView value

◆ GetNumberOfViews()

virtual unsigned int SimplygonSDK::ISceneCamera::GetNumberOfViews ( )
pure virtual

Returns the number of views.

Returns
the number of views.

◆ GetOrthographicCameraPixelSize()

virtual real SimplygonSDK::ISceneCamera::GetOrthographicCameraPixelSize ( )
pure virtual

Specifies the length of the side of a square pixel if the camera type is SG_CAMERATYPE_ORTHOGRAPHIC.

Returns
the current OrthographicCameraPixelSize value

◆ GetPixelFieldOfView()

virtual real SimplygonSDK::ISceneCamera::GetPixelFieldOfView ( )
pure virtual

Determines the resolution by specifying the field of view per pixel (both vertically and horizontally) if the camera type is SG_CAMERATYPE_PERSPECTIVE or SG_CAMERATYPE_PERSPECTIVE_OMNIDIRECTIONAL. For instance, if the camera type is SG_CAMERATYPE_PERSPECTIVE and has PI/2 radians field of view (for the entire camera) and the pixel field of view is (PI/2)/512 the camera will have 512x512 pixels.

Returns
the current PixelFieldOfView value

◆ GetTargetPositions()

virtual CountedPointer<IRealArray> SimplygonSDK::ISceneCamera::GetTargetPositions ( )
pure virtual

TargetPositions is an IRealArray (with tuple size 3) where each tuple is a 3d camera target position.

Returns
the current array of target positions

◆ GetUseNormalizedCoordinates()

virtual bool SimplygonSDK::ISceneCamera::GetUseNormalizedCoordinates ( )
pure virtual

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.

Returns
the current UseNormalizedCoordinates flag

◆ IsA()

virtual bool SimplygonSDK::ISceneCamera::IsA ( const char *  type) const
virtual

The IsA function returns true if the object is a or is a descendant of the class named as the type parameter

Parameters
typeis the name of the class to check if the object is, or is a descendant of
Returns
true if the object is of the specified class, false if not

Reimplemented from SimplygonSDK::ISceneNode.

◆ IsClassA()

static bool SimplygonSDK::ISceneCamera::IsClassA ( const char *  type)
inlinestatic

The IsClassA function returns true if ISceneCamera is a or is a descendant of the class named as the type parameter

Parameters
typeis the name of the class to check if the class is, or is a descendant of
Returns
true if the class is of the specified class, false if not

Definition at line 15110 of file SimplygonSDK.h.

◆ SafeCast()

static ISceneCamera* SimplygonSDK::ISceneCamera::SafeCast ( IObject ptr)
inlinestatic

SafeCast makes sure the pointer is of a class that can be cast into a ISceneCamera pointer, and if this is possible, returns the cast pointer.

Parameters
ptris the pointer to be cast into a ISceneCamera pointer
Returns
a pointer to the ISceneCamera object, if the cast can be made, and a NULL pointer otherwise

Definition at line 15123 of file SimplygonSDK.h.

◆ SetCameraType()

virtual void SimplygonSDK::ISceneCamera::SetCameraType ( unsigned int  value)
pure virtual

Specifies the camera type. SG_CAMERATYPE_PERSPECTIVE - A regular camera that uses the FieldOfView. SG_CAMERATYPE_OMNIDIRECTIONAL - An omni directional camera view all directions from its position and ignores the TargetPositions and FieldOfView. SG_CAMERATYPE_ORTHOGRAPHIC - Orthographic cameras render the scene in a direction determined by the vector from CameraPositions to TargetPositions, it uses OrthographicCameraPixelSize and ignores the FieldOfView and UseNormalizedCoordinates.

Parameters
valuethe desired CameraType

◆ SetCustomSphereCameraPath()

virtual void SimplygonSDK::ISceneCamera::SetCustomSphereCameraPath ( int  fidelity,
real  pitch_angle,
real  yaw_angle,
real  coverage_angle 
)
pure virtual

Creates a set of camera views placed on a custom sphere around the center of the scene.

Parameters
fidelitydetermines both the resolution and the amount of cameras and should be between 0 and 10.
pitch_angleamount of degrees the sphere should be pitch rotated
yaw_angleamount of degrees the sphere should be yaw rotated
coverage_angle360° would be entire sphere, 180° would be hemisphere, 0° would be no sphere.

◆ SetFieldOfView()

virtual void SimplygonSDK::ISceneCamera::SetFieldOfView ( real  value)
pure virtual

The field of view (in radians) of the camera.

Parameters
valuethe desired FieldOfView value

◆ SetOrthographicCameraPixelSize()

virtual void SimplygonSDK::ISceneCamera::SetOrthographicCameraPixelSize ( real  value)
pure virtual

Specifies the length of the side of a square pixel if the camera type is SG_CAMERATYPE_ORTHOGRAPHIC.

Parameters
valuethe desired OrthographicCameraPixelSize value

◆ SetPixelFieldOfView()

virtual void SimplygonSDK::ISceneCamera::SetPixelFieldOfView ( real  value)
pure virtual

Determines the resolution by specifying the field of view per pixel (both vertically and horizontally) if the camera type is SG_CAMERATYPE_PERSPECTIVE or SG_CAMERATYPE_PERSPECTIVE_OMNIDIRECTIONAL. For instance, if the camera type is SG_CAMERATYPE_PERSPECTIVE and has PI/2 radians field of view (for the entire camera) and the pixel field of view is (PI/2)/512 the camera will have 512x512 pixels.

Parameters
valuethe desired PixelFieldOfView value

◆ SetUseNormalizedCoordinates()

virtual void SimplygonSDK::ISceneCamera::SetUseNormalizedCoordinates ( bool  value)
pure virtual

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.

Parameters
valuethe desired UseNormalizedCoordinates flag

◆ ValidateCamera()

virtual bool SimplygonSDK::ISceneCamera::ValidateCamera ( )
pure virtual

Validates the camera properties. Asserts on invalid ISceneCamera.

Returns
true if the ISceneCamera is valid.

The documentation for this class was generated from the following file: