# DXGfxLib.BBox Class Reference

Culling and collision detection is based on this class. More...

Inherited by DXGfxLib.AABBox, and DXGfxLib.AABBox.

List of all members.

## Public Member Functions
| BBox ()
| Defautl constructor. For most of our algorithms having a bbox of null dimensions would be risky. This is purely due to our implementation. Still because of that the default constructor will in fact build a bbox with: vMin = new Vector3(-0.0005f, -0.0005f, -0.0005f); vMax = new Vector3(0.0005f, 0.0005f, 0.0005f);.
void | Reset ()
| BBox (BBox bbox)
| This constructor will build a bbox instance from another bbox.
| BBox (Vector3 pos, float size)
| This constructor will create a Bbox for centered on the pos you give with the same size along all three axes.
BBox | Transform (Matrix mat)
| This method will transform the bbox on which you call this method by the given transformation matrix.
Vector3 | Size ()
| This method computes and return the size of the bbox along the three axes.
Vector3 | MinPoint ()
| This is in fact the center of the bbox again.
float | MaxAAXZSize ()
Vector3[] | BuildSumits ()
| If you want to compute all the submits of your bbox this method is for you. It will return an array of 8 Vector3.
BBox | BuildSwepingAABBox (Vector3 linVel, float elapsedTime)
| This can be interesting if you attempt to build sweeping collision algorithm. It does compute a bbox from the bbox on which you call this method, from a direction vector and an elapsedTime. If elapsedTime is big and your movement is not along the same direction over that period of time this method is useless.
bool | CheckCollision (BBox bbox)
| Check if provide bbox and bbox on which you call this method interpenetrate. This is a very basic test it returns only a boolean if the two bbox overlap. This can be used for positioning of scene node if you don't want to put any scene node or scene object where there is already something, it can also be interesting to perform a first selection of nodes whith which you might collide before performing finer collision testing.
bool | Collide (BBox bbox)
| This method return true if the two bbox collide with each other.
void | Scale (Vector3 scale)
| Use this method if you want to scale a specific bounding box.
| BBox ()
| Defautl constructor. For most of our algorithms having a bbox of null dimensions would be risky. This is purely due to our implementation. Still because of that the default constructor will in fact build a bbox with: vMin = new Vector3(-0.0005f, -0.0005f, -0.0005f); vMax = new Vector3(0.0005f, 0.0005f, 0.0005f);.
void | Reset ()
| BBox (BBox bbox)
| This constructor will build a bbox instance from another bbox.
| BBox (Vector3 pos, float size)
| This constructor will create a Bbox for centered on the pos you give with the same size along all three axes.
BBox | Transform (Matrix mat)
| This method will transform the bbox on which you call this method by the given transformation matrix.
Vector3 | Size ()
| This method computes and return the size of the bbox along the three axes.
Vector3 | MinPoint ()
| This is in fact the center of the bbox again.
float | MaxAAXZSize ()
Vector3[] | BuildSumits ()
| If you want to compute all the submits of your bbox this method is for you. It will return an array of 8 Vector3.
BBox | BuildSwepingAABBox (Vector3 linVel, float elapsedTime)
| This can be interesting if you attempt to build sweeping collision algorithm. It does compute a bbox from the bbox on which you call this method, from a direction vector and an elapsedTime. If elapsedTime is big and your movement is not along the same direction over that period of time this method is useless.
bool | CheckCollision (BBox bbox)
| Check if provide bbox and bbox on which you call this method interpenetrate. This is a very basic test it returns only a boolean if the two bbox overlap. This can be used for positioning of scene node if you don't want to put any scene node or scene object where there is already something, it can also be interesting to perform a first selection of nodes whith which you might collide before performing finer collision testing.
bool | Collide (BBox bbox)
| This method return true if the two bbox collide with each other.
void | Scale (Vector3 scale)
| Use this method if you want to scale a specific bounding box.
## Static Public Member Functions
static BBox | Transform (BBox bbox, Matrix mat)
| This method can transform a bbox for you from the given transformation matrix.
static BBox | Transform (BBox bbox, Matrix mat)
| This method can transform a bbox for you from the given transformation matrix.
## Public Attributes
Vector3 | vMin
| A bbox is defined by two point in space that are at the extreme of the box diag. vMin is one of these two points, it is called that way because for an AABBox this is guaranteed to have the smallest values of any of the submits along all axes. For a generic BBox this is not guaranted at all as the bbox might have been rotated in space and local axes might differ from world space axes.
Vector3 | vMax
| See remarks for vMin. This is the other point in space used to define the bbox.
## Properties
Vector3 | Center`[get]`
| In case we need to know where the center of the bbox is. This computed from vMin and vMax each time it is needed.

## Detailed Description

Culling and collision detection is based on this class.

Definition at line 79 of file MathUtil.cs.

## Constructor & Destructor Documentation

DXGfxLib.BBox.BBox | ( |  | ) |

Defautl constructor. For most of our algorithms having a bbox of null dimensions would be risky. This is purely due to our implementation. Still because of that the default constructor will in fact build a bbox with: vMin = new Vector3(-0.0005f, -0.0005f, -0.0005f); vMax = new Vector3(0.0005f, 0.0005f, 0.0005f);.

Definition at line 113 of file MathUtil.cs.

Here is the caller graph for this function:

DXGfxLib.BBox.BBox | ( | BBox | bbox | ) |

This constructor will build a bbox instance from another bbox.

Parameters:

  | bbox |

Definition at line 129 of file MathUtil.cs.

DXGfxLib.BBox.BBox | ( | Vector3 | pos,
|  | float | size |
| ) |  |  |

This constructor will create a Bbox for centered on the pos you give with the same size along all three axes.

Parameters:

  | pos | Position of the bbox.
  | size | desired size, will be used along all three axes.

Definition at line 140 of file MathUtil.cs.

DXGfxLib.BBox.BBox | ( |  | ) |

Defautl constructor. For most of our algorithms having a bbox of null dimensions would be risky. This is purely due to our implementation. Still because of that the default constructor will in fact build a bbox with: vMin = new Vector3(-0.0005f, -0.0005f, -0.0005f); vMax = new Vector3(0.0005f, 0.0005f, 0.0005f);.

Definition at line 113 of file MathUtil.cs.

DXGfxLib.BBox.BBox | ( | BBox | bbox | ) |

This constructor will build a bbox instance from another bbox.

Parameters:

  | bbox |

Definition at line 129 of file MathUtil.cs.

DXGfxLib.BBox.BBox | ( | Vector3 | pos,
|  | float | size |
| ) |  |  |

This constructor will create a Bbox for centered on the pos you give with the same size along all three axes.

Parameters:

  | pos | Position of the bbox.
  | size | desired size, will be used along all three axes.

Definition at line 140 of file MathUtil.cs.

## Member Function Documentation

Vector3 [] DXGfxLib.BBox.BuildSumits | ( |  | ) |

If you want to compute all the submits of your bbox this method is for you. It will return an array of 8 Vector3.

Returns:

Definition at line 212 of file MathUtil.cs.

Vector3 [] DXGfxLib.BBox.BuildSumits | ( |  | ) |

If you want to compute all the submits of your bbox this method is for you. It will return an array of 8 Vector3.

Returns:

Definition at line 212 of file MathUtil.cs.

Here is the caller graph for this function:

BBox DXGfxLib.BBox.BuildSwepingAABBox | ( | Vector3 | linVel,
|  | float | elapsedTime |
| ) |  |  |

This can be interesting if you attempt to build sweeping collision algorithm. It does compute a bbox from the bbox on which you call this method, from a direction vector and an elapsedTime. If elapsedTime is big and your movement is not along the same direction over that period of time this method is useless.

Parameters:

  | linVel |
  | elapsedTime |

Returns:

Definition at line 259 of file MathUtil.cs.

BBox DXGfxLib.BBox.BuildSwepingAABBox | ( | Vector3 | linVel,
|  | float | elapsedTime |
| ) |  |  |

This can be interesting if you attempt to build sweeping collision algorithm. It does compute a bbox from the bbox on which you call this method, from a direction vector and an elapsedTime. If elapsedTime is big and your movement is not along the same direction over that period of time this method is useless.

Parameters:

  | linVel |
  | elapsedTime |

Returns:

Definition at line 259 of file MathUtil.cs.

bool DXGfxLib.BBox.CheckCollision | ( | BBox | bbox | ) |

Check if provide bbox and bbox on which you call this method interpenetrate. This is a very basic test it returns only a boolean if the two bbox overlap. This can be used for positioning of scene node if you don't want to put any scene node or scene object where there is already something, it can also be interesting to perform a first selection of nodes whith which you might collide before performing finer collision testing.

Parameters:

  | bbox |

Returns:

Definition at line 272 of file MathUtil.cs.

Here is the call graph for this function:

bool DXGfxLib.BBox.CheckCollision | ( | BBox | bbox | ) |

Check if provide bbox and bbox on which you call this method interpenetrate. This is a very basic test it returns only a boolean if the two bbox overlap. This can be used for positioning of scene node if you don't want to put any scene node or scene object where there is already something, it can also be interesting to perform a first selection of nodes whith which you might collide before performing finer collision testing.

Parameters:

  | bbox |

Returns:

Definition at line 272 of file MathUtil.cs.

Here is the call graph for this function:

bool DXGfxLib.BBox.Collide | ( | BBox | bbox | ) |

This method return true if the two bbox collide with each other.

Parameters:

  | bbox |

Returns:

Definition at line 285 of file MathUtil.cs.

Here is the call graph for this function:

bool DXGfxLib.BBox.Collide | ( | BBox | bbox | ) |

This method return true if the two bbox collide with each other.

Parameters:

  | bbox |

Returns:

Definition at line 285 of file MathUtil.cs.

Here is the call graph for this function:

float DXGfxLib.BBox.MaxAAXZSize | ( |  | ) |

Definition at line 201 of file MathUtil.cs.

float DXGfxLib.BBox.MaxAAXZSize | ( |  | ) |

Definition at line 201 of file MathUtil.cs.

Vector3 DXGfxLib.BBox.MinPoint | ( |  | ) |

This is in fact the center of the bbox again.

Returns:

Definition at line 194 of file MathUtil.cs.

Vector3 DXGfxLib.BBox.MinPoint | ( |  | ) |

This is in fact the center of the bbox again.

Returns:

Definition at line 194 of file MathUtil.cs.

Here is the caller graph for this function:

void DXGfxLib.BBox.Reset | ( |  | ) |

Definition at line 119 of file MathUtil.cs.

void DXGfxLib.BBox.Reset | ( |  | ) |

Definition at line 119 of file MathUtil.cs.

Here is the caller graph for this function:

void DXGfxLib.BBox.Scale | ( | Vector3 | scale | ) |

Use this method if you want to scale a specific bounding box.

Parameters:

  | scale |

Definition at line 297 of file MathUtil.cs.

Here is the call graph for this function:

void DXGfxLib.BBox.Scale | ( | Vector3 | scale | ) |

Use this method if you want to scale a specific bounding box.

Parameters:

  | scale |

Definition at line 297 of file MathUtil.cs.

Here is the call graph for this function:

Vector3 DXGfxLib.BBox.Size | ( |  | ) |

This method computes and return the size of the bbox along the three axes.

Returns:

Definition at line 185 of file MathUtil.cs.

Vector3 DXGfxLib.BBox.Size | ( |  | ) |

This method computes and return the size of the bbox along the three axes.

Returns:

Definition at line 185 of file MathUtil.cs.

Here is the caller graph for this function:

BBox DXGfxLib.BBox.Transform | ( | Matrix | mat | ) |

This method will transform the bbox on which you call this method by the given transformation matrix.

Parameters:

  | mat | the transform matrix to use. Should be a worldspace transform.

Returns:
  a ref to the transformed bbox.

Definition at line 173 of file MathUtil.cs.

static BBox DXGfxLib.BBox.Transform | ( | BBox | bbox,
|  | Matrix | mat |
| ) |  |  | `[static]`

This method can transform a bbox for you from the given transformation matrix.

Parameters:

  | bbox | The box you want to transform. This bbox is unafected by the call. If you want to tranform it call the non static Transform method instead!
  | mat | Transformation matrix to use. Should be a worldspace transform.

Returns:
  a reference to a bbox resulting of the transformation.

Definition at line 158 of file MathUtil.cs.

Here is the call graph for this function:

BBox DXGfxLib.BBox.Transform | ( | Matrix | mat | ) |

This method will transform the bbox on which you call this method by the given transformation matrix.

Parameters:

  | mat | the transform matrix to use. Should be a worldspace transform.

Returns:
  a ref to the transformed bbox.

Definition at line 173 of file MathUtil.cs.

static BBox DXGfxLib.BBox.Transform | ( | BBox | bbox,
|  | Matrix | mat |
| ) |  |  | `[static]`

This method can transform a bbox for you from the given transformation matrix.

Parameters:

  | bbox | The box you want to transform. This bbox is unafected by the call. If you want to tranform it call the non static Transform method instead!
  | mat | Transformation matrix to use. Should be a worldspace transform.

Returns:
  a reference to a bbox resulting of the transformation.

Definition at line 158 of file MathUtil.cs.

Here is the call graph for this function:

Here is the caller graph for this function:

## Member Data Documentation

Vector3 DXGfxLib.BBox::vMax

See remarks for vMin. This is the other point in space used to define the bbox.

Definition at line 92 of file MathUtil.cs.

Vector3 DXGfxLib.BBox::vMin

A bbox is defined by two point in space that are at the extreme of the box diag. vMin is one of these two points, it is called that way because for an AABBox this is guaranteed to have the smallest values of any of the submits along all axes. For a generic BBox this is not guaranted at all as the bbox might have been rotated in space and local axes might differ from world space axes.

Definition at line 87 of file MathUtil.cs.

## Property Documentation

Vector3 DXGfxLib.BBox::Center`[get]`

In case we need to know where the center of the bbox is. This computed from vMin and vMax each time it is needed.

Definition at line 99 of file MathUtil.cs.

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

- D:/guillaume/guillara/3D/DXGfx/Backup/DXGfxLib/MathUtil.cs
- D:/guillaume/guillara/3D/DXGfx/DXGfxLib/MathUtil.cs