SoFrustumCamera - Online Linux Manual Page

Section : 3
Updated : Mon Jan 25 2021
Source : Version 2.5.0
Note : Coin

NAMESoFrustumCamera − The SoFrustumCamera class defines a camera with a generic frustum​.​.

SYNOPSIS
#include <Inventor/nodes/SoFrustumCamera​.h> Inherits SoCamera​.

Public Member Functionsvirtual SoType getTypeId (void) const
SoFrustumCamera (void)
virtual void scaleHeight (float scalefactor)
virtual SbViewVolume getViewVolume (float useaspectratio=0​.0f) const

Static Public Member Functionsstatic SoType getClassTypeId (void)
static void initClass (void)

Public AttributesSoSFFloat left
SoSFFloat right
SoSFFloat top
SoSFFloat bottom

Protected Member Functionsvirtual const SoFieldData * getFieldData (void) const
virtual ~SoFrustumCamera ()
virtual void viewBoundingBox (const SbBox3f &box, float aspect, float slack)

Static Protected Member Functionsstatic const SoFieldData ** getFieldDataPtr (void)

Additional Inherited Members

Detailed DescriptionThe SoFrustumCamera class defines a camera with a generic frustum​.​. The SoFrustumCamera class makes it possible to specify a frustum in the same manner as the OpenGL glFrustum() function​. It has four new fields (left, right, top, bottom), and will use SoCamera::nearDistance and SoCamera::farDistance for the two last glFrustum() parameters​. This camera can be useful in applications that require full control over the view frustum, such as in CAVE or other multipipe applications​. Since Coin 2​.5

Constructor & Destructor Documentation

SoFrustumCamera::SoFrustumCamera (void)Constructor​. References bottom, left, right, and top​.

SoFrustumCamera::~SoFrustumCamera (void) [protected], [virtual]Destructor​.

Member Function Documentation

SoType SoFrustumCamera::getTypeId (void) const [virtual]Returns the type identification of an object derived from a class inheriting SoBase​. This is used for run-time type checking and 'downward' casting​. Usage example: void foo(SoNode * node) { if (node->getTypeId() == SoFile::getClassTypeId()) { SoFile * filenode = (SoFile *)node; // safe downward cast, knows the type } else if (node->getTypeId()​.isOfType(SoGroup::getClassTypeId())) { SoGroup * group = (SoGroup *)node; // safe downward cast, knows the type } }For application programmers wanting to extend the library with new nodes, engines, nodekits, draggers or others: this method needs to be overridden in all subclasses​. This is typically done as part of setting up the full type system for extension classes, which is usually accomplished by using the pre-defined macros available through for instance Inventor/nodes/SoSubNode​.h (SO_NODE_INIT_CLASS and SO_NODE_CONSTRUCTOR for node classes), Inventor/engines/SoSubEngine​.h (for engine classes) and so on​. For more information on writing Coin extensions, see the class documentation of the toplevel superclasses for the various class groups​. Reimplemented from SoCamera​.

const SoFieldData * SoFrustumCamera::getFieldData (void) const [protected], [virtual]Returns a pointer to the class-wide field data storage object for this instance​. If no fields are present, returns NULL​. Reimplemented from SoCamera​.

void SoFrustumCamera::scaleHeight (float scalefactor) [virtual]Sets a scalefactor for the height of the camera viewport​. What 'viewport height' means exactly in this context depends on the camera model​. See documentation in subclasses​. Implements SoCamera​. References bottom, and top​.

SbViewVolume SoFrustumCamera::getViewVolume (float useaspectratio = 0​.0f) const [virtual]Returns total view volume covered by the camera under the current settings​. This view volume is not adjusted to account for viewport mapping​. If you want the same view volume as the one used during rendering, you should do something like this: SbViewVolume vv; float aspectratio = myviewport.getViewportAspectRatio(); switch (camera->viewportMapping.getValue()) { case SoCamera::CROP_VIEWPORT_FILL_FRAME: case SoCamera::CROP_VIEWPORT_LINE_FRAME: case SoCamera::CROP_VIEWPORT_NO_FRAME: vv = camera->getViewVolume(0.0f); break; case SoCamera::ADJUST_CAMERA: vv = camera->getViewVolume(aspectratio); if (aspectratio < 1.0f) vv.scale(1.0f / aspectratio); break; case SoCamera::LEAVE_ALONE: vv = camera->getViewVolume(0.0f); break; default: assert(0 && "unknown viewport mapping"); break; }.fiAlso, for the CROPPED viewport mappings, the viewport might be changed if the viewport aspect ratio is not equal to the camera aspect ratio​. See SoCamera::getView() to see how this is done​.
Implements SoCamera​.References bottom, SoCamera::farDistance, SbViewVolume::frustum(), left, SoCamera::nearDistance, SoCamera::orientation, SoCamera::position, right, SbViewVolume::rotateCamera(), top, and SbViewVolume::translateCamera()​.

void SoFrustumCamera::viewBoundingBox (const SbBox3f & box, float aspect, float slack) [protected], [virtual] Convenience method for setting up the camera definition to cover the given bounding box with the given aspect ratio​. Multiplies the exact dimensions with a slack factor to have some space between the rendered model and the borders of the rendering area​. If you define your own camera node class, be aware that this method should not set the orientation field of the camera, only the position, focal distance and near and far clipping planes​. Implements SoCamera​. References bottom, SbSphere::circumscribe(), SbVec3f::dot(), SoCamera::farDistance, SoCamera::focalDistance, SbBox3f::getCenter(), SbSphere::getRadius(), SbBox3f::isEmpty(), SbRotation::multVec(), SoCamera::nearDistance, SbVec3f::normalize(), SoCamera::orientation, SoCamera::position, SoDebugError::postWarning(), and top​.

Member Data Documentation

SoSFFloat SoFrustumCamera::leftThe left clipping plane position​. Default value is -0​.5​. Referenced by getViewVolume(), and SoFrustumCamera()​.

SoSFFloat SoFrustumCamera::rightThe right clipping plane position​. Default value is 0​.5 Referenced by getViewVolume(), and SoFrustumCamera()​.

SoSFFloat SoFrustumCamera::topThe top clipping plane position​. Default value is 0​.5​. Referenced by getViewVolume(), scaleHeight(), SoFrustumCamera(), and viewBoundingBox()​.

SoSFFloat SoFrustumCamera::bottomThe bottom clipping plane position​. Default value is -0​.5​. Referenced by getViewVolume(), scaleHeight(), SoFrustumCamera(), and viewBoundingBox()​.

AuthorGenerated automatically by Doxygen for Coin from the source code​.
0
Johanes Gumabo
Data Size   :   29,234 byte
man-SoFrustumCamera.3coin2Build   :   2025-03-22, 13:26   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   62 / 5,717,672
Visitor ID   :     :  
Visitor IP   :   216.73.216.104   :  
Visitor Provider   :   Amazon.com, Inc.   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   20   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 25.03.22
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36


Very long time ago, I have the best tutor, Wenzel Svojanovsky. If someone knows the email address of Wenzel Svojanovsky, please send an email to johanesgumabo@gmail.com.

If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.