Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
GeometryInfo Class Reference

#include <Geometry.h>

Inherits Snapshot.

Public Member Functions

 GeometryInfo (GeometryType type, Bool isSmall, Real height, Real majorRadius, Real minorRadius)
 
void set (GeometryType type, Bool isSmall, Real height, Real majorRadius, Real minorRadius)
 
void setMajorRadius (Real majorRadius)
 
void setMinorRadius (Real minorRadius)
 
GeometryType getGeomType () const
 
Bool getIsSmall () const
 
Real getMajorRadius () const
 
Real getMinorRadius () const
 
Real getBoundingCircleRadius () const
 
Real getBoundingSphereRadius () const
 
Bool isIntersectedByLineSegment (const Coord3D &loc, const Coord3D &from, const Coord3D &to) const
 
Real getFootprintArea () const
 
Real getMaxHeightAbovePosition () const
 
Real getMaxHeightBelowPosition () const
 
Real getZDeltaToCenterPosition () const
 
void getCenterPosition (const Coord3D &pos, Coord3D &center) const
 
void calcPitches (const Coord3D &thisPos, const GeometryInfo &that, const Coord3D &thatPos, Real &minPitch, Real &maxPitch) const
 
void expandFootprint (Real radius)
 expand the 2d footprint
 
void get2DBounds (const Coord3D &geomCenter, Real angle, Region2D &bounds) const
 get the 2d bounding box
 
void makeRandomOffsetWithinFootprint (Coord3D &pt) const
 note that the pt is generated using game logic random, not game client random!
 
void makeRandomOffsetOnPerimeter (Coord3D &pt) const
 
void clipPointToFootprint (const Coord3D &geomCenter, Coord3D &ptToClip) const
 
Bool isPointInFootprint (const Coord3D &geomCenter, const Coord3D &pt) const
 
void setMaxHeightAbovePosition (Real z)
 
- Public Member Functions inherited from Snapshot
 Snapshot (void)
 
 ~Snapshot (void)
 

Static Public Member Functions

static void parseGeometryType (INI *ini, void *, void *store, const void *)
 
static void parseGeometryIsSmall (INI *ini, void *, void *store, const void *)
 
static void parseGeometryHeight (INI *ini, void *, void *store, const void *)
 
static void parseGeometryMajorRadius (INI *ini, void *, void *store, const void *)
 
static void parseGeometryMinorRadius (INI *ini, void *, void *store, const void *)
 

Protected Member Functions

virtual void crc (Xfer *xfer)
 
virtual void xfer (Xfer *xfer)
 
virtual void loadPostProcess (void)
 

Detailed Description

Geometry information

Definition at line 85 of file Geometry.h.

Constructor & Destructor Documentation

◆ GeometryInfo()

GeometryInfo::GeometryInfo ( GeometryType type,
Bool isSmall,
Real height,
Real majorRadius,
Real minorRadius )
inline

Definition at line 114 of file Geometry.h.

Member Function Documentation

◆ calcPitches()

void GeometryInfo::calcPitches ( const Coord3D & thisPos,
const GeometryInfo & that,
const Coord3D & thatPos,
Real & minPitch,
Real & maxPitch ) const
Todo
srj – this could be better, by calcing it for all the corners, not just top-center and bottom-center... oh well

Definition at line 175 of file Geometry.cpp.

◆ clipPointToFootprint()

void GeometryInfo::clipPointToFootprint ( const Coord3D & geomCenter,
Coord3D & ptToClip ) const

Definition at line 328 of file Geometry.cpp.

◆ crc()

void GeometryInfo::crc ( Xfer * xfer)
protectedvirtual

CRC

Implements Snapshot.

Definition at line 558 of file Geometry.cpp.

◆ expandFootprint()

void GeometryInfo::expandFootprint ( Real radius)

expand the 2d footprint

Definition at line 263 of file Geometry.cpp.

◆ get2DBounds()

void GeometryInfo::get2DBounds ( const Coord3D & geomCenter,
Real angle,
Region2D & bounds ) const

get the 2d bounding box

Definition at line 271 of file Geometry.cpp.

◆ getBoundingCircleRadius()

Real GeometryInfo::getBoundingCircleRadius ( ) const
inline

Definition at line 150 of file Geometry.h.

◆ getBoundingSphereRadius()

Real GeometryInfo::getBoundingSphereRadius ( ) const
inline

Definition at line 151 of file Geometry.h.

◆ getCenterPosition()

void GeometryInfo::getCenterPosition ( const Coord3D & pos,
Coord3D & center ) const

Definition at line 256 of file Geometry.cpp.

◆ getFootprintArea()

Real GeometryInfo::getFootprintArea ( ) const

Definition at line 471 of file Geometry.cpp.

◆ getGeomType()

GeometryType GeometryInfo::getGeomType ( ) const
inline

Definition at line 141 of file Geometry.h.

◆ getIsSmall()

Bool GeometryInfo::getIsSmall ( ) const
inline

Definition at line 142 of file Geometry.h.

◆ getMajorRadius()

Real GeometryInfo::getMajorRadius ( ) const
inline

Definition at line 143 of file Geometry.h.

◆ getMaxHeightAbovePosition()

Real GeometryInfo::getMaxHeightAbovePosition ( ) const

Definition at line 215 of file Geometry.cpp.

◆ getMaxHeightBelowPosition()

Real GeometryInfo::getMaxHeightBelowPosition ( ) const

Definition at line 232 of file Geometry.cpp.

◆ getMinorRadius()

Real GeometryInfo::getMinorRadius ( ) const
inline

Definition at line 144 of file Geometry.h.

◆ getZDeltaToCenterPosition()

Real GeometryInfo::getZDeltaToCenterPosition ( ) const

Definition at line 249 of file Geometry.cpp.

◆ isIntersectedByLineSegment()

Bool GeometryInfo::isIntersectedByLineSegment ( const Coord3D & loc,
const Coord3D & from,
const Coord3D & to ) const
Todo
srj – treats everything as a sphere for now. fix.

Definition at line 163 of file Geometry.cpp.

◆ isPointInFootprint()

Bool GeometryInfo::isPointInFootprint ( const Coord3D & geomCenter,
const Coord3D & pt ) const

Definition at line 360 of file Geometry.cpp.

◆ loadPostProcess()

void GeometryInfo::loadPostProcess ( void )
protectedvirtual

Load post process

Implements Snapshot.

Definition at line 602 of file Geometry.cpp.

◆ makeRandomOffsetOnPerimeter()

void GeometryInfo::makeRandomOffsetOnPerimeter ( Coord3D & pt) const

Definition at line 424 of file Geometry.cpp.

◆ makeRandomOffsetWithinFootprint()

void GeometryInfo::makeRandomOffsetWithinFootprint ( Coord3D & pt) const

note that the pt is generated using game logic random, not game client random!

Definition at line 384 of file Geometry.cpp.

◆ parseGeometryHeight()

void GeometryInfo::parseGeometryHeight ( INI * ini,
void * ,
void * store,
const void *  )
static

Definition at line 64 of file Geometry.cpp.

◆ parseGeometryIsSmall()

void GeometryInfo::parseGeometryIsSmall ( INI * ini,
void * ,
void * store,
const void *  )
static

Definition at line 57 of file Geometry.cpp.

◆ parseGeometryMajorRadius()

void GeometryInfo::parseGeometryMajorRadius ( INI * ini,
void * ,
void * store,
const void *  )
static

Definition at line 71 of file Geometry.cpp.

◆ parseGeometryMinorRadius()

void GeometryInfo::parseGeometryMinorRadius ( INI * ini,
void * ,
void * store,
const void *  )
static

Definition at line 78 of file Geometry.cpp.

◆ parseGeometryType()

void GeometryInfo::parseGeometryType ( INI * ini,
void * ,
void * store,
const void *  )
static

Definition at line 50 of file Geometry.cpp.

◆ set()

void GeometryInfo::set ( GeometryType type,
Bool isSmall,
Real height,
Real majorRadius,
Real minorRadius )

Definition at line 85 of file Geometry.cpp.

◆ setMajorRadius()

void GeometryInfo::setMajorRadius ( Real majorRadius)
inline

Definition at line 128 of file Geometry.h.

◆ setMaxHeightAbovePosition()

void GeometryInfo::setMaxHeightAbovePosition ( Real z)

Definition at line 196 of file Geometry.cpp.

◆ setMinorRadius()

void GeometryInfo::setMinorRadius ( Real minorRadius)
inline

Definition at line 135 of file Geometry.h.

◆ xfer()

void GeometryInfo::xfer ( Xfer * xfer)
protectedvirtual

Xfer method Version Info: 1: Initial version

Implements Snapshot.

Definition at line 568 of file Geometry.cpp.


The documentation for this class was generated from the following files: