55 virtual void Collide(
const Segment &segment, std::list<Collision> &collisions);
67 virtual void Collide(
const Vector2 &point, std::list<Collision> &collisions);
165 if (pCollideable ==
nullptr) {
169 objects.push_back(pChild);
204 std::list<RndCollideable *> mCollides;
Stream of raw bytes, the base of the memory, file, and network streams.
Definition binstream.h:22
Text output stream.
Definition prnstream.h:16
void AcquireCollideRefs()
Take a reference on every child.
void Save(BinStream &stream) override
Write the names of the children.
void Load(BinStream &stream) override
Read what Save() wrote.
virtual void Collide(const Segment &segment, std::list< Collision > &collisions)
Test a segment against the collideable and add what it strikes to a list.
void Replace(RndObject *pFrom, RndObject *pTo) override
Replace a child with another object.
bool AddCollide(RndCollideable *pCollide)
Append a child.
static void CollectChildren(std::list< RndObject * > &objects, RndCollideable *pCollideable)
Append every collision descendant of a collideable, depth first, each before its descendants.
Definition rndcollideable.h:164
void Copy(const RndObject *pSource, int nFlags) override
Copy the children when the flags request them.
void RemoveCollide(RndCollideable *pCollide)
Remove a child.
void ReleaseCollideRefs()
Drop the reference on every child without emptying the list.
RndCollideable * Parent()
Find the collideable whose children include this one.
static int sRev
The format version Save() writes and Load() accepts.
Definition rndcollideable.h:180
void DumpText(PrnStream &stream) override
Write a description of the collideable.
virtual void Collide(const Vector2 &point, std::list< Collision > &collisions)
Test a screen point against the collideable and add what it strikes to a list.
~RndCollideable() override
Drop the references on the children.
RndCollideable()
Construct a collideable without children.
Definition rndcollideable.h:34
RndObject(const char *pszName)
Construct an object and register it under a name.
One recorded intersection.
Definition rndcollideable.h:24
float mDistance
Definition rndcollideable.h:26
RndCollideable * mObject
Definition rndcollideable.h:25
Two points that fix a line or a segment.
Definition plane.h:39
Two-component vector, used for texture coordinates.
Definition vector2.h:12