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 . |
|
SB_DECLARE_DATA (SBDDocumentCamera) |
|
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. |
const SBQuantity::length & | getClippingPlane () const Returns the clipping plane. |
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. |
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 |
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 | setClippingPlane (const SBQuantity::length & clippingPlane) Sets the clipping plane. |
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 | 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_DECLARE_DATA (SBDDataGraphNode) |
|
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 is node , or descends from it. |
bool | descendsFrom (const SBNodeIndexer & nodeIndexer) const Returns true if and only if this node is one of the nodes of the nodeIndexer , 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 the nodePointerIndexer , 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 an action on each node. |
virtual void | forEachNodeDepthFirst (SBCClass * object, void(SBCClass::*)(SBDDataGraphNode *node) action) Performs an action on each node. |
virtual unsigned int | getDefaultOpacity () const Returns the default opacity. |
virtual 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. |
virtual unsigned int | getMaximumOpacity () const Returns the maximum opacity. |
virtual unsigned int | getMaximumTransparency () const Returns the maximum transparency. |
virtual unsigned int | getMinimumOpacity () const Returns the minimum opacity. |
virtual 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. |
virtual unsigned int | getOpacitySingleStep () const Returns the opacity single step. |
virtual 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. |
virtual unsigned int | getTransparencySingleStep () const Returns the transparency single step. |
virtual 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 the nodeIndexer , or is the ancestor of one of them, or is a group that stores one of them. |
virtual bool | hasOpacityRange () const Returns whether the node has the opacity range. |
virtual 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 is node , 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 the nodeIndexer , 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 the nodePointerIndexer , 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 the nodeIndexer . |
bool | isOneOf (SBPointerIndexer< SBDDataGraphNode > * nodePointerIndexer) const Returns true if and only if this node is one of the nodes of the nodePointerIndexer . |
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 to type . |
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 () |
|
unsigned int | getMemoryFootprint () const |
void | printReferencesToOwners () const |
virtual | ~SBCReferenceTarget () |
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 an action for each node in a selection. |
void | forEachNodeInSelection (SBNodeIndexer & nodeIndexer, SBCClass * object, void(SBCClass::*)(SBDDataGraphNode *node) action) Performs an action for each node in a selection. |
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 |
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) |
|
void | removeAllReferenceOwners () |
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.
function SBDDocumentCamera [2/2]#
Constructs a camera with name name
.
function SB_DECLARE_DATA#
function alignWithAxis#
Aligns the indexed nodes with the camera axis.
function alignWithPlane#
Aligns the indexed nodes with the camera plane.
function backView#
Goes to the back view.
function bottomView#
Goes to the bottom view.
function center [1/3]#
Centers the camera on the currently selected nodes or on visible nodes if the selection is empty.
function center [2/3]#
Centers the camera on the visible indexed nodes.
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 based on the visitPredicate
Tip: set the visit predicate to SBDDataGraphNode::All() to center on all nodes indexed in nodeIndexer
.
function clone#
Returns a copy of the node and its descendants.
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
)
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
)
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
function frontView#
Goes to the front view.
function getAspectRatio#
Returns the aspect ratio.
function getAutofocusFlag#
Returns the autofocus flag.
function getBasisX#
Returns the x vector of the camera basis.
function getBasisY#
Returns the y vector of the camera basis.
function getBasisZ#
Returns the z vector of the camera basis.
function getClippingPlane#
Returns the clipping plane.
function getDepthOfFieldFlag#
Returns the depth of field flag.
function getEyeDestination#
Returns the destination of the eye.
function getEyePosition#
Returns the position of the eye.
function getEyeVelocity#
Returns the velocity of the eye.
function getFNumber#
Returns the f-number.
function getFarPlane#
Returns the far plane.
function getFieldOfViewAngleY#
Returns the field of view angle, in degrees, in the Y direction.
function getFieldOfViewAngleYSingleStep#
Returns the step of field of view.
function getFieldOfViewAngleYSuffix#
Returns the suffix of field of view.
function getFocalDistance#
Returns the focal distance.
function getFrustumPositionFromWorldPosition#
Returns the projection in the frustum of a given world position.
SBPosition3 SBDDocumentCamera::getFrustumPositionFromWorldPosition (
const SBPosition3 & worldPosition
) const
function getHeadForwardVector#
Returns the forward vector of the head.
function getHeadPosition#
Returns the position of the head.
function getHeadUpVector#
Returns the up vector of the head.
function getInertiaFlag#
Returns the inertia flag.
function getMaximumFieldOfViewAngleY#
Returns the maximum field of view.
function getMinimumFieldOfViewAngleY#
Returns the minimum field of view.
function getNearPlane#
Returns the near plane.
function getNextCamera#
Returns the next camera in the document.
function getOrthographicProjectionFlag#
Returns the orthographic projection flag.
function getPreviousCamera#
Returns the previous camera in the document.
function getProjectionMatrix#
Returns the projection matrix.
function getProjectionMatrixTranspose#
Returns the transpose of the projection matrix.
function getRotationVelocity#
Returns the rotation velocity.
function getTargetDestination#
Returns the destination of the target.
function getTargetPosition#
Returns the position of the target.
function getTargetVelocity#
Returns the velocity of the target.
function getTransform#
function getType#
Returns the type of the data graph node.
Implements SBDDataGraphNode::getType
function getUpVector#
Returns the up vector.
function getUpVectorDestination#
Returns the destination of the up vector.
function getViewMatrix#
Returns the view matrix.
function getViewMatrixTranspose#
Returns the transpose of the view matrix.
function getViewProjectionMatrix#
Returns the view projection matrix.
function getViewProjectionMatrixTranspose#
Returns the transpose of the view projection matrix.
function getViewProjectionMatrixTransposeInverse#
Returns the inverse of the transpose of the view projection matrix.
function getWorldPositionFromFrustumPosition#
Returns the world position that corresponds to a frustum position.
SBPosition3 SBDDocumentCamera::getWorldPositionFromFrustumPosition (
const SBPosition3 & frustumPosition
) const
function isMoving#
Returns whether the camera is currently moving.
function isSerializable#
Returns true.
Implements SBDDataGraphNode::isSerializable
function leftBackBottomView#
Goes to the left back bottom view.
function leftBackTopView#
Goes to the left back top view.
function leftFrontBottomView#
Goes to the left front bottom view.
function leftFrontTopView#
Goes to the left front top view.
function leftView#
Goes to the left view.
function orientUpwards#
Turns the camera around its Z vector to the upwards direction.
function print#
Prints the camera.
Implements SBDDataGraphNode::print
function rightBackBottomView#
Goes to the right back bottom view.
function rightBackTopView#
Goes to the right back top view.
function rightFrontBottomView#
Goes to the right front bottom view.
function rightFrontTopView#
Goes to the right front top view.
function rightView#
Goes to the right view.
function rotate [1/2]#
Rotates the camera.
void SBDDocumentCamera::rotate (
const SBVector3 & axis,
const SBQuantity::dimensionless & angle,
bool immediate=false
)
function rotate [2/2]#
Rotates the camera.
function rotateClockwise#
Rotates the camera 45 degrees clockwise around its axis.
function rotateCounterClockwise#
Rotates the camera 45 degrees counterclockwise around its axis.
function rotateDown#
Rotates the camera 45 degrees down around its target.
function rotateLeft#
Rotates the camera 45 degrees left around its target.
function rotateRight#
Rotates the camera 45 degrees right around its target.
function rotateUp#
Rotates the camera 45 degrees up around its target.
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
Implements SBDDataGraphNode::serialize
function setAspectRatio#
Sets the aspect ratio.
function setAutofocusFlag#
Sets the autofocus flag.
function setClippingPlane#
Sets the clipping plane.
function setDepthOfFieldFlag#
Sets the depth of field flag.
function setEyeDestination#
Sets the destination of the eye.
function setEyePosition#
Sets the position of the eye.
function setEyeVelocity#
Sets the velocity of the eye.
function setFNumber#
Sets the f-number.
function setFarPlane#
Sets the far plane.
function setFieldOfViewAngleY#
Sets the field of view angle, in degrees, in the Y direction.
function setFocalDistance#
Sets the focal distance.
function setHeadForwardVector#
Sets the forward vector of the head.
function setHeadPosition#
Sets the position of the head.
function setHeadUpVector#
Sets the up vector of the head.
function setInertiaFlag#
Sets the inertia flag.
function setMatrices#
Sets the camera matrices.
void SBDDocumentCamera::setMatrices (
float * projectionMatrix,
float * viewMatrix,
const SBQuantity::length & lengthPerUnit,
const SBSpatialTransform & origin
)
function setNearPlane#
Sets the near plane.
function setOrthographicProjectionFlag#
Sets the orthographic projection flag.
function setRotationVelocity#
Sets the rotation velocity.
function setTargetDestination#
Sets the destination of the target.
function setTargetPosition#
Sets the position of the target.
function setTargetVelocity#
Sets the velocity of the target.
function setUpVector#
Sets the up vector.
function setUpVectorDestination#
Sets the destination of the up vector.
function stop#
Stops the camera.
function topView#
Goes to the top view.
function transform#
Applies a spatial transform to the camera.
function translate [1/2]#
Translates the camera.
function translate [2/2]#
Translates the camera.
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
Implements SBDDataGraphNode::unserialize
function updateState#
Updates the state of the camera and returns true if the camera moved.
function zoomIn#
Zooms in.
void SBDDocumentCamera::zoomIn (
const SBQuantity::picometerPerSecond & velocity,
const SBPosition3 & center
)
function zoomOut#
Zooms out.
void SBDDocumentCamera::zoomOut (
const SBQuantity::picometerPerSecond & velocity,
const SBPosition3 & center
)
function zoomTo#
Zooms to a specific destination.
function ~SBDDocumentCamera#
Destructs the camera.