FBVector3d Class Reference

FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d FBVector3d

List of all members.


Detailed Description

Vector3d class.

This class creates a list like object, which can be modified using the list protocol method. But unlike lists, its length is fixed: it always contain 3 floating point values. Thus it does not support the any list methods that would affect its length. The values within can be changed, usually via the bracket operator.

    # Supported list protocol methods:
    color = FBColor()
    len(color)
    print color[0]
        color[0] = 1.0
Warning:
Slicing is not supported by this object.

Public Member Functions

  FBVector3d ()
  Constructor.
  FBVector3d (FBVector3d pVector3d)
  Constructor.
  FBVector3d (float pX, float pY, float pZ)
  Constructor.
  FBVector3d (tuple< float, float, float >)
  Constructor.
int  __len__ ()
  Returns the number of elements.
float  __getitem__ (int pIndex)
  Returns the ith component Corresponds to python: print v[1].
  __setitem__ (int pIndex, float pComponentValue)
  Sets the ith components Corresponds to python: v[1] = 0.5.
FBVector3d  operator+ (FBVector3d pVector)
  Add 2 vectors.
FBVector3d  operator- (FBVector3d pVector)
  Substract 2 vectors.

Constructor & Destructor Documentation

FBVector3d (  ) 

Constructor.

Default constructor, all 3 values within are set to 0.0.

FBVector3d ( FBVector3d  pVector3d  ) 

Constructor.

Copy constructor. Copy values from another instance.

FBVector3d ( float  pX,
float  pY,
float  pZ  
)

Constructor.

Explicitely construct a vector by specifying its values.

FBVector3d ( tuple< float, float, float  ) 

Constructor.

A vector can be built from any python object with supports the tuple interface and is of a lenght of 3.


Member Function Documentation

int __len__ (  ) 

Returns the number of elements.

Corresponds to python: len(object)

float __getitem__ ( int  pIndex  ) 

Returns the ith component Corresponds to python: print v[1].

Parameters:
pIndex  Index of the components to get (0 to 2)
Returns:
Color component value.

__setitem__ ( int  pIndex,
float  pComponentValue  
)

Sets the ith components Corresponds to python: v[1] = 0.5.

Parameters:
pIndex  Index of the components to set (0 to 2)
pComponentValue  Value of component to set

FBVector3d operator+ ( FBVector3d  pVector  ) 

Add 2 vectors.

Parameters:
pVector  Vector to add to source.
Returns:
The addition of both vectors.

FBVector3d operator- ( FBVector3d  pVector  ) 

Substract 2 vectors.

Parameters:
pVector  Vector to add to source.
Returns:
The substraction of both vectors.

Generated on Tue Feb 9 19:34:01 2010 for Python Reference Guide by  doxygen 1.5.3