SilverLining
Public Member Functions | Public Attributes | List of all members
SilverLining::Vector3f Class Reference

A 3D single-precision vector class, and its operations. More...

#include <Vector3.h>

Inheritance diagram for SilverLining::Vector3f:
Inheritance graph
[legend]
Collaboration diagram for SilverLining::Vector3f:
Collaboration graph
[legend]

Public Member Functions

 Vector3f ()
 Default constructor; does not initialize the vector.
 
 Vector3f (const SilverLining::Vector3 &v)
 Construct a single precision vector from a double precision one.
 
 Vector3f (float px, float py, float pz)
 Constructs a Vector3f from the specified single-precision floating point x, y, and z values.
 
float SILVERLINING_API Length ()
 Returns the length of this vector.
 
float SILVERLINING_API SquaredLength ()
 Returns the squared length of this vector.
 
void SILVERLINING_API Normalize ()
 Scales the vector to be of length 1.0.
 
double SILVERLINING_API Dot (const Vector3 &v) const
 Returns the dot product of this vector with the specified Vector3.
 
Vector3f SILVERLINING_API operator- (const Vector3f &v) const
 Subtracts the specified vector from this vector, and returns the result.
 
Vector3f SILVERLINING_API operator+ (const Vector3f &v) const
 Adds this vector to the specified vector, and returns the result.
 
Vector3f SILVERLINING_API operator* (float s) const
 Multiplies this vector by a scalar and returns the result.
 

Public Attributes

float x
 Data members x, y, z are public for convenience.
 

Detailed Description

A 3D single-precision vector class, and its operations.

Constructor & Destructor Documentation

◆ Vector3f() [1/3]

SilverLining::Vector3f::Vector3f ( )
inline

Default constructor; does not initialize the vector.

◆ Vector3f() [2/3]

SilverLining::Vector3f::Vector3f ( const SilverLining::Vector3 v)
inline

Construct a single precision vector from a double precision one.

◆ Vector3f() [3/3]

SilverLining::Vector3f::Vector3f ( float  px,
float  py,
float  pz 
)
inline

Constructs a Vector3f from the specified single-precision floating point x, y, and z values.

Member Function Documentation

◆ Dot()

double SILVERLINING_API SilverLining::Vector3f::Dot ( const Vector3 v) const
inline

Returns the dot product of this vector with the specified Vector3.

◆ Length()

float SILVERLINING_API SilverLining::Vector3f::Length ( )
inline

Returns the length of this vector.

◆ Normalize()

void SILVERLINING_API SilverLining::Vector3f::Normalize ( )
inline

Scales the vector to be of length 1.0.

◆ operator*()

Vector3f SILVERLINING_API SilverLining::Vector3f::operator* ( float  s) const
inline

Multiplies this vector by a scalar and returns the result.

◆ operator+()

Vector3f SILVERLINING_API SilverLining::Vector3f::operator+ ( const Vector3f v) const
inline

Adds this vector to the specified vector, and returns the result.

◆ operator-()

Vector3f SILVERLINING_API SilverLining::Vector3f::operator- ( const Vector3f v) const
inline

Subtracts the specified vector from this vector, and returns the result.

◆ SquaredLength()

float SILVERLINING_API SilverLining::Vector3f::SquaredLength ( )
inline

Returns the squared length of this vector.

Member Data Documentation

◆ x

float SilverLining::Vector3f::x

Data members x, y, z are public for convenience.


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