Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

This kind of extensions implement camera lenses. This class is defined in mx_cameraextension.h. 

class CcameraLensExtension : public CbaseExtension
{
public:
    virtual bool initializeForRendering( Cmaxwell::Ccamera& camera, Cmaxwell* pMaxwell ) = 0;
    
    // Returns camera origin and direction (normalized) in world coordinates, given a point in the 2D buffer (in [0,xRes],[0,yRes] range)
    virtual bool getCameraRay( Cpoint& origin, Cvector& direction, const Cvector2D& bufferPoint ) = 0;
    // Returns true if the lens has real area or false if this is an ideal lens (pinhole, spherical, etc)
    virtual bool hasArea( void ) const
    {
        return ( false );
    }
    // Returns true if the lens supports Bidirectional Path Tracing
    virtual bool supportsBPT( void ) const
    {
        return ( false );
    }
    // Returns by reference a 2D point in the film in [1,1] coordinates
    // Returns by value the PDF associated to the given input direction
    // If returned PDF is 0.0 the direction is not valid
    virtual real onLensToFilm( Cvector2D& filmPoint, const Cvector& direction )
    {
        return ( 0.0 );
    }
};


  • No labels