Triton
Visual simulation library for ocean rendering.
Public Member Functions | Public Attributes | List of all members
Triton::Vector3f Class Reference

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

#include <Vector3.h>

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

Public Member Functions

 Vector3f ()
 Default constructor; does not initialize the vector.
 
 Vector3f (const Triton::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 TRITONAPI Length ()
 Returns the length of this vector.
 
void TRITONAPI Normalize ()
 Scales the vector to be of length 1.0.
 
double TRITONAPI Dot (const Vector3f &v) const
 Returns the dot product of this vector with the specified Vector3.
 
Vector3f TRITONAPI operator- (const Vector3f &v) const
 Subtracts the specified vector from this vector, and returns the result.
 
Vector3f TRITONAPI operator+ (const Vector3f &v) const
 Adds this vector to the specified vector, and returns the result.
 
Vector3f TRITONAPI operator* (const Vector3f &v) const
 Multiplies the components of two vectors together, and returns the result.
 
Vector3f TRITONAPI operator* (float n) const
 Scales each x,y,z value of the vector by a constant n, 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.


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