Zap::Barrier Class Reference
#include <barrier.h>
Inheritance diagram for Zap::Barrier:
Detailed Description
The
Barrier class represents rectangular barriers that player controlled
Ship instances cannot pass through.
Barrier objects, once created, never change state, simplifying the pack/unpack update methods. Barriers are constructed as an expanded line segment.
Member Enumeration Documentation
|
- Enumeration values:
-
BarrierWidth |
The width, in game units of the barrier. |
|
Constructor & Destructor Documentation
Member Function Documentation
void Zap::Barrier::onAddedToGame |
( |
Game * |
theGame |
) |
[virtual] |
|
|
Adds the server object to the net interface's scope always list.
Reimplemented from Zap::GameObject. |
void Zap::Barrier::render |
( |
U32 |
layer |
) |
[virtual] |
|
|
renders this barrier by drawing the render line segments,
Reimplemented from Zap::GameObject. |
S32 Zap::Barrier::getRenderSortValue |
( |
|
) |
[inline, virtual] |
|
|
returns a sorting key for the object. Barriers should sort behind other objects
Reimplemented from Zap::GameObject. |
bool Zap::Barrier::getCollisionPoly |
( |
Vector< Point > & |
polyPoints |
) |
[virtual] |
|
|
returns the collision polygon of this barrier, which is the boundary extruded from the start,end line segment.
Reimplemented from Zap::GameObject. |
bool Zap::Barrier::collide |
( |
GameObject * |
otherObject |
) |
[inline, virtual] |
|
void Zap::Barrier::clipRenderLinesToPoly |
( |
Vector< Point > & |
polyPoints |
) |
|
|
|
clips the current set of render lines against the polygon passed as polyPoints.
|
Zap::Barrier::TNL_DECLARE_CLASS |
( |
Barrier |
|
) |
|
|
Field Documentation
|
The start point of the barrier.
|
|
The end point of the barrier.
|
|
Global counter that is incremented every time a new barrier is added on the client.
|
|
Index to check against the global counter - if it is different, then this barrier's polygon outline will be clipped against all adjacent barriers.
|
|
The clipped line segments representing this barrier.
|