Interface to Alias image planes.
#include <AlImagePlane.h>
class AlImagePlane : public AlObject , public AlAnimatable , public AlPickable
enum AlDisplayMode {
kDisplayOff,
kDisplayUnknown,
kRGB,
kColourMap,
kOutline,
kFilled
};
enum AlFrameType {
kFrameOff,
kRegular,
kKeyframe
};
union AlFrameTypeParams {
struct {
int start;
int end;
int by;
int offset;
} regular;
struct {
int frame;
double offset;
} keyframe;
};
enum AlDepthType {
kDepthOff,
kDepthUnknown,
kPriority
};
enum AlMaskType {
kMaskOff,
kMaskUnknown,
kImage,
kFile,
kChromaKey
};
union AlMaskTypeParams {
struct {
const char *name;
AlFrameType frameType;
AlFrameTypeParams *params;
} file;
struct {
double r;
double g;
double b;
double hue_range;
double sat_range;
double val_range;
double threshold;
} chroma_key;
};
enum AlImageSpaceType {
kScreen,
kFields,
k01,
kWorld
};
union AlImageSpaceTypeParams {
struct {
int size;
} fields;
struct {
int origin_x;
int origin_y;
int size_x;
int size_y;
} screen;
struct {
double tran_x;
double tran_y;
double size_x;
double size_y;
} zero_one;
struct {
double tran_x;
double tran_y;
double size_x;
double size_y;
double pivot_x;
double pivot_y;
} world;
};
struct AlImageSpaceParams {
boolean wrap_horiz;
boolean wrap_vert;
int offset_x;
int offset_y;
int coverage_x;
int coverage_y;
};
AlImagePlane();
virtual ~AlImagePlane();
virtual AlObject* copyWrapper() const;
virtual statusCode deleteObject();
virtual AlObjectType type() const;
virtual const char* name() const;
virtual statusCode setName( const char * );
AlImagePlane* next() const;
AlImagePlane* nextInCamera() const;
AlImagePlane* prev() const;
AlImagePlane* prevInCamera() const;
statusCode nextD();
statusCode nextInCameraD();
statusCode prevD();
statusCode prevInCameraD();
const char* imageFile();
statusCode setImageFile( const char * );
statusCode displayMode( AlDisplayMode & );
statusCode setDisplayMode( AlDisplayMode );
statusCode RGBMult( double&, double&, double&, double& );
statusCode setRGBMult( double, double, double, double );
statusCode RGBOffset( double&, double&, double&, double& );
statusCode setRGBOffset( double, double, double, double );
statusCode frameType( AlFrameType&, AlFrameTypeParams* = NULL );
statusCode setFrameType( AlFrameType, AlFrameTypeParams* = NULL );
statusCode imageSize( int&, int& );
statusCode imageData( void*& );
// The next four functions are not fully supported.
statusCode maskType( AlMaskType&, AlMaskTypeParams* = NULL );
statusCode setMaskType( AlMaskType, AlMaskTypeParams* = NULL );
statusCode maskInvert( boolean& );
statusCode setMaskInvert( boolean );
statusCode depthType( AlDepthType&, double* = NULL );
statusCode setDepthType( AlDepthType, double* = NULL );
// The next two functions are not fully supported.
statusCode imageSpace( AlImageSpaceType, AlImageSpaceTypeParams* = NULL, AlImageSpaceParams* = NULL );
statusCode setImageSpace( AlImageSpaceType, AlImageSpaceTypeParams* = NULL, AlImageSpaceParams* = NULL );
// use kScreen X/Y origin to set the position of the image
// in pixels. Use these to set the pivot (in pixels)
statusCode pivot( double&, double & );
statusCode setPivot( double, double );
Image planes are full colour images that are attached to a camera. If the view from that camera is rendered, they get rendered into the background of the resulting image. This class deals with setting the various parameters of image planes and their associations to cameras.
To create an image plane, you must use the addImagePlane function of AlCamera. That function will return to you a new AlImagePlane object that you can use to set the image plane’s parameters. Given a pointer to an AlImagePlane, you can delete it from Alias using the deleteObject method.
To walk the list of all the image planes in Alias, use AlUniverse::firstImagePlane. You can move from image plane to image plane in the current stage or in a camera, by using the appropriate next method.
For more information about image planes in general, see the online documentation for the camera editor.
statusCode AlImagePlane::RGBMult( double& r, double& g, double& b, double& a )
statusCode AlImagePlane::frameType(AlFrameType& ft,AlFrameTypeParams* ftp)
statusCode AlImagePlane::setFrameType(AlFrameType ft,AlFrameTypeParams* ftp )
statusCode AlImagePlane::imageData( void*& data )
Returns a pointer to the internal image data. The size of the data referenced by the pointer can be determined from imageSize(x,y) above and the type of image. If it is an RGB image the number of bytes in the image is 4 * x * y. The data should be treated as read only.
Note: Under no circumstances should the returned pointer be freed.
statusCode AlImagePlane::maskType(AlMaskType& mt,AlMaskTypeParams* mtp )
statusCode AlImagePlane::setMaskType(AlMaskType mt,AlMaskTypeParams* mtp )
statusCode AlImagePlane::depthType(AlDepthType& dt,double* depth )
statusCode AlImagePlane::setDepthType(AlDepthType dt,double* depth )
statusCode AlImagePlane::imageSpace(AlImageSpaceType spaceType,AlImageSpaceTypeParams* spaceTypeParams,AlImageSpaceParams* spaceParams )
Returns the parameters of the image plane (refer to the camera editor for more details). Use the spaceType to denote the type of parameters that you are requesting information on.
This can be kFields (if the image is in the perspective window), k01, kScreen or kWorld.
statusCode AlImagePlane::setImageSpace(AlImageSpaceType spaceType,AlImageSpaceTypeParams* spaceTypeParams,AlImageSpaceParams* spaceParams )
Sets the parameters of the image plane. The spaceType must be one of kFields, kScreen, kWorld, k01. (This denotes the set of parameters that you want to set. Several calls to this routine may be required to set all of the parameters. Please refer to the camera editor for more details).
Note that world space is only allowed in orthographic windows but not in perspective windows.