Web Analytics Made Easy - Statcounter
Skip to content

Class SBDDocumentCamera#

ClassList > SBDDocumentCamera

This class describes a camera. More...

  • #include <SBDDocumentCamera.hpp>

Inherits the following classes: SBDDataGraphNode

Public Types inherited from SBDDataGraphNode#

See SBDDataGraphNode

Type Name
enum RenderingPass
The rendering pass.
enum Type
The type of the data graph node.

Public Functions#

Type Name
SBDDocumentCamera ()
Constructs a camera.
SBDDocumentCamera (const std::string & name)
Constructs a camera with name name .
void alignWithAxis (const SBNodeIndexer & nodeIndexer, bool reversed=false)
Aligns the indexed nodes with the camera axis.
void alignWithPlane (const SBNodeIndexer & nodeIndexer, bool reversed=false)
Aligns the indexed nodes with the camera plane.
void backView (bool immediate=false)
Goes to the back view.
void bottomView (bool immediate=false)
Goes to the bottom view.
void center (bool immediate=false)
Centers the camera on the currently selected nodes or on visible nodes if the selection is empty.
void center (const SBNodeIndexer & nodeIndexer, bool immediate=false)
Centers the camera on the visible indexed nodes.
void center (const SBNodeIndexer & nodeIndexer, const SBNodePredicate & visitPredicate, bool immediate=false)
Centers the camera on the indexed nodes based on the visitPredicate .
virtual SBDDocumentCamera * clone () override
Returns a copy of the node and its descendants.
void connectDocumentSignalToSlot (SBCReferenceTarget * referenceTarget, void(SBCReferenceTarget::*)(SBDocumentEvent *) functionPointer, SBCReferenceTarget * nextReferenceTarget=0, void(SBCReferenceTarget::*)(SBDocumentEvent *) nextFunctionPointer=0)
Connects the document signal to a slot.
void defaultView ()
Sets the view to default parameters.
void disconnectDocumentSignalFromSlot (SBCReferenceTarget * referenceTarget, void(SBCReferenceTarget::*)(SBDocumentEvent *) functionPointer)
Disconnects the document signal from a slot.
bool documentSignalIsConnectedToSlot (SBCReferenceTarget * referenceTarget, void(SBCReferenceTarget::*)(SBDocumentEvent *) functionPointer) const
Returns true if and only if the document signal is connected to the slot.
void frontView (bool immediate=false)
Goes to the front view.
float getAspectRatio () const
Returns the aspect ratio.
bool getAutofocusFlag () const
Returns the autofocus flag.
SBVector3 getBasisX () const
Returns the x vector of the camera basis.
SBVector3 getBasisY () const
Returns the y vector of the camera basis.
SBVector3 getBasisZ () const
Returns the z vector of the camera basis.
float getClippingRatio () const
Returns the clipping ratio.
bool getDepthOfFieldFlag () const
Returns the depth of field flag.
SBPosition3 const & getEyeDestination () const
Returns the destination of the eye.
SBPosition3 const & getEyePosition () const
Returns the position of the eye.
SBPicometerPerSecond3 const & getEyeVelocity () const
Returns the velocity of the eye.
float getFNumber () const
Returns the f-number.
const SBQuantity::length & getFarPlane () const
Returns the far plane.
float getFieldOfViewAngleY () const
Returns the field of view angle, in degrees, in the Y direction.
float getFieldOfViewAngleYSingleStep () const
Returns the step of field of view.
std::string getFieldOfViewAngleYSuffix () const
Returns the suffix of field of view.
const SBQuantity::length & getFocalDistance () const
Returns the focal distance.
float getFogRatio () const
Returns the fog ratio.
SBPosition3 getFrustumPositionFromWorldPosition (const SBPosition3 & worldPosition) const
Returns the projection in the frustum of a given world position.
SBVector3 const & getHeadForwardVector () const
Returns the forward vector of the head.
SBPosition3 const & getHeadPosition () const
Returns the position of the head.
SBVector3 const & getHeadUpVector () const
Returns the up vector of the head.
bool getInertiaFlag () const
Returns the inertia flag.
float getMaximumFieldOfViewAngleY () const
Returns the maximum field of view.
float getMinimumFieldOfViewAngleY () const
Returns the minimum field of view.
const SBQuantity::length & getNearPlane () const
Returns the near plane.
SBDDocumentCamera * getNextCamera () const
Returns the next camera in the document.
bool getOrthographicProjectionFlag () const
Returns the orthographic projection flag.
SBDDocumentCamera * getPreviousCamera () const
Returns the previous camera in the document.
double const * getProjectionMatrix () const
Returns the projection matrix.
float const * getProjectionMatrixTranspose () const
Returns the transpose of the projection matrix.
SBRadianPerSecond3 const & getRotationVelocity () const
Returns the rotation velocity.
SBPosition3 const & getTargetDestination () const
Returns the destination of the target.
SBPosition3 const & getTargetPosition () const
Returns the position of the target.
SBPicometerPerSecond3 const & getTargetVelocity () const
Returns the velocity of the target.
SBSpatialTransform getTransform () const
Returns the spatial transform representing the camera's orientation and position.
virtual SBDDataGraphNode::Type getType () override const
Returns the type of the data graph node.
SBVector3 const & getUpVector () const
Returns the up vector.
SBVector3 const & getUpVectorDestination () const
Returns the destination of the up vector.
double const * getViewMatrix () const
Returns the view matrix.
float const * getViewMatrixTranspose () const
Returns the transpose of the view matrix.
double const * getViewProjectionMatrix () const
Returns the view projection matrix.
float const * getViewProjectionMatrixTranspose () const
Returns the transpose of the view projection matrix.
float const * getViewProjectionMatrixTransposeInverse () const
Returns the inverse of the transpose of the view projection matrix.
SBPosition3 getWorldPositionFromFrustumPosition (const SBPosition3 & frustumPosition) const
Returns the world position that corresponds to a frustum position.
bool isMoving () const
Returns whether the camera is currently moving.
virtual bool isSerializable () override const
Returns true __
void leftBackBottomView (bool immediate=false)
Goes to the left back bottom view.
void leftBackTopView (bool immediate=false)
Goes to the left back top view.
void leftFrontBottomView (bool immediate=false)
Goes to the left front bottom view.
void leftFrontTopView (bool immediate=false)
Goes to the left front top view.
void leftView (bool immediate=false)
Goes to the left view.
void orientUpwards (bool immediate=false)
Turns the camera around its Z vector to the upwards direction.
virtual void print (unsigned int offset=0) override const
Prints the camera.
void rightBackBottomView (bool immediate=false)
Goes to the right back bottom view.
void rightBackTopView (bool immediate=false)
Goes to the right back top view.
void rightFrontBottomView (bool immediate=false)
Goes to the right front bottom view.
void rightFrontTopView (bool immediate=false)
Goes to the right front top view.
void rightView (bool immediate=false)
Goes to the right view.
void rotate (const SBVector3 & axis, const SBQuantity::dimensionless & angle, bool immediate=false)
Rotates the camera.
void rotate (const SBRadianPerSecond3 & velocity, const SBPosition3 & center)
Rotates the camera.
void rotateClockwise (bool immediate=false)
Rotates the camera 45 degrees clockwise around its axis.
void rotateCounterClockwise (bool immediate=false)
Rotates the camera 45 degrees counterclockwise around its axis.
void rotateDown (bool immediate=false)
Rotates the camera 45 degrees down around its target.
void rotateLeft (bool immediate=false)
Rotates the camera 45 degrees left around its target.
void rotateRight (bool immediate=false)
Rotates the camera 45 degrees right around its target.
void rotateUp (bool immediate=false)
Rotates the camera 45 degrees up around its target.
virtual void serialize (SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber(1, 0, 0)) override const
Serializes the camera.
void setAspectRatio (float aspectRatio)
Sets the aspect ratio.
void setAutofocusFlag (bool flag)
Sets the autofocus flag.
void setClippingRatio (float clippingRatio)
Sets the clipping ratio.
void setDepthOfFieldFlag (bool flag)
Sets the depth of field flag.
void setEyeDestination (const SBPosition3 & eyeDestination)
Sets the destination of the eye.
void setEyePosition (const SBPosition3 & eyePosition)
Sets the position of the eye.
void setEyeVelocity (const SBPicometerPerSecond3 & eyeVelocity)
Sets the velocity of the eye.
void setFNumber (float fNumber)
Sets the f-number.
void setFarPlane (const SBQuantity::length & farPlane)
Sets the far plane.
void setFieldOfViewAngleY (float fieldOfViewAngleY)
Sets the field of view angle, in degrees, in the Y direction.
void setFocalDistance (const SBQuantity::length & focalDistance)
Sets the focal distance.
void setFogRatio (float clippingRatio)
Sets the fog ratio.
void setHeadForwardVector (const SBVector3 & headForwardVector)
Sets the forward vector of the head.
void setHeadPosition (const SBPosition3 & headPosition)
Sets the position of the head.
void setHeadUpVector (const SBVector3 & headUpVector)
Sets the up vector of the head.
void setInertiaFlag (bool flag)
Sets the inertia flag.
void setMatrices (float * projectionMatrix, float * viewMatrix, const SBQuantity::length & lengthPerUnit, const SBSpatialTransform & origin)
Sets the camera matrices.
void setNearPlane (const SBQuantity::length & nearPlane)
Sets the near plane.
void setOrthographicProjectionFlag (bool orthographicProjectionFlag)
Sets the orthographic projection flag.
void setRotationVelocity (const SBRadianPerSecond3 & rotationVelocity)
Sets the rotation velocity.
void setTargetDestination (const SBPosition3 & targetDestination)
Sets the destination of the target.
void setTargetPosition (const SBPosition3 & targetPosition)
Sets the position of the target.
void setTargetVelocity (const SBPicometerPerSecond3 & targetVelocity)
Sets the velocity of the target.
void setUpVector (const SBVector3 & upVector)
Sets the up vector.
void setUpVectorDestination (const SBVector3 & upVectorDestination)
Sets the destination of the up vector.
void stop ()
Stops the camera.
void topView (bool immediate=false)
Goes to the top view.
void transform (const SBSpatialTransform & transform, bool immediate=false)
Applies a spatial transform to the camera.
void translate (const SBLength3 & translation, bool immediate=false)
Translates the camera.
void translate (const SBPicometerPerSecond3 & velocity)
Translates the camera.
virtual void unserialize (SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber(1, 0, 0)) override
Unserializes the camera.
bool updateState ()
Updates the state of the camera and returns true if the camera moved.
void zoomIn (const SBQuantity::picometerPerSecond & velocity, const SBPosition3 & center)
Zooms in.
void zoomOut (const SBQuantity::picometerPerSecond & velocity, const SBPosition3 & center)
Zooms out.
void zoomTo (const SBPosition3 & cameraTargetDestination)
Zooms to a specific destination.
virtual ~SBDDocumentCamera ()
Destructs the camera.

Public Functions inherited from SBDDataGraphNode#

See SBDDataGraphNode

Type Name
SB_NODE_GETTER_0 (SB_SBDDATAGRAPH_EXPORT, SBCClassProxy *, GetProxy)
SB_NODE_GETTER_0 (SB_SBDDATAGRAPH_EXPORT, SBDDataGraphNode *, This)
SB_NODE_GETTER_0 (SB_SBDDATAGRAPH_EXPORT, SBDDataGraphNode *, GetParent)
SB_NODE_GETTER_0 (SB_SBDDATAGRAPH_EXPORT, SBDDataGraphNode *, GetThis)
SB_NODE_GETTER_0 (SB_SBDDATAGRAPH_EXPORT, SBDDataGraphNode *, GetNextNode)
SB_NODE_GETTER_0 (SB_SBDDATAGRAPH_EXPORT, SBDDataGraphNode *, GetPreviousNode)
SB_NODE_GETTER_0 (SB_SBDDATAGRAPH_EXPORT, SBDDocument *, GetDocument)
SB_NODE_GETTER_0 (SB_SBDDATAGRAPH_EXPORT, SBDDataGraphNode *, GetRoot)
SB_NODE_GETTER_0 (SB_SBDDATAGRAPH_EXPORT, unsigned int, GetNodeIndex)
SB_NODE_GETTER_0 (SB_SBDDATAGRAPH_EXPORT, SBDDataGraphNode::Type, GetType)
SB_NODE_GETTER_0 (SB_SBDDATAGRAPH_EXPORT, bool, GetSelectionFlag)
SB_NODE_GETTER_0 (SB_SBDDATAGRAPH_EXPORT, bool, GetLockedFlag)
SB_NODE_GETTER_0 (SB_SBDDATAGRAPH_EXPORT, bool, GetVisibilityFlag)
SB_NODE_GETTER_0 (SB_SBDDATAGRAPH_EXPORT, bool, GetHighlightingFlag)
SB_NODE_GETTER_0 (SB_SBDDATAGRAPH_EXPORT, unsigned int, GetFlags)
SB_NODE_GETTER_0 (SB_SBDDATAGRAPH_EXPORT, std::string, GetName)
SB_NODE_GETTER_0 (SB_SBDDATAGRAPH_EXPORT, std::string, GetClass)
SB_NODE_GETTER_0 (SB_SBDDATAGRAPH_EXPORT, std::string, GetElement)
SB_NODE_GETTER_0 (SB_SBDDATAGRAPH_EXPORT, SBCContainerUUID, GetElementUUID)
SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, All)
SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, None)
SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsModel)
SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsAtom)
SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsBond)
SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsStructuralNode)
SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsStructuralModel)
SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsVisualModel)
SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsMesh)
SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsLight)
SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsInteractionModel)
SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsDynamicalModel)
SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsPropertyModel)
SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsSimulator)
SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsBallAndStick)
SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsLicorice)
SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsVanDerWaals)
SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsCartoon)
SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsRibbon)
SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsTube)
SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsGaussianSurface)
SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsSolventAccessibleSurface)
SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsSolventExcludedSurface)
SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, HasMaterial)
SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, OwnsMaterial)
SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsLocked)
SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsSerializable)
SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsCreated)
SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsErased)
SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsSelected)
SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsVisible)
SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsHighlighted)
SB_NODE_PREDICATE_1 (SB_SBDDATAGRAPH_EXPORT, IsType, SBDDataGraphNode::Type)
SB_NODE_PREDICATE_1 (SB_SBDDATAGRAPH_EXPORT, HasOneOf, SBNodeIndexer)
virtual bool addChild (SBDDataGraphNode * node, SBDDataGraphNode * nextNode=nullptr)
Adds a child to the node.
bool addMaterial (SBDDataGraphNodeMaterial * material)
Adds a material.
bool baseSignalIsConnectedToSlot (SBCReferenceTarget * referenceTarget, void(SBCReferenceTarget::*)(SBBaseEvent *) functionPointer) const
Returns true when the base signal is connected to a slot.
virtual bool canAddChild (const SBDDataGraphNode * node, const SBDDataGraphNode * nextNode=nullptr) const
Returns whether this node can add node as a child.
virtual bool canAddChildType (SBDDataGraphNode::Type nodeType) const
Returns whether this node can add a node with type nodeType as a child.
bool canAddMaterial () const
Returns whether can add a material to the node based on its type.
virtual bool canHaveDescendantType (SBDDataGraphNode::Type nodeType) const
Returns whether this node can have a node with type nodeType as a descendant.
virtual SBDDataGraphNode * clone ()
Returns a copy of the node and its descendants.
void connectBaseSignalToSlot (SBCReferenceTarget * referenceTarget, void(SBCReferenceTarget::*)(SBBaseEvent *) functionPointer, SBCReferenceTarget * nextReferenceTarget=0, void(SBCReferenceTarget::*)(SBBaseEvent *) nextFunctionPointer=0)
Connects the base signal to a slot.
unsigned int countNodes (SBDDataGraphNode::Type nodeType, bool selectedNodesOnly=false, const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) const
Counts nodes based on a nodeType , a selection status and avisitPredicate , with or without dependencies.
unsigned int countNodes (const SBNodePredicate & selectionPredicate=SBDDataGraphNode::All(), const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) const
Counts nodes based on a selectionPredicate and avisitPredicate , with or without dependencies.
void create ()
Creates the node.
bool descendsFrom (const SBDDataGraphNode * node) const
Returns true if and only if this node isnode , or descends from it.
bool descendsFrom (const SBNodeIndexer & nodeIndexer) const
Returns true if and only if this node is one of the nodes of thenodeIndexer , or descends from one of them.
bool descendsFrom (SBPointerIndexer< SBDDataGraphNode > * nodePointerIndexer) const
Returns true if and only if this node is one of the nodes of thenodePointerIndexer , or descends from one of them.
void disconnectBaseSignalFromSlot (SBCReferenceTarget * referenceTarget, void(SBCReferenceTarget::*)(SBBaseEvent *) functionPointer)
Disconnects the base signal from a slot.
virtual void display (RenderingPass renderingPass)
Displays the node.
virtual void display ()
Displays the node (deprecated)
virtual void displayForSelection ()
Displays the node for selection purposes (deprecated)
virtual void displayForShadow ()
Displays the node for shadowing purposes (deprecated)
void erase ()
Erases the node.
virtual void forEachNodeDepthFirst (void(*)(SBDDataGraphNode *node) action)
Performs the action on this node.
virtual void forEachNodeDepthFirst (SBCClass * object, void(SBCClass::*)(SBDDataGraphNode *node) action)
Performs the objects 'saction on this node.
unsigned int getDefaultOpacity () const
Returns the default opacity.
unsigned int getDefaultTransparency () const
Returns the default transparency.
SBDDocument * getDocument () const
Returns the document the node belongs to.
virtual unsigned int getFlags () const
Returns the flags.
virtual std::string getHierarchyString (const std::string & separator=" / ", bool includeNodeType=false) const
Returns a string with hierarchical information on the node and its parents names.
bool getHighlightingFlag () const
Returns the highlighting flag.
virtual unsigned int getInheritedFlags () const
Returns the inherited flags.
float getInheritedOpacity () const
Returns the cumulative opacity, when taking into account the ascendants.
float getInheritedTransparency () const
Returns the cumulative transparency, when taking into account the ascendants.
virtual bool getLockedFlag () const
Returns the locked flag.
SBDDataGraphNodeMaterial * getMaterial () const
Returns the material.
SBDDataGraphNode * getMaterialOwner () const
Returns the node whose material is inherited.
unsigned int getMaximumOpacity () const
Returns the maximum opacity.
unsigned int getMaximumTransparency () const
Returns the maximum transparency.
unsigned int getMinimumOpacity () const
Returns the minimum opacity.
unsigned int getMinimumTransparency () const
Returns the minimum transparency.
virtual SBQuantity::mass getMolecularWeight ()
Returns the molecular weight.
virtual std::string const & getName () const
Returns the name of the node.
SBDDataGraphNode * getNextNode () const
Returns the pointer to the next node in the children of the node's parent.
SBDDataGraphNode * getNextNode (SBDDataGraphNode::Type nodeType) const
Returns the pointer to the next node with type nodeType in the children of the node's parent.
unsigned int getNodeIndex () const
Returns the node index (unique in the whole data graph, but non-persistent)
SBUUID getNodeUUID () const
Returns the node UUID.
virtual void getNodes (SBNodeIndexer & nodeIndexer, SBDDataGraphNode::Type nodeType, bool selectedNodesOnly=false, const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) const
Collects nodes into nodeIndexer , based on anodeType , a selection status and avisitPredicate , with or without dependencies.
virtual void getNodes (SBNodeIndexer & nodeIndexer, const SBNodePredicate & selectionPredicate=SBDDataGraphNode::All(), const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) const
Collects nodes into nodeIndexer , based on aselectionPredicate and avisitPredicate , with or without dependencies.
virtual unsigned int getNumberOfAtoms ()
Returns the number of atoms.
virtual unsigned int getNumberOfCarbons ()
Returns the number of carbons.
virtual unsigned int getNumberOfChains ()
Returns the number of chains.
virtual unsigned int getNumberOfCoarseGrainedAtoms ()
Returns the number of coarse-grained atoms.
virtual unsigned int getNumberOfHydrogens ()
Returns the number of hydrogens.
virtual unsigned int getNumberOfMolecules ()
Returns the number of molecules.
virtual unsigned int getNumberOfNitrogens ()
Returns the number of nitrogens.
virtual unsigned int getNumberOfOtherAtoms ()
Returns the number of other atoms.
virtual unsigned int getNumberOfOxygens ()
Returns the number of oxygens.
virtual unsigned int getNumberOfResidues ()
Returns the number of residues.
virtual unsigned int getNumberOfSegments ()
Returns the number of segments.
virtual unsigned int getNumberOfStructuralGroups ()
Returns the number of structural groups.
virtual unsigned int getNumberOfStructuralModels ()
Returns the number of structural models.
virtual unsigned int getNumberOfSulfurs ()
Returns the number of sulfurs.
virtual unsigned int getOpacity () const
Returns the opacity.
unsigned int getOpacitySingleStep () const
Returns the opacity single step.
std::string getOpacitySuffix () const
Returns the opacity suffix.
SBDDataGraphNode * getParent () const
Returns the parent of the node.
SBDDataGraphNode * getPreviousNode () const
Returns the pointer to the previous node in the children of the node's parent.
SBDDataGraphNode * getPreviousNode (SBDDataGraphNode::Type nodeType) const
Returns the pointer to the previous node with type nodeType in the children of the node's parent.
SBDDataGraphNode * getRoot () const
Returns the root of the hierarchy the node belongs to.
bool getSelected () const
Returns whether the node is selected.
bool getSelectionFlag () const
Returns the selection flag.
virtual int getSumOfFormalCharges ()
Returns the sum of formal charges.
virtual float getSumOfPartialCharges ()
Returns the sum of partial charges.
SBDDataGraphNode * getThisNode () const
Returns the pointer to this node.
virtual unsigned int getTransparency () const
Returns the transparency.
unsigned int getTransparencySingleStep () const
Returns the transparency single step.
std::string getTransparencySuffix () const
Returns the transparency suffix.
virtual Type getType () const
Returns the type of the data graph node.
std::string getTypeString (bool humanReadable=false) const
Returns a string describing the type of the data graph node.
bool getVisibilityFlag () const
Returns the visibility flag.
bool getVisible () const
Returns whether the node is visible.
bool hasMaterial () const
Returns whether the node has a material (by itself, or inherited)
virtual bool hasNode (SBDDataGraphNode::Type nodeType, bool selectedNodesOnly=false, const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) const
Returns whether the node has nodes based on a nodeType , a selection status and avisitPredicate , with or without dependencies.
virtual bool hasNode (const SBNodePredicate & selectionPredicate=SBDDataGraphNode::All(), const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) const
Returns whether the node has nodes based on a selectionPredicate and avisitPredicate , with or without dependencies.
bool hasOneOf (const SBNodeIndexer & nodeIndexer) const
Returns true if and only if this node is one of the nodes of thenodeIndexer , or is the ancestor of one of them, or is a group that stores one of them.
bool hasOpacityRange () const
Returns whether the node has the opacity range.
bool hasTransparencyRange () const
Returns whether the node has the transparency range.
bool isAtom () const
Returns true when the node is an atom.
bool isBallAndStick () const
Returns true when the node is the default ball-and-stick visual model.
bool isBond () const
Returns true when the node is a bond.
bool isCartoon () const
Returns true when the node is the default cartoon visual model.
bool isCreated () const
Returns true if and only if the node is created.
bool isDynamicalModel () const
Returns true when the node is a dynamical model.
bool isErased () const
Returns true if and only if the node is erased.
bool isGaussianSurface () const
Returns true when the node is the default Gaussian surface visual model.
bool isHighlighted () const
Returns whether the node is highlighted.
bool isIn (const SBDDataGraphNode * node) const
Returns true if and only if this node isnode , or descends from it, or belongs to a group stored innode .
bool isIn (const SBNodeIndexer & nodeIndexer) const
Returns true if and only if this node is one of the nodes of thenodeIndexer , or descends from one of them, or belongs to a group stored in one of the nodes of thenodeIndexer .
bool isIn (SBPointerIndexer< SBDDataGraphNode > * nodePointerIndexer) const
Returns true if and only if this node is one of the nodes of thenodePointerIndexer , or descends from one of them, or belongs to a group stored in of the nodes of thenodePointerIndexer .
bool isInteractionModel () const
Returns true when the node is a interaction model.
bool isLicorice () const
Returns true when the node is the default licorice visual model.
bool isLight () const
Returns true when the node is a light.
virtual bool isLocked () const
Returns whether the node is locked.
bool isMesh () const
Returns true when the node is a mesh.
bool isModel () const
Returns true when the node is a model.
bool isOneOf (const SBNodeIndexer & nodeIndexer) const
Returns true if and only if this node is one of the nodes of thenodeIndexer .
bool isOneOf (SBPointerIndexer< SBDDataGraphNode > * nodePointerIndexer) const
Returns true if and only if this node is one of the nodes of thenodePointerIndexer .
bool isPropertyModel () const
Returns true when the node is a property model.
bool isRibbon () const
Returns true when the node is the default ribbon visual model.
bool isSelected () const
Returns whether the node is selected.
virtual bool isSerializable () const
Returns true when the class is serializable.
bool isSimulator () const
Returns true when the node is a simulator.
bool isSolventAccessibleSurface () const
Returns true when the node is the default solvent accessible surface visual model.
bool isSolventExcludedSurface () const
Returns true when the node is the default solvent excluded surface visual model.
bool isStructuralModel () const
Returns true when the node is a structural model.
bool isStructuralNode () const
Returns true when the node is a structural node.
bool isTube () const
Returns true when the node is the default tube visual model.
bool isType (Type type) const
Returns true when the type of the node corresponds totype .
bool isVanDerWaals () const
Returns true when the node is the default van der Waals visual model.
bool isVisible () const
Returns whether the node is visible.
bool isVisualModel () const
Returns true when the node is a visual model.
bool ownsMaterial () const
Returns whether the node owns a material.
virtual void print (unsigned int offset=0) const
Prints some debugging information.
virtual bool removeChild (SBDDataGraphNode * node)
Removes a child from the node.
bool removeMaterial ()
Removes the material.
void removeMaterialsFromDescendants ()
Removes materials from all nodes that descend from this node, but it does not remove the material from the node itself.
virtual void serialize (SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber(1, 0, 0)) const
Serializes the node.
void setHighlightingFlag (bool flag)
Sets the highlighting flag.
virtual void setLockedFlag (bool flag)
Sets the locked flag.
virtual void setName (const std::string & name)
Sets the name of the node.
virtual void setOpacity (unsigned int opacity)
Sets the opacity.
void setSelectionFlag (bool flag)
Sets the selection flag.
virtual void setTransparency (unsigned int transparency)
Sets the transparency.
void setVisibilityFlag (bool flag)
Sets the visibility flag.
virtual void unserialize (SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber(1, 0, 0))
Unserializes the node.

Public Functions inherited from SBCReferenceTarget#

See SBCReferenceTarget

Type Name
SBCReferenceTarget ()
Builds the reference target.
unsigned int getMemoryFootprint () const
Returns the memory footprint.
void printReferencesToOwners () const
Prints the references to the owners of this reference target.
virtual ~SBCReferenceTarget ()
Destructor.

Public Static Functions inherited from SBDDataGraphNode#

See SBDDataGraphNode

Type Name
bool canAddMaterial (SBDDataGraphNode::Type nodeType)
Returns whether can add a material to a node of type nodeType .
void clone (const SBNodeIndexer & sourceNodeIndexer, SBNodeIndexer & destinationNodeIndexer)
Clones the nodes in sourceNodeIndexer (treated as a whole) and places the clones indestinationNodeIndexer .
void forEachNodeInSelection (SBNodeIndexer & nodeIndexer, void(*)(SBDDataGraphNode *node) action)
Performs the action for each node innodeIndexer __
void forEachNodeInSelection (SBNodeIndexer & nodeIndexer, SBCClass * object, void(SBCClass::*)(SBDDataGraphNode *node) action)
Performs the objects 'saction for each node innodeIndexer __
SBDDataGraphNode * getNode (unsigned int nodeIndex)
Returns the unique node corresponding to the node index nodeIndex .
std::string getTypeString (Type type, bool humanReadable=false)
Returns a string describing the type of the data graph node.

Protected Attributes inherited from SBCReferenceTarget#

See SBCReferenceTarget

Type Name
SBCReferenceTargetData * dataPointer
A pointer to the private data.

Protected Functions inherited from SBDDataGraphNode#

See SBDDataGraphNode

Type Name
SBDDataGraphNode ()
Builds a data graph node.
SBDDataGraphNode (SBDDataGraphNodeData * dataPointer)
Builds a data graph node.
virtual ~SBDDataGraphNode ()
Destroys the node.

Protected Functions inherited from SBCReferenceTarget#

See SBCReferenceTarget

Type Name
SBCReferenceTarget (SBCReferenceTargetData * dataPointer)
Protected constructor.
void removeAllReferenceOwners ()
Stops all the reference owners from referencing this reference target.

Detailed Description#

The SBDDocumentCamera class implements all mechanisms related to cameras in SAMSON.

A camera provides a 3D view of visualizable objects in SAMSON's data graph, and can be easily controlled to point to a specific location, zoom in or out, translate, rotate, etc.

The currently active camera can be retrieved through SAMSON::getActiveCamera().

Short name: SBCamera

See also: SAMSON.

Public Functions Documentation#

function SBDDocumentCamera [1/2]#

Constructs a camera.

SBDDocumentCamera::SBDDocumentCamera () 

Constructs a camera with default parameters.

Creates a new camera instance with default settings.


function SBDDocumentCamera [2/2]#

Constructs a camera with name name .

SBDDocumentCamera::SBDDocumentCamera (
    const std::string & name
) 

Constructs a camera with the given name.

Initializes a new camera instance and sets its name to the provided value.

Parameters:

  • name The name to assign to the camera.

function alignWithAxis#

Aligns the indexed nodes with the camera axis.

void SBDDocumentCamera::alignWithAxis (
    const SBNodeIndexer & nodeIndexer,
    bool reversed=false
) 

Aligns the camera axis with the bounding box of the specified nodes.

The camera is positioned such that the view axis aligns with the longest dimension of the nodes' spatial domain. If reversed is true, the camera is placed on the opposite side of the domain.

Parameters:

  • nodeIndexer Indexer containing the nodes to be aligned.
  • reversed If true, the alignment direction is reversed.

function alignWithPlane#

Aligns the indexed nodes with the camera plane.

void SBDDocumentCamera::alignWithPlane (
    const SBNodeIndexer & nodeIndexer,
    bool reversed=false
) 

Aligns the camera plane with the bounding box of the specified nodes.

The camera is positioned such that its view plane aligns with the longest dimension of the nodes' spatial domain. If reversed is true, the camera is placed on the opposite side of the domain.

Parameters:

  • nodeIndexer Indexer containing the nodes to be aligned.
  • reversed If true, the alignment direction is reversed.

function backView#

Goes to the back view.

void SBDDocumentCamera::backView (
    bool immediate=false
) 

Moves the camera to a back view of the scene.

Parameters:

  • immediate If true, the view changes instantly; otherwise the camera animates to the new view.

function bottomView#

Goes to the bottom view.

void SBDDocumentCamera::bottomView (
    bool immediate=false
) 

Moves the camera to a bottom-up view of the scene.

Parameters:

  • immediate If true, the view changes instantly; otherwise the camera animates to the new view.

function center [1/3]#

Centers the camera on the currently selected nodes or on visible nodes if the selection is empty.

void SBDDocumentCamera::center (
    bool immediate=false
) 

Centers the camera on the current selection or on all visible nodes.

Parameters:

  • immediate If true, the centering is performed immediately; otherwise the camera moves smoothly.

function center [2/3]#

Centers the camera on the visible indexed nodes.

void SBDDocumentCamera::center (
    const SBNodeIndexer & nodeIndexer,
    bool immediate=false
) 

Centers the camera on the specified nodes.

Parameters:

  • nodeIndexer The indexer of nodes to center on.
  • immediate If true, the centering is performed immediately; otherwise the camera moves smoothly.

function center [3/3]#

Centers the camera on the indexed nodes based on the visitPredicate .

void SBDDocumentCamera::center (
    const SBNodeIndexer & nodeIndexer,
    const SBNodePredicate & visitPredicate,
    bool immediate=false
) 

Centers the camera on the indexed nodes that satisfy a predicate.

Parameters:

  • nodeIndexer The indexer of nodes to consider.
  • visitPredicate Predicate used to filter nodes.
  • immediate If true, the centering is performed immediately; otherwise the camera moves smoothly.

function clone#

Returns a copy of the node and its descendants.

virtual SBDDocumentCamera * SBDDocumentCamera::clone () override

Creates a copy of the camera and its descendants.

The copy is a deep clone of the camera node and all its child nodes.

Returns:

Pointer to the newly created camera copy.

Implements SBDDataGraphNode::clone


function connectDocumentSignalToSlot#

Connects the document signal to a slot.

void SBDDocumentCamera::connectDocumentSignalToSlot (
    SBCReferenceTarget * referenceTarget,
    void(SBCReferenceTarget::*)( SBDocumentEvent *) functionPointer,
    SBCReferenceTarget * nextReferenceTarget=0,
    void(SBCReferenceTarget::*)( SBDocumentEvent *) nextFunctionPointer=0
) 

Parameters:

  • referenceTarget The object that will receive the signal.
  • functionPointer The member function to be called on the reference target when the signal is emitted.
  • nextReferenceTarget Optional next target in the chain, or nullptr if none.
  • nextFunctionPointer Optional next function pointer in the chain, or nullptr if none.

function defaultView#

Sets the view to default parameters.

void SBDDocumentCamera::defaultView () 


function disconnectDocumentSignalFromSlot#

Disconnects the document signal from a slot.

void SBDDocumentCamera::disconnectDocumentSignalFromSlot (
    SBCReferenceTarget * referenceTarget,
    void(SBCReferenceTarget::*)( SBDocumentEvent *) functionPointer
) 

Parameters:

  • referenceTarget The object that receives the signal.
  • functionPointer The member function that was connected to the signal.

function documentSignalIsConnectedToSlot#

Returns true if and only if the document signal is connected to the slot.

bool SBDDocumentCamera::documentSignalIsConnectedToSlot (
    SBCReferenceTarget * referenceTarget,
    void(SBCReferenceTarget::*)( SBDocumentEvent *) functionPointer
) const

Returns true if the document signal is connected to the specified slot.

Parameters:

  • referenceTarget The object that would receive the signal.
  • functionPointer The member function that would be called on the reference target.

Returns:

true if the document signal is connected to the slot; otherwise false.


function frontView#

Goes to the front view.

void SBDDocumentCamera::frontView (
    bool immediate=false
) 

Moves the camera to a front view of the scene.

Parameters:

  • immediate If true, the view changes instantly; otherwise the camera animates to the new view.

function getAspectRatio#

Returns the aspect ratio.

float SBDDocumentCamera::getAspectRatio () const

Retrieves the aspect ratio (width divided by height).

Returns the current aspect ratio of the camera view.

Returns:

The aspect ratio.


function getAutofocusFlag#

Returns the autofocus flag.

bool SBDDocumentCamera::getAutofocusFlag () const

Returns whether autofocus is enabled for the camera.

Returns:

true if autofocus is enabled; otherwise false.


function getBasisX#

Returns the x vector of the camera basis.

SBVector3 SBDDocumentCamera::getBasisX () const

Returns the X basis vector of the camera coordinate system.

Returns:

X basis vector.


function getBasisY#

Returns the y vector of the camera basis.

SBVector3 SBDDocumentCamera::getBasisY () const

Returns the Y basis vector of the camera coordinate system.

Returns:

Y basis vector.


function getBasisZ#

Returns the z vector of the camera basis.

SBVector3 SBDDocumentCamera::getBasisZ () const

Returns the Z basis vector of the camera coordinate system.

Returns:

Z basis vector.


function getClippingRatio#

Returns the clipping ratio.

float SBDDocumentCamera::getClippingRatio () const

Retrieves the clipping ratio.

Returns the current clipping ratio.

Returns:

The clipping ratio value.


function getDepthOfFieldFlag#

Returns the depth of field flag.

bool SBDDocumentCamera::getDepthOfFieldFlag () const

Returns whether depth of field is enabled for the camera.

Returns:

true if depth of field is enabled; otherwise false.


function getEyeDestination#

Returns the destination of the eye.

SBPosition3 const & SBDDocumentCamera::getEyeDestination () const

Retrieves the destination position for the eye during movement.

Returns the target eye position that the camera is moving towards.

Returns:

Reference to the eye destination.


function getEyePosition#

Returns the position of the eye.

SBPosition3 const & SBDDocumentCamera::getEyePosition () const

Retrieves the eye (camera) position.

Returns the position of the camera's eye.

Returns:

Reference to the eye position.


function getEyeVelocity#

Returns the velocity of the eye.

SBPicometerPerSecond3 const & SBDDocumentCamera::getEyeVelocity () const

Retrieves the current velocity of the eye.

Returns the velocity vector of the eye.

Returns:

Reference to the eye velocity.


function getFNumber#

Returns the f-number.

float SBDDocumentCamera::getFNumber () const

Returns the camera's f-number.

Returns:

f-number value.


function getFarPlane#

Returns the far plane.

const SBQuantity::length & SBDDocumentCamera::getFarPlane () const

Retrieves the far clipping plane distance.

Returns the distance to the far clipping plane.

Returns:

Reference to the far plane distance.


function getFieldOfViewAngleY#

Returns the field of view angle, in degrees, in the Y direction.

float SBDDocumentCamera::getFieldOfViewAngleY () const

Retrieves the vertical field of view angle in degrees.

Returns the field of view angle measured in the Y direction.

Returns:

The field of view angle.


function getFieldOfViewAngleYSingleStep#

Returns the step of field of view.

float SBDDocumentCamera::getFieldOfViewAngleYSingleStep () const

Retrieves the step size for adjusting the field of view angle.

Returns the increment used when changing the field of view angle.

Returns:

The single step increment.


function getFieldOfViewAngleYSuffix#

Returns the suffix of field of view.

std::string SBDDocumentCamera::getFieldOfViewAngleYSuffix () const

Retrieves the suffix string used for the field of view angle display.

Returns the textual suffix appended to the field of view angle value.

Returns:

The suffix string.


function getFocalDistance#

Returns the focal distance.

const SBQuantity::length & SBDDocumentCamera::getFocalDistance () const

Returns the focal distance of the camera.

Returns:

Focal distance.


function getFogRatio#

Returns the fog ratio.

float SBDDocumentCamera::getFogRatio () const

Retrieves the fog ratio.

Returns the current fog ratio.

Returns:

The fog ratio value.


function getFrustumPositionFromWorldPosition#

Returns the projection in the frustum of a given world position.

SBPosition3 SBDDocumentCamera::getFrustumPositionFromWorldPosition (
    const SBPosition3 & worldPosition
) const

Converts a world position to frustum coordinates.

Transforms the given world position into normalized device coordinates using the view-projection matrix.

Parameters:

  • worldPosition The position in world space to convert.

Returns:

The corresponding position in frustum (normalized device) coordinates.


function getHeadForwardVector#

Returns the forward vector of the head.

SBVector3 const & SBDDocumentCamera::getHeadForwardVector () const

Retrieves the forward direction vector of the head.

Returns the vector pointing forward from the head.

Returns:

Reference to the forward vector.


function getHeadPosition#

Returns the position of the head.

SBPosition3 const & SBDDocumentCamera::getHeadPosition () const

Retrieves the current head position.

Returns the position of the head associated with the camera.

Returns:

Reference to the head position.


function getHeadUpVector#

Returns the up vector of the head.

SBVector3 const & SBDDocumentCamera::getHeadUpVector () const

Retrieves the up direction vector of the head.

Returns the vector pointing upward from the head.

Returns:

Reference to the up vector.


function getInertiaFlag#

Returns the inertia flag.

bool SBDDocumentCamera::getInertiaFlag () const

Returns whether inertia is enabled for camera motion.

Returns:

true if inertia is enabled; otherwise false.


function getMaximumFieldOfViewAngleY#

Returns the maximum field of view.

float SBDDocumentCamera::getMaximumFieldOfViewAngleY () const

Retrieves the maximum allowed field of view angle.

Returns the upper bound for the vertical field of view angle.

Returns:

The maximum field of view angle.


function getMinimumFieldOfViewAngleY#

Returns the minimum field of view.

float SBDDocumentCamera::getMinimumFieldOfViewAngleY () const

Retrieves the minimum allowed field of view angle.

Returns the lower bound for the vertical field of view angle.

Returns:

The minimum field of view angle.


function getNearPlane#

Returns the near plane.

const SBQuantity::length & SBDDocumentCamera::getNearPlane () const

Retrieves the near clipping plane distance.

Returns the distance to the near clipping plane.

Returns:

Reference to the near plane distance.


function getNextCamera#

Returns the next camera in the document.

SBDDocumentCamera * SBDDocumentCamera::getNextCamera () const

Retrieves the next camera in the document.

Searches forward from this camera to find the next camera node.

Returns:

Pointer to the next camera, or nullptr if there is no subsequent camera.


function getOrthographicProjectionFlag#

Returns the orthographic projection flag.

bool SBDDocumentCamera::getOrthographicProjectionFlag () const

Checks whether orthographic projection is enabled.

Returns true if the camera uses orthographic projection; otherwise false.

Returns:

true if orthographic projection is active; otherwise false.


function getPreviousCamera#

Returns the previous camera in the document.

SBDDocumentCamera * SBDDocumentCamera::getPreviousCamera () const

Retrieves the previous camera in the document.

Searches backward from this camera to find the previous camera node.

Returns:

Pointer to the previous camera, or nullptr if there is no preceding camera.


function getProjectionMatrix#

Returns the projection matrix.

double const * SBDDocumentCamera::getProjectionMatrix () const

Retrieves the projection matrix.

Returns a pointer to the 4x4 projection matrix.

Returns:

Pointer to an array of 16 double values representing the projection matrix.


function getProjectionMatrixTranspose#

Returns the transpose of the projection matrix.

float const * SBDDocumentCamera::getProjectionMatrixTranspose () const

Retrieves the transpose of the projection matrix.

Returns a pointer to the transposed 4x4 projection matrix.

Returns:

Pointer to an array of 16 float values representing the transposed projection matrix.


function getRotationVelocity#

Returns the rotation velocity.

SBRadianPerSecond3 const & SBDDocumentCamera::getRotationVelocity () const

Retrieves the current rotation velocity of the camera.

Returns the angular velocity vector of the camera.

Returns:

Reference to the rotation velocity.


function getTargetDestination#

Returns the destination of the target.

SBPosition3 const & SBDDocumentCamera::getTargetDestination () const

Retrieves the destination position for the target during movement.

Returns the target point that the camera is moving towards.

Returns:

Reference to the target destination.


function getTargetPosition#

Returns the position of the target.

SBPosition3 const & SBDDocumentCamera::getTargetPosition () const

Retrieves the target point that the camera looks at.

Returns the position of the target point.

Returns:

Reference to the target position.


function getTargetVelocity#

Returns the velocity of the target.

SBPicometerPerSecond3 const & SBDDocumentCamera::getTargetVelocity () const

Retrieves the current velocity of the target.

Returns the velocity vector of the target.

Returns:

Reference to the target velocity.


function getTransform#

Returns the spatial transform representing the camera's orientation and position.

SBSpatialTransform SBDDocumentCamera::getTransform () const

Returns:

Spatial transform of the camera.


function getType#

Returns the type of the data graph node.

virtual SBDDataGraphNode::Type SBDDocumentCamera::getType () override const

Returns the type identifier for a camera node.

Provides the enumeration value that identifies this node as a camera.

Returns:

The enum value representing a camera node type.

Implements SBDDataGraphNode::getType


function getUpVector#

Returns the up vector.

SBVector3 const & SBDDocumentCamera::getUpVector () const

Retrieves the up direction vector of the camera.

Returns the up vector defining the camera's orientation.

Returns:

Reference to the up vector.


function getUpVectorDestination#

Returns the destination of the up vector.

SBVector3 const & SBDDocumentCamera::getUpVectorDestination () const

Retrieves the destination up vector during movement.

Returns the up vector that the camera is moving towards.

Returns:

Reference to the up vector destination.


function getViewMatrix#

Returns the view matrix.

double const * SBDDocumentCamera::getViewMatrix () const

Retrieves the view matrix.

Returns a pointer to the 4x4 view matrix.

Returns:

Pointer to an array of 16 double values representing the view matrix.


function getViewMatrixTranspose#

Returns the transpose of the view matrix.

float const * SBDDocumentCamera::getViewMatrixTranspose () const

Retrieves the transpose of the view matrix.

Returns a pointer to the transposed 4x4 view matrix.

Returns:

Pointer to an array of 16 float values representing the transposed view matrix.


function getViewProjectionMatrix#

Returns the view projection matrix.

double const * SBDDocumentCamera::getViewProjectionMatrix () const

Retrieves the combined view-projection matrix.

Returns a pointer to the 4x4 view-projection matrix.

Returns:

Pointer to an array of 16 double values representing the view-projection matrix.


function getViewProjectionMatrixTranspose#

Returns the transpose of the view projection matrix.

float const * SBDDocumentCamera::getViewProjectionMatrixTranspose () const

Retrieves the transpose of the view-projection matrix.

Returns a pointer to the transposed 4x4 view-projection matrix.

Returns:

Pointer to an array of 16 float values representing the transposed view-projection matrix.


function getViewProjectionMatrixTransposeInverse#

Returns the inverse of the transpose of the view projection matrix.

float const * SBDDocumentCamera::getViewProjectionMatrixTransposeInverse () const

Retrieves the inverse of the transposed view-projection matrix.

Returns a pointer to the inverse of the transposed view-projection matrix.

Returns:

Pointer to an array of 16 float values representing the inverse of the transposed view-projection matrix.


function getWorldPositionFromFrustumPosition#

Returns the world position that corresponds to a frustum position.

SBPosition3 SBDDocumentCamera::getWorldPositionFromFrustumPosition (
    const SBPosition3 & frustumPosition
) const

Converts a frustum position to world coordinates.

Transforms the given frustum (normalized device) position back to world space using the inverse view-projection matrix.

Parameters:

  • frustumPosition The position in frustum (normalized device) coordinates to convert.

Returns:

The corresponding position in world space.


function isMoving#

Returns whether the camera is currently moving.

bool SBDDocumentCamera::isMoving () const

Returns true if the camera is currently moving.


function isSerializable#

Returns true __

virtual bool SBDDocumentCamera::isSerializable () override const

Checks if the camera can be serialized.

Returns true because camera objects support serialization.

Returns:

true indicating the camera is serializable.

Implements SBDDataGraphNode::isSerializable


function leftBackBottomView#

Goes to the left back bottom view.

void SBDDocumentCamera::leftBackBottomView (
    bool immediate=false
) 

Positions the camera at the left-back-bottom diagonal view.

Parameters:

  • immediate If true, the view changes instantly; otherwise the camera animates to the new view.

function leftBackTopView#

Goes to the left back top view.

void SBDDocumentCamera::leftBackTopView (
    bool immediate=false
) 

Positions the camera at the left-back-top diagonal view.

Parameters:

  • immediate If true, the view changes instantly; otherwise the camera animates to the new view.

function leftFrontBottomView#

Goes to the left front bottom view.

void SBDDocumentCamera::leftFrontBottomView (
    bool immediate=false
) 

Positions the camera at the left-front-bottom diagonal view.

Parameters:

  • immediate If true, the view changes instantly; otherwise the camera animates to the new view.

function leftFrontTopView#

Goes to the left front top view.

void SBDDocumentCamera::leftFrontTopView (
    bool immediate=false
) 

Positions the camera at the left-front-top diagonal view.

Parameters:

  • immediate If true, the view changes instantly; otherwise the camera animates to the new view.

function leftView#

Goes to the left view.

void SBDDocumentCamera::leftView (
    bool immediate=false
) 

Moves the camera to a left side view of the scene.

Parameters:

  • immediate If true, the view changes instantly; otherwise the camera animates to the new view.

function orientUpwards#

Turns the camera around its Z vector to the upwards direction.

void SBDDocumentCamera::orientUpwards (
    bool immediate=false
) 

Parameters:

  • immediate If true, the up vector is updated immediately; otherwise the update is deferred.

function print#

Prints the camera.

virtual void SBDDocumentCamera::print (
    unsigned int offset=0
) override const

Parameters:

  • offset Number of indentation tabs to prepend to each line.

Implements SBDDataGraphNode::print


function rightBackBottomView#

Goes to the right back bottom view.

void SBDDocumentCamera::rightBackBottomView (
    bool immediate=false
) 

Positions the camera at the right-back-bottom diagonal view.

Parameters:

  • immediate If true, the view changes instantly; otherwise the camera animates to the new view.

function rightBackTopView#

Goes to the right back top view.

void SBDDocumentCamera::rightBackTopView (
    bool immediate=false
) 

Positions the camera at the right-back-top diagonal view.

Parameters:

  • immediate If true, the view changes instantly; otherwise the camera animates to the new view.

function rightFrontBottomView#

Goes to the right front bottom view.

void SBDDocumentCamera::rightFrontBottomView (
    bool immediate=false
) 

Positions the camera at the right-front-bottom diagonal view.

Parameters:

  • immediate If true, the view changes instantly; otherwise the camera animates to the new view.

function rightFrontTopView#

Goes to the right front top view.

void SBDDocumentCamera::rightFrontTopView (
    bool immediate=false
) 

Positions the camera at the right-front-top diagonal view.

Parameters:

  • immediate If true, the view changes instantly; otherwise the camera animates to the new view.

function rightView#

Goes to the right view.

void SBDDocumentCamera::rightView (
    bool immediate=false
) 

Moves the camera to a right side view of the scene.

Parameters:

  • immediate If true, the view changes instantly; otherwise the camera animates to the new view.

function rotate [1/2]#

Rotates the camera.

void SBDDocumentCamera::rotate (
    const SBVector3 & axis,
    const SBQuantity::dimensionless & angle,
    bool immediate=false
) 

Rotates the camera around a specified axis by a given angle.

Parameters:

  • axis The axis of rotation.
  • angle The rotation angle.
  • immediate If true, the rotation is applied immediately; otherwise the camera rotates smoothly.

function rotate [2/2]#

Rotates the camera.

void SBDDocumentCamera::rotate (
    const SBRadianPerSecond3 & velocity,
    const SBPosition3 & center
) 

Rotates the camera around a given center point with a specified angular velocity.

Parameters:

  • velocity The angular velocity of the rotation.
  • center The point around which the camera rotates.

function rotateClockwise#

Rotates the camera 45 degrees clockwise around its axis.

void SBDDocumentCamera::rotateClockwise (
    bool immediate=false
) 

Parameters:

  • immediate If true, the rotation is applied immediately; otherwise the camera rotates smoothly.

function rotateCounterClockwise#

Rotates the camera 45 degrees counterclockwise around its axis.

void SBDDocumentCamera::rotateCounterClockwise (
    bool immediate=false
) 

Rotates the camera 45 degrees counter‑clockwise around its axis.

Parameters:

  • immediate If true, the rotation is applied immediately; otherwise the camera rotates smoothly.

function rotateDown#

Rotates the camera 45 degrees down around its target.

void SBDDocumentCamera::rotateDown (
    bool immediate=false
) 

Parameters:

  • immediate If true, the rotation is applied immediately; otherwise the camera rotates smoothly.

function rotateLeft#

Rotates the camera 45 degrees left around its target.

void SBDDocumentCamera::rotateLeft (
    bool immediate=false
) 

Parameters:

  • immediate If true, the rotation is applied immediately; otherwise the camera rotates smoothly.

function rotateRight#

Rotates the camera 45 degrees right around its target.

void SBDDocumentCamera::rotateRight (
    bool immediate=false
) 

Parameters:

  • immediate If true, the rotation is applied immediately; otherwise the camera rotates smoothly.

function rotateUp#

Rotates the camera 45 degrees up around its target.

void SBDDocumentCamera::rotateUp (
    bool immediate=false
) 

Parameters:

  • immediate If true, the rotation is applied immediately; otherwise the camera rotates smoothly.

function serialize#

Serializes the camera.

virtual void SBDDocumentCamera::serialize (
    SBCSerializer * serializer,
    const SBNodeIndexer & nodeIndexer,
    const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER,
    const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0)
) override const

Serializes the camera to a serializer.

Writes the camera's state to the provided serializer.

Parameters:

  • serializer Pointer to the serializer used to write the data.
  • nodeIndexer Indexer used for node references during serialization.
  • sdkVersionNumber SDK version number for compatibility checks.
  • classVersionNumber Class version number for compatibility checks.

Implements SBDDataGraphNode::serialize


function setAspectRatio#

Sets the aspect ratio.

void SBDDocumentCamera::setAspectRatio (
    float aspectRatio
) 

Sets the aspect ratio (width divided by height).

Updates the camera's aspect ratio to the specified value.

Parameters:

  • n The new aspect ratio.

function setAutofocusFlag#

Sets the autofocus flag.

void SBDDocumentCamera::setAutofocusFlag (
    bool flag
) 

Enables or disables autofocus for the camera.

Parameters:

  • flag true to enable autofocus, false to disable.

function setClippingRatio#

Sets the clipping ratio.

void SBDDocumentCamera::setClippingRatio (
    float clippingRatio
) 

Sets the clipping ratio (clamped between 0.0 and 0.99).

Updates the clipping ratio, ensuring it stays within the valid range.

Parameters:

  • f The new clipping ratio.

function setDepthOfFieldFlag#

Sets the depth of field flag.

void SBDDocumentCamera::setDepthOfFieldFlag (
    bool flag
) 

Enables or disables depth of field for the camera.

Parameters:

  • flag true to enable depth of field, false to disable.

function setEyeDestination#

Sets the destination of the eye.

void SBDDocumentCamera::setEyeDestination (
    const SBPosition3 & eyeDestination
) 

Sets the destination position for the eye and marks the camera as moving.

Updates the eye destination and flags the camera as moving.

Parameters:

  • v The new eye destination.

function setEyePosition#

Sets the position of the eye.

void SBDDocumentCamera::setEyePosition (
    const SBPosition3 & eyePosition
) 

Sets the eye (camera) position.

Updates the eye position to the specified value.

Parameters:

  • v The new eye position.

function setEyeVelocity#

Sets the velocity of the eye.

void SBDDocumentCamera::setEyeVelocity (
    const SBPicometerPerSecond3 & eyeVelocity
) 

Updates the eye's velocity to the specified value.

Parameters:

  • v The new eye velocity.

function setFNumber#

Sets the f-number.

void SBDDocumentCamera::setFNumber (
    float fNumber
) 

Sets the camera's f-number.

Parameters:

  • n The new f-number value.

function setFarPlane#

Sets the far plane.

void SBDDocumentCamera::setFarPlane (
    const SBQuantity::length & farPlane
) 

Sets the far clipping plane distance.

Updates the far clipping plane to the specified distance.

Parameters:

  • f The new far plane distance.

function setFieldOfViewAngleY#

Sets the field of view angle, in degrees, in the Y direction.

void SBDDocumentCamera::setFieldOfViewAngleY (
    float fieldOfViewAngleY
) 

Sets the vertical field of view angle in degrees.

Updates the field of view angle measured in the Y direction.

Parameters:

  • n The new field of view angle.

function setFocalDistance#

Sets the focal distance.

void SBDDocumentCamera::setFocalDistance (
    const SBQuantity::length & focalDistance
) 

Sets the focal distance of the camera.

Parameters:

  • focalDistance The new focal distance.

function setFogRatio#

Sets the fog ratio.

void SBDDocumentCamera::setFogRatio (
    float clippingRatio
) 

Sets the fog ratio (clamped between 0.0 and 0.99).

Updates the fog ratio, ensuring it stays within the valid range.

Parameters:

  • f The new fog ratio.

function setHeadForwardVector#

Sets the forward vector of the head.

void SBDDocumentCamera::setHeadForwardVector (
    const SBVector3 & headForwardVector
) 

Sets the forward direction vector of the head.

Updates the forward vector to the specified value.

Parameters:

  • v The new forward vector.

function setHeadPosition#

Sets the position of the head.

void SBDDocumentCamera::setHeadPosition (
    const SBPosition3 & headPosition
) 

Sets the head position.

Updates the head position to the specified value.

Parameters:

  • v The new head position.

function setHeadUpVector#

Sets the up vector of the head.

void SBDDocumentCamera::setHeadUpVector (
    const SBVector3 & headUpVector
) 

Sets the up direction vector of the head.

Updates the up vector to the specified value.

Parameters:

  • v The new up vector.

function setInertiaFlag#

Sets the inertia flag.

void SBDDocumentCamera::setInertiaFlag (
    bool flag
) 

Enables or disables inertia for camera motion.

Parameters:

  • flag true to enable inertia, false to disable.

function setMatrices#

Sets the camera matrices.

void SBDDocumentCamera::setMatrices (
    float * projectionMatrix,
    float * viewMatrix,
    const SBQuantity::length & lengthPerUnit,
    const SBSpatialTransform & origin
) 

Sets the camera's projection and view matrices and updates internal state.

Assigns new projection and view matrices and updates the camera's internal transforms.

Parameters:

  • projectionMatrix Pointer to an array of 16 float values for the projection matrix.
  • viewMatrix Pointer to an array of 16 float values for the view matrix.
  • lengthPerUnit Length per unit conversion factor.
  • origin Spatial transform defining the camera's origin.

function setNearPlane#

Sets the near plane.

void SBDDocumentCamera::setNearPlane (
    const SBQuantity::length & nearPlane
) 

Sets the near clipping plane distance.

Updates the near clipping plane to the specified distance.

Parameters:

  • n The new near plane distance.

function setOrthographicProjectionFlag#

Sets the orthographic projection flag.

void SBDDocumentCamera::setOrthographicProjectionFlag (
    bool orthographicProjectionFlag
) 

Enables or disables orthographic projection.

Sets the camera to use orthographic or perspective projection based on the flag.

Parameters:

  • orthographicProjectionFlag true to enable orthographic projection, false for perspective.

function setRotationVelocity#

Sets the rotation velocity.

void SBDDocumentCamera::setRotationVelocity (
    const SBRadianPerSecond3 & rotationVelocity
) 

Sets the rotation velocity of the camera.

Updates the angular velocity to the specified value.

Parameters:

  • v The new rotation velocity.

function setTargetDestination#

Sets the destination of the target.

void SBDDocumentCamera::setTargetDestination (
    const SBPosition3 & targetDestination
) 

Sets the destination position for the target and marks the camera as moving.

Updates the target destination and flags the camera as moving.

Parameters:

  • v The new target destination.

function setTargetPosition#

Sets the position of the target.

void SBDDocumentCamera::setTargetPosition (
    const SBPosition3 & targetPosition
) 

Sets the target point for the camera.

Updates the target position to the specified value.

Parameters:

  • v The new target position.

function setTargetVelocity#

Sets the velocity of the target.

void SBDDocumentCamera::setTargetVelocity (
    const SBPicometerPerSecond3 & targetVelocity
) 

Updates the target's velocity to the specified value.

Parameters:

  • v The new target velocity.

function setUpVector#

Sets the up vector.

void SBDDocumentCamera::setUpVector (
    const SBVector3 & upVector
) 

Sets the up direction vector of the camera.

Updates the up vector to the specified value.

Parameters:

  • v The new up vector.

function setUpVectorDestination#

Sets the destination of the up vector.

void SBDDocumentCamera::setUpVectorDestination (
    const SBVector3 & upVectorDestination
) 

Sets the destination up vector and marks the camera as moving.

Updates the up vector destination and flags the camera as moving.

Parameters:

  • v The new up vector destination.

function stop#

Stops the camera.

void SBDDocumentCamera::stop () 

Stops the camera motion and resets destinations to the current positions.


function topView#

Goes to the top view.

void SBDDocumentCamera::topView (
    bool immediate=false
) 

Moves the camera to a top-down view of the scene.

Parameters:

  • immediate If true, the view changes instantly; otherwise the camera animates to the new view.

function transform#

Applies a spatial transform to the camera.

void SBDDocumentCamera::transform (
    const SBSpatialTransform & transform,
    bool immediate=false
) 

Applies a spatial transformation to the camera.

Parameters:

  • transform The spatial transform to apply.
  • immediate If true, the transformation is applied immediately; otherwise the camera moves smoothly to the new position.

function translate [1/2]#

Translates the camera.

void SBDDocumentCamera::translate (
    const SBLength3 & translation,
    bool immediate=false
) 

Translates the camera by a given displacement.

Parameters:

  • translation The translation vector.
  • immediate If true, the translation is applied immediately; otherwise the camera moves smoothly.

function translate [2/2]#

Translates the camera.

void SBDDocumentCamera::translate (
    const SBPicometerPerSecond3 & velocity
) 

Translates the camera with a given velocity.

Parameters:

  • velocity The translation velocity.

function unserialize#

Unserializes the camera.

virtual void SBDDocumentCamera::unserialize (
    SBCSerializer * serializer,
    const SBNodeIndexer & nodeIndexer,
    const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER,
    const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0)
) override

Deserializes the camera from a serializer.

Reads the camera's state from the provided serializer.

Parameters:

  • serializer Pointer to the serializer used to read the data.
  • nodeIndexer Indexer used for node references during deserialization.
  • sdkVersionNumber SDK version number for compatibility checks.
  • classVersionNumber Class version number for compatibility checks.

Implements SBDDataGraphNode::unserialize


function updateState#

Updates the state of the camera and returns true if the camera moved.

bool SBDDocumentCamera::updateState () 

Updates the camera state based on velocities and returns whether the camera moved.

Computes new positions and orientations using current velocities and updates internal state.

Returns:

true if the camera's position or orientation changed; otherwise false.


function zoomIn#

Zooms in.

void SBDDocumentCamera::zoomIn (
    const SBQuantity::picometerPerSecond & velocity,
    const SBPosition3 & center
) 

Zooms the camera towards a specified point while preserving its frustum coordinates.

Parameters:

  • velocity Zoom speed expressed as a velocity.
  • center The world position that should remain at the same frustum coordinates during the zoom.

function zoomOut#

Zooms out.

void SBDDocumentCamera::zoomOut (
    const SBQuantity::picometerPerSecond & velocity,
    const SBPosition3 & center
) 

Zooms the camera away from a specified point.

Parameters:

  • velocity Zoom speed expressed as a velocity.
  • target The world position that should remain at the same frustum coordinates during the zoom.

function zoomTo#

Zooms to a specific destination.

void SBDDocumentCamera::zoomTo (
    const SBPosition3 & cameraTargetDestination
) 

Moves the camera to focus on a specific target position.

Parameters:

  • v The target world position to zoom to.

function ~SBDDocumentCamera#

Destructs the camera.

virtual SBDDocumentCamera::~SBDDocumentCamera () 

Destroys the camera.

Releases resources associated with the camera.