Class GenCamera

3DS Max Plug-In SDK

Class GenCamera

See Also: Class CameraObject, Class Interval, Class Control.

class GenCamera : public CameraObject

Description:

This class describes a generic camera object. It is used as a base class for creating plug-in cameras. Methods of this class are used to get and set properties of the camera. All methods of this class are implemented by the plug-in.

Methods:

Prototype:

virtual GenCamera *NewCamera(int type)=0;

Remarks:

Creates a new generic camera object.

Parameters:

int type

Nonzero if the camera has a target; otherwise 0.

Return Value:

A pointer to a new instance of the specified light type.

Prototype:

virtual void SetConeState(int s)=0;

Remarks:

Sets if the camera cone is displayed in the viewports.

Parameters:

int s

Nonzero to display the camera cone; otherwise 0.

Prototype:

virtual int GetConeState()=0;

Remarks:

Returns TRUE if the camera cone is displayed in the viewports; otherwise FALSE.

Prototype:

virtual void SetHorzLineState(int s)=0;

Remarks:

Sets if the camera has a horizon line displayed.

Parameters:

int s

Nonzero to display the horizon line; otherwise 0.

Prototype:

virtual int GetHorzLineState()=0;

Remarks:

Returns TRUE if the camera has a horizon line displayed; otherwise FALSE.

Prototype:

virtual void Enable(int enab)=0;

Remarks:

Enables or disables the camera. If enabled the camera may be displayed, hit tested, etc.

Parameters:

int enab

Nonzero to enable; zero to disable.

Prototype:

virtual BOOL SetFOVControl(Control *c)=0;

Remarks:

Sets the controller for the field-of-view parameter.

Parameters:

Control *c

Points to the controller to set.

Return Value:

Returns TRUE if set; otherwise FALSE.

Prototype:

virtual Control *GetFOVControl()=0;

Remarks:

Returns the controller for the field-of-view parameter.

Prototype:

virtual void SetFOVType(int ft)=0;

Remarks:

This method is available in release 3.0 and later only.

Sets the Field-Of-View type of the camera.

Parameters:

int ft

One of the following values:

FOV_W

Width-related FOV

FOV_H

Height-related FOV

FOV_D

Diagonal-related FOV

Prototype:

virtual int GetFOVType()=0;

Remarks:

This method is available in release 3.0 and later only.

Returns the Field-Of-View type of the camera. One of the following values:

FOV_W

Width-related FOV

FOV_H

Height-related FOV

FOV_D

Diagonal-related FOV

Prototype:

virtual int Type()=0;

Remarks:

This method is available in release 3.0 and later only.

Returns one of the following values to indicate the camera type:

FREE_CAMERA (No Target)

TARGETED_CAMERA (Target / Look At Controller)

PARALLEL_CAMERA (Orthographic Camera)

Prototype:

virtual void SetType(int tp)=0;

Remarks:

This method is available in release 3.0 and later only.

Sets the type of camera.

Parameters:

int tp

One of the following types:

FREE_CAMERA (No Target)

TARGETED_CAMERA (Target / Look At Controller)

PARALLEL_CAMERA (Orthographic Camera)