GClasses

GClasses::GBillboard Class Reference

This is a billboard (a 2-D image in a 3-D world) for use with GBillboardWorld. You can set m_repeatX and/or m_repeatY to make the image repeat across the billboard. More...

#include <G3D.h>

List of all members.

Public Member Functions

 GBillboard (GImage *pImage)
 Does not take ownership of pImage.
void adjustHeightToRestoreAspect ()
 Ensures that m_y is orthogonal to m_x, and adjusts the magnitude of m_y to restore the aspect ratio of the billboard image.

Public Attributes

GImagem_pImage
 The image associated with this billboard.
int m_repeatX
 The number of times the image repeats horizontally on the billboard.
int m_repeatY
 The number of times the image repeats vertically on the billboard.
G3DVector m_origin
 The origin corner of the billboard (where the bottom-left corner of the image is displayed)
G3DVector m_x
 The horizontal vector of the billboard. The magnitude of this vector specifies the width of the billboard.
G3DVector m_y
 The vertical vector of the billboard. The magnitude of this vector specifies the height of the billboard.

Detailed Description

This is a billboard (a 2-D image in a 3-D world) for use with GBillboardWorld. You can set m_repeatX and/or m_repeatY to make the image repeat across the billboard.


Constructor & Destructor Documentation

GClasses::GBillboard::GBillboard ( GImage pImage)

Does not take ownership of pImage.


Member Function Documentation

void GClasses::GBillboard::adjustHeightToRestoreAspect ( )

Ensures that m_y is orthogonal to m_x, and adjusts the magnitude of m_y to restore the aspect ratio of the billboard image.


Member Data Documentation

The origin corner of the billboard (where the bottom-left corner of the image is displayed)

The image associated with this billboard.

The number of times the image repeats horizontally on the billboard.

The number of times the image repeats vertically on the billboard.

The horizontal vector of the billboard. The magnitude of this vector specifies the width of the billboard.

The vertical vector of the billboard. The magnitude of this vector specifies the height of the billboard.