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.
Constructs an AlImagePlane wrapper object.
Deletes an AlImagePlane wrapper object.
Makes a copy of the AlImagePlane. The returned AlCamera will reference the same data as the original.
Returns the class identifier kImagePlaneType.
Deletes the image object.
Returns the next image plane in the universe.
Returns the next ImagePlane in the who universe, no for the given camera. The best way to walk the ImagePlanes for a camera is AlCamera::applyIteratorToImagePlanes.
Returns the previous ImagePlane in the who universe.
Returns the previous ImagePlane in the universe for the given camera. The best way to walk the ImagePlanes for a camera is AlCamera::applyIteratorToImagePlanes.
Returns the next ImagePlane in the universe by pointing the current wrapper to the next image plane object.
sSuccess - the wrapper now points to the next object
sFailure - there is no next imageplane
sInvalidObject - the image plane was invalid
Returns the next ImagePlane in the universe that is associated with the same camera. The current wrapper will now point to the next image plane object in the list.
sSuccess - the wrapper now points to the next object
sFailure - there is no next imageplane
sInvalidObject - the image plane was invalid
Returns the previous ImagePlane in the universe by pointing the current wrapper to the previous image plane object.
sSuccess - the wrapper now points to the previous object
sFailure - there is no previous imageplane before the current one
sInvalidObject - the image plane was invalid
Returns the previous ImagePlane in the universe that is associated with the same camera. The current wrapper will now point to the previous image plane object in the list.
sSuccess - the wrapper now points to the previous object
sFailure - there is no next imageplane
sInvalidObject - the image plane was invalid
Returns the name of the image plane.
Sets the name of the image plane.
< newName - the new name for the image plane
sSuccess - the name was set
sFailure - the name could not be changed
Returns the filename of the image plane.
Sets the filename of the image plane.
< newName - the new filename for the image plane
sSuccess - the name was set
sFailure - the name could not be changed
Returns the display mode of the image plane.
> dm - the variable to place the result in
sSuccess - the display mode was returned
sInvalidObject - the image plane was invalid
Sets the display mode of the image plane. The available display modes are kDisplayOff, kRGB, kColourMap, kOutline, kFilled
< dm - the new display mode
sSuccess - the display mode was set
sInvalidArgument - an unknown display mode was specified
sInvalidObject - the image plane was invalid
Returns the RGBA multipliers of the image plane. Values of 1,1,1,1 will produce no change. 0,0,0,0 will result in a black image.
> r,g,b,a - the returned red, green, blue and alpha values
sSuccess - the multipliers were retrieved
sInvalidObject - the image plane was invalid
sFailure - the rgba values could not be read
Sets the RGB multiplier of the image plane.
< r,g,b,a - the new red, green, blue and alpha values
sSuccess - the multipliers were set
sInvalidObject - the image plane was invalid
sFailure - the rgba values could not be set
Returns the RGBA offsets of the image plane. These values are added to each RGBA value.
> r,g,b,a - the returned red, green, blue and alpha values
sSuccess - the offset was retrieved
sInvalidObject - the image plane was invalid
sFailure - the rgba values could not be read
Sets the RGB multiplier of the image plane.
< r,g,b,a - the red, green, blue and alpha values
sSuccess - the multipliers were set
sInvalidObject - the image plane was invalid
sFailure - the rgba values could not be set
Returns the frame type parameters of the image plane.
> ft - the returned type of the frame parameters
> ftp - the returned values for the parameters
sSuccess - the parameters were retrieved
sInvalidObject - the image plane was invalid
sFailure - the parameters could not be retrieved
Sets the frame type parameters of the image plane. The frame type must be one of kFrameOff, kRegular or kKeyframe.
< ft - the type of the frame parameters
< ftp - the values for the parameters
sSuccess - the parameters were set
sInvalidObject - the image plane was invalid
sFailure - the parameters could not be set
sInvalidArgument - an invalid frame type was given
Returns the width and height in pixels of the underlying image.
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.
Returns the mask type parameters of the image plane.
> ft - the returned type of the mask parameters
> ftp - the returned values for the parameters
sSuccess - the parameters were retrieved
sInvalidObject - the image plane was invalid
sFailure - the parameters could not be retrieved
Sets the mask type parameters of the image plane. The frame type must be one of kMaskOff, kImage, kKeyframe or kFile.
< ft - the type of the mask parameters
< ftp - the values for the parameters
sSuccess - the parameters were set
sInvalidObject - the image plane was invalid
sFailure - the parameters could not be set
sInvalidArgument - an invalid mask type was given
Returns the state of the mask invert flag.
> b - the returned state of the flag
sSuccess - the state was returned
sInvalidObject - the image plane was invalid
Sets the state of the mask invert flag.
< b - the new state of the flag
sSuccess - the state was set
sInvalidObject - the image plane was invalid
sFailure - the flag could not be set
Returns the state and value of the depth type.
> dt - the returned depth type
> depth - a pointer to a variable to place the depth (if not NULL)
sSuccess - the type was returned
sInvalidObject - the image plane was invalid
sFailure - the type could not be determined
Sets the state and value of the depth type.
< dt - the new depth type
< depth - if non-NULL, then this points to the value of the depth
sSuccess - the depth type was returned
sInvalidObject - the image plane was invalid
sFailure - the depth type could not be set
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.
< spaceType - the space type parameters to return
> spaceTypeParams - the returned values of the space type
> spaceParams - the returned values of the wrap and origin values
sSuccess - the parameters were returned
sInvalidObject - the image plane was invalid
sFailure - the parameters could not be read
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.
< spaceType - the set of space parameters to set
< spaceTypeParams - the new values of the space type
< spaceParams - the new values of the wrap and origin values
sSuccess - the parameters were set
sInvalidObject - the image plane was invalid
sFailure - the parameters could not be set