Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 27 Next »

C++Python
Cmaxwell::CcameraCmaxwellCamera

Camera description.

Inherits from

Cpointer

Sub-classes

Citerator

Methods

NameDescription
setStepSets the camera parameters that can change in an animation.
getStepGets the camera parameteres that can change in an animation.
setOrthoValues 
getOrthoValues 
getValuesGets the camera parameters that cannot change in an animation.
setNameSets camera name.
getNameGets camera name.
setResolutionSets camera resolution.
getResolutionGets camera resolution.
setPixelAspectSets camera pixel aspect.
getPixelAspectGets camera pixel aspect.
setShutterSets camera shutter.
getShutterGets camera shutter.
setIsoSets camera ISO.
getIsoGets camera ISO.
setFilmSizeSets camera film size.
getFilmSizeGets camera film size.
setDiaphragmSets camera diaphragm.
getDiaphragmGets camera diaphragm.
setFPSSets camera FPS.
getFPSGets camera FPS.
setScreenRegionDefines a render region for the camera.
getScreenRegionGets render region defined.
setCutPlanesSets camera cut planes.
getCutPlanesGets camera cut planes.
setShiftLensSets camera shift lens.
getShiftLensGets camera shift lens.
setHideSets camera hidden status.
isHideGets camera hidden status.
setUuidSets camera unique ID. For custom purposes.
getUuidGets camera unique ID. For custom purposes.
setUserData 
getUserData 
setActiveSets the active camera in case the scene have more than one.
setDirty 
isDirty 
freeDestroys the camera.

Inherited methods

NameDescription
isNullChecks 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...).

LanguageSyntax
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

TypeNameIn/OutDescription
dwordiStepinStep number.
CpointorigininCamera position.
CpointfocalPointinCamera focus point.
CvectorupinCamera up vector.
realfocalLenghtinCamera focal lenght (mm).
realfStopinCamera f-Stop.
bytefocalLenghtNeedCorrectioninIndicates 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...).

LanguageSyntax
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

TypeNameIn/OutDescription
dwordiStepinStep requested.
CpointoriginoutCamera position.
CpointfocalPointoutCamera target.
CvectorupoutCamera up vector.
realfocalLenghtoutCamera focal lenght (mm).
realfStopoutCamera f-Stop.

Return value

C++

0 = Error getting camera step values.

1 = Success.

setOrthoValues

 

LanguageSyntax
C++byte setOrthoValues( dword iStep, real orthoX, real orthoY, real orthoZoom, real focalLength, real fStop )
Pythonint setOrthoValues( int iStep, float orthoX, float orthoY, float orthoZoom, float focalLength, float fStop )

Parameters

TypeNameIn/OutDescription
dwordiStepinCamera step to be set.
realorthoXin 
realorthoYin 
realorthoZoomin 
realfocalLenghtinCamera focal lenght.
realfStopinCamera f-Stop.

Return values

0 = Error setting ortho values.

1 = Success.

getOrthoValues

 

LanguageSyntax
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

TypeNameIn/OutDescription
dwordiStepinCamera step requested.
realorthoXout 
realorthoYout 
realorthoZoomout 
realfocalLenghtoutCamera focal lenght.
realfStopoutCamera f-Stop.

Return value

0 = Error getting ortho values.

1 = Success.

getValues

Gets the camera parameters that cannot change in an animation.

LanguageSyntax
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

TypeNameIn/OutDescription
dwordnStepsoutNumber of steps.
realshutteroutCamera shutter (1/s).
realfilmWidthoutCamera film width (mm).
realfilmHeightoutCamera film height (mm).
realisooutCamera ISO.
const char**pDiaphragmTypeoutDiaphragm type. Possible values: "CIRCULAR" and "POLYGONAL".
realangleoutShutter angle. --TODO--
dwordnBladesoutNumber of diaphragm blades if pDiaphragmType is "POLYGONAL".
dwordfpsoutFrames per second.
dwordxResoutResolution output width.
dwordyResoutResolution output height.
realpixelAspectoutPixel aspect ratio.
byteprojectionTypeoutCamera projection type. 0 (perspective, default), 1 (front), 2 (top), 3 (left), 4 (back), 5 (bottom), 6 (right).

setResolution

Sets camera resolution.

LanguageSyntax
C++byte setResolution( dword xRes, dword yRes )
Pythonint setResolution( int xRes, int yRes )

Return value

0 = Error setting camera resolution.

1 = Success.

getResolution

Gets camera resolution.

LanguageSyntax
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.

LanguageSyntax
C++byte setFilmSize( real filmWidth, real filmHeight )
Pythonint setFilmSize( float filmWidth, float filmHeight)

Return value

0 = Error setting film size.

1 = Success.

getFilmSize

Gets camera film size.

LanguageSyntax
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.

LanguageSyntax
C++byte setDiaphragm( const char* pDiaphragmType, real angle, dword nBlades )
Pythonint setDiaphgragm( str pDiaphgragmType, float angle, int nBlades )

Parameters

TypeNameIn/OutDescription
const char*pDiaphragmTypeinDiaphgragm type. Must be one of the following values: "CIRCULAR" or "POLYGONAL".
realangleinDiaphgragm angle.
dwordnBladesinNumber of blades (of "POLYGONAL" diaphragm).

Return value

0 = Error setting camera diaphgragm.

1 = Success.

getDiaphragm

Gets camera diaphragm.

LanguageSyntax
C++byte getDiaphragm( const char** pDiaphragmType, real& angle, dword& nBlades )
Python[ str 'type', float 'angle', int 'nBlades' ] getDiaphragm()

Parameters

TypeNameIn/OutDescription
const char*pDiaphragmTypeoutDiaphgragm type. Can be one of the following values: "CIRCULAR" or "POLYGONAL".
realangleoutDiaphgragm angle.
dwordnBladesoutNumber of blades (if "POLYGONAL" diaphragm).

Return value

C++

0 = Error getting camera diaphragm.

1 = Success.

setScreenRegion

Defines a render region for the camera.

LanguageSyntax
C++byte setScreenRegion( dword x1, dword y1, dword x2, dword y2, const char* pRegionType )
Pythonint setScreenRegion( int x1, int y1, int x2, int y2, str pRegionType )

Parameters

TypeNameIn/OutDescription
dwordx1inX-axis up-left edge of the region (in pixels)
dwordy1inY-axis up-left edge of the region (in pixels)
dwordx2inX-axis down-right edge of the region (in pixels)
dwordy2inY-axis down-right edge of the region (in pixels)
const char*pRegionTypeinRegion 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.

LanguageSyntax
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

TypeNameIn/OutDescription
dwordx1outX-axis up-left edge of the region (in pixels)
dwordy1outY-axis up-left edge of the region (in pixels)
dwordx2outX-axis down-right edge of the region (in pixels)
dwordy2outY-axis down-right edge of the region (in pixels)
const char*pRegionTypeoutRegion type. Must be one of the following values: "REGION" or "BLOW UP".

Return value

C++

0 = Error setting screen region.

1 = Success.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  • No labels