C4 Engine
C4 Engine API Documentation

class TruncatedPyramidVolume

Defined in:  C4Volumes.h
The TruncatedPyramidVolume class encapsulates data pertaining to a generic pyramid volume.

class TruncatedPyramidVolume : public PyramidVolume

Member Functions
TruncatedPyramidVolume::GetPyramidRatio Returns the truncated pyramid ratio.
TruncatedPyramidVolume::SetPyramidRatio Sets the truncated pyramid ratio.

TruncatedPyramidVolume(const Vector2D& size, float height, float ratio);

size The size of the pyramid base.
height The height of the truncated pyramid, measuring the distance between the top and bottom faces.
ratio The ratio of the dimensions of the top face to the dimensions of the bottom face.
The TruncatedPyramidVolume class encapsulates the physical dimensions of a generic truncated pyramidal volume and functionality that is used by various subclasses throughout the engine.

One corner of the truncated pyramid coincides with the origin, and the two components of the size parameter correspond to the dimensions of the pyramid's base along the positive x and y axes. The height parameter specifies the distance from the bottom face (the base) to the top face along the positive z axis. The ratio parameter specifies the ratio of the dimensions of the top face to the dimensions of the bottom face and should be in the range (0,1).
Base Classes
PyramidVolume A TruncatedPyramidVolume is an extension of a pyramid volume.