34 |
#include <GL/gl.h> |
#include <GL/gl.h> |
35 |
|
|
36 |
#include <vob/Primitives.hxx> |
#include <vob/Primitives.hxx> |
37 |
|
#include <vob/LinearPrimitives.hxx> |
38 |
#include <vob/Debug.hxx> |
#include <vob/Debug.hxx> |
39 |
|
|
40 |
namespace Vob { |
namespace Vob { |
44 |
|
|
45 |
/** Base class for... */ |
/** Base class for... */ |
46 |
class DisablableIdentity : |
class DisablableIdentity : |
47 |
public PrimitiveTransform, |
public Box, |
48 |
public DisablablePrimitiveTransform { |
public DisablablePrimitiveTransform { |
49 |
public: |
public: |
50 |
bool enabled; |
bool enabled; |
51 |
|
|
52 |
|
DisablableIdentity() : Box(Pt(1,1)) { } |
53 |
|
|
54 |
bool shouldBeDrawn() const { |
bool shouldBeDrawn() const { |
55 |
if (dbg_cull) printf("\nCull.shouldBeDrawn() called;"); |
if (dbg_cull) printf("\nCull.shouldBeDrawn() called;"); |
56 |
return enabled; |
return enabled; |
70 |
public: |
public: |
71 |
enum { NDepends = 3 }; |
enum { NDepends = 3 }; |
72 |
template<class SPtr> void setParams(SPtr depends) { |
template<class SPtr> void setParams(SPtr depends) { |
73 |
|
box = depends[0]->getSqSize(); |
74 |
if (cullShouldBeDrawn(depends[1], depends[2])) enabled = true; |
if (cullShouldBeDrawn(depends[1], depends[2])) enabled = true; |
75 |
else enabled = false; |
else enabled = false; |
76 |
|
|