C++ | Python |
---|---|
Cmaxwell::Ccamera | CmaxwellCamera |
Camera description.
Inherits from
Sub-classes
Methods
Name | Description |
---|---|
setStep | Sets the camera parameters that can change in an animation. |
getStep | Gets the camera parameteres that can change in an animation. |
setOrthoValues | |
getOrthoValues | |
getValues | Gets the camera parameters that cannot change in an animation. |
setName | Sets camera name. |
getName | Gets camera name. |
setResolution | Sets camera resolution. |
getResolution | Gets camera resolution. |
setPixelAspect | Sets camera pixel aspect. |
getPixelAspect | Gets camera pixel aspect. |
setShutter | Sets camera shutter. |
getShutter | Gets camera shutter. |
setIso | Sets camera ISO. |
getIso | Gets camera ISO. |
setFilmSize | Sets camera film size. |
getFilmSize | Gets camera film size. |
setDiaphragm | Sets camera diaphragm. |
getDiaphragm | Gets camera diaphragm. |
setFPS | Sets camera FPS. |
getFPS | Gets camera FPS. |
setScreenRegion | Defines a render region for the camera. |
getScreenRegion | Gets render region defined. |
setCutPlanes | Sets camera cut planes. |
getCutPlanes | Gets camera cut planes. |
setShiftLens | Sets camera shift lens. |
getShiftLens | Gets camera shift lens. |
setHide | Sets camera hidden status. |
isHide | Gets camera hidden status. |
setUuid | Sets camera unique ID. For custom purposes. |
getUuid | Gets camera unique ID. For custom purposes. |
setUserData | |
getUserData | |
setActive | Sets the active camera in case the scene have more than one. |
setDirty | |
isDirty | |
free | Destroys the camera. |
Inherited methods
Name | Description |
---|---|
isNull | Checks whether the object is null. |
setStep
Sets the camera parameters that can change in an animation. The static parameters that are set in Cmaxwell::addCamera can not be animated (resolution, film...).
Language | Syntax |
---|---|
C++ | byte setStep( dword iStep, Cpoint origin, Cpoint focalPoint, Cvector up, real focalLength, real fStop, byte focalLengthNeedCorrection = true ) |
Python | int setStep( dword iStep, Cvector origin, Cvector focalPoint, Cvector up, float focalLength, float fStop, byte focalLengthNeedCorrection = true ) |
Parameters
Type | Name | In/Out | Description |
---|---|---|---|
dword | iStep | in | Step number. |
Cpoint | origin | in | Camera position. |
Cpoint | focalPoint | in | Camera focus point. |
Cvector | up | in | Camera up vector. |
real | focalLenght | in | Camera focal lenght (mm). |
real | fStop | in | Camera f-Stop. |
byte | focalLenghtNeedCorrection | in | Indicates wheter focal lenght needs correction. Default value: 1 (true). |
Return value
0 = Error adding step to the camera.
1 = Success.
getStep
Gets the camera parameteres that can change in an animation. The static parameters that are set in Cmaxwell::addCamera can not be animated (resolution, film...).
Language | Syntax |
---|---|
C++ | byte getStep( dword iStep, Cpoint& origin, Cpoint& focalPoint, Cvector& up, real& focalLength, real& fStop ) |
Python | [ Cvector 'origin', Cvector 'focalPoint', Cvector 'up', float 'focalLength', float 'fStop'] getStep( int step ) |
Parameters
Type | Name | In/Out | Description |
---|---|---|---|
dword | iStep | in | Step requested. |
Cpoint | origin | out | Camera position. |
Cpoint | focalPoint | out | Camera target. |
Cvector | up | out | Camera up vector. |
real | focalLenght | out | Camera focal lenght (mm). |
real | fStop | out | Camera f-Stop. |
Return value
C++
0 = Error getting camera step values.
1 = Success.
setOrthoValues
Language | Syntax |
---|---|
C++ | byte setOrthoValues( dword iStep, real orthoX, real orthoY, real orthoZoom, real focalLength, real fStop ) |
Python | int setOrthoValues( int iStep, float orthoX, float orthoY, float orthoZoom, float focalLength, float fStop ) |
Parameters
Type | Name | In/Out | Description |
---|---|---|---|
dword | iStep | in | Camera step to be set. |
real | orthoX | in | |
real | orthoY | in | |
real | orthoZoom | in | |
real | focalLenght | in | Camera focal lenght. |
real | fStop | in | Camera f-Stop. |
Return values
0 = Error setting ortho values.
1 = Success.
getOrthoValues
Language | Syntax |
---|---|
C++ | byte getOrthoValues( dword iStep, real& orthoX, real& orthoY, real& orthoZoom, real& focalLength, real& fStop ) |
Python | [ float 'orthoX', float 'orthoY', float 'ortoZoom', float 'focalLenght', float 'fStop' ] getOrthoValues( int iStep ) |
Parameters
Type | Name | In/Out | Description |
---|---|---|---|
dword | iStep | in | Camera step requested. |
real | orthoX | out | |
real | orthoY | out | |
real | orthoZoom | out | |
real | focalLenght | out | Camera focal lenght. |
real | fStop | out | Camera f-Stop. |
Return value
0 = Error getting ortho values.
1 = Success.
getValues
Gets the camera parameters that cannot change in an animation.
Language | Syntax |
---|---|
C++ | const char* getValues( dword& nSteps, real& shutter, real& filmWidth, real& filmHeight, real& iso, const char** pDiaphragmType, real& angle, dword& nBlades, dword& fps, dword& xRes, dword& yRes, real& pixelAspect, byte& projectionType ); |
Python | [int 'nSteps', float 'shutter', float 'filmWidth', float 'filmHeight', float 'iso', str 'DiaphragmType', float 'angle', int 'nBlades', int 'fps', int 'xRes', int 'yRes', float 'pixelAspect', int 'projectionType'] getValues() |
Parameters
Type | Name | In/Out | Description |
---|---|---|---|
dword | nSteps | out | Number of steps. |
real | shutter | out | Camera shutter (1/s). |
real | filmWidth | out | Camera film width (mm). |
real | filmHeight | out | Camera film height (mm). |
real | iso | out | Camera ISO. |
const char** | pDiaphragmType | out | Diaphragm type. Possible values: "CIRCULAR" and "POLYGONAL". |
real | angle | out | Shutter angle. --TODO-- |
dword | nBlades | out | Number of diaphragm blades if pDiaphragmType is "POLYGONAL". |
dword | fps | out | Frames per second. |
dword | xRes | out | Resolution output width. |
dword | yRes | out | Resolution output height. |
real | pixelAspect | out | Pixel aspect ratio. |
byte | projectionType | out | Camera projection type. 0 (perspective, default), 1 (front), 2 (top), 3 (left), 4 (back), 5 (bottom), 6 (right). |
setResolution
Sets camera resolution.
Language | Syntax |
---|---|
C++ | byte setResolution( dword xRes, dword yRes ) |
Python | int setResolution( int xRes, int yRes ) |
Return value
0 = Error setting camera resolution.
1 = Success.
getResolution
Gets camera resolution.
Language | Syntax |
---|---|
C++ | byte getResolution( dword& xRes, dword& yRes) |
Python | (x,y) getResolution() |
Return value
C++
0 = Error getting camera resolution.
1 = Success.
Python
(x,y) = Tuple containing width and height.
setFilmSize
Sets camera film size ( 0.001 - 10000.0 meters ). Default = 0.035 x 0.024.
Language | Syntax |
---|---|
C++ | byte setFilmSize( real filmWidth, real filmHeight ) |
Python | int setFilmSize( float filmWidth, float filmHeight) |
Return value
0 = Error setting film size.
1 = Success.
getFilmSize
Gets camera film size.
Language | Syntax |
---|---|
C++ | byte getFilmSize( real& filmWidth, real& filmHeight ) |
Python | (x,y) getFilmSize() |
Return value
C++
0 = Error getting camera film size.
1 = Success.
Python
(x,y) = Tuple containing width and height.
setDiaphragm
Sets camera diaphragm.
Language | Syntax |
---|---|
C++ | byte setDiaphragm( const char* pDiaphragmType, real angle, dword nBlades ) |
Python | int setDiaphgragm( str pDiaphgragmType, float angle, int nBlades ) |
Parameters
Type | Name | In/Out | Description |
---|---|---|---|
const char* | pDiaphragmType | in | Diaphgragm type. Must be one of the following values: "CIRCULAR" or "POLYGONAL". |
real | angle | in | Diaphgragm angle. |
dword | nBlades | in | Number of blades (of "POLYGONAL" diaphragm). |
Return value
0 = Error setting camera diaphgragm.
1 = Success.
getDiaphragm
Gets camera diaphragm.
Language | Syntax |
---|---|
C++ | byte getDiaphragm( const char** pDiaphragmType, real& angle, dword& nBlades ) |
Python | [ str 'type', float 'angle', int 'nBlades' ] getDiaphragm() |
Parameters
Type | Name | In/Out | Description |
---|---|---|---|
const char* | pDiaphragmType | out | Diaphgragm type. Can be one of the following values: "CIRCULAR" or "POLYGONAL". |
real | angle | out | Diaphgragm angle. |
dword | nBlades | out | Number of blades (if "POLYGONAL" diaphragm). |
Return value
C++
0 = Error getting camera diaphragm.
1 = Success.
setScreenRegion
Defines a render region for the camera.
Language | Syntax |
---|---|
C++ | byte setScreenRegion( dword x1, dword y1, dword x2, dword y2, const char* pRegionType ) |
Python | int setScreenRegion( int x1, int y1, int x2, int y2, str pRegionType ) |
Parameters
Type | Name | In/Out | Description |
---|---|---|---|
dword | x1 | in | X-axis up-left edge of the region (in pixels) |
dword | y1 | in | Y-axis up-left edge of the region (in pixels) |
dword | x2 | in | X-axis down-right edge of the region (in pixels) |
dword | y2 | in | Y-axis down-right edge of the region (in pixels) |
const char* | pRegionType | in | Region type. Must be one of the following values: "REGION" or "BLOW UP". |
Return value
0 = Error setting screen region.
1 = Success.
getScreenRegion
Gets the render screen region of the camera.
Language | Syntax |
---|---|
C++ | byte getScreenRegion( dword& x1, dword& y1, dword& x2, dword& y2, char* pType ) |
Python | [ int 'x1', int 'y1', int 'x2', int 'y2', str 'type' ] getScreenRegion() |
Parameters
Type | Name | In/Out | Description |
---|---|---|---|
dword | x1 | out | X-axis up-left edge of the region (in pixels) |
dword | y1 | out | Y-axis up-left edge of the region (in pixels) |
dword | x2 | out | X-axis down-right edge of the region (in pixels) |
dword | y2 | out | Y-axis down-right edge of the region (in pixels) |
const char* | pRegionType | out | Region type. Must be one of the following values: "REGION" or "BLOW UP". |
Return value
C++
0 = Error setting screen region.
1 = Success.