Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

nvmath::Vec3f Class Reference

3-component vector class. More...

#include <Vec3f.h>

Inheritance diagram for nvmath::Vec3f:

Inheritance graph
[legend]
Collaboration diagram for nvmath::Vec3f:

Collaboration graph
[legend]
List of all members.

Public Member Functions

NVSG_API Vec3f (void)
 Default constructor.
NVSG_API Vec3f (float x, float y, float z)
 Constructor using three floats.
NVSG_API Vec3f (const Vecnf< 3 > &v)
 Copy constructor.
NVSG_API Vec3f (const Vecnf< 4 > &v)
 Constructor by a Vec4f.
NVSG_API Vec3foperator= (const Vec4f &v)
 Assignment operator.
NVSG_API Vec3f operator- (void) const
 Negation operator.
NVSG_API void set (float x, float y, float z)
 Set the vector with three float values.

Related Functions

(Note that these are not member functions.)

Vec3f normalize (const Vec3f &v)
void normalizeV (const std::vector< Vec3f > &vecIn, std::vector< Vec3f > &vecOut)
Vec3f operator * (float f, const Vec3f &v)
Vec3f operator^ (const Vecnf< 3 > &v0, const Vecnf< 3 > &v1)
bool areCollinear (const Vec3f &v0, const Vec3f &v1)
NVSG_API void smoothNormals (const std::vector< Vec3f > &vertices, const Sphere3f &sphere, float creaseAngle, std::vector< Vec3f > &normals)

Detailed Description

3-component vector class.


Constructor & Destructor Documentation

nvmath::Vec3f::Vec3f void   )  [inline]
 

Default constructor.

For performance reasons no initialization is performed.

nvmath::Vec3f::Vec3f float  x,
float  y,
float  z
[inline]
 

Constructor using three floats.

A vector with the given values is constructed.

Parameters:
x  x component
y  y component
z  z component

nvmath::Vec3f::Vec3f const Vecnf< 3 > &  v  )  [inline]
 

Copy constructor.

Parameters:
v  vector to copy

nvmath::Vec3f::Vec3f const Vecnf< 4 > &  v  )  [inline]
 

Constructor by a Vec4f.

Ignores fourth component of constructing vector.

Parameters:
v  vector to use first three components from


Member Function Documentation

NVSG_API Vec3f& nvmath::Vec3f::operator= const Vec4f v  ) 
 

Assignment operator.

Ignores the fourth component of the assigning vector.

Returns:
reference to the assigned vector
Parameters:
v  copy v to the vector

Vec3f nvmath::Vec3f::operator- void   )  const [inline]
 

Negation operator.

Returns:
negated vector

Reimplemented from nvmath::Vecnf< 3 >.

void nvmath::Vec3f::set float  x,
float  y,
float  z
[inline]
 

Set the vector with three float values.

Parameters:
x  x component
y  y component
z  z component


Friends And Related Function Documentation

Vec3f normalize const Vec3f v  )  [related]
 

Calculate the normalized vector of a given one.

Returns:
normalized version of v
Parameters:
v  vector to determine normalized vector from

void normalizeV const std::vector< Vec3f > &  vecIn,
std::vector< Vec3f > &  vecOut
[related]
 

Calculate the normalized vector of a vector of Vec3fs

Vec3f operator * float  f,
const Vec3f v
[related]
 

Multiplication of a scalar with a vector.

Returns:
product of f with v
Parameters:
f  scalar to multiply with
v  vector to multiply

Vec3f operator^ const Vecnf< 3 > &  v0,
const Vecnf< 3 > &  v1
[related]
 

Calculation of the cross product of v0 with v1. The cross product of two vectors is a vector that is orthogonal to both arguments

Returns:
cross product of v0 and v1.

bool areCollinear const Vec3f v0,
const Vec3f v1
[related]
 

Test two Vec3f for collinearity. The test is done by testing the cross product (operator^) of the two objects being less than some epsilon.

Returns:
true if t0 and t1 are collinear, otherwise false
Parameters:
v0  first Vec3f
v1  second Vec3f

NVSG_API void smoothNormals const std::vector< Vec3f > &  vertices,
const Sphere3f sphere,
float  creaseAngle,
std::vector< Vec3f > &  normals
[related]
 

Determine smoothed normals for a set of vertices.


The documentation for this class was generated from the following file:
Generated on Tue Mar 1 13:20:40 2005 for NVSGSDK by NVIDIA