Public Member Functions
Camera Class Reference

Detailed Description

The Camera object represents a Softimage camera in a scene.

You can create a Camera with X3DObject::AddCamera. A new camera always has its interest located at the origin of the scene's 3D world.

        using namespace XSI;
        Application app;
        Model root = app.GetActiveSceneRoot();

        CameraRig myCamRig;
        root.AddCameraRig( L"Camera", L"", myCamRig );

        Camera myCam(myCamRig.GetCamera());
        X3DObject myCamInterest(myCam.GetInterest());

        CString strCamName( myCam.GetName() );
        app.LogMessage( L"Camera interest" );
        app.LogMessage( strCamName + L" " + myCam.GetInterest().GetName() );

        app.LogMessage( strCamName + L"'s near parameter: " + myCam.GetParameterValue(CString(L"near")).GetAsText() );
        app.LogMessage( strCamName + L"'s far parameter: " +  myCam.GetParameterValue(CString(L"far")).GetAsText() );
        app.LogMessage( strCamName + L"'s orthoheight parameter: " + myCam.GetParameterValue(CString(L"orthoheight")).GetAsText() );
        app.LogMessage( strCamName + L"'s fov parameter: " + myCam.GetParameterValue(CString(L"fov")).GetAsText() );

#include <xsi_camera.h>

Inheritance diagram for Camera:
Inheritance graph

List of all members.

Public Member Functions

 Camera ()
 ~Camera ()
 Camera (const CRef &in_ref)
 Camera (const Camera &in_obj)
bool IsA (siClassID in_ClassID) const
siClassID GetClassID () const
Cameraoperator= (const Camera &in_obj)
Cameraoperator= (const CRef &in_ref)
CRefArray GetShaders () const
siShaderParameterType GetShaderInputType (const CString &in_paramscriptname) const
CRefArray FindShaders (const CString &in_filtername) const
CRefArray GetAllShaders () const
CRefArray GetAllImageClips () const
CStatus GetFrustum (double &out_Left, double &out_Right, double &out_Bottom, double &out_Top) const

Constructor & Destructor Documentation

Camera ( )

Constructs a Camera object.

~Camera ( )

Destroys a Camera object.

Camera ( const CRef in_ref)

Constructs a Camera object from a CRef object.

in_refA reference to a camera.
Camera ( const Camera in_obj)

Constructs a new Camera object from an existing Camera object.

in_objAn existing Camera object to copy into this Camera object.

Member Function Documentation

bool IsA ( siClassID  in_ClassID) const [virtual]

Returns true if this object supports the functionality of a specified class. For example, a Camera is a type of SceneItem, so a Group object supports SceneItem functionality.

in_ClassIDTest if this object supports this class.
True if this object supports the specified class, and false otherwise.

Reimplemented from Directed.

siClassID GetClassID ( ) const [virtual]

Returns the class ID for this object.

The class ID.

Reimplemented from Directed.

Camera& operator= ( const Camera in_obj)

Assigns a Camera object to an existing Camera object.

in_objA Camera object to be copied into this object.
The reinitialized Camera object.
Camera& operator= ( const CRef in_ref)

Assigns a CRef to this Camera object. The Camera object is cleared if the CRef is not a reference to an object that supports the Camera class.

in_refA reference to an object that supports the Camera class.
The reinitialized Camera object.

Reimplemented from Directed.

CRefArray GetShaders ( ) const

Returns an array of references to the Shader objects connected to this camera.

An array of shader references.
siShaderParameterType GetShaderInputType ( const CString in_paramscriptname) const

Returns the input type of a parameter. Before you connect a Shader to the parameter, use Parameter::GetCapabilities to make sure that the parameter supports the siTexturable capability.

in_paramscriptnameThe script name of a parameter.
The shader input type (one of the siShaderParameterType values). If the parameter cannot be connected to a shader, siUnknownParameterType is returned.
CRefArray FindShaders ( const CString in_filtername) const

Returns all shaders that match a filter. For example, you can write a custom filter that matches shaders with texturespace and colormap parameters, and then use this custom filter with this function.

in_filternameThe name of a shader Filter (for example, siShaderFilter).
An array of references to shaders that match the filter.
CRefArray GetAllShaders ( ) const

Returns a list of the shaders nested under this camera.

CRefArray of references to the nested Shader objects.
CRefArray GetAllImageClips ( ) const

Returns a list of the image clips nested under this Camera.

CRefArray of references to the nested ImageClip2 objects.
See also:
Light::GetAllImageClips, Material::GetAllImageClips, Pass:GetAllImageClips, Shader::GetAllImageClips, Override::GetAllImageClips
CStatus GetFrustum ( double &  out_Left,
double &  out_Right,
double &  out_Bottom,
double &  out_Top 
) const

Returns the camera frustum values of the near plane.

out_LeftThe left value.
out_RightThe right value.
out_BottomThe bottom value.
out_TopThe top value.
Whether the execution failed or not.
11.0 (2013)

The documentation for this class was generated from the following file: