§ __init__()
def Box3D.Box3D.__init__ |
( |
|
self, |
|
|
|
corner, |
|
|
|
size |
|
) |
| |
Constructor for Box3D.
Constructor accepts two parameters for the top left corner and size dimensions.
- Parameters
-
corner | (x,y,z) tuple for the top left corner. |
size | (w,h,d) tuple containing the width, height and depth. Constructor accepts 2 parameters corner: (x,y,z) tuple for the top left corner size: (w,h,d) tuple containing the width and height |
§ getAreaOfFace()
def Box3D.Box3D.getAreaOfFace |
( |
|
self, |
|
|
|
face |
|
) |
| |
This function calculates the area of the given face.
- Author
- Mustafa Haddara
- Parameters
-
face | Face of the box: FRONT or TOP or SIDE. |
- Returns
- Area of the given face.
- Date
- 1/10/2016
§ getDimensions()
def Box3D.Box3D.getDimensions |
( |
|
self | ) |
|
gets width, height and depth.
- Returns
- dimensions
§ getDimensionsOfFace()
def Box3D.Box3D.getDimensionsOfFace |
( |
|
self, |
|
|
|
face |
|
) |
| |
This function sets the dimensions of the given face.
- Author
- Mustafa Haddara
- Parameters
-
face | Face of the box: FRONT or TOP or SIDE. |
- Returns
- width, hight.
§ getFrontTopLeftCorner()
def Box3D.Box3D.getFrontTopLeftCorner |
( |
|
self | ) |
|
returns the front top left corner tuple.
- Returns
- frontTopLeftCorner
§ getPerimeterOfFace()
def Box3D.Box3D.getPerimeterOfFace |
( |
|
self, |
|
|
|
face |
|
) |
| |
This function calculates the perimeter of the given face.
- Author
- Mustafa Haddara
- Parameters
-
face | Face of the box: FRONT or TOP or SIDE. |
- Returns
- Perimeter of the given face.
- Date
- 1/10/2016
§ getSurfaceArea()
def Box3D.Box3D.getSurfaceArea |
( |
|
self | ) |
|
This function calculates the surface area of the rectangle.
- Author
- Mustafa Haddara
- Returns
- Surface area of the rectangle.
- Date
- 1/10/2016
§ getVolume()
def Box3D.Box3D.getVolume |
( |
|
self | ) |
|
This function calculates the volume of the rectangle.
- Author
- Mustafa Haddara
- Returns
- Volume of the rectangle.
- Date
- 1/10/2016
§ setFrontTopLeftCorner()
def Box3D.Box3D.setFrontTopLeftCorner |
( |
|
self, |
|
|
|
newCorner |
|
) |
| |
sets the front top left corner.
- Parameters
-
newCorner | (x,y,z) tuple for the front top left corner |
§ __dimensions
gets width, height and depth.
- Parameters
-
§ __frontTopLeftCorner
Box3D.Box3D.__frontTopLeftCorner |
|
private |
Box3D.Box3D.b = Box3D( (1,1,1), (2,2,2) ) |
|
static |
Example of the usage.
- Author
- Mustafa Haddara
- Date
- 1/10/2016
§ FRONT
int Box3D.Box3D.FRONT = 0 |
|
static |
§ SIDE
§ TOP
The documentation for this class was generated from the following file: