This commit is contained in:
watrabi
2025-10-28 14:05:46 -04:00
parent 977f1ff4b8
commit c93494f795
452 changed files with 47860 additions and 152 deletions
+57
View File
@@ -0,0 +1,57 @@
/* Copyright 2003-2005 ROBLOX Corporation, All Rights Reserved */
#pragma once
namespace RBX {
class PVInstance;
class TouchType {
private:
friend class PVInstance;
typedef enum {NOTHING, TOUCH_ONLY, INTERSECT} Status;
Status worldExtents;
Status objects;
public:
TouchType() :
worldExtents(NOTHING),
objects(NOTHING)
{}
bool intersectingWorldExtents() {
return (worldExtents == INTERSECT);
}
bool intersectingObject() {
return (objects == INTERSECT);
}
bool intersecting() {
return (intersectingWorldExtents() || intersectingObject());
}
bool touchingWorldExtents() {
return (worldExtents == TOUCH_ONLY);
}
bool touchingObject() {
return (objects == TOUCH_ONLY);
}
bool touching() {
return (touchingWorldExtents() || touchingObject());
}
bool touchingOnlyWorldExtents() {
return (touchingWorldExtents() && !touchingObject());
}
bool nothingFound() {
return ((worldExtents == NOTHING) && (objects == NOTHING));
}
bool touchingNotIntersecting() {
return (touching() && (!intersecting()));
}
bool somethingFound() {
return (!nothingFound());
}
bool intersectsOtherOnly() {
return ((objects == INTERSECT) && (worldExtents == NOTHING));
}
};
} // namespace