Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagecpp
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-1],[0,yRes-1] 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 );
    }
};

...