C3D Toolkit  Kernel - 117982, Vision - 2.9.2.2
VSN::SizeF Class Reference

SizeI class describes a size and uses an floating precision. More...

#include <vsn_size.h>

Public Member Functions

 SizeF ()
 Default constructor that creates invalid size, i.e. IsValid() returns false.
 
 SizeF (const SizeI &sz)
 Constructor with setting size width and height with integer precision.
 
 SizeF (float w, float h)
 Constructor with setting size width and height with floating precision.
 
bool IsNull () const
 Returns true if width and height are 0.0 otherwise returns false.
 
bool IsEmpty () const
 Returns true if width and height are less than or equal to 0 otherwise returns false.
 
bool IsValid () const
 Returns true if width and height are greater than or equal to 0 otherwise returns false.
 
float GetWidth () const
 Returns width.
 
float GetHeight () const
 Returns height .
 
void SetWidth (float w)
 Sets width.
 
void SetHeight (float h)
 Sets height.
 
float & InitWidth ()
 Returns reference to width.
 
float & InitHeight ()
 Returns reference to height.
 
SizeFoperator+= (const SizeF &)
 Adds the specified size to this size and returns reference to this size.
 
SizeFoperator-= (const SizeF &)
 Subtracts the given size from this size and returns reference to this size.
 
SizeFoperator*= (float c)
 Multiplies width and height by the given value, and returns reference to size.
 
SizeFoperator/= (float c)
 Divides width and height by the given divider and returns reference to size.
 

Friends

bool operator== (const SizeF &, const SizeF &)
 Returns true if the specified size and this one are equal otherwise returns false.
 
bool operator!= (const SizeF &, const SizeF &)
 Returns true if the specified size and this one are different otherwise returns false.
 
const SizeF operator+ (const SizeF &, const SizeF &)
 Returns sum of the specified size and this one. Each component is added separately.
 
const SizeF operator- (const SizeF &, const SizeF &)
 Returns difference between this size and the specified one. Each component is subtracted separately.
 
const SizeF operator* (const SizeF &, float)
 Multiplies the given size by the given value and returns result.
 
const SizeF operator* (float, const SizeF &)
 Multiplies the given size by the given value and returns result.
 
const SizeF operator/ (const SizeF &, float)
 Divides the given size by the given divider and returns result.
 

Detailed Description

SizeI class describes a size and uses an floating precision.

SizeI class defines a width and height. It can be initialized in constructor or changed with SetWidth(), SetHeight() functions, and also uses the arithmetic operators. SizeI can be managed directly changing its values by receiving the references to width and heights. The width and height can be initialized with functions or with constructor. IsValid() method defines the correct size: the correct size must have a width and height greater than 0. IsEmpty() function returns true if the width and height are less than or equal to 0, and IsNull() function returns true if the width and height are 0.


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