5 #include "custtrans.hxx"
6 void _ssgPushMatrix ( sgMat4 m );
9 void SGCustomTransform::copy_from( SGCustomTransform *src, int clone_flags )
11 ssgBranch::copy_from( src, clone_flags );
12 _callback = src->_callback;
16 ssgBase *SGCustomTransform::clone( int clone_flags )
18 SGCustomTransform *b = new SGCustomTransform;
19 b -> copy_from( this, clone_flags );
24 SGCustomTransform::SGCustomTransform()
25 : _callback(0),_data(0)
27 type = ssgTypeBranch();
30 SGCustomTransform::~SGCustomTransform()
34 void SGCustomTransform::cull( sgFrustum *f, sgMat4 m, int test_needed )
36 if ( ! preTravTests( &test_needed, SSGTRAV_CULL ) )
41 _callback( tmp, f, m, _data );
43 _ssgPushMatrix( tmp );
45 glLoadMatrixf( (float *) tmp );
47 for ( ssgEntity *e = getKid ( 0 ); e != NULL; e = getNextKid() )
48 e -> cull( f, tmp, test_needed );
53 postTravTests( SSGTRAV_CULL );
57 const char *SGCustomTransform::getTypeName (void) { return "SGCustomTransform"; }