Class 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#
| 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#
| 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#
| 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.
Constructs a camera with default parameters.
Creates a new camera instance with default settings.
function SBDDocumentCamera [2/2]#
Constructs a camera with name name .
Constructs a camera with the given name.
Initializes a new camera instance and sets its name to the provided value.
Parameters:
nameThe name to assign to the camera.
function alignWithAxis#
Aligns the indexed nodes with the camera axis.
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:
nodeIndexerIndexer containing the nodes to be aligned.reversedIf true, the alignment direction is reversed.
function alignWithPlane#
Aligns the indexed nodes with the camera plane.
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:
nodeIndexerIndexer containing the nodes to be aligned.reversedIf true, the alignment direction is reversed.
function backView#
Goes to the back view.
Moves the camera to a back view of the scene.
Parameters:
immediateIf true, the view changes instantly; otherwise the camera animates to the new view.
function bottomView#
Goes to the bottom view.
Moves the camera to a bottom-up view of the scene.
Parameters:
immediateIf 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.
Centers the camera on the current selection or on all visible nodes.
Parameters:
immediateIf true, the centering is performed immediately; otherwise the camera moves smoothly.
function center [2/3]#
Centers the camera on the visible indexed nodes.
Centers the camera on the specified nodes.
Parameters:
nodeIndexerThe indexer of nodes to center on.immediateIf 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:
nodeIndexerThe indexer of nodes to consider.visitPredicatePredicate used to filter nodes.immediateIf true, the centering is performed immediately; otherwise the camera moves smoothly.
function clone#
Returns a copy of the node and its descendants.
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:
referenceTargetThe object that will receive the signal.functionPointerThe member function to be called on the reference target when the signal is emitted.nextReferenceTargetOptional next target in the chain, or nullptr if none.nextFunctionPointerOptional next function pointer in the chain, or nullptr if none.
function defaultView#
Sets the view to default parameters.
function disconnectDocumentSignalFromSlot#
Disconnects the document signal from a slot.
void SBDDocumentCamera::disconnectDocumentSignalFromSlot (
SBCReferenceTarget * referenceTarget,
void(SBCReferenceTarget::*)( SBDocumentEvent *) functionPointer
)
Parameters:
referenceTargetThe object that receives the signal.functionPointerThe 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:
referenceTargetThe object that would receive the signal.functionPointerThe 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.
Moves the camera to a front view of the scene.
Parameters:
immediateIf true, the view changes instantly; otherwise the camera animates to the new view.
function getAspectRatio#
Returns the aspect ratio.
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.
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.
Returns the X basis vector of the camera coordinate system.
Returns:
X basis vector.
function getBasisY#
Returns the y vector of the camera basis.
Returns the Y basis vector of the camera coordinate system.
Returns:
Y basis vector.
function getBasisZ#
Returns the z vector of the camera basis.
Returns the Z basis vector of the camera coordinate system.
Returns:
Z basis vector.
function getClippingRatio#
Returns the clipping ratio.
Retrieves the clipping ratio.
Returns the current clipping ratio.
Returns:
The clipping ratio value.
function getDepthOfFieldFlag#
Returns the depth of field flag.
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.
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.
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.
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.
Returns the camera's f-number.
Returns:
f-number value.
function getFarPlane#
Returns the far plane.
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.
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.
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.
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.
Returns the focal distance of the camera.
Returns:
Focal distance.
function getFogRatio#
Returns the fog ratio.
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:
worldPositionThe position in world space to convert.
Returns:
The corresponding position in frustum (normalized device) coordinates.
function getHeadForwardVector#
Returns the forward vector of the head.
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.
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.
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.
Returns whether inertia is enabled for camera motion.
Returns:
true if inertia is enabled; otherwise false.
function getMaximumFieldOfViewAngleY#
Returns the maximum field of view.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Returns:
Spatial transform of the camera.
function getType#
Returns the type of the data graph node.
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.
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.
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.
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.
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.
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.
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.
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:
frustumPositionThe position in frustum (normalized device) coordinates to convert.
Returns:
The corresponding position in world space.
function isMoving#
Returns whether the camera is currently moving.
Returns true if the camera is currently moving.
function isSerializable#
Returns true __
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.
Positions the camera at the left-back-bottom diagonal view.
Parameters:
immediateIf true, the view changes instantly; otherwise the camera animates to the new view.
function leftBackTopView#
Goes to the left back top view.
Positions the camera at the left-back-top diagonal view.
Parameters:
immediateIf true, the view changes instantly; otherwise the camera animates to the new view.
function leftFrontBottomView#
Goes to the left front bottom view.
Positions the camera at the left-front-bottom diagonal view.
Parameters:
immediateIf true, the view changes instantly; otherwise the camera animates to the new view.
function leftFrontTopView#
Goes to the left front top view.
Positions the camera at the left-front-top diagonal view.
Parameters:
immediateIf true, the view changes instantly; otherwise the camera animates to the new view.
function leftView#
Goes to the left view.
Moves the camera to a left side view of the scene.
Parameters:
immediateIf 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.
Parameters:
immediateIf true, the up vector is updated immediately; otherwise the update is deferred.
function print#
Prints the camera.
Parameters:
offsetNumber of indentation tabs to prepend to each line.
Implements SBDDataGraphNode::print
function rightBackBottomView#
Goes to the right back bottom view.
Positions the camera at the right-back-bottom diagonal view.
Parameters:
immediateIf true, the view changes instantly; otherwise the camera animates to the new view.
function rightBackTopView#
Goes to the right back top view.
Positions the camera at the right-back-top diagonal view.
Parameters:
immediateIf true, the view changes instantly; otherwise the camera animates to the new view.
function rightFrontBottomView#
Goes to the right front bottom view.
Positions the camera at the right-front-bottom diagonal view.
Parameters:
immediateIf true, the view changes instantly; otherwise the camera animates to the new view.
function rightFrontTopView#
Goes to the right front top view.
Positions the camera at the right-front-top diagonal view.
Parameters:
immediateIf true, the view changes instantly; otherwise the camera animates to the new view.
function rightView#
Goes to the right view.
Moves the camera to a right side view of the scene.
Parameters:
immediateIf 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:
axisThe axis of rotation.angleThe rotation angle.immediateIf true, the rotation is applied immediately; otherwise the camera rotates smoothly.
function rotate [2/2]#
Rotates the camera.
Rotates the camera around a given center point with a specified angular velocity.
Parameters:
velocityThe angular velocity of the rotation.centerThe point around which the camera rotates.
function rotateClockwise#
Rotates the camera 45 degrees clockwise around its axis.
Parameters:
immediateIf true, the rotation is applied immediately; otherwise the camera rotates smoothly.
function rotateCounterClockwise#
Rotates the camera 45 degrees counterclockwise around its axis.
Rotates the camera 45 degrees counter‑clockwise around its axis.
Parameters:
immediateIf true, the rotation is applied immediately; otherwise the camera rotates smoothly.
function rotateDown#
Rotates the camera 45 degrees down around its target.
Parameters:
immediateIf true, the rotation is applied immediately; otherwise the camera rotates smoothly.
function rotateLeft#
Rotates the camera 45 degrees left around its target.
Parameters:
immediateIf true, the rotation is applied immediately; otherwise the camera rotates smoothly.
function rotateRight#
Rotates the camera 45 degrees right around its target.
Parameters:
immediateIf true, the rotation is applied immediately; otherwise the camera rotates smoothly.
function rotateUp#
Rotates the camera 45 degrees up around its target.
Parameters:
immediateIf 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:
serializerPointer to the serializer used to write the data.nodeIndexerIndexer used for node references during serialization.sdkVersionNumberSDK version number for compatibility checks.classVersionNumberClass version number for compatibility checks.
Implements SBDDataGraphNode::serialize
function setAspectRatio#
Sets the aspect ratio.
Sets the aspect ratio (width divided by height).
Updates the camera's aspect ratio to the specified value.
Parameters:
nThe new aspect ratio.
function setAutofocusFlag#
Sets the autofocus flag.
Enables or disables autofocus for the camera.
Parameters:
flagtrueto enable autofocus,falseto disable.
function setClippingRatio#
Sets the clipping ratio.
Sets the clipping ratio (clamped between 0.0 and 0.99).
Updates the clipping ratio, ensuring it stays within the valid range.
Parameters:
fThe new clipping ratio.
function setDepthOfFieldFlag#
Sets the depth of field flag.
Enables or disables depth of field for the camera.
Parameters:
flagtrueto enable depth of field,falseto disable.
function setEyeDestination#
Sets the destination of the eye.
Sets the destination position for the eye and marks the camera as moving.
Updates the eye destination and flags the camera as moving.
Parameters:
vThe new eye destination.
function setEyePosition#
Sets the position of the eye.
Sets the eye (camera) position.
Updates the eye position to the specified value.
Parameters:
vThe new eye position.
function setEyeVelocity#
Sets the velocity of the eye.
Updates the eye's velocity to the specified value.
Parameters:
vThe new eye velocity.
function setFNumber#
Sets the f-number.
Sets the camera's f-number.
Parameters:
nThe new f-number value.
function setFarPlane#
Sets the far plane.
Sets the far clipping plane distance.
Updates the far clipping plane to the specified distance.
Parameters:
fThe new far plane distance.
function setFieldOfViewAngleY#
Sets the field of view angle, in degrees, in the Y direction.
Sets the vertical field of view angle in degrees.
Updates the field of view angle measured in the Y direction.
Parameters:
nThe new field of view angle.
function setFocalDistance#
Sets the focal distance.
Sets the focal distance of the camera.
Parameters:
focalDistanceThe new focal distance.
function setFogRatio#
Sets the fog ratio.
Sets the fog ratio (clamped between 0.0 and 0.99).
Updates the fog ratio, ensuring it stays within the valid range.
Parameters:
fThe new fog ratio.
function setHeadForwardVector#
Sets the forward vector of the head.
Sets the forward direction vector of the head.
Updates the forward vector to the specified value.
Parameters:
vThe new forward vector.
function setHeadPosition#
Sets the position of the head.
Sets the head position.
Updates the head position to the specified value.
Parameters:
vThe new head position.
function setHeadUpVector#
Sets the up vector of the head.
Sets the up direction vector of the head.
Updates the up vector to the specified value.
Parameters:
vThe new up vector.
function setInertiaFlag#
Sets the inertia flag.
Enables or disables inertia for camera motion.
Parameters:
flagtrueto enable inertia,falseto 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:
projectionMatrixPointer to an array of 16 float values for the projection matrix.viewMatrixPointer to an array of 16 float values for the view matrix.lengthPerUnitLength per unit conversion factor.originSpatial transform defining the camera's origin.
function setNearPlane#
Sets the near plane.
Sets the near clipping plane distance.
Updates the near clipping plane to the specified distance.
Parameters:
nThe new near plane distance.
function setOrthographicProjectionFlag#
Sets the orthographic projection flag.
Enables or disables orthographic projection.
Sets the camera to use orthographic or perspective projection based on the flag.
Parameters:
orthographicProjectionFlagtrueto enable orthographic projection,falsefor perspective.
function setRotationVelocity#
Sets the rotation velocity.
Sets the rotation velocity of the camera.
Updates the angular velocity to the specified value.
Parameters:
vThe new rotation velocity.
function setTargetDestination#
Sets the destination of the target.
Sets the destination position for the target and marks the camera as moving.
Updates the target destination and flags the camera as moving.
Parameters:
vThe new target destination.
function setTargetPosition#
Sets the position of the target.
Sets the target point for the camera.
Updates the target position to the specified value.
Parameters:
vThe new target position.
function setTargetVelocity#
Sets the velocity of the target.
Updates the target's velocity to the specified value.
Parameters:
vThe new target velocity.
function setUpVector#
Sets the up vector.
Sets the up direction vector of the camera.
Updates the up vector to the specified value.
Parameters:
vThe new up vector.
function setUpVectorDestination#
Sets the destination of the up vector.
Sets the destination up vector and marks the camera as moving.
Updates the up vector destination and flags the camera as moving.
Parameters:
vThe new up vector destination.
function stop#
Stops the camera.
Stops the camera motion and resets destinations to the current positions.
function topView#
Goes to the top view.
Moves the camera to a top-down view of the scene.
Parameters:
immediateIf true, the view changes instantly; otherwise the camera animates to the new view.
function transform#
Applies a spatial transform to the camera.
Applies a spatial transformation to the camera.
Parameters:
transformThe spatial transform to apply.immediateIf true, the transformation is applied immediately; otherwise the camera moves smoothly to the new position.
function translate [1/2]#
Translates the camera.
Translates the camera by a given displacement.
Parameters:
translationThe translation vector.immediateIf true, the translation is applied immediately; otherwise the camera moves smoothly.
function translate [2/2]#
Translates the camera.
Translates the camera with a given velocity.
Parameters:
velocityThe 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:
serializerPointer to the serializer used to read the data.nodeIndexerIndexer used for node references during deserialization.sdkVersionNumberSDK version number for compatibility checks.classVersionNumberClass version number for compatibility checks.
Implements SBDDataGraphNode::unserialize
function updateState#
Updates the state of the camera and returns true if the camera moved.
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:
velocityZoom speed expressed as a velocity.centerThe 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:
velocityZoom speed expressed as a velocity.targetThe world position that should remain at the same frustum coordinates during the zoom.
function zoomTo#
Zooms to a specific destination.
Moves the camera to focus on a specific target position.
Parameters:
vThe target world position to zoom to.
function ~SBDDocumentCamera#
Destructs the camera.
Destroys the camera.
Releases resources associated with the camera.