Debian Codegraph @

doc/man/man3/ivm/nodes/SoCamera.ivm

raw
1 NAME SoCamera SoCam SO_CAM_ { abstract base class for camera nodes }
2
3 INCLUDE nodes/SoCamera.h
4
5 DESC {
6 This is the abstract base class for all camera nodes. It defines the
7 common methods and fields that all cameras have. Cameras are used to
8 view a scene. When a camera is encountered during rendering, it sets
9 the projection and viewing matrices and viewport appropriately; it
10 does not draw geometry. Cameras should be placed before any shape
11 nodes or light nodes in a scene graph; otherwise, those shapes or
12 lights cannot be rendered properly. Cameras are affected by the
13 current transformation, so you can position a camera by placing a
14 transformation node before it in the scene graph . The default
15 position and orientation of a camera is at (0,0,1) looking along the
16 negative z-axis.
17 \p
18 You can also use a node kit to create a camera; see the reference page for
19 \cSoCameraKit\..
20 }
21
22 DEFINE { SO_ASPECT_SQUARE 1.00 }
23 DEFINE { SO_ASPECT_VIDEO 1.333333333 }
24 DEFINE { SO_ASPECT_35mm_ACADEMY 1.371 }
25 DEFINE { SO_ASPECT_16mm 1.369 }
26 DEFINE { SO_ASPECT_35mm_FULL 1.33333 }
27 DEFINE { SO_ASPECT_70mm 2.287 }
28 DEFINE { SO_ASPECT_CINEMASCOPE 2.35 }
29 DEFINE { SO_ASPECT_HDTV 1.777777777 }
30 DEFINE { SO_ASPECT_PANAVISION 2.361 }
31 DEFINE { SO_ASPECT_35mm 1.5 }
32 DEFINE { SO_ASPECT_VISTAVISION 2.301 }
33
34 ENUM ViewportMapping {
35 CROP_VIEWPORT_FILL_FRAME "Crops the viewport within the current
36 window, so that the aspect ratio
37 matches that of the camera. As the
38 window size changes, the aspect ratio
39 remains unchanged. The cropped region
40 is drawn as a filled gray area.",
41 CROP_VIEWPORT_LINE_FRAME "Crops the viewport, but draws a thin
42 frame around the viewport",
43 CROP_VIEWPORT_NO_FRAME "Crops the viewport, but gives no
44 visual feedback as to the viewport
45 dimensions within the window",
46 ADJUST_CAMERA "Adjusts the camera aspect ratio and
47 height to make it fit within the
48 given window. (The camera's fields are
49 not affected, just the values sent to
50 the graphics library.)",
51 LEAVE_ALONE "Do nothing. Camera image may
52 become stretched out of proportion"
53 }
54
55 FIELD viewportMapping {
56 Defines how to map the rendered image into the current viewport, when the
57 aspect ratio of the camera differs from that of the viewport.
58 }
59
60 FIELD position {
61 The location of the camera viewpoint.
62 }
63
64 FIELD orientation {
65 The orientation of the camera viewpoint, defined as a rotation of the
66 viewing direction from its default (0,0,-1) vector.
67 }
68
69 FIELD aspectRatio {
70 The ratio of camera viewing width to height. This value must be greater
71 than 0.0. There are several standard camera aspect ratios defined
72 in \cSoCamera.h\..
73 }
74
75 FIELD nearDistance {}
76 FIELD farDistance {
77 The distance from the camera viewpoint to the near and far clipping planes.
78 }
79
80 FIELD focalDistance {
81 The distance from the viewpoint to the point of focus. This is
82 typically ignored during rendering, but may be used by some viewers to
83 define a point of interest.
84 }
85
86 METHOD ptAt void pointAt(const SbVec3f &targetPoint) {
87 Sets the orientation of the camera so that it points toward the
88 given target point while keeping the "up" direction of the
89 camera parallel to the positive y-axis. If this is not
90 possible, it uses the positive z-axis as "up."
91 }
92
93 METHOD "" virtual void scaleHeight(float scaleFactor) {
94 Scales the height of the camera. Perspective cameras scale their
95 \vheightAngle\. fields, and orthographic cameras scale their
96 \vheight\. fields.
97 }
98
99 METHOD getViewVol virtual SbViewVolume
100 getViewVolume(float useAspectRatio = 0.0) const {
101 Returns a view volume structure, based on the camera's viewing
102 parameters. If the \auseAspectRatio\. argument is not 0.0 (the default),
103 the camera uses that ratio instead of the one it has.
104 }
105
106 METHOD "" void viewAll(SoNode *sceneRoot, const SbViewportRegion &vpRegion,
107 float slack = 1.0) {}
108 METHOD viewAllPath void viewAll(SoPath *path, const SbViewportRegion &vpRegion,
109 float slack = 1.0) {
110 Sets the camera to view the scene rooted by the given node or defined
111 by the given path. The near and far clipping planes will be positioned
112 \aslack\. bounding sphere radii away from the bounding box's
113 center. A value of 1.0 will make the clipping planes the tightest
114 around the bounding sphere.
115 }
116
117 METHOD getVpBounds SbViewportRegion
118 getViewportBounds(const SbViewportRegion &region) const {
119 Returns the viewport region this camera would use to render into the
120 given viewport region, accounting for cropping.
121 }
122
123 METHOD "" static SoType getClassTypeId() {
124 Returns type identifier for this class.
125 }
126
127 ALSO { SoOrthographicCamera, SoPerspectiveCamera, SoCameraKit }
128