Camera¶
The Camera 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 controled to point to a specific location, zoom in or out, translate, rotate, etc.
The currently active camera can be retrieved through samson.Facade.SAMSON
:
camera = SAMSON.getActiveCamera()
# set the front view of the camera
camera.frontView()
camera.name = "Front view camera"
Let’s center a camera on structural models.
# get a node indexer with all structural models
nodeIndexer = SAMSON.getNodes('node.type sm')
# center the camera on the nodes in the nodeIndexer
camera.center(nodeIndexer)
Let’s rotate a camera around some center with a given velocity.
# get all atoms
nodeIndexer = SAMSON.getNodes('n.t a')
# compute the center of mass
centerOfMass = Type.length3()
for atom in nodeIndexer:
centerOfMass[0] += atom.getX()
centerOfMass[1] += atom.getY()
centerOfMass[2] += atom.getZ()
centerOfMass /= nodeIndexer.size
# rotate the camera
numberOfRorations = 36 # the number of rotations
# set the rotation velocity in x-direction
velocity3 = Type.radianPerSecond3() # the zero vector
velocity3.x = Quantity.radPerS(3.14159 / 180.0)
# rotate several times in the loop
for i in range(numberOfRorations):
# rotate the camera once with the given velocity around the given center
camera.rotate(velocity3, centerOfMass)
# request SAMSON to process events
SAMSON.processEvents()
Note
If you want to produce pictures, you can capture the current viewport using the samson.Facade.SAMSON.captureViewportToFile()
function.
See also
SAMSON API: SBDDocumentCamera
- class samson.DataModel.Document.Camera(*args, **kwargs)¶
Bases:
samson.DataModel.DataGraph.Node
This class describes a camera.
Overloaded function.
__init__(self: samson.DataModel.Document.Camera) -> None
Constructs a camera
__init__(self: samson.DataModel.Document.Camera, name: str) -> None
Constructs a camera with name
- class NodeType(self: samson.DataModel.DataGraph.Node.NodeType, value: int) None ¶
Bases:
pybind11_builtins.pybind11_object
Members:
Undefined
StructuralModel
StructuralModelNode
Conformation
StructuralModelConformation
Path
StructuralModelPath
StructuralGroup
StructuralModelNodeGroup
Root
StructuralModelNodeRoot
StructuralParticle
StructuralModelNodeParticle
Atom
StructuralModelNodeAtom
PseudoAtom
StructuralModelNodePseudoAtom
Bond
StructuralModelNodeBond
PseudoBond
StructuralModelNodePseudoBond
HydrogenBond
StructuralModelNodeHydrogenBond
HydrogenBondGroup
StructuralModelNodeHydrogenBondGroup
Residue
StructuralModelNodeResidue
Segment
StructuralModelNodeSegment
Protein
StructuralModelNodeProtein
Chain
StructuralModelNodeChain
Molecule
StructuralModelNodeMolecule
Backbone
StructuralModelNodeBackbone
SideChain
StructuralModelNodeSideChain
VisualModel
Mesh
VisualModelMesh
DynamicalModel
ParticleSystem
DynamicalModelParticleSystem
RigidBodySystem
DynamicalModelRigidBodySystem
ArticulatedBodySystem
DynamicalModelArticulatedBodySystem
DynamicalNode
DynamicalModelNode
DynamicalGroup
DynamicalModelNodeGroup
DynamicalRoot
DynamicalModelNodeRoot
DynamicalParticle
DynamicalModelNodeParticle
RigidBody
DynamicalModelNodeRigidBody
ArticulatedBody
DynamicalModelNodeArticulatedBody
InteractionModel
InteractionModelParticleSystem
InteractionModelRigidBodySystem
InteractionModelArticulatedBodySystem
PropertyModel
PropertyModelFunction
Simulator
SimulatorParticleSystem
SimulatorRigidBodySystem
SimulatorArticulatedBodySystem
StateUpdater
StateUpdaterParticleSystem
StateUpdaterRigidBodySystem
StateUpdaterArticulatedBodySystem
DocumentManager
Document
Folder
Camera
Label
Note
Animation
Presentation
DataGraphNodeGroup
NodeGroup
Controller
ControllerNode
Asset
- Animation = <NodeType.Animation: 26>¶
- ArticulatedBody = <NodeType.ArticulatedBody: 603>¶
- ArticulatedBodySystem = <NodeType.ArticulatedBodySystem: 502>¶
- Asset = <NodeType.Asset: 50>¶
- Atom = <NodeType.Atom: 20100>¶
- Backbone = <NodeType.Backbone: 209>¶
- Bond = <NodeType.Bond: 202>¶
- Camera = <NodeType.Camera: 23>¶
- Chain = <NodeType.Chain: 207>¶
- Conformation = <NodeType.Conformation: 28>¶
- Controller = <NodeType.Controller: 40>¶
- ControllerNode = <NodeType.ControllerNode: 41>¶
- DataGraphNodeGroup = <NodeType.DataGraphNodeGroup: 30>¶
- Document = <NodeType.Document: 21>¶
- DocumentManager = <NodeType.DocumentManager: 20>¶
- DynamicalGroup = <NodeType.DynamicalGroup: 600>¶
- DynamicalModel = <NodeType.DynamicalModel: 5>¶
- DynamicalModelArticulatedBodySystem = <NodeType.ArticulatedBodySystem: 502>¶
- DynamicalModelNode = <NodeType.DynamicalNode: 6>¶
- DynamicalModelNodeArticulatedBody = <NodeType.ArticulatedBody: 603>¶
- DynamicalModelNodeGroup = <NodeType.DynamicalGroup: 600>¶
- DynamicalModelNodeParticle = <NodeType.DynamicalParticle: 601>¶
- DynamicalModelNodeRigidBody = <NodeType.RigidBody: 602>¶
- DynamicalModelNodeRoot = <NodeType.DynamicalRoot: 60000>¶
- DynamicalModelParticleSystem = <NodeType.ParticleSystem: 500>¶
- DynamicalModelRigidBodySystem = <NodeType.RigidBodySystem: 501>¶
- DynamicalNode = <NodeType.DynamicalNode: 6>¶
- DynamicalParticle = <NodeType.DynamicalParticle: 601>¶
- DynamicalRoot = <NodeType.DynamicalRoot: 60000>¶
- Folder = <NodeType.Folder: 22>¶
- HydrogenBond = <NodeType.HydrogenBond: 20202>¶
- HydrogenBondGroup = <NodeType.HydrogenBondGroup: 20203>¶
- InteractionModel = <NodeType.InteractionModel: 7>¶
- InteractionModelArticulatedBodySystem = <NodeType.InteractionModelArticulatedBodySystem: 702>¶
- InteractionModelParticleSystem = <NodeType.InteractionModelParticleSystem: 700>¶
- InteractionModelRigidBodySystem = <NodeType.InteractionModelRigidBodySystem: 701>¶
- Label = <NodeType.Label: 24>¶
- Mesh = <NodeType.Mesh: 300>¶
- Molecule = <NodeType.Molecule: 208>¶
- NodeGroup = <NodeType.DataGraphNodeGroup: 30>¶
- Note = <NodeType.Note: 25>¶
- ParticleSystem = <NodeType.ParticleSystem: 500>¶
- Path = <NodeType.Path: 29>¶
- Presentation = <NodeType.Presentation: 27>¶
- PropertyModel = <NodeType.PropertyModel: 9>¶
- PropertyModelFunction = <NodeType.PropertyModelFunction: 900>¶
- Protein = <NodeType.Protein: 206>¶
- PseudoAtom = <NodeType.PseudoAtom: 20101>¶
- PseudoBond = <NodeType.PseudoBond: 20201>¶
- Residue = <NodeType.Residue: 204>¶
- RigidBody = <NodeType.RigidBody: 602>¶
- RigidBodySystem = <NodeType.RigidBodySystem: 501>¶
- Root = <NodeType.Root: 20000>¶
- Segment = <NodeType.Segment: 205>¶
- SideChain = <NodeType.SideChain: 210>¶
- Simulator = <NodeType.Simulator: 11>¶
- SimulatorArticulatedBodySystem = <NodeType.SimulatorArticulatedBodySystem: 1102>¶
- SimulatorParticleSystem = <NodeType.SimulatorParticleSystem: 1100>¶
- SimulatorRigidBodySystem = <NodeType.SimulatorRigidBodySystem: 1101>¶
- StateUpdater = <NodeType.StateUpdater: 15>¶
- StateUpdaterArticulatedBodySystem = <NodeType.StateUpdaterArticulatedBodySystem: 1503>¶
- StateUpdaterParticleSystem = <NodeType.StateUpdaterParticleSystem: 1501>¶
- StateUpdaterRigidBodySystem = <NodeType.StateUpdaterRigidBodySystem: 1502>¶
- StructuralGroup = <NodeType.StructuralGroup: 200>¶
- StructuralModel = <NodeType.StructuralModel: 1>¶
- StructuralModelConformation = <NodeType.Conformation: 28>¶
- StructuralModelNode = <NodeType.StructuralModelNode: 2>¶
- StructuralModelNodeAtom = <NodeType.Atom: 20100>¶
- StructuralModelNodeBackbone = <NodeType.Backbone: 209>¶
- StructuralModelNodeBond = <NodeType.Bond: 202>¶
- StructuralModelNodeChain = <NodeType.Chain: 207>¶
- StructuralModelNodeGroup = <NodeType.StructuralGroup: 200>¶
- StructuralModelNodeHydrogenBond = <NodeType.HydrogenBond: 20202>¶
- StructuralModelNodeHydrogenBondGroup = <NodeType.HydrogenBondGroup: 20203>¶
- StructuralModelNodeMolecule = <NodeType.Molecule: 208>¶
- StructuralModelNodeParticle = <NodeType.StructuralParticle: 201>¶
- StructuralModelNodeProtein = <NodeType.Protein: 206>¶
- StructuralModelNodePseudoAtom = <NodeType.PseudoAtom: 20101>¶
- StructuralModelNodePseudoBond = <NodeType.PseudoBond: 20201>¶
- StructuralModelNodeResidue = <NodeType.Residue: 204>¶
- StructuralModelNodeRoot = <NodeType.Root: 20000>¶
- StructuralModelNodeSegment = <NodeType.Segment: 205>¶
- StructuralModelNodeSideChain = <NodeType.SideChain: 210>¶
- StructuralModelPath = <NodeType.Path: 29>¶
- StructuralParticle = <NodeType.StructuralParticle: 201>¶
- Undefined = <NodeType.Undefined: 0>¶
- VisualModel = <NodeType.VisualModel: 3>¶
- VisualModelMesh = <NodeType.Mesh: 300>¶
- property name¶
- property value¶
- addChild(self: samson.DataModel.DataGraph.Node, node: samson.DataModel.DataGraph.Node, nextNode: samson.DataModel.DataGraph.Node = None) bool ¶
Adds a child to the node
- alignWithAxis(self: samson.DataModel.Document.Camera, nodeIndexer: samson.DataModel.DataGraph.NodeIndexer, reversed: bool = False) None ¶
Aligns the indexed nodes with the camera axis
- alignWithPlane(self: samson.DataModel.Document.Camera, nodeIndexer: samson.DataModel.DataGraph.NodeIndexer, reversed: bool = False) None ¶
Aligns the indexed nodes with the camera plane
- backView(self: samson.DataModel.Document.Camera, immediate: bool = False) None ¶
Goes to the back view
- bottomView(self: samson.DataModel.Document.Camera, immediate: bool = False) None ¶
Goes to the bottom view
- canAddChild(self: samson.DataModel.DataGraph.Node, node: samson.DataModel.DataGraph.Node, nextNode: samson.DataModel.DataGraph.Node = None) bool ¶
Returns whether this node can add node as a child
- canAddChildType(self: samson.DataModel.DataGraph.Node, nodeType: SBDDataGraphNode::Type) bool ¶
Returns whether this node can add a node with type nodeType as a child
- canHaveDescendantType(self: samson.DataModel.DataGraph.Node, nodeType: SBDDataGraphNode::Type) bool ¶
Returns whether this node can have a node with type nodeType as a descendant
- castToInteractionModelParticleSystem(self: samson.DataModel.DataGraph.Node) SBMInteractionModelParticleSystem ¶
Casts (if possible) from SBDDataGraphNode to SBMInteractionModelParticleSystem
- castToLabel(self: samson.DataModel.DataGraph.Node) SBDDocumentLabel ¶
Casts (if possible) from SBDDataGraphNode to SBDDocumentLabel
- castToMesh(self: samson.DataModel.DataGraph.Node) SBMVisualModelMesh ¶
Casts (if possible) from SBDDataGraphNode to SBMVisualModelMesh
- castToVisualModel(self: samson.DataModel.DataGraph.Node) SBMVisualModel ¶
Casts (if possible) from SBDDataGraphNode to SBMVisualModel
- center(*args, **kwargs)¶
Overloaded function.
center(self: samson.DataModel.Document.Camera, immediate: bool = False) -> None
Centers the camera
center(self: samson.DataModel.Document.Camera, nodeIndexer: samson.DataModel.DataGraph.NodeIndexer, immediate: bool = False) -> None
Centers the camera on the indexed nodes
- clone(self: samson.DataModel.DataGraph.Node) samson.DataModel.DataGraph.Node ¶
Returns a copy of the node and its descendants
- countNodes(*args, **kwargs)¶
Overloaded function.
countNodes(self: samson.DataModel.DataGraph.Node, selectionString: str = ‘*’, visitString: str = ‘*’, includeDependencies: bool = False) -> int
- Count nodes into nodeIndexer, based on a selectionPredicate and a visitPredicate, with our without dependencies).
For selectionString and visitString use Node Specification Language (SAMSON API: Node Specification Language
countNodes(self: samson.DataModel.DataGraph.Node, nodeType: SBDDataGraphNode::Type, selectedNodesOnly: bool = False, visitString: str = ‘*’, includeDependencies: bool = False) -> int
- Count nodes into nodeIndexer, based on a nodeType, a selection status and a visitPredicate, with our without dependencies).
For visitString use Node Specification Language (SAMSON API: Node Specification Language
- create(self: samson.DataModel.DataGraph.Node) None ¶
Creates the node
- defaultView(self: samson.DataModel.Document.Camera) None ¶
Sets the view to default parameters
- descendsFrom(*args, **kwargs)¶
Overloaded function.
descendsFrom(self: samson.DataModel.DataGraph.Node, node: samson.DataModel.DataGraph.Node) -> bool
Returns true if and only if this node is node, or descends from it
descendsFrom(self: samson.DataModel.DataGraph.Node, nodeIndexer: SBDDataGraphNodeIndexer) -> bool
Returns true if and only if this node is one of the nodes of the nodeIndexer, or descends from one of them
- erase(self: samson.DataModel.DataGraph.Node) None ¶
Erases the node
- frontView(self: samson.DataModel.Document.Camera, immediate: bool = False) None ¶
Goes to the front view
- getDocument(self: samson.DataModel.DataGraph.Node) SBDDocument ¶
Returns the document the node belongs to
- getEyeDestination(self: samson.DataModel.Document.Camera) SBDTypePhysicalVector3Wrapper<SBDQuantityWrapper<SBDQuantityUnitSystemSI> > ¶
Returns destination of the eye
- getEyePosition(self: samson.DataModel.Document.Camera) SBDTypePhysicalVector3Wrapper<SBDQuantityWrapper<SBDQuantityUnitSystemSI> > ¶
Returns position of the eye
- getEyeVelocity(self: samson.DataModel.Document.Camera) SBDTypePhysicalVector3Wrapper<SBDQuantityWrapper<SBDQuantityUnitSystemSI> > ¶
Returns velocity of the eye
- getFlags(self: samson.DataModel.DataGraph.Node) int ¶
Returns the flags
- getFrustumPositionFromWorldPosition(self: samson.DataModel.Document.Camera, worldPosition: SBDTypePhysicalVector3Wrapper<SBDQuantityWrapper<SBDQuantityUnitSystemSI> >) SBDTypePhysicalVector3Wrapper<SBDQuantityWrapper<SBDQuantityUnitSystemSI> > ¶
Returns the projection in the frustum of a given world position
- getHeadPosition(self: samson.DataModel.Document.Camera) SBDTypePhysicalVector3Wrapper<SBDQuantityWrapper<SBDQuantityUnitSystemSI> > ¶
Returns position of the head
- getHierarchyString(self: samson.DataModel.DataGraph.Node, separator: str = ' / ', includeNodeType: bool = False) str ¶
Returns a string with hierarchical information on the node and its parents names
- getInheritedFlags(self: samson.DataModel.DataGraph.Node) int ¶
Returns the inherited flags
- getMaterial(self: samson.DataModel.DataGraph.Node) SBDDataGraphNodeMaterial ¶
Returns the material of the node
- getMaterialOwner(self: samson.DataModel.DataGraph.Node) samson.DataModel.DataGraph.Node ¶
Returns the node whose material is inherited
- getMemoryFootprint(self: samson.Core.Reference.ReferenceTarget) int ¶
Returns the memory footprint
- getNextCamera(self: samson.DataModel.Document.Camera) samson.DataModel.Document.Camera ¶
Returns the next Camera
- getNextNode(*args, **kwargs)¶
Overloaded function.
getNextNode(self: samson.DataModel.DataGraph.Node) -> samson.DataModel.DataGraph.Node
Returns the pointer to the next node in the children of the node’s parent
getNextNode(self: samson.DataModel.DataGraph.Node, nodeType: SBDDataGraphNode::Type) -> samson.DataModel.DataGraph.Node
Returns the pointer to the next node with type nodeType in the children of the node’s parent
- getNode(self: int) samson.DataModel.DataGraph.Node ¶
Returns the unique node corresponding to the node index nodeIndex
- getNodes(*args, **kwargs)¶
Overloaded function.
getNodes(self: samson.DataModel.DataGraph.Node, selectionString: str = ‘*’, visitString: str = ‘*’, includeDependencies: bool = False) -> SBDDataGraphNodeIndexer
- Returns nodes (in a node indexer), based on a selectionString and a visitString, with our without dependencies).
For selectionString and visitString use Node Specification Language (SAMSON API: Node Specification Language
getNodes(self: samson.DataModel.DataGraph.Node, nodeType: SBDDataGraphNode::Type, selectedNodesOnly: bool = False, visitString: str = ‘*’, includeDependencies: bool = False) -> SBDDataGraphNodeIndexer
- Returns nodes (in a node indexer), based on a nodeType, a selection status and a visitString, with our without dependencies).
For visitString use Node Specification Language (SAMSON API: Node Specification Language
- getParent(self: samson.DataModel.DataGraph.Node) samson.DataModel.DataGraph.Node ¶
Returns the parent of the node
- getPreviousCamera(self: samson.DataModel.Document.Camera) samson.DataModel.Document.Camera ¶
Returns the previous Camera
- getPreviousNode(*args, **kwargs)¶
Overloaded function.
getPreviousNode(self: samson.DataModel.DataGraph.Node) -> samson.DataModel.DataGraph.Node
Returns the pointer to the previous node in the children of the node’s parent
getPreviousNode(self: samson.DataModel.DataGraph.Node, nodeType: SBDDataGraphNode::Type) -> samson.DataModel.DataGraph.Node
Returns the pointer to the previous node with type nodeType in the children of the node’s parent
- getProjectionMatrix(self: samson.DataModel.Document.Camera) List[List[float]] ¶
Returns the projection matrix
- getProjectionMatrixTranspose(self: samson.DataModel.Document.Camera) List[List[float]] ¶
Returns the transpose of the projection matrix
- getRoot(self: samson.DataModel.DataGraph.Node) samson.DataModel.DataGraph.Node ¶
Returns the root of the hierarchy the node belongs to
- getRotationVelocity(self: samson.DataModel.Document.Camera) SBDTypePhysicalVector3Wrapper<SBDQuantityWrapper<SBDQuantityUnitSystemSI> > ¶
Returns rotation velocity
- getTargetDestination(self: samson.DataModel.Document.Camera) SBDTypePhysicalVector3Wrapper<SBDQuantityWrapper<SBDQuantityUnitSystemSI> > ¶
Returns destination of the target
- getTargetPosition(self: samson.DataModel.Document.Camera) SBDTypePhysicalVector3Wrapper<SBDQuantityWrapper<SBDQuantityUnitSystemSI> > ¶
Returns position of the target
- getTargetVelocity(self: samson.DataModel.Document.Camera) SBDTypePhysicalVector3Wrapper<SBDQuantityWrapper<SBDQuantityUnitSystemSI> > ¶
Returns velocity of the target
- getThisNode(self: samson.DataModel.DataGraph.Node) samson.DataModel.DataGraph.Node ¶
Returns the pointer to this node
- static getTypeString(type: SBDDataGraphNode::Type) str ¶
Returns a string describing the type of the data graph node
- getUpVector(self: samson.DataModel.Document.Camera) SBDTypePhysicalVector3Wrapper<SBDQuantityWrapper<SBDQuantityUnitSystemSI> > ¶
Returns up vector
- getUpVectorDestination(self: samson.DataModel.Document.Camera) SBDTypePhysicalVector3Wrapper<SBDQuantityWrapper<SBDQuantityUnitSystemSI> > ¶
Returns destination of the up vector
- getViewMatrix(self: samson.DataModel.Document.Camera) List[List[float]] ¶
Returns the view matrix
- getViewMatrixTranspose(self: samson.DataModel.Document.Camera) List[List[float]] ¶
Returns the transpose of the view matrix
- getViewProjectionMatrix(self: samson.DataModel.Document.Camera) List[List[float]] ¶
Returns the view projection matrix
- getViewProjectionMatrixTranspose(self: samson.DataModel.Document.Camera) List[List[float]] ¶
Returns the transpose of the view projection matrix
- getViewProjectionMatrixTransposeInverse(self: samson.DataModel.Document.Camera) List[List[float]] ¶
Returns the inverse of the transpose of the view projection matrix
- getWorldPositionFromFrustumPosition(self: samson.DataModel.Document.Camera, frustumPosition: SBDTypePhysicalVector3Wrapper<SBDQuantityWrapper<SBDQuantityUnitSystemSI> >) SBDTypePhysicalVector3Wrapper<SBDQuantityWrapper<SBDQuantityUnitSystemSI> > ¶
Returns the world position that corresponds to a frustum position
- hasOneOf(self: samson.DataModel.DataGraph.Node, nodeIndexer: SBDDataGraphNodeIndexer) bool ¶
Returns true if and only if this node is one of the nodes of the nodeIndexer, or is the ancestor of one of them
- isDynamicalModel(self: samson.DataModel.DataGraph.Node) bool ¶
Returns true when the node is a dynamical model
- isIn(*args, **kwargs)¶
Overloaded function.
isIn(self: samson.DataModel.DataGraph.Node, node: samson.DataModel.DataGraph.Node) -> bool
Returns true if and only if this node is node, or descends from it, or belongs to a group stored in node
isIn(self: samson.DataModel.DataGraph.Node, nodeIndexer: SBDDataGraphNodeIndexer) -> bool
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 the nodeIndexer
- isInteractionModel(self: samson.DataModel.DataGraph.Node) bool ¶
Returns true when the node is a interaction model
- isMesh(self: samson.DataModel.DataGraph.Node) bool ¶
Returns true when the node is a mesh
- isModel(self: samson.DataModel.DataGraph.Node) bool ¶
Returns true when the node is a model
- isMoving(self: samson.DataModel.Document.Camera) bool ¶
Returns whether the camera is currently moving
- isOneOf(self: samson.DataModel.DataGraph.Node, nodeIndexer: SBDDataGraphNodeIndexer) bool ¶
Returns true if and only if this node is one of the nodes of the nodeIndexer
- isPropertyModel(self: samson.DataModel.DataGraph.Node) bool ¶
Returns true when the node is a property model
- isSimulator(self: samson.DataModel.DataGraph.Node) bool ¶
Returns true when the node is a simulator
- isStructuralModel(self: samson.DataModel.DataGraph.Node) bool ¶
Returns true when the node is a structural model
- isStructuralParticle(self: samson.DataModel.DataGraph.Node) bool ¶
Returns true when the node is a structural particle (an atom or a pseudo-atom)
- isType(self: samson.DataModel.DataGraph.Node, type: SBDDataGraphNode::Type) bool ¶
Returns true when the type of the node corresponds to type
- isVisualModel(self: samson.DataModel.DataGraph.Node) bool ¶
Returns true when the node is a visual model
- leftBackBottomView(self: samson.DataModel.Document.Camera, immediate: bool = False) None ¶
Goes to the left back bottom view
- leftBackTopView(self: samson.DataModel.Document.Camera, immediate: bool = False) None ¶
Goes to the left back top view
- leftFrontBottomView(self: samson.DataModel.Document.Camera, immediate: bool = False) None ¶
Goes to the left front bottom view
- leftFrontTopView(self: samson.DataModel.Document.Camera, immediate: bool = False) None ¶
Goes to the left front top view
- leftView(self: samson.DataModel.Document.Camera, immediate: bool = False) None ¶
Goes to the left view
- printDebugInfo(self: samson.DataModel.DataGraph.Node, offset: int = 0) None ¶
Prints some debugging information in stdout
- removeChild(self: samson.DataModel.DataGraph.Node, node: samson.DataModel.DataGraph.Node) bool ¶
Removes a child from the node
- removeMaterial(self: samson.DataModel.DataGraph.Node) bool ¶
Removes material from the node
- rightBackBottomView(self: samson.DataModel.Document.Camera, immediate: bool = False) None ¶
Goes to the right back bottom view
- rightBackTopView(self: samson.DataModel.Document.Camera, immediate: bool = False) None ¶
Goes to the right back top view
- rightFrontBottomView(self: samson.DataModel.Document.Camera, immediate: bool = False) None ¶
Goes to the right front bottom view
- rightFrontTopView(self: samson.DataModel.Document.Camera, immediate: bool = False) None ¶
Goes to the right front top view
- rightView(self: samson.DataModel.Document.Camera, immediate: bool = False) None ¶
Goes to the right view
- rotate(*args, **kwargs)¶
Overloaded function.
rotate(self: samson.DataModel.Document.Camera, axis: SBDTypePhysicalVector3Wrapper<SBDQuantityWrapper<SBDQuantityUnitSystemSI> >, angle: SBDQuantityWrapper<SBDQuantityUnitSystemSI>, immediate: bool = False) -> None
Rotates the camera
rotate(self: samson.DataModel.Document.Camera, velocity: SBDTypePhysicalVector3Wrapper<SBDQuantityWrapper<SBDQuantityUnitSystemSI> >, center: SBDTypePhysicalVector3Wrapper<SBDQuantityWrapper<SBDQuantityUnitSystemSI> >) -> None
Rotates the camera
- rotateClockwise(self: samson.DataModel.Document.Camera, immediate: bool = False) None ¶
Rotates the camera 45 degrees clockwise around its target
- rotateCounterClockwise(self: samson.DataModel.Document.Camera, immediate: bool = False) None ¶
Rotates the camera 45 degrees counterclockwise around its target
- rotateDown(self: samson.DataModel.Document.Camera, immediate: bool = False) None ¶
Rotates the camera 45 degrees down around its target
- rotateLeft(self: samson.DataModel.Document.Camera, immediate: bool = False) None ¶
Rotates the camera 45 degrees left around its target
- rotateRight(self: samson.DataModel.Document.Camera, immediate: bool = False) None ¶
Rotates the camera 45 degrees right around its target
- rotateUp(self: samson.DataModel.Document.Camera, immediate: bool = False) None ¶
Rotates the camera 45 degrees up around its target
- setColor(self: samson.DataModel.DataGraph.Node, color: SBDTypeColor) bool ¶
Sets the color for the node (modifies an existing material of the node or adds a material with a given color)
- Args:
color (Color): color to set
- setColorScheme(self: samson.DataModel.DataGraph.Node, colorScheme: SBDDataGraphNodeColorScheme) bool ¶
Sets the color scheme for the node (modifies an existing material of the node or adds a material with a given color scheme)
Args: colorScheme (ColorScheme): color scheme to set
- setEyeDestination(self: samson.DataModel.Document.Camera, arg0: SBDTypePhysicalVector3Wrapper<SBDQuantityWrapper<SBDQuantityUnitSystemSI> >) None ¶
Sets destination of the eye
- setEyePosition(self: samson.DataModel.Document.Camera, arg0: SBDTypePhysicalVector3Wrapper<SBDQuantityWrapper<SBDQuantityUnitSystemSI> >) None ¶
Sets position of the eye
- setEyeVelocity(self: samson.DataModel.Document.Camera, arg0: SBDTypePhysicalVector3Wrapper<SBDQuantityWrapper<SBDQuantityUnitSystemSI> >) None ¶
Sets velocity of the eye
- setHeadPosition(self: samson.DataModel.Document.Camera, arg0: SBDTypePhysicalVector3Wrapper<SBDQuantityWrapper<SBDQuantityUnitSystemSI> >) None ¶
Sets position of the head
- setMaterial(self: samson.DataModel.DataGraph.Node, material: SBDDataGraphNodeMaterial) bool ¶
Sets the material for the node.
- Args:
material (Material): material to set
- setRotationVelocity(self: samson.DataModel.Document.Camera, arg0: SBDTypePhysicalVector3Wrapper<SBDQuantityWrapper<SBDQuantityUnitSystemSI> >) None ¶
Sets rotation velocity
- setTargetDestination(self: samson.DataModel.Document.Camera, arg0: SBDTypePhysicalVector3Wrapper<SBDQuantityWrapper<SBDQuantityUnitSystemSI> >) None ¶
Sets destination of the target
- setTargetPosition(self: samson.DataModel.Document.Camera, arg0: SBDTypePhysicalVector3Wrapper<SBDQuantityWrapper<SBDQuantityUnitSystemSI> >) None ¶
Sets position of the target
- setTargetVelocity(self: samson.DataModel.Document.Camera, arg0: SBDTypePhysicalVector3Wrapper<SBDQuantityWrapper<SBDQuantityUnitSystemSI> >) None ¶
Sets velocity of the target
- setUpVector(self: samson.DataModel.Document.Camera, arg0: SBDTypePhysicalVector3Wrapper<SBDQuantityWrapper<SBDQuantityUnitSystemSI> >) None ¶
Sets up vector
- setUpVectorDestination(self: samson.DataModel.Document.Camera, arg0: SBDTypePhysicalVector3Wrapper<SBDQuantityWrapper<SBDQuantityUnitSystemSI> >) None ¶
Sets destination of the up vector
- stop(self: samson.DataModel.Document.Camera) None ¶
Stops the camera
- toString(self: samson.DataModel.Document.Camera) str ¶
A string representation
- topView(self: samson.DataModel.Document.Camera, immediate: bool = False) None ¶
Goes to the top view
- transform(self: samson.DataModel.Document.Camera, spatialTransform: SBDTypeSpatialTransformWrapper, immediate: bool = False) None ¶
Applies a spatial transform to the camera
- translate(self: samson.DataModel.Document.Camera, velocity: SBDTypePhysicalVector3Wrapper<SBDQuantityWrapper<SBDQuantityUnitSystemSI> >, immediate: bool = False) None ¶
Translates the camera
- updateState(self: samson.DataModel.Document.Camera) bool ¶
Updates the state of the camera and returns true if the camera moved
- zoomIn(self: samson.DataModel.Document.Camera, velocity: SBDQuantityWrapper<SBDQuantityUnitSystemSI>, center: SBDTypePhysicalVector3Wrapper<SBDQuantityWrapper<SBDQuantityUnitSystemSI> >) None ¶
Zooms in
- zoomOut(self: samson.DataModel.Document.Camera, velocity: SBDQuantityWrapper<SBDQuantityUnitSystemSI>, center: SBDTypePhysicalVector3Wrapper<SBDQuantityWrapper<SBDQuantityUnitSystemSI> >) None ¶
Zooms out
- zoomTo(self: samson.DataModel.Document.Camera, cameraTargetDestination: SBDTypePhysicalVector3Wrapper<SBDQuantityWrapper<SBDQuantityUnitSystemSI> >) None ¶
Zooms to a specific destination
- Animation = <NodeType.Animation: 26>¶
- ArticulatedBody = <NodeType.ArticulatedBody: 603>¶
- ArticulatedBodySystem = <NodeType.ArticulatedBodySystem: 502>¶
- Asset = <NodeType.Asset: 50>¶
- Atom = <NodeType.Atom: 20100>¶
- Backbone = <NodeType.Backbone: 209>¶
- Bond = <NodeType.Bond: 202>¶
- Camera = <NodeType.Camera: 23>¶
- Chain = <NodeType.Chain: 207>¶
- Conformation = <NodeType.Conformation: 28>¶
- Controller = <NodeType.Controller: 40>¶
- ControllerNode = <NodeType.ControllerNode: 41>¶
- DataGraphNodeGroup = <NodeType.DataGraphNodeGroup: 30>¶
- Document = <NodeType.Document: 21>¶
- DocumentManager = <NodeType.DocumentManager: 20>¶
- DynamicalGroup = <NodeType.DynamicalGroup: 600>¶
- DynamicalModel = <NodeType.DynamicalModel: 5>¶
- DynamicalModelArticulatedBodySystem = <NodeType.ArticulatedBodySystem: 502>¶
- DynamicalModelNode = <NodeType.DynamicalNode: 6>¶
- DynamicalModelNodeArticulatedBody = <NodeType.ArticulatedBody: 603>¶
- DynamicalModelNodeGroup = <NodeType.DynamicalGroup: 600>¶
- DynamicalModelNodeParticle = <NodeType.DynamicalParticle: 601>¶
- DynamicalModelNodeRigidBody = <NodeType.RigidBody: 602>¶
- DynamicalModelNodeRoot = <NodeType.DynamicalRoot: 60000>¶
- DynamicalModelParticleSystem = <NodeType.ParticleSystem: 500>¶
- DynamicalModelRigidBodySystem = <NodeType.RigidBodySystem: 501>¶
- DynamicalNode = <NodeType.DynamicalNode: 6>¶
- DynamicalParticle = <NodeType.DynamicalParticle: 601>¶
- DynamicalRoot = <NodeType.DynamicalRoot: 60000>¶
- Folder = <NodeType.Folder: 22>¶
- HydrogenBond = <NodeType.HydrogenBond: 20202>¶
- HydrogenBondGroup = <NodeType.HydrogenBondGroup: 20203>¶
- InteractionModel = <NodeType.InteractionModel: 7>¶
- InteractionModelArticulatedBodySystem = <NodeType.InteractionModelArticulatedBodySystem: 702>¶
- InteractionModelParticleSystem = <NodeType.InteractionModelParticleSystem: 700>¶
- InteractionModelRigidBodySystem = <NodeType.InteractionModelRigidBodySystem: 701>¶
- Label = <NodeType.Label: 24>¶
- Mesh = <NodeType.Mesh: 300>¶
- Molecule = <NodeType.Molecule: 208>¶
- NodeGroup = <NodeType.DataGraphNodeGroup: 30>¶
- Note = <NodeType.Note: 25>¶
- ParticleSystem = <NodeType.ParticleSystem: 500>¶
- Path = <NodeType.Path: 29>¶
- Presentation = <NodeType.Presentation: 27>¶
- PropertyModel = <NodeType.PropertyModel: 9>¶
- PropertyModelFunction = <NodeType.PropertyModelFunction: 900>¶
- Protein = <NodeType.Protein: 206>¶
- PseudoAtom = <NodeType.PseudoAtom: 20101>¶
- PseudoBond = <NodeType.PseudoBond: 20201>¶
- Residue = <NodeType.Residue: 204>¶
- RigidBody = <NodeType.RigidBody: 602>¶
- RigidBodySystem = <NodeType.RigidBodySystem: 501>¶
- Root = <NodeType.Root: 20000>¶
- Segment = <NodeType.Segment: 205>¶
- SideChain = <NodeType.SideChain: 210>¶
- Simulator = <NodeType.Simulator: 11>¶
- SimulatorArticulatedBodySystem = <NodeType.SimulatorArticulatedBodySystem: 1102>¶
- SimulatorParticleSystem = <NodeType.SimulatorParticleSystem: 1100>¶
- SimulatorRigidBodySystem = <NodeType.SimulatorRigidBodySystem: 1101>¶
- StateUpdater = <NodeType.StateUpdater: 15>¶
- StateUpdaterArticulatedBodySystem = <NodeType.StateUpdaterArticulatedBodySystem: 1503>¶
- StateUpdaterParticleSystem = <NodeType.StateUpdaterParticleSystem: 1501>¶
- StateUpdaterRigidBodySystem = <NodeType.StateUpdaterRigidBodySystem: 1502>¶
- StructuralGroup = <NodeType.StructuralGroup: 200>¶
- StructuralModel = <NodeType.StructuralModel: 1>¶
- StructuralModelConformation = <NodeType.Conformation: 28>¶
- StructuralModelNode = <NodeType.StructuralModelNode: 2>¶
- StructuralModelNodeAtom = <NodeType.Atom: 20100>¶
- StructuralModelNodeBackbone = <NodeType.Backbone: 209>¶
- StructuralModelNodeBond = <NodeType.Bond: 202>¶
- StructuralModelNodeChain = <NodeType.Chain: 207>¶
- StructuralModelNodeGroup = <NodeType.StructuralGroup: 200>¶
- StructuralModelNodeHydrogenBond = <NodeType.HydrogenBond: 20202>¶
- StructuralModelNodeHydrogenBondGroup = <NodeType.HydrogenBondGroup: 20203>¶
- StructuralModelNodeMolecule = <NodeType.Molecule: 208>¶
- StructuralModelNodeParticle = <NodeType.StructuralParticle: 201>¶
- StructuralModelNodeProtein = <NodeType.Protein: 206>¶
- StructuralModelNodePseudoAtom = <NodeType.PseudoAtom: 20101>¶
- StructuralModelNodePseudoBond = <NodeType.PseudoBond: 20201>¶
- StructuralModelNodeResidue = <NodeType.Residue: 204>¶
- StructuralModelNodeRoot = <NodeType.Root: 20000>¶
- StructuralModelNodeSegment = <NodeType.Segment: 205>¶
- StructuralModelNodeSideChain = <NodeType.SideChain: 210>¶
- StructuralModelPath = <NodeType.Path: 29>¶
- StructuralParticle = <NodeType.StructuralParticle: 201>¶
- Undefined = <NodeType.Undefined: 0>¶
- VisualModel = <NodeType.VisualModel: 3>¶
- VisualModelMesh = <NodeType.Mesh: 300>¶
- property aspectRatio¶
aspect ratio
- property basisX¶
the x vector of the camera basis
- property basisY¶
the y vector of the camera basis
- property basisZ¶
the z vector of the camera basis
- property clippingPlane¶
clipping plane
- property defaultOpacity¶
Returns the default opacity
- property defaultTransparency¶
Returns the default transparency
- property farPlane¶
far plane
- property fieldOfViewAngleY¶
field of view angle
- property getTransform¶
the spatial transform
- property hasMaterial¶
Returns whether the node has a material (by itself, or inherited)
- property hasOpacityRange¶
Returns whether the node has opacity range
- property hasTransparencyRange¶
Returns whether the node has transparency range
- property highlightingFlag¶
Highlighting flag
- property inertiaFlag¶
- property isCreated¶
Returns true if and only if the node is created
- property isErased¶
Returns true if and only if the node is erased
- property isHighlighted¶
Returns whether the node is highlighted
- property isLocked¶
Returns whether the node is locked
- property isSelected¶
Returns whether the node is selected
- property isSerializable¶
Returns true when the class is serializable
- property isVisible¶
Returns whether the node is visible
- property lockedFlag¶
Locked flag
- property maximumOpacity¶
Returns the maximum opacity
- property maximumTransparency¶
Returns the maximum transparency
- property minimumOpacity¶
Returns the minimum opacity
- property minimumTransparency¶
Returns the minimum transparency
- property molecularWeight¶
Returns the molecular weight
- property name¶
The name of the node
- property nearPlane¶
near plane
- property nodeIndex¶
Returns the node index (unique in the whole data graph, but non-persistent)
- property numberOfAtoms¶
Returns the number of atoms
- property numberOfCarbons¶
Returns the number of carbons
- property numberOfChains¶
Returns the number of chains
- property numberOfHydrogens¶
Returns the number of hydrogens
- property numberOfMolecules¶
Returns the number of molecules
- property numberOfNitrogens¶
Returns the number of nitrogens
- property numberOfOtherAtoms¶
Returns the number of other atoms
- property numberOfOxygens¶
Returns the number of oxygens
- property numberOfResidues¶
Returns the number of residues
- property numberOfSegments¶
Returns the number of segments
- property numberOfStructuralGroups¶
Returns the number of structural groups
- property numberOfStructuralModels¶
Returns the number of structural models
- property numberOfSulfurs¶
Returns the number of sulfurs
- property opacity¶
Opacity
- property orthographicProjectionFlag¶
the orthographic projection flag
- property ownsMaterial¶
Returns whether the node owns a material
- property selectionFlag¶
Selection flag
- property sumOfFormalCharges¶
Returns the sum of formal charges
- property sumOfPartialCharges¶
Returns the sum of partial charges
- property transparency¶
Transparency
- property type¶
Returns the type of the data graph node
- property typeString¶
Returns a string describing the type of this data graph node
- property visibilityFlag¶
Visibility flag