This type of extensions create geometry on-the-fly at render time. They are used to render objects described by mathematical expressions rather than vertices and faces. This class is defined in mx_geometryextension.h
Code Block |
---|
class CgeometryProceduralExtension : public CbaseExtension { public: virtual bool intersect( Cmaxwell::Cobject* object, const Cpoint& rayOrigin, const Cvector& dir, real time, const dword subVolumeIndex, Cvector* pNormal, Cvector* pLocalImpact, CfVector &data, Cvector& parametricUVW, Cvector& tangentU, Cvector& tangentV ) = 0; virtual void getBoundingBox( Cpoint *bboxPoints, float time ) = 0; virtual dword getNumSubVolumes( void ) { return 1; }; virtual void getSubVolumeBoundingBox( Cpoint *bboxPoints, dword subVolumeIndex, float time ) { getBoundingBox( bboxPoints, time ); }; virtual byte getNumberOfUVGenerators( void ) { return 0; }; virtual const char* getUVGeneratorName( byte index ) { return NULL; }; virtual byte getUVForChannel( CfVector& uvw, const Cpoint& point, const Cpoint& normal, dword iGenerator, dword subVolIndex, const Cvector& parametricUVW ) { uvw.assign( 0.f, 0.f, 0.f ); return 1; }; virtual bool isOverlappingBoundingBox( const Cpoint *bboxPoints, dword subVolumeIndex, bool forceHalfTime ) { return true; }; virtual bool getProxyDisplayPoints( const dword& percent, const dword& maxPoints, dword& nPoints, float*& points ) { return false; }; virtual bool getProxyDisplayLines( const dword& percent, const dword& maxLines, dword& nPoints, float*& points, dword& nLines, dword*& pointsPerLine ) { return false; } virtual bool getProxyDisplayFaces( const dword& percent, const dword& maxFaces, dword& nPoints, float*& points, dword& nFaces, dword*& faces ) { return false; } }; |
...