Main Page Namespace List Class Hierarchy Alphabetical List Compound List Namespace Members Compound Members Related Pages

# PajaTypes::Vector2C Class Reference

2D Vector class. More...

`#include <Vector2C.h>`

List of all members.

## Public Methods

- Vector2C ( float32 f32X = 0, float32 f32Y = 0 )
- Vector2C ( const Vector2C& rVec )
- Vector2C ( const float32 f32A[2] )
- virtual ~Vector2C ()
- float32& operator[] ( int32 i )
- const float32& operator[] ( int32 i ) const
- Vector2C operator- () const
- bool operator== ( const Vector2C& rVec ) const
- bool operator!= ( const Vector2C& rVec ) const
- Vector2C& operator-= ( const Vector2C& rVec )
- Vector2C& operator+= ( const Vector2C& rVec )
- Vector2C& operator *= ( float32 f32S )
- Vector2C& operator/= ( float32 f32S )
- Vector2C operator * ( float32 f32S ) const
- Vector2C operator/ ( float32 f32S ) const
- Vector2C operator- ( const Vector2C& rVec ) const
- Vector2C operator+ ( const Vector2C& rVec ) const
- Vector2C operator * ( const Vector2C& rVec ) const
- Vector2C normalize () const
- float32 length () const
- float32 dot ( const Vector2C& rVec ) const

## Friends

- Vector2C operator * ( float32 s, const Vector2C& rVec )

## Detailed Description

2D Vector class.

Vector2C class defines a two dimensional vector class which is used by the Demopaja system. The vector class implements standard set of methods and overdriven opertators for easy use.

This class is implemented by the system.

## Constructor & Destructor Documentation

Vector2C ( | float32 f32X = 0,
| float32 f32Y = 0 )

| Default constructor.

Vector2C ( | const Vector2C & rVec )

| Copy constructor.

Vector2C ( | const float32 f32A[2] )

| Creates a new vector with the values as the array pointed by the argument.

~Vector2C ( | )`[virtual]`

| Default destructor.

## Member Function Documentation

float32 dot ( | const Vector2C & v ) const`[inline]`

| Computes the dot product of the two vectors and returns the result.

float32 length ( | ) const`[inline]`

| Returns the length of the vector.

Vector2C normalize ( | ) const

| Normalizes the vector to unit size and returns the result.

Vector2C operator * ( | const Vector2C & a ) const`[inline]`

| Multiplies the vector specified by argument from the vector and returns the result. The multiplication is done component vise (that is, each corresponding component is multiplied).

Vector2C operator * ( | float32 s ) const`[inline]`

| Multiplies the vector by a scalar value specified by the argument and returns the result.

Vector2C & operator *= ( | float32 s )`[inline]`

| Multiplies the vector by a scalar value specified by the argument and stores the result.

bool operator!= ( | const Vector2C & rVec ) const

| Return true if both vectors are not equal, else false.

Vector2C operator+ ( | const Vector2C & a ) const`[inline]`

| Adds the vector specified by argument from the vector and returns the result.

Vector2C & operator+= ( | const Vector2C & a )`[inline]`

| Adds the vector specified by argument from the vector and stores the result.

Vector2C operator- ( | const Vector2C & a ) const`[inline]`

| Substracts the vector specified by argument from the vector and returns the result.

Vector2C operator- ( | ) const`[inline]`

| Returns Negated vector.

Vector2C & operator-= ( | const Vector2C & a )`[inline]`

| Substracts the vector specified by argument from the vector and stores the result.

Vector2C operator/ ( | float32 s ) const`[inline]`

| Divides the vector by a scalar value specified by the argument and returns the result.

Vector2C & operator/= ( | float32 s )`[inline]`

| Divides the vector by a scalar value specified by the argument and stores the result.

bool operator== ( | const Vector2C & rVec ) const

| Return true if both vectors are equal, else false.

const float32 & operator[] ( | int32 i ) const`[inline]`

| Return reference to the component pointed by the index. The index values from 0 to 1 corresponds to components X, and Y respectively. There are two versions of this method, this version is for retrieving the values.

float32 & operator[] ( | int32 i )`[inline]`

| Return reference to the component pointed by the index. The index values from 0 to 1 corresponds to components X, and Y respectively. There are two versions of this method, this version is to assign values.

## Friends And Related Function Documentation

Vector2C operator * ( | float32 s,
| const Vector2C & rVec )`[friend]`

| Multiplies the vector by a scalar value specified by the argument and returns the result.

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

- Vector2C.h