BASE::RCCuboid Class Reference

A cuboid represented by 2 vectors for 2 corners. More...

Inherits BASE::RCStringValueInterface.

Inheritance diagram for BASE::RCCuboid:

Inheritance graph
[legend]
Collaboration diagram for BASE::RCCuboid:

Collaboration graph
[legend]
List of all members.

Public Types

enum  TConstants {
  SI_MinX = 0,
  SI_MaxX = 1,
  SI_MinY = 2,
  SI_MaxY = 3,
  SI_MinZ = 4,
  SI_MaxZ = 5,
  SI_EntryCount = 6,
  DI_X = 0,
  DI_Y = 1,
  DI_Z = 2
}

Public Member Functions

 RCCuboid ()
 RCCuboid (TReal nSize)
 RCCuboid (TReal nWidth, TReal nHeight, TReal nDepth)
 RCCuboid (const RCVector &Pos0, const RCVector &Pos1)
 RCCuboid (TReal x0, TReal y0, TReal z0, TReal x1, TReal y1, TReal z1)
 RCCuboid (const RCCuboid &Source)
const RCCuboidoperator= (const RCCuboid &Source)
RCVectoroperator[] (TInt nIndex)
const RCVectoroperator[] (TInt nIndex) const
void Include (const RCVector &Vector)
void Include (const RCCuboid &Cuboid)
void Include (const RCCuboid &Cuboid, const RCPose &Pose)
RCVector GetPos (TInt nSide, TInt nCorner) const
RCVector GetNormal (TInt nSide, TBool bInverse=false) const
TInt GetPosIndex (TInt nSide, TInt nCorner) const
RCTriple GetTexCoord (TInt nSide, TInt nCorner, TReal nScale) const
RCVector GetCenter (TInt nSide) const
void Normalize ()
RCCuboid Normalized () const
void Inflate (TReal x, TReal y, TReal z)
void Inflate (TReal xyz)
void InflateRelative (TReal fFactor)
void Offset (const RCVector &Vector)
TReal Diagonal () const
TReal MaxExtension () const
RCTriple GetExtension () const
TReal GetExtension (TInt nDimension) const
TReal Width () const
TReal Height () const
TReal Depth () const
virtual TBool FromString (const RCString &sValue)
virtual const RCStringToString () const

Detailed Description

A cuboid represented by 2 vectors for 2 corners.

Author:
Patrik Stellmann
The 2 vectores stored internally need to be unfactorized at any time. Every member function that takes a vector as argument will unfactorize it.


Constructor & Destructor Documentation

RCCuboid::RCCuboid  )  [inline]
 

Creates an invalid cuboid with the corners at +/- infinite.

RCCuboid::RCCuboid TReal  nWidth,
TReal  nHeight,
TReal  nDepth
[inline]
 

Creates a centered cuboid with the specified size in x- y- and z-direction.

RCCuboid::RCCuboid const RCVector Pos0,
const RCVector Pos1
[inline]
 

Creates a cuboid with the specified corners.

RCCuboid::RCCuboid TReal  x0,
TReal  y0,
TReal  z0,
TReal  x1,
TReal  y1,
TReal  z1
[inline]
 

Creates a cuboid with the specified corners.


Member Function Documentation

void RCCuboid::Include const RCVector Vector  ) 
 

Enlarges the cuboid that the given vector is inside. If the vector is already inside nothing is changed. Works only on normalized or invalid cuboids!

void RCCuboid::Inflate TReal  xyz  )  [inline]
 

Increases the size of the cuboid by 2 times the specified value. Works only for normalized cuboids!

void RCCuboid::Inflate TReal  x,
TReal  y,
TReal  z
[inline]
 

Increases the size of the cuboid by 2 times the specified value for the corresponding dimension. Works only for normalized cuboids!

void RCCuboid::InflateRelative TReal  fFactor  )  [inline]
 

Increases the size of the cuboid by 2 times the specified factor multiplied by the maximal extension.

void RCCuboid::Normalize  )  [inline]
 

Normalizes the cuboid by ensuring pos1 refers to the lower coordinates and pos2 to the upper coordinates.

RCCuboid RCCuboid::Normalized  )  const [inline]
 

Returns a normalized copy of this cuboid.

const RCCuboid & RCCuboid::operator= const RCCuboid Source  ) 
 

Assign operator.

const RCVector & RCCuboid::operator[] TInt  nIndex  )  const [inline]
 

Returns the position of the specified corner. nIndex needs to be 0 or 1!

RCVector & RCCuboid::operator[] TInt  nIndex  )  [inline]
 

Returns the position of the specified corner. nIndex needs to be 0 or 1!


The documentation for this class was generated from the following files:
Generated on Thu Feb 16 12:46:20 2006 for Simulator Bob by  doxygen 1.4.6-NO