VisualizationFoundation CAT2DBoundingBox

Usage: you must use this class as is. You should never derive it.


public class CAT2DBoundingBox

Class to manage a box encompassing 2D elements.
Role:This classe is used to manage the space used by a 2D element. This information is used at the rendering time to know if a given element is visible on the screen and needs to be drawn on not. For performances issues 2DBoundingBox need to be at close to the object they are linked to as possible. Idealy they represent the smallest rectangle containing the object. You can add 2 2DBoundingBox using the += operator.


Constructor and Destructor Index


o CAT2DBoundingBox()
Default constructor.
o CAT2DBoundingBox(float,float,float)
Construct a Box of width and height 0 and 0 and centered in x,y.
o CAT2DBoundingBox(CAT2DBoundingBox&)
Copy Constructor
o CAT2DBoundingBox(float,float,float,float)
Construct a 2DBoundingBox.
o CAT2DBoundingBox(CAT2DBoundingSphere&)
Creates a BoundingBox from a 2DBoundingSphere.
o ~CAT2DBoundingBox()

Method Index


o GetCenter()
Returns the Bounding Box center.
o GetParameter(float*,float*,float*,float*)
Retrieves the BoundingBox parameters.
o GetSizeMM()
Returns the 2DBoundingBox size in milimmeters.
o operator *=(CAT3x3Matrix&)
Multiplication assignment operator.
o operator +=(CAT2DBoundingBox&)
Addition assignment operator.
o operator =(CAT2DBoundingBox&)
Assignment operator.

Constructor and Destructor


o CAT2DBoundingBox
public CAT2DBoundingBox()
Default constructor. Construct a boundingBox of width and height 1 and centered on 0,0.
o CAT2DBoundingBox
public CAT2DBoundingBox( const x,
const y,
const size_mm)
Construct a Box of width and height 0 and 0 and centered in x,y. This is used for non zoomable objects.
Parameters:
x
The x value of the center
y
The y value of the center
size_mm
The size of the non zommable box (it is a square in this case)
o CAT2DBoundingBox
public CAT2DBoundingBox( const )
Copy Constructor
o CAT2DBoundingBox
public CAT2DBoundingBox( const xmin,
const xmax,
const ymin,
const ymax)
Construct a 2DBoundingBox.
Parameters:
xmin
The min x value
xmax
The max x value
ymin
The min y value
ymax
The max y value
o CAT2DBoundingBox
public CAT2DBoundingBox( const bs)
Creates a BoundingBox from a 2DBoundingSphere. You get the smallest Box containing the circle.
Parameters:
bs
The 2DboundingSphere tou construct the box from.
o ~CAT2DBoundingBox
public virtual ~CAT2DBoundingBox()

Methods


o GetCenter
public GetCenter()
Returns the Bounding Box center.
Returns:
The 2DBoundingBox center.
o GetParameter
public GetParameter( xmin,
xmax,
ymin,
ymax)
Retrieves the BoundingBox parameters.
Parameters:
xmin
The returned xmin.
xmax
The returned xmax
ymin
The returned ymin
ymax
The returned ymax.
o GetSizeMM
public GetSizeMM()
Returns the 2DBoundingBox size in milimmeters.
Returns:
The size in mm of the 2DBoundingBox. A non zero value means the object this box is attached too will have that size on the screen whatever the zoom value is.
o operator *=
public operator *=( const iMatrix)
Multiplication assignment operator.
Parameters:
iMatrix
The tranform to apply to the boundingbox.
Returns:
The 2DBoundingBox resulting from this transformation.
o operator +=
public operator +=( const bbox)
Addition assignment operator.
Parameters:
bbox
The boundingbox to add.
Returns:
The 2DBoundingBox resulting from this transformation
o operator =
public operator =( const bbox)
Assignment operator.
Parameters:
bbox
The 2DBoundingBox to assign to the current one.
Returns:
The 2DBoundingBox resulting from the assignment.

This object is included in the file: CAT2DBoundingBox.h
If needed, your Imakefile.mk should include the module: CATVisFoundation

Copyright © 1999-2015, Dassault Systèmes. All rights reserved.