#include <xsi_memocamera.h>
The MemoCamera class represents a memo camera control in a view.
using namespace XSI; Application app; // Get the View Manager View vm = app.GetDesktop().GetActiveLayout().GetViews().GetItem( "vm" ); // Get view B (perspective) View viewB = vm.GetViews()[ 1 ]; // Get memocams for view B CRefArray memoCameras = viewB.GetMemoCameras(); app.LogMessage( "Memo camera count for view B: " + CString( memoCameras.GetCount() ) ); // Get View B's camera object Camera camB = app.GetActiveSceneRoot().FindObjects( XSI::siCameraID )[ 0 ]; // Get the camera global KinematicState KinematicState kinestate = camB.GetKinematics().GetGlobal(); // Record 4 memo cameras in view B for ( int index = 0; index < 4; index++ ) { switch( index ) { case 0: kinestate.PutParameterValue( "posx", -10.0 ); kinestate.PutParameterValue( "posy", 2.0 ); kinestate.PutParameterValue( "posz", 20.0 ); break; case 1: kinestate.PutParameterValue( "posx", 0.0 ); break; case 2: kinestate.PutParameterValue( "posx", 10.0 ); break; case 3: kinestate.PutParameterValue( "posx", 0.0 ); kinestate.PutParameterValue( "posy", -2.0 ); break; } MemoCamera memoCamera = memoCameras[ index] ; memoCamera.Record(); }
Public Member Functions |
|
MemoCamera () | |
~MemoCamera () | |
MemoCamera (const CRef &in_ref) | |
MemoCamera (const MemoCamera &in_obj) | |
bool | IsA (siClassID in_ClassID) const |
siClassID | GetClassID () const |
MemoCamera & | operator= (const MemoCamera &in_obj) |
MemoCamera & | operator= (const CRef &in_ref) |
CStatus | Record () const |
CStatus | Recall () const |
CStatus | Reset () const |
MemoCamera | ( | ) |
Default constructor.
~MemoCamera | ( | ) |
Default destructor.
MemoCamera | ( | const CRef & | in_ref | ) |
Constructor.
in_ref | constant reference object. |
MemoCamera | ( | const MemoCamera & | in_obj | ) |
Copy constructor.
in_obj | constant class object. |
bool IsA | ( | siClassID | in_ClassID | ) | const [virtual] |
Returns true if a given class type is compatible with this API class.
in_ClassID | class type. |
Reimplemented from UIObject.
siClassID GetClassID | ( | ) | const [virtual] |
MemoCamera& operator= | ( | const MemoCamera & | in_obj | ) |
Creates an object from another object. The newly created object is set to empty if the input object is not compatible.
in_obj | constant class object. |
MemoCamera& operator= | ( | const CRef & | in_ref | ) |
Creates an object from a reference object. The newly created object is set to empty if the input reference object is not compatible.
in_ref | constant class object. |
Reimplemented from UIObject.
CStatus Record | ( | ) | const |
CStatus Recall | ( | ) | const |
CStatus Reset | ( | ) | const |