Inherits From:
NSObject
Declared In:
Sc21/SCCamera.h
In a typical Sc21 application, you will never need to create an
SCCamera yourself, since SCSceneGraph automatically initializes
one. Use SCSceneGraph's camera: method to access that SCCamera.
delegate
Returns the receiver's delegate.
reorient:(SbRotation)rotation
Reorients the receiver's SoCamera camera by rotation.
Note that this does not replace the previous values but is accumulative: the current orientation will be multiplied with rotation.
setDelegate:(id)newdelegate
Makes newdelegate the receiver's delegate.
setSoCamera:(SoCamera *)newcamera
Sets the receiver's SoCamera to newcamera.
setUpdatesClippingPlanes:(BOOL)yn
Sets whether the receiver should automatically update the clipping
planes to optimzie z-buffer usage. The default is YES.
soCamera
Returns the receiver's SoCamera.
translate:(SbVec3f)vector
Translates the receiver's SoCamera by vector relative to its own coordinate system.(In its own coordinate system, the camera is pointing in negative Z direction with the Y axis being up.)
updateClippingPlanes:(SCSceneGraph *)scenegraph
Positions the near and far clipping planes just in front of and behind the scene's bounding box to optimize depth buffer usage.
If present, the delegate method
adjustNearClippingPlane:farClippingPlane: will be called with the
internally calculated near and far clipping plane values to allow
for final fine-tuning. (See the NSObject(SCCameraDelegate)
documentation for more information.)
You can set updatesClippingPlanes to NO to disable automatic
clipping plane adjustment. In this case, the delegate method
adjustNearClippingPlane:farClippingPlane: (if present) will be
called with the current (unmodified) near and far clipping plane
values, allowing you to do your own custom modifications.
updatesClippingPlanes
Returns YES if the receiver automatically updates the clipping
planes to optimzie z-buffer usage, and NO otherwise.
The default is YES
viewAll:(SCSceneGraph *)scenegraph
Positions the receiver's SoCamera so the whole scene in scenegraph is visible. The SoCamera must be part of the scenegraph.
zoom:(float)delta
Zooms in if delta is > 0, else zoom out.
This method is designed so it can easily be connected to mouse movement, using the difference between normalized mouse coordinates as input. Therefore, typical delta values are expected to be in the area of 0.001 - 0.005; the actual zoom factor is calculated based on delta.