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.

Example:
        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".interest.name: " + 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
[legend]

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
Camera operator= (const Camera &in_obj)
Camera operator= (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

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.

Parameters:
in_ref A reference to a camera.
Camera ( const Camera in_obj )

Constructs a new Camera object from an existing Camera object.

Parameters:
in_obj An 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.

Parameters:
in_ClassID Test if this object supports this class.
Returns:
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.

Returns:
The class ID.

Reimplemented from Directed.

Camera& operator= ( const Camera in_obj )

Assigns a Camera object to an existing Camera object.

Parameters:
in_obj A Camera object to be copied into this object.
Returns:
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.

Parameters:
in_ref A reference to an object that supports the Camera class.
Returns:
The reinitialized Camera object.

Reimplemented from Directed.

CRefArray GetShaders ( ) const

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

Returns:
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.

Parameters:
in_paramscriptname The script name of a parameter.
Returns:
The shader input type (one of the siShaderParameterType values). If the parameter cannot be connected to a shader, siUnknownParameterType is returned.
Since:
5.0
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.

Parameters:
in_filtername The name of a shader Filter (for example, siShaderFilter).
Returns:
An array of references to shaders that match the filter.
Since:
5.0
CRefArray GetAllShaders ( ) const

Returns a list of the shaders nested under this camera.

Returns:
CRefArray of references to the nested Shader objects.
Since:
7.0
CRefArray GetAllImageClips ( ) const

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

Returns:
CRefArray of references to the nested ImageClip2 objects.
See also:
Light::GetAllImageClips, Material::GetAllImageClips, Pass:GetAllImageClips, Shader::GetAllImageClips, Override::GetAllImageClips
Since:
7.0

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