In 3D rendering, a camera is something that defines a view and a projection using a pair of matrices. This class provides the APIs and behaviours describing the projection component of a camera. See the base class CYIAbstractCameraSceneNode for the definition of the "view" component of a camera.
A perspective transformation is one in which objects further away from the camera appear smaller, and the view contains a vanishing point. A standard definition of a perspective transform is done using aspect ratio, field of view, and near and far planes.
A perspective transform also describes a view frustum, which is a trapezoidal volume with the smallest of the rectangular faces anchored to the camera's position:
/|
/ |
[]o | | \ | |
A standard way of defining a perspective is using the near and far planes, aspect ratio, and field of view. The field of view in our case is described in vertical degrees.
The near plane is the distance from the camera at which the viewing volume begins. The far plane is the distance from the camera at which the viewing volume ends. Objects outside of this range will not be rendered even if the camera is facing them.
The aspect ratio is the aspect ratio of the camera's viewport.
The field of view is the angle between the top and bottom planes of the viewing frustum.
Unlike an orthographic projection, parallel lines may not appear parallel depending on the position and orientation of the objects in the scene.
#include <scenetree/YiPerspectiveCameraSceneNode.h>

Public Member Functions | |
| CYIPerspectiveCameraSceneNode () | |
| virtual | ~CYIPerspectiveCameraSceneNode () |
| void | SetNearPlane (float fNearZ) |
| float | GetNearPlane () const |
| void | SetFarPlane (float fFarZ) |
| float | GetFarPlane () const |
| void | SetAspectRatio (float fAspectRatio) |
| float | GetAspectRatio () const |
| void | SetFOV (float fFovYDegrees) |
| float | GetFOV () const |
| bool | IsInViewVolume (CYISceneNode *pCandidate) const |
Public Member Functions inherited from CYIAbstractCameraSceneNode | |
| void | SetUpVector (const glm::vec3 &fCamUp) |
| const glm::vec3 & | GetUpVector () const |
| void | SetTarget (CYISceneNode *pTargetNode) |
| CYISceneNode * | GetTarget () const |
| void | RemoveTarget () |
| const glm::mat4 & | GetCameraMatrix () const |
| void | SetViewport (const CYIViewport &viewport) |
| const CYIViewport & | GetViewport () const |
| const glm::mat4 & | GetViewMatrix () const |
| const glm::mat4 & | GetProjectionMatrix () const |
Public Member Functions inherited from CYISceneNode | |
| CYISceneNode () | |
| virtual | ~CYISceneNode () |
| virtual bool | Init () |
| void | ForceDirty () |
| void | ClearDirtyFlag () |
| void | SetDirtyFlag (DirtyFlag eDirtyFlag) |
| DirtyFlag | GetDirtyFlag () const |
| DirtyFlag | GetPreviousDirtyFlag () const |
| const CYIString & | GetName () const |
| CYIString | GetUniqueName () const |
| void | SetSceneManager (CYISceneManager *pSceneManager) |
| void | SetName (const CYIString &name) |
| int32_t | GetID () const |
| void | SetID (int32_t nID) |
| uint64_t | GetUniqueID () const |
| bool | AddChild (std::unique_ptr< CYISceneNode > pSceneNode) |
| bool | AddChild (std::unique_ptr< CYISceneNode >, int32_t nIndex) |
| bool | InsertChildAfter (CYISceneNode *pRefNode, std::unique_ptr< CYISceneNode > pSceneNode) |
| std::unique_ptr< CYISceneNode > | RemoveChild (CYISceneNode *pSceneNode) |
| bool | ReorderChild (uint32_t uFromIndex, uint32_t uToIndex) |
| CYISceneNode * | GetParent () const |
| bool | ChangeParent (CYISceneNode *pParent) |
| CYISceneNode * | GetDrawParent () const |
| bool | IsAncestorOf (const CYISceneNode *pNode) const |
| CYISceneManager * | GetSceneManager () const |
| uint32_t | GetChildCount () const |
| uint32_t | GetChildCountRecursive () const |
| CYISceneNode * | GetChild (uint32_t nIndex) const |
| Iterator | begin (Iterator::ITERATION_MODE eMode=Iterator::IMMEDIATE_CHILDREN) const |
| Iterator | end (Iterator::ITERATION_MODE eMode=Iterator::IMMEDIATE_CHILDREN) const |
| ReverseIterator | rbegin (Iterator::ITERATION_MODE eMode=Iterator::IMMEDIATE_CHILDREN) const |
| ReverseIterator | rend (Iterator::ITERATION_MODE eMode=Iterator::IMMEDIATE_CHILDREN) const |
| CYISceneNode * | GetChild (const CYIString &sName) const |
| uint32_t | GetDrawChildCount () const |
| CYISceneNode * | GetDrawChild (uint32_t uIndex) const |
| CYISceneNode * | GetDrawChildByID (int32_t nID) const |
| template<class YI_SCENE_NODE_SUBCLASS > | |
| YI_SCENE_NODE_SUBCLASS * | GetChild (uint32_t uTargetMatchedNodeCount=1) const |
| template<class YI_SCENE_NODE_SUBCLASS > | |
| std::list< YI_SCENE_NODE_SUBCLASS * > | GetChildren () const |
| int32_t | GetIndexOfChild (const CYISceneNode *pSceneNode) const |
| void | Show () |
| void | Hide () |
| void | SetVisibility (bool bVisible) |
| void | SetOpacity (float fOpacity) |
| float | GetCompositeOpacity () const |
| float | GetLocalOpacity () const |
| bool | IsVisible () const |
| bool | IsTrulyVisible () const |
| CYISceneNode * | GetNode (const CYIString &name) |
| CYISceneNode * | GetNode (const CYIString &name, const CYIRuntimeTypeInfo &enforceClassType) |
| CYISceneNode * | GetNode (const CYIRuntimeTypeInfo &enforceClassType) |
| CYISceneNode * | GetNodeAfterTarget (const CYIRuntimeTypeInfo &enforceClassType, CYISceneNode *pStartAfterTarget) |
| template<class YI_SCENE_NODE_SUBCLASS > | |
| YI_SCENE_NODE_SUBCLASS * | GetNode (const CYIString &name) |
| CYISceneNode * | GetNode (const int32_t nID) |
| CYISceneNode * | GetNode (const int32_t nID, const CYIRuntimeTypeInfo &enforceClassType) |
| template<class YI_SCENE_NODE_SUBCLASS > | |
| bool | FindNode (YI_SCENE_NODE_SUBCLASS *&pNode, const CYIString &nodeName, FETCH_TYPE eType, const CYIString &tag) |
| std::list< CYISceneNode * > | GetNodes (const CYIString &name) |
| std::list< CYISceneNode * > | GetNodes (int32_t nID) |
| std::list< CYISceneNode * > | GetNodes (const CYIRuntimeTypeInfo &enforceClassType) |
| template<class YI_SCENE_NODE_SUBCLASS > | |
| const YI_SCENE_NODE_SUBCLASS * | GetNode (uint32_t uTargetMatchedNodeCount=1) const |
| template<class YI_SCENE_NODE_SUBCLASS > | |
| YI_SCENE_NODE_SUBCLASS * | GetNode (uint32_t uTargetMatchedNodeCount=1) |
| void | SetMesh (const std::shared_ptr< CYIMesh > &pMesh) |
| void | SetMaterial (const std::shared_ptr< CYIMaterial > &pMaterial, uint32_t nIndex=0) |
| void | AddEffect (const std::shared_ptr< CYIEffect > &pEffect) |
| void | RemoveEffect (const std::shared_ptr< CYIEffect > &pEffect) |
| uint32_t | GetEffectCount () const |
| std::shared_ptr< CYIEffect > | GetEffect (uint32_t uIndex) const |
| void | ConnectEffectsToTimelines (const CYITimelineTrack *pTrack) |
| void | AddMask (std::unique_ptr< CYIMask > pMask) |
| std::unique_ptr< CYIMask > | RemoveMask (const CYIMask *pMask) |
| uint32_t | GetMaskCount () const |
| const CYIMask * | GetMask (uint32_t uIndex) const |
| CYIMask * | GetMask (uint32_t uIndex) |
| const std::shared_ptr< CYIMesh > & | GetMesh () const |
| uint32_t | GetMaterialCount () const |
| const std::shared_ptr< CYIMaterial > | GetMaterial (uint32_t nIndex=0) const |
| const std::shared_ptr< IYIUniformBufferObject > & | GetShaderUniforms () const |
| void | SetMeshTransform (const glm::mat4 &rTransform) |
| void | DestroyChildren () |
| const glm::mat4 & | GetLocalTransform () const |
| const glm::mat4 & | GetEffectTransform () const |
| const glm::mat4 & | GetWorldTransform () const |
| bool | Intersects (const CYISceneNode *pNode) const |
| void | SetRenderTarget (const std::shared_ptr< CYIRenderTarget > &pRenderTarget) |
| const std::shared_ptr< CYIRenderTarget > | GetRenderTarget () const |
| virtual void | BuildDrawList (std::vector< IYIRenderer::Command > &drawList, CYIAbstractCameraSceneNode *pCameraToDrawWith=nullptr) |
| const CYIAABB & | GetWorldAABB () const |
| const CYIAABB & | GetLocalAABB () const |
| void | SetAnchorPoint (const glm::vec3 &ref) |
| void | SetAnchorPoint (float fX, float fY, float fZ) |
| void | SetAnchorPointX (float fX) |
| void | SetAnchorPointY (float fY) |
| void | SetAnchorPointZ (float fZ) |
| void | SetPosition (const glm::vec3 &ref) |
| void | SetPosition (float fX, float fY, float fZ) |
| void | SetPositionX (float fX) |
| void | SetPositionY (float fY) |
| void | SetPositionZ (float fZ) |
| void | SetRotation (const glm::vec3 &fEulerDegrees) |
| void | SetRotation (float fPitchDegrees, float fYawDegrees, float fRollDegrees) |
| void | SetRotationX (float fPitchDegrees) |
| void | SetRotationY (float fYawDegrees) |
| void | SetRotationZ (float fRollDegrees) |
| void | SetOrientation (float fPitchDegrees, float fYawDegrees, float fRollDegrees) |
| void | SetOrientation (const glm::quat &orient) |
| void | SetScale (const glm::vec3 &fScaleFactors) |
| void | SetScale (float fFactorX, float fFactorY, float fFactorZ) |
| void | SetScaleX (float fFactor) |
| void | SetScaleY (float fFactor) |
| void | SetScaleZ (float fFactor) |
| const glm::vec3 & | GetPosition () const |
| const glm::vec3 & | GetScale () const |
| const glm::vec3 & | GetWorldScale () const |
| const glm::vec3 & | GetWorldSurfaceScale () const |
| const glm::vec3 & | GetRotation () const |
| const glm::quat & | GetOrientation () const |
| const glm::vec3 & | GetAnchorPoint () const |
| virtual void | SetSize (const glm::vec3 &vSize, bool bDirtyLayout=true) |
| const glm::vec3 & | GetSize () const |
| const glm::vec3 & | GetInitialSize () const |
| void | SetMeasuredSize (const glm::vec3 &vMeasuredSize) |
| const glm::vec3 & | GetMeasuredSize () const |
| void | SetInternalCustomTimelineValue (uint32_t nTrackID, const CYIVariant &value) |
| virtual void | SetCustomTimelineValue (uint32_t nTrackID, const CYIVariant &value) |
| void | SetClippingOn () |
| void | SetClippingOff () |
| bool | GetClipping () const |
| void | SetClippingBox (const CYIAABB &rWorldBox) |
| const CYIAABB & | GetClippingBox () const |
| void | StartPropertyAnimation (YI_NODE_PROPERTY_TYPE ePropType, float fFrom, float fTo, uint32_t nDurMs, CYITimeInterpolator *pTimeInterpolator=nullptr, bool bDirtyLayout=true) |
| void | StopPropertyAnimation (YI_NODE_PROPERTY_TYPE ePropType) |
| void | UpdateLocalSpaceCollision (CYIActionEvent *pActionEvent) |
| virtual bool | BroadcastEvent (const std::shared_ptr< CYIEventDispatcher > &pDispatcher, CYIEvent *pEvent) |
| void | UpdateEventForLocalSpace (CYIActionEvent *pActionEvent, glm::vec3 &rayOrigin, glm::vec3 &rayNonOriginPoint) const |
| bool | IsBoundingBoxHit (const CYIRay &rWorldSpaceRay) const |
| bool | IsMeshHit (const CYIRay &rWorldSpaceRay) const |
| void | DumpTree () const |
| void | StartCaptureKeyboardEvents () |
| void | StopCaptureKeyboardEvents () |
| void | StartCaptureTrackpadEvents () |
| void | StopCaptureTrackpadEvents () |
| void | StartCapturePointerEvents (uint8_t uPointerID) |
| void | StopCapturePointerEvents (uint8_t uPointerID) |
| bool | DrawBehindChildren (CYISceneNode *pSceneNode) |
| bool | DrawInFrontOfChildren (CYISceneNode *pSceneNode) |
| bool | DrawBehind (CYISceneNode *pSceneNode) |
| bool | DrawInFront (CYISceneNode *pSceneNode) |
| bool | IsFocusRoot () const |
| void | SetIsFocusRoot (bool bIsFocusRoot) |
| virtual void | OnFocusGainedInDescendants () |
| virtual void | FocusGainedInDescendants () |
| virtual void | OnFocusLostInDescendants () |
| virtual void | FocusLostInDescendants () |
| virtual void | OnFocusChangedInDescendants () |
| virtual void | FocusChangedInDescendants () |
| virtual bool | ContainsFocusableDescendant (const CYIFocusSearchOptions &options=CYIFocusSearchOptions()) const |
| void | ShowPointerDebugNode (CYIActionEvent *pActionEvent) |
| void | SetUseLocalTransformAndAlpha (bool bUse) |
| virtual bool | GetProperty (const CYIString &rPropertyName, CYIString *pValue) const override |
| virtual const std::map< CYIString, CYIString > & | GetProperties () const override |
| void | SetProperty (const CYIString &rPropertyName, const CYIString &rPropertyValue) |
| const std::shared_ptr< CYISceneNodeProxy > & | GetSceneNodeProxy () const |
| void | SetLayoutConfig (std::unique_ptr< CYILayoutConfig > pLayoutConfig) |
| const CYILayoutConfig * | GetLayoutConfig (LayoutConfigFetchMode eFetchMode=LAYOUT_CONFIG_LAZY_INSTANTIATE) const |
| CYILayoutConfig * | GetLayoutConfig (LayoutConfigFetchMode eFetchMode=LAYOUT_CONFIG_LAZY_INSTANTIATE) |
| void | SetLayoutState (std::unique_ptr< CYILayoutState > pLayoutState) |
| const CYILayoutState * | GetLayoutState () const |
| CYILayoutState * | GetLayoutState () |
| void | RequestLayout () |
| LayoutDirtyFlag | GetLayoutDirtyFlag () const |
| virtual void | SetLayoutDirtyFlag (LayoutDirtyFlag eFlag) |
| virtual void | Measure (const MeasureSpec &widthSpec, const MeasureSpec &heightSpec, const MeasureSpec &depthSpec) |
| virtual void | ApplyMeasurements () |
| CYIAbstractCameraSceneNode * | FindActiveCamera () const |
| template<typename T > | |
| bool | CanCastTo () const |
Public Member Functions inherited from CYIEventTarget | |
| CYIEventTarget () | |
| virtual | ~CYIEventTarget () |
| bool | AddEventListener (YI_EVENT_TYPE eEventType, CYIEventHandler *pListener, EVENT_PHASE ePhase=BUBBLE) |
| bool | RemoveEventListener (YI_EVENT_TYPE eEventType, CYIEventHandler *pListener, EVENT_PHASE ePhase=BUBBLE) |
| void | SetSpecialTypeFlag (YI_SPECIAL_EVENT_TARGET_TYPE eType) |
| void | ClearSpecialTypeFlag (YI_SPECIAL_EVENT_TARGET_TYPE eType) |
| YI_SPECIAL_EVENT_TARGET_TYPE | GetSpecialTypes () const |
Public Member Functions inherited from CYIScriptableRTTIObject | |
| CYIScriptableRTTIObject () | |
| virtual | ~CYIScriptableRTTIObject () |
| virtual const CYIRuntimeTypeInfo * | GetRuntimeTypeInfoForScriptObject () const override |
Public Member Functions inherited from CYIScriptableObject | |
| CYIScriptableObject () | |
| CYIScriptableObject (const CYIScriptableObject &other) | |
| CYIScriptableObject & | operator= (const CYIScriptableObject &other) |
| virtual | ~CYIScriptableObject () |
| CYIBindingImplementation * | GetBindingImplementation () const |
| void | SetBindingImplementation (CYIBindingImplementation *pBindingImplementation) |
Public Member Functions inherited from CYISignalHandler | |
| CYISignalHandler () | |
| CYISignalHandler (const CYISignalHandler &rSignalHandler) | |
| virtual | ~CYISignalHandler () |
| CYISignalHandler & | operator= (const CYISignalHandler &rSignalHandler) |
| void | MoveToThread (CYIThread *pThread) |
| This function allows the user to override the default thread affinity to any CYIThread that may or may not be running. More... | |
| CYIThreadHandle | GetThreadAffinity () const |
| void | SetThreadAffinity (const CYIThreadHandle &rThreadAffinity) |
| virtual bool | IsConnected () const |
| virtual bool | IsConnected (const CYISignalBase &rSignal) const |
| void | Disconnect (CYISignalBase &rSignal) |
| void | DisconnectFromAllSignals () |
Public Member Functions inherited from CYIThread::Listener | |
| Listener () | |
| virtual | ~Listener () |
| virtual void | OnThreadStarted (CYIThread *) |
| virtual void | OnThreadTerminated (CYIThread *) |
| virtual void | OnThreadFinished (CYIThread *) |
Public Member Functions inherited from IYIPropertiesSource | |
| virtual | ~IYIPropertiesSource () |
Static Public Member Functions | |
| static std::unique_ptr< CYIPerspectiveCameraSceneNode > | BuildDefaultCamera (const CYIString &name, float fRegionOfInterestDistance, float fRegionOfInterestWidth, float fRegionOfInterestHeight) |
| static void | ConfigurePerspective (CYIPerspectiveCameraSceneNode *pCamera, float fRegionOfInterestDistance, float fRegionOfInterestWidth, float fRegionOfInterestHeight) |
Static Public Member Functions inherited from CYISceneNode | |
| static void | RegisterAllSceneNodes () |
Static Public Attributes | |
| static const float | DEFAULT_FRUSTUM_DISTANCE |
Static Public Attributes inherited from CYISceneNode | |
| static const float | OPACITY_NOT_VISIBLE_EPSILON |
Protected Member Functions | |
| virtual void | TransformUpdated () override |
| virtual glm::mat4 | CalculateProjectionMatrix () const override |
| virtual CYIString | GetDumpTreeString () const override |
Protected Member Functions inherited from CYIAbstractCameraSceneNode | |
| CYIAbstractCameraSceneNode () | |
| void | DirtyProjectionMatrix () |
| glm::mat4 | CalculateViewMatrix () const |
| glm::mat4 | CalculateViewportMatrix () const |
| const glm::mat4 & | GetViewportWorldMatrix () const |
| virtual void | UpdateEnd () override |
Protected Member Functions inherited from CYISceneNode | |
| void | Update (bool bForceDirty=false) |
| virtual void | OnUpdateBegin () |
| virtual void | UpdateBegin () |
| virtual void | OnUpdateEnd () |
| virtual void | OnDirtyFlagChanged () |
| virtual void | DirtyFlagChanged () |
| virtual void | OnTransformUpdated () |
| virtual void | OnWorldScaleUpdated () |
| virtual void | WorldScaleUpdated () |
| virtual void | OnWorldSurfaceScaleUpdated () |
| virtual void | WorldSurfaceScaleUpdated () |
| virtual void | OnVisibilityUpdated () |
| virtual void | VisibilityUpdated () |
| virtual void | OnCompositeOpacityUpdated () |
| virtual void | CompositeOpacityUpdated () |
| virtual void | OnWorldBoundingBoxUpdated () |
| virtual void | WorldBoundingBoxUpdated () |
| virtual void | OnLocalBoundingBoxUpdated () |
| virtual void | LocalBoundingBoxUpdated () |
| virtual void | OnChildAdded (CYISceneNode *pChild) |
| virtual void | ChildAdded (CYISceneNode *pChild) |
| virtual void | OnChildRemoved (CYISceneNode *pChild) |
| virtual void | ChildRemoved (CYISceneNode *pChild) |
| virtual void | OnSizeChanged () |
| virtual void | SizeChanged () |
| virtual void | CalculateLocalTransform (glm::mat4 *pTransform) const |
| virtual void | ChildNeedsLayout () |
| virtual void | LayoutDirtied () |
| virtual void | OnChildVisibilityChanged (CYISceneNode *pChild) |
| virtual void | ChildVisibilityChanged (CYISceneNode *pChild) |
| virtual bool | ProcessEvent (const std::shared_ptr< CYIEventDispatcher > &pDispatcher, CYIEvent *pEvent) override |
| LayoutDirtyFlag | GetCurrentLayoutDirtyFlag () const |
| void | DumpTree (int32_t nIndentLevel) const |
| void | SetShaderUniforms () |
| virtual void | SetCustomUniforms () |
| template<class T > | |
| void | SetNodeType () |
| virtual CYISceneNode * | GetNodeFromChildren (const CYIString &name) |
| virtual CYISceneNode * | GetNodeFromChildren (const int32_t nID) |
| virtual CYISceneNode * | GetNodeFromChildren (const CYIRuntimeTypeInfo &enforceClassType) |
| CYISceneNode * | GetNodeFromChildrenAfterTarget (const CYIRuntimeTypeInfo &enforceClassType, bool *pbTargetReached, CYISceneNode *pStartAfterTarget) |
Protected Member Functions inherited from CYIScriptableRTTIObject | |
| virtual std::pair< const CYIRuntimeTypeInfo *, const void * > | GetRuntimeTypeInfoWithObject () const =0 |
| CYIPerspectiveCameraSceneNode::CYIPerspectiveCameraSceneNode | ( | ) |
|
virtual |
|
static |
A camera whose view encompasses the region of interest described by the parameters will be generated.
With a static distance, width, and height the dependent variables are the field of view, spect ratio, and X and Y position of the camera.
Callers own the returned CYIPerspectiveCameraSceneNode.
|
overrideprotectedvirtual |
Subclasses must implement this function to return their calculated projection matrix. This function will be called if the result of IsProjectionDirty() is true on a given frame.
Implements CYIAbstractCameraSceneNode.
|
static |
The provided camera will have its field of view and aspect ratio modified to encompass the specified region.
| float CYIPerspectiveCameraSceneNode::GetAspectRatio | ( | ) | const |
Get the aspect ratio for the camera's view frustum. This is generally equivalent to the aspect ratio of the viewport in which the camera will be located.
|
overrideprotectedvirtual |
Returns a string containing useful information about this node, displayed by DumpTree
Subclasses can implement this method to specify different or additional information. Appending to the default string is recommended.
Reimplemented from CYIAbstractCameraSceneNode.
| float CYIPerspectiveCameraSceneNode::GetFarPlane | ( | ) | const |
Get the far plane for the camera's view frustum in eye coordinates.
Eye space refers to a coordinate system in which the camera's position is the origin and the camera is facing +Z.
Objects that are farther than the far plane won't be visible.
| float CYIPerspectiveCameraSceneNode::GetFOV | ( | ) | const |
Get the vertical field of view of the camera in degrees.
| float CYIPerspectiveCameraSceneNode::GetNearPlane | ( | ) | const |
Get the near plane for the camera's view frustum in eye coordinates.
Eye space refers to a coordinate system in which the camera's position is the origin and the camera is facing +Z.
Objects that are closer than the near plane will not be visible.
| bool CYIPerspectiveCameraSceneNode::IsInViewVolume | ( | CYISceneNode * | pCandidate | ) | const |
If clipping is enabled on pCandidate, returns true if pCandidate's clipping box is within the camera's frustum. If clipping is disabled on pCandidate, returns true if pCandidate's bounding box is within the camera's frustum. In other cases, false is returned.
| void CYIPerspectiveCameraSceneNode::SetAspectRatio | ( | float | fAspectRatio | ) |
Set the aspect ratio for the camera's view frustum. This is generally equivalent to the aspect ratio of the viewport in which the camera will be located.
| void CYIPerspectiveCameraSceneNode::SetFarPlane | ( | float | fFarZ | ) |
Set the far plane of the camera's view frustum in eye coordinates.
Eye space refers to a coordinate system in which the camera's position is the origin and the camera is facing +Z.
Objects that are farther than the far plane won't be visible.
| void CYIPerspectiveCameraSceneNode::SetFOV | ( | float | fFovYDegrees | ) |
Set the vertical field of view of the camera in degrees.
| void CYIPerspectiveCameraSceneNode::SetNearPlane | ( | float | fNearZ | ) |
Set the near plane for the camera's view frustum in eye coordinates.
Eye space refers to a coordinate system in which the camera's position is the origin and the camera is facing +Z.
Objects that are closer than the near plane will not be visible.
|
overrideprotectedvirtual |
Called by Update() when the transform update process is complete. Subclasses may overload this function to do post-processing.
Reimplemented from CYISceneNode.
|
static |
The frustum distance defines the distance between the near and far planes of the cameras.
Things outside this range, i.e. closer than the near plane or further than the far plane, will be clipped by the render pipeline.