[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] libvob/include/vob DisablablePrimitives.hxx
From: |
Tuomas J. Lukka |
Subject: |
[Gzz-commits] libvob/include/vob DisablablePrimitives.hxx |
Date: |
Fri, 14 Mar 2003 10:03:57 -0500 |
CVSROOT: /cvsroot/libvob
Module name: libvob
Changes by: Tuomas J. Lukka <address@hidden> 03/03/14 10:03:48
Modified files:
include/vob : DisablablePrimitives.hxx
Log message:
Move&rename shouldBeDrawns as they should be
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/include/vob/DisablablePrimitives.hxx.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
Patches:
Index: libvob/include/vob/DisablablePrimitives.hxx
diff -u libvob/include/vob/DisablablePrimitives.hxx:1.3
libvob/include/vob/DisablablePrimitives.hxx:1.4
--- libvob/include/vob/DisablablePrimitives.hxx:1.3 Fri Mar 14 09:45:50 2003
+++ libvob/include/vob/DisablablePrimitives.hxx Fri Mar 14 10:03:43 2003
@@ -48,6 +48,11 @@
public:
bool enabled;
+ bool shouldBeDrawn() const {
+ if (dbg_cull) printf("\nCull.shouldBeDrawn() called;");
+ return enabled;
+ }
+
typedef DisablableIdentity InverseType;
void inverse(InverseType &into) const { into = *this; }
};
@@ -62,7 +67,7 @@
public:
enum { NDepends = 3 };
template<class SPtr> void setParams(SPtr depends) {
- if (shouldBeDrawn(depends[1], depends[2])) enabled = true;
+ if (cullShouldBeDrawn(depends[1], depends[2])) enabled = true;
else enabled = false;
if (dbg_cull) {
@@ -71,16 +76,11 @@
}
}
- bool shouldBeDrawn() const {
- if (dbg_cull) printf("\nCull.shouldBeDrawn() called;");
- return enabled;
- }
-
/** Cull transforms' shouldBeDrawn() returns true always when boxes
* of its test and clip coordinate systems do intersect. When
* the boxes don't intersect, it should retun false.
*/
- bool shouldBeDrawn(const Transform *test, const Transform *clip) const {
+ static bool cullShouldBeDrawn(const Transform *test, const Transform
*clip) {
Pt box;
float hyp;
/** Lower left and upper right points of bounding boxes for
@@ -115,8 +115,8 @@
* @param p4 second rectangle, "upper right corner"
* @return true if the given rectangles intersect
*/
- bool parallelRectIntersect(ZPt &p1, ZPt &p2,
- ZPt &p3, ZPt &p4) const {
+ static bool parallelRectIntersect(ZPt &p1, ZPt &p2,
+ ZPt &p3, ZPt &p4) {
return (p2.x > p3.x) && (p4.x > p1.x) && (p2.y > p3.y) && (p4.y > p1.y);
}
@@ -127,8 +127,8 @@
* @param p4 second rectangle, "upper right corner"
* @return true if the given rectangles are within each other.
*/
- bool parallelRectWithin(ZPt &p1, ZPt &p2,
- ZPt &p3, ZPt &p4) const {
+ static bool parallelRectWithin(ZPt &p1, ZPt &p2,
+ ZPt &p3, ZPt &p4) {
return (p1.x <= p3.x) && (p1.y <= p3.y) && (p4.x <= p2.x) && (p4.y <=
p2.y);
}
@@ -139,7 +139,7 @@
* @param p1 "lower left corner"
* @param p2 "upper right corner"
*/
- void findBoundingBox(const Transform *t, ZPt &p1, ZPt &p2) const {
+ static void findBoundingBox(const Transform *t, ZPt &p1, ZPt &p2) {
float i, j;
Pt box = t->getSqSize();
float x1, y1, x2, y2;
@@ -171,7 +171,7 @@
* @param p1 "lower left corner"
* @param p2 "upper right corner"
*/
- void findDistortedBoundingBox(const Transform *t, ZPt &p1, ZPt &p2)
const {
+ static void findDistortedBoundingBox(const Transform *t, ZPt &p1, ZPt
&p2) {
double i, step_x, step_y;
Pt box = t->getSqSize();
float x1, y1, x2, y2;
- [Gzz-commits] libvob/include/vob DisablablePrimitives.hxx,
Tuomas J. Lukka <=