Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
#include "gfx/camera.h"
Go to the source code of this file.
Functions | |
bool | CalculateOrientation (QVector &Pos, Vector &p, Vector &q, Vector &r, float &wid, float &hei, float OffsetByThisPercent, bool moveiftoofar, Matrix *local_transformation=NULL) |
|
inline |
Calculates the way a point-like sphere should be oriented, with a given input position. Pos will be tweaked, and p,q,r to be used will be returned. true will be returned if it is close enough to be rendered Uses current camera orientation If local_transformation is used, the object will attempt to use that to keep Its own up alignment, otherwise it will match the camera up If offsetbyradius is used the animation will appear closer than it is If moveiftoofar is true and also offset by radius is true then the item will be moved closer to the cam if it is too far and shrunken appropriately Fixed 052402 to have floating -> double for important values
Definition at line 20 of file point_to_cam.h.
References _Universe, Universe::AccessCamera(), g_game, Camera::GetPosition(), Camera::GetPQR(), QVector, Vector, game_data_t::zfar, and game_data_t::znear.
Referenced by Halo::Draw(), GameUnit< UnitType >::Draw(), and GameUnit< UnitType >::DrawNow().