gfx_types_vertex_ops.hh File Reference

Vector/vertex operator() functions. More...

Go to the source code of this file.

Functions

INLINE VECTOR3 operator+ (const VECTOR3 &v1, const VECTOR3 &v2)
INLINE VECTOR3 operator- (const VECTOR3 &v1, const VECTOR3 &v2)
INLINE VECTOR3 operator * (const VECTOR3 &v1, const VECTOR3 &v2)
INLINE VECTOR3 operator/ (const VECTOR3 &v1, const VECTOR3 &v2)
INLINE VECTOR3 operator+ (const VECTOR3 &v, fp f)
INLINE VECTOR3 operator- (const VECTOR3 &v, fp f)
INLINE VECTOR3 operator * (const VECTOR3 &v, fp f)
INLINE VECTOR3 operator/ (const VECTOR3 &v, fp f)
INLINE ostream & operator<< (ostream &strm, const VECTOR3 &v)


Detailed Description

Vector/vertex operator() functions.

Id
LastChangedDate

Author:
Jim E. Brooks http://www.palomino3d.org
 *
 * External operator() functions cannot be implemented
 * in terms of the base Vector3 because doing so leads
 * to erosion of the distinctiveness of the Vertex types.
 * If they were, to be useful, they would require every
 * Vertex class to define a Vertex& operator(const Vector3&).
 * That method is trouble: it would make Vertex and Vector3
 * interchangeable in some situations, and transformation problems
 * would go unnoticed since the code would compile.
 * The vertex types should be kept distinct because a vertex
 * must be mathematically transformed first before its type can change.
 *
 * LocalVertex lv;
 * WorldVertex wv;
 * wv = lv + lv;  // WorldVertex.operator=( LocalVertex + LocalVertex );
 *
 * 

Function Documentation

INLINE VECTOR3 operator * ( const VECTOR3 &  v,
fp  f 
)

INLINE VECTOR3 operator * ( const VECTOR3 &  v1,
const VECTOR3 &  v2 
)

INLINE VECTOR3 operator+ ( const VECTOR3 &  v,
fp  f 
)

VECTOR3 [op] fp

INLINE VECTOR3 operator+ ( const VECTOR3 &  v1,
const VECTOR3 &  v2 
)

VECTOR3 [op] VECTOR3

INLINE VECTOR3 operator- ( const VECTOR3 &  v,
fp  f 
)

INLINE VECTOR3 operator- ( const VECTOR3 &  v1,
const VECTOR3 &  v2 
)

INLINE VECTOR3 operator/ ( const VECTOR3 &  v,
fp  f 
)

INLINE VECTOR3 operator/ ( const VECTOR3 &  v1,
const VECTOR3 &  v2 
)

INLINE ostream& operator<< ( ostream &  strm,
const VECTOR3 &  v 
)

operator<<(VECTOR3)

Palomino 3D Engine documents generated by doxygen 1.5.3 on Fri Nov 23 11:26:15 2007