- english
- /
- japanese
methods
ofCamera provides a camera onto a 3D scene. Some of the different properties of the camera are shown in the picture below:
The far and near clip planes are the boundaries of what's visible in the camera. If you need more information on these, check http://www.falloutsoftware.com/tutorials/gl/gl0.htm
cacheMatrices(...)
void ofCamera::cacheMatrices(bool cache=true)
This caches the projection matrix for the ofCamera.
cameraToWorld(...)
ofVec3f ofCamera::cameraToWorld(ofVec3f CameraXYZ, ofRectangle viewport=ofGetCurrentViewport())
disableOrtho()
void ofCamera::disableOrtho()
Calling disableOrtho() turns off the orthographic mode.
enableOrtho()
void ofCamera::enableOrtho()
Orthographic, or parallel, projections consist of those that involve no perspective correction. There is no adjustment for distance from the camera made in these projections, meaning objects on the screen will appear the same size no matter how close or far away they are. Calling enableOrtho() sets the ofCamera to orthographic mode.
getImagePlaneDistance(...)
float ofCamera::getImagePlaneDistance(ofRectangle viewport=ofGetCurrentViewport())
getModelViewProjectionMatrix(...)
ofMatrix4x4 ofCamera::getModelViewProjectionMatrix(ofRectangle viewport=ofGetCurrentViewport())
getProjectionMatrix(...)
ofMatrix4x4 ofCamera::getProjectionMatrix(ofRectangle viewport=ofGetCurrentViewport())
screenToWorld(...)
ofVec3f ofCamera::screenToWorld(ofVec3f ScreenXYZ, ofRectangle viewport=ofGetCurrentViewport())
setupPerspective(...)
void ofCamera::setupPerspective(bool vFlip=true, float fov=60, float nearDist=0, float farDist=0)
worldToCamera(...)
ofVec3f ofCamera::worldToCamera(ofVec3f WorldXYZ, ofRectangle viewport=ofGetCurrentViewport())
worldToScreen(...)
ofVec3f ofCamera::worldToScreen(ofVec3f WorldXYZ, ofRectangle viewport=ofGetCurrentViewport())
Last updated
Thursday, 16 May 2013 14:01:08 UTC
-
cbf0910627a25e6153f2452833c5313fe6067059

