6 #include "custtrans.hxx"
7 void _ssgPushMatrix ( sgMat4 m );
9 void _ssgReadInt ( FILE *fd, int *var );
10 void _ssgWriteInt ( FILE *fd, const int var );
11 extern sgMat4 _ssgOpenGLAxisSwapMatrix;
13 void SGCustomTransform::copy_from( SGCustomTransform *src, int clone_flags )
15 ssgBranch::copy_from( src, clone_flags );
16 _callback = src->_callback;
20 ssgBase *SGCustomTransform::clone( int clone_flags )
22 SGCustomTransform *b = new SGCustomTransform;
23 b -> copy_from( this, clone_flags );
28 SGCustomTransform::SGCustomTransform()
29 : _callback(0),_data(0)
31 type = ssgTypeBranch();
34 SGCustomTransform::~SGCustomTransform()
38 void SGCustomTransform::cull( sgFrustum *f, sgMat4 m, int test_needed )
40 if ( ! preTravTests( &test_needed, SSGTRAV_CULL ) )
45 _callback( tmp, f, m, _data );
47 _ssgPushMatrix( tmp );
49 glLoadMatrixf( (float *) tmp );
51 for ( ssgEntity *e = getKid ( 0 ); e != NULL; e = getNextKid() )
52 e -> cull( f, tmp, test_needed );
57 postTravTests( SSGTRAV_CULL );
61 const char *SGCustomTransform::getTypeName (void) { return "SGCustomTransform"; }