DeformLandscape Class Reference

#include <DeformLandscape.h>

List of all members.

Public Types

enum  DeformType { eDeformLandscapeUp = 1, eDeformLandscapeDown = 2, eFlattenArea = 3 }

Static Public Member Functions

static bool deformLandscape (ScorchedContext &context, FixedVector &pos, fixed radius, bool down, DeformPoints &map)
static void flattenArea (ScorchedContext &context, FixedVector &tankPos, bool removeObjects=true, fixed size=2)
static void clearInfos ()
static std::vector
< DeformInfo > & 
getInfos ()
static void applyInfos (ScorchedContext &context, std::vector< DeformInfo > &infos, ProgressCounter *counter=0)

Static Private Member Functions

static bool deformLandscapeInternal (ScorchedContext &context, FixedVector &pos, fixed radius, bool down, DeformPoints &map, bool setNormals)
static void flattenAreaInternal (ScorchedContext &context, FixedVector &tankPos, bool removeObjects, fixed size, bool setNormals)

Static Private Attributes

static std::vector
< DeformInfo
deformInfos_

Classes

struct  DeformInfo
struct  DeformPoints


Detailed Description

Definition at line 30 of file DeformLandscape.h.


Member Enumeration Documentation

enum DeformLandscape::DeformType

Enumerator:
eDeformLandscapeUp 
eDeformLandscapeDown 
eFlattenArea 

Definition at line 37 of file DeformLandscape.h.


Member Function Documentation

bool DeformLandscape::deformLandscape ( ScorchedContext context,
FixedVector pos,
fixed  radius,
bool  down,
DeformPoints map 
) [static]

Definition at line 39 of file DeformLandscape.cpp.

References ActionController::addSyncCheck(), deformInfos_, deformLandscapeInternal(), eDeformLandscapeDown, eDeformLandscapeUp, S3D::formatStringBuffer(), ScorchedContext::getActionController(), fixed::getInternal(), ScorchedContext::getOptionsGame(), ScorchedContext::getServerMode(), DeformLandscape::DeformInfo::pos, DeformLandscape::DeformInfo::radius, and DeformLandscape::DeformInfo::type.

Referenced by Explosion::simulate().

void DeformLandscape::flattenArea ( ScorchedContext context,
FixedVector tankPos,
bool  removeObjects = true,
fixed  size = 2 
) [static]

Definition at line 180 of file DeformLandscape.cpp.

References ActionController::addSyncCheck(), deformInfos_, eFlattenArea, flattenAreaInternal(), S3D::formatStringBuffer(), ScorchedContext::getActionController(), TargetSpace::getCollisionSet(), TargetState::getFlattenDestroy(), fixed::getInternal(), ScorchedContext::getOptionsGame(), Target::getPlayerId(), ScorchedContext::getServerMode(), ScorchedContext::getTargetContainer(), ScorchedContext::getTargetSpace(), Target::getTargetState(), Target::isTarget(), DeformLandscape::DeformInfo::pos, DeformLandscape::DeformInfo::radius, TargetContainer::removeTarget(), and DeformLandscape::DeformInfo::type.

Referenced by TankFalling::collision(), PlacementTankPosition::flattenTankPositions(), Teleport::simulate(), Resurrection::simulate(), TankMovement::simulationMove(), and PlacementShadowDefinition::updateLandscapeHeight().

void DeformLandscape::clearInfos (  )  [static]

Definition at line 269 of file DeformLandscape.cpp.

References deformInfos_.

Referenced by LandscapeMaps::generateMaps().

static std::vector<DeformInfo>& DeformLandscape::getInfos (  )  [inline, static]

Definition at line 61 of file DeformLandscape.h.

References deformInfos_.

Referenced by ServerNewGameState::addTanksToGame().

void DeformLandscape::applyInfos ( ScorchedContext context,
std::vector< DeformInfo > &  infos,
ProgressCounter counter = 0 
) [static]

Definition at line 274 of file DeformLandscape.cpp.

References deformInfos_, deformLandscapeInternal(), eDeformLandscapeDown, eDeformLandscapeUp, eFlattenArea, flattenAreaInternal(), LandscapeMaps::getGroundMaps(), GroundMaps::getHeightMap(), ScorchedContext::getLandscapeMaps(), HeightMap::getMapHeight(), HeightMap::getMapWidth(), HeightMap::getNormal(), int(), LANG_RESOURCE, DeformLandscape::DeformInfo::pos, DeformLandscape::DeformInfo::radius, ProgressCounter::setNewOp(), ProgressCounter::setNewPercentage(), and DeformLandscape::DeformInfo::type.

Referenced by ClientNewGameHandler::actualProcessMessage().

bool DeformLandscape::deformLandscapeInternal ( ScorchedContext context,
FixedVector pos,
fixed  radius,
bool  down,
DeformPoints map,
bool  setNormals 
) [static, private]

Definition at line 64 of file DeformLandscape.cpp.

References fixed::asInt(), DIALOG_ASSERT, LandscapeMaps::getGroundMaps(), HeightMap::getHeight(), GroundMaps::getHeightMap(), ScorchedContext::getLandscapeMaps(), HeightMap::getMapHeight(), HeightMap::getMapWidth(), HeightMap::getNormal(), int(), DeformLandscape::DeformPoints::map, HeightMap::setHeight(), fixed::sin(), and fixed::XPIO2.

Referenced by applyInfos(), and deformLandscape().

void DeformLandscape::flattenAreaInternal ( ScorchedContext context,
FixedVector tankPos,
bool  removeObjects,
fixed  size,
bool  setNormals 
) [static, private]

Definition at line 225 of file DeformLandscape.cpp.

References fixed::asInt(), LandscapeMaps::getGroundMaps(), GroundMaps::getHeightMap(), ScorchedContext::getLandscapeMaps(), HeightMap::getMapHeight(), HeightMap::getMapWidth(), HeightMap::getNormal(), and HeightMap::setHeight().

Referenced by applyInfos(), and flattenArea().


Member Data Documentation

std::vector< DeformLandscape::DeformInfo > DeformLandscape::deformInfos_ [static, private]

Definition at line 67 of file DeformLandscape.h.

Referenced by applyInfos(), clearInfos(), deformLandscape(), flattenArea(), and getInfos().


The documentation for this class was generated from the following files:
Generated on Mon Feb 16 15:15:01 2009 for Scorched3D by  doxygen 1.5.3