Box3D
Box3D.Box3D Class Reference
Inheritance diagram for Box3D.Box3D:

Public Member Functions

def __init__ (self, corner, size)
 Constructor for Box3D. More...
 
def getFrontTopLeftCorner (self)
 returns the front top left corner tuple. More...
 
def setFrontTopLeftCorner (self, newCorner)
 sets the front top left corner. More...
 
def getDimensions (self)
 gets width, height and depth. More...
 
def getDimensionsOfFace (self, face)
 This function sets the dimensions of the given face. More...
 
def getAreaOfFace (self, face)
 This function calculates the area of the given face. More...
 
def getPerimeterOfFace (self, face)
 This function calculates the perimeter of the given face. More...
 
def getVolume (self)
 This function calculates the volume of the rectangle. More...
 
def getSurfaceArea (self)
 This function calculates the surface area of the rectangle. More...
 

Static Public Attributes

int FRONT = 0
 Faces enums. More...
 
int TOP = 1
 
int SIDE = 2
 
 b = Box3D( (1,1,1), (2,2,2) )
 Example of the usage. More...
 

Private Attributes

 __frontTopLeftCorner
 
 __dimensions
 gets width, height and depth. More...
 

Constructor & Destructor Documentation

§ __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

Member Function Documentation

§ getAreaOfFace()

def Box3D.Box3D.getAreaOfFace (   self,
  face 
)

This function calculates the area of the given face.

Author
Mustafa Haddara
Parameters
faceFace 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
faceFace 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
faceFace 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

Member Data Documentation

§ __dimensions

Box3D.Box3D.__dimensions
private

gets width, height and depth.

Parameters
dimensions

§ __frontTopLeftCorner

Box3D.Box3D.__frontTopLeftCorner
private

§ b

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

Faces enums.

§ SIDE

int Box3D.Box3D.SIDE = 2
static

§ TOP

int Box3D.Box3D.TOP = 1
static

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